This repo is a basic implementation of a lsp for zettelkasten markdown files
- ✔️ Support for link completion for type
[[link here]]
. - 🚧 Clickable links inside
[[..]]
. - ✔️ Support for file content preview in completion (with onCompletionResolve).
- 🚧 Hover option on clickable links, in order to preview the file.
- 🚧 Support tag completions with
#
character (needs a grammar).
git clone https://github.com/lsp-zettelkasten/lsp-zettelkasten.git
cd lsp-zettelkasten/server
npm install
npm run compile
After compiling, the compiled javascript will be in out
directory.
The command to start the lsp is node out/server.js --stdio
.
However, you'll need a working client for your text editor.
- Neovim (using lspconfig)
~/.config/nvim/init.lua
local lspconfig = require'lspconfig'
local configs = require'lspconfig/configs'
if not lspconfig.zettelkastenlsp then
configs.zettelkastenlsp = {
default_config = {
cmd = {'node', 'path/to/lsp-zettelkasten/out/server.js', '--stdio'};
filetypes = {'markdown'};
root_dir = function(fname)
return lspconfig.util.find_git_ancestor(fname) or vim.loop.os_homedir()
end;
settings = {};
};
}
end
lspconfig.zettelkastenlsp.setup{}