Configure custom LSP using filetype plugin #1956
sagikazarmark
started this conversation in
General
Replies: 1 comment 1 reply
-
This is now fixed in #1981 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to configure
rnix
LSP server (supported by nvim-lspconfig).I installed the
rnix-lsp
binary manually (it's not supported by nvim-lsp-installer and added the following toconfig.lua
:Unfortunately that didn't work, so based on the documentation I added this:
This seemed to work.
The next thing I tried is adding the the configuration to filetype plugin based on the configuration at
$LUNARVIM_CONFIG_DIR/after/ftplugin/nix.lua
(which I translated to~/.config/lvim/after/ftplugin/nix.lua
based on the code):That seemed to work fine.
The reason why I wanted to write this down is because it wasn't immediately obvious how to do this (eg
require("lvim.lsp.manager")
vsrequire("lspconfig")
or how to resolve$LUNARVIM_CONFIG_DIR
), so hopefully this will help others and it's searchable on GitHub.Ultimately, this should probably go into the documentation. Most of the information is available in different places, a single guide might be better.
An interesting piece of information: there is a plan to Support ALL THE LSP.
I'm not completely sure if this is the right way to do it, so if you spot something wrong, please let me know.
It's also unclear whether using
require("lspconfig")
directly is a good idea (although it's referenced in the documentation) or whyrequire("lvim.lsp.manager")
wouldn't work (although looking at the code, it seems some kind of "provider" is missing?).Beta Was this translation helpful? Give feedback.
All reactions