-
Verify
How can we help you?I am trying to solve issue #41 using render-markdown.nvim. Currently, it supports concealing wikilinks. But by default I found a way to get title by using cli Is there way to get note's title knowing it's id by using lsp? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
In which context are you wanting to "get" the note's title? The notes title is exposed in some way as mentioned in that same issue: #41 (comment) But I'm guessing that's not working for you / not in the right direction. But yeah, unfortunately I'm not completely understanding what you're needing, where you need it and how it should be implemented for render-markdown.nvim (I'm not familiar with this plugin). |
Beta Was this translation helpful? Give feedback.
-
@kirasok Does it not suffice to just use the notes title as the link title? Which is default behaviour. Or use a template for it. |
Beta Was this translation helpful? Give feedback.
I wanted to conceal wikilinks, and neovim doesn't conceal them. I found render-markdown.nvim plugin but it only conceals wikilinks with custom title, which is not the case for me. So I decided to make a fork that adds support of getting title from language server.
For this, I was looking how to get note's title by knowing note's id within neovim. I knew neovim gets diagnostics from
zk lsp
but I didn't know what function I should use.I haven't found what I was looking for but I managed to get diagnostics with
vim.diagnostic.get()
. Then within markdown handler of render-markdown.nvim I compared node's position with provided diagnostics, and then displayed the message.