Replies: 1 comment
-
Yes, I think that would make sense to support this. If you want to implement this, I think you could use the {
"title": "Selection content",
"uri":"file:///Users/mickael/notes/9se3.md",
"range": {
"end":{"line": 5, "character":149},
"start":{"line": 5, "character":137}
}
} This is not part of the LSP specification, but it's JSON so we might as well use the extensibility it offers. Once this is implemented server-side, we need a command in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ZkInsertLinkAtSelection
allows to link an existing note without changing the selected text. I was wondering if it's possible to extend this functionality to the new note creation as well. I.e. select a text, create a new note with a specific title, and link it to the selected text without replacing it with a note's title likeZkNewFromTitleSelection
does.Does this use case make sense? If so, would it be possible to add a new
ZkNewFromSelection
command or add an option to the existing command that would not replace a selected text with the note's title? I believe there is such an option inZkInsertLinkAtSelection
.What I tried as a workaround
I was trying to hack a workaround for this by using
zk.new
to create a note and then callingzk.link
on it with an option to not replace the selection. Butzk.link
requires a note's path, which, although is returned from a server after creating a note, gets ignored on nvim side. I am assuming it's because the request is async and the only way to get the response back is through a callback, which doesn't make sense in that context. Anyway, it looks like the cleanest way would be to actually change this behavior on the server side.I am curious to hear your thoughts on this. If you think this is a useful feature to have, I'd be happy to take a stab at this. Just not sure which path to take: change this on the server side by extending the
zk.new
command or somehow tap into the response from the LSP server on nvim side, or something else entirely.Beta Was this translation helpful? Give feedback.
All reactions