DATAVIEW alternatives in nvim #713
Dardanos-Aeolus
started this conversation in
Cookbook
Replies: 1 comment 2 replies
-
I like that this approach is understandable and easy for most folks to extend. The closest I've found to dataview in Neovim is dynomark and it's plugin, but it's written in Go and I'm not familiar with that language. I agree that a dataview alternative is sorely needed! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody,
Lots of people use DATAVIEW as a plugin in Obsidian.
I haven't found some similar for Neovim.
So I wanted to start a discussion and give a starting point for people, who are inexperienced like me :-)
(I know this is somewhat hacky - please improve and comment if you can )
1. A simple customised telescope prompt
A telescope prompt could be an alternative for very simple Dataview usage.
So for example I want to have a list of all my notes with active projects.
These have a frontmatter with:
in init.lua:
projekt_liste_picker = function() require("telescope.builtin").live_grep({ cwd="/path/to/your/vault", -- this is the regex search with two keywords default_text="type: project.*status: open", -- I like normal mode, so I can go up/down with j/k quickly initial_mode = "normal", vimgrep_arguments={ "rg", "--color=never", "-l", -- list matching file only fonce -- I don't want templates to show, so I exclude these here: "--iglob=!templates", "--no-heading", "--multiline", "--multiline-dotall", "--with-filename", "--line-number", "--column", "--smart-case", } })
2. A Python Script
Now this is much better :-D
Same application: I want to have a list with active projects.
Here it is written into a md-file inside my vault adding additional metadata.
Setup of python:
OUTPUT:
For easier acces I have in my init.lua:
of course you could do the same with autocmd
3. Further ideas:
(Look into pandas.DataFrame.from_dict)
Obviously
#tags
are not taken into consideration, but Dataview looks for them, too.Beta Was this translation helpful? Give feedback.
All reactions