lsp-zero? #523
-
|
I'm trying to match ThePrimeagen's setup from his "Neovim RC" video. He's got the lsp-zero plugin installed, is that possible to install with nixvim? I don't see it in the plugin options. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello ! You have two options:
programs.nixvim = {
extraPlugins = [pkgs.vimPlugins.lsp-zero-nvim];
extraConfigLua = ''
local lsp = require('lsp-zero').preset({})
lsp.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp.default_keymaps({buffer = bufnr})
end)
-- (Optional) Configure lua language server for neovim
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
lsp.setup()
'';
}; |
Beta Was this translation helpful? Give feedback.
Hello !
Currently we don't support lspzero. I don't think it is super useful because nixvim already does some of the work for you when you enable
plugins.nvim-cmpandplugins.lsp. For instance, thecapabilitiesstuff regarding thenvim_lspsource is already managed automatically.Also, enabling a specific server is as simple as doing
plugins.lsp.servers.anyServer.enable = true.This will also install it for you thanks to nixpkgs (so the
masonpart is useless).You have two options:
nvim-lspandnvim-cmp"manually" throughplugins.nvim-cmpandplugins.lsp. This is not that hard.You can have a look at my config as an example:
completion.nixlsp.nix.…