Closed lhoffjann closed 1 year ago
Indeed. The simplest way of doing that would be to add a custom action to the picker, so when you do not find what you are looking for, you can just do ctrl+n
and it will automatically close the search and call create_new_note
.
Maybe it is also possible to get the search query and pre-fill the filename as well (not sure).
What do you think?
Sounds good to me :+1: having the pre-fill option would be awesome, because otherwise you have to type the same thing twice. I would really like to help with the implementation and I am currently trying to get a better understanding about the code. But my impression is that I first have to understand what planery and telescope is doing before I can contribute in a meaningful way.
Planery is basically a set of libraries. We mostly use it for path manipulation.
Understanding a bit Telescope is definitely useful, especially if you are playing with the pickers (as it is the case here). But it is not "mandatory". Lots of small stuff on the side are not directly related to it (regex, uuids, link formatting/parsing, etc).
I managed to enable ctrl-n
to create a new note if not found. no need to type the same thing twice, the new note name is pre-filled.
I am going to post a PR, however, since I am very unfamiliar to post a PR, just need sometime to look up GH docs. The problem I met currently is my nvim config have different ident tab than this repo, which make every line different.
I am going to post a PR, however, since I am very unfamiliar to post a PR, just need sometime to look up GH docs. The problem I met currently is my nvim config have different ident tab than this repo, which make every line different.
Awesome! I think you can check "allow commits from maintainers" when posting a PR. Check that and I will do the formatting myself before merging if you want.
I am going to post a PR, however, since I am very unfamiliar to post a PR, just need sometime to look up GH docs. The problem I met currently is my nvim config have different ident tab than this repo, which make every line different.
Awesome! I think you can check "allow commits from maintainers" when posting a PR. Check that and I will do the formatting myself before merging if you want.
See #230 , kindly help to merge it.
Describe the solution you'd like I would like to be able to create a new note directly out of the search query. I often times double check if my Zettelkasten already has a note where I can append the stuff I want to write down. If there is no note that seems to fit I currently have to close the find view and execute the
create_new_note
function. It's not that big of a deal but would make my workflow smoother.