I have an existing Lazyvim based Neovim config, from a non-NixOS Distro, for the most part, my Neovim configuration works fine, i.e. Syntax highlighting, etc.
This is what I have been doing so far: (using home manager) & Symlinking my nvim config directory
{
home-manager.users.usr = { pkgs, ... }: {
home.file = {
nvimconfigdir = {
enable = true;
source = "/etc/nixos/pkg/neovim/data/nvim/";
target = ".config/nvim";
recursive = true;
};
projecthistory = {
enable = true;
source = "/etc/nixos/pkg/neovim/data/project_history";
target = ".local/share/nvim/project_nvim/project_history";
};
};
programs.neovim = {
enable = true;
withNodeJs = true;
withPython3 = true;
extraPackages = [
pkgs.vimPlugins.mason-lspconfig-nvim
pkgs.vimPlugins.mason-tool-installer-nvim
pkgs.marksman pkgs.cargo
pkgs.vimPlugins.mason-lspconfig-nvim
pkgs.lua-language-server
];
viAlias = true;
vimAlias = true;
};
};
}
However, I noticed my LSP servers weren’t working properly & I had to add some packages in extraPackages
to stop Mason Compilation errors from constantly showing
I recently checked my :LspInfo
& :LspLog
& noticed that my LSP clients/ servers weren’t even working, they often had some errors about NixOS dynamically linked exe’s, or weren’t reporting info on their status
I realised that this was caused by NixOS’s lack of FHS & dynamically linked library caveats
TLDR I realised that you cant use LSP stuff OOTB on NixOS, whats the best way to get my existing config working again? What are all of my options?
FYI, i’ve been using Mason for all of my LSP stuff, I also dont want to do too much work like having to reconfigure everything or stop using a neovim distro like Lazyvim