Skip to content

[Help] How can I get title knowing note's id with LSP? #191

Answered by kirasok
kirasok asked this question in Help
Discussion options

You must be logged in to vote

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.

# index

- [[rigo|fir…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@kirasok
Comment options

Answer selected by tjex
@tjex
Comment options

Comment options

You must be logged in to vote
1 reply
@kirasok
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants