Simple language server exploration for a previously build sphinx extension called 'source code linker'.
This is a small project to learn more about LSP's and maybe implement it into a real world use.
Currently this is the MVP with very simple logic and internals. Missing tests etc.
Currently I only tested it crudely on Neovim (0.10+). Though plugins/integration for VSCode and Neovim are planned.
Here is how you can implement it in neovim.
- Download the right tar for you here
- Extract the tar at a location convenient for you
tar -xf scl_ls_Linux_x86_64.tar.gz -C /home/dev/LSP/scl_ls- Inside your init.lua or whever you load your configuration add the following:
local client = vim.lsp.start_client {
name = "scl_lsp",
cmd = { "<path to the binary>" },
priority = 1, -- low priority as to not disturb other 'real' LSP's
}
if not client then
vim.notify("couldn't start scl_lsp")
return
end
vim.api.nvim_create_autocmd("FileType", {
pattern = '*', -- Change this to any file type you want, or keep it as is to enable the LSP in all files
callback = function()
vim.lsp.buf_attach_client(0, client)
end,
})It can publish diagnostics as errors or warnings. It looks like this:

If you have a 'need' it knows defined, it can go to the definition of said need inside of your sphinx documentation (rst files)
It has completion suggestions for template strings and needs it knows (from the needs.json)
Very simple logging inside the LSP.
Currently there is quiet some things missing I would like to integrate into this LSP.
-
More & better tests
-
Better Documentation (of everything, inside and outside the code)
-
VSCode integration (via a plugin)
-
Better Neovim integration (plugin?)
-
Persitent Datastorage (maybe sqlite3 db or so?)
-
Debouncing of spaming messages (Diagnostics mainly)
-
Further improvements based on feedback