I am a new user to neovim, so I know a tiny bit about lsp, I dont know where to get started for getting rust-analyzer working with neovim, if anyone can point me in the right direction or give me a config, much appreciated. I mean configure it with PURE nix.
Fixed, use this config (and add rust-analyzer to systemPackages):
neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
nvim-lspconfig
];
extraLuaConfig = ''
require'lspconfig'.rust_analyzer.setup{
settings = {
['rust-analyzer'] = {
diagnostics = {
enable = false;
}
}
}
}
'';
};
Which nix based configuration did you choose for this?
Though anyway, I would not recommend going “pure nix”, as as soon as you have to go beyond the limits of the chosen configuration framework, you have to understand neovims lua config anyway, also you will need a good understanding of the framework then and know how to extend it.
A good starter is usually to just write lua using programs.neovim.configure
in NixOS or programs.neovim.extra
(Lua
)Config
.
You could also wrap neovim yourself with a configuration and basically create your own frameowrk or just write lua that way. Though thats usually a more advanced topic.
So once you have choosen the framework and told us which that is, I am pretty sure there will be someone who is able to help you with that particular framework.