mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
Upstream still documents the now-deprecated `require("lspconfig").<name>.setup` mechanism. I believe the modern alternative is to register a `LspAttach` autocmd. For more context, see: - https://github.com/lukas-reineke/lsp-format.nvim/issues/98 - https://github.com/lukas-reineke/lsp-format.nvim/pull/99
79 lines
1.4 KiB
Nix
79 lines
1.4 KiB
Nix
{
|
|
legacy-empty = {
|
|
plugins.lsp.enable = true;
|
|
plugins.lsp-format.enable = true;
|
|
};
|
|
|
|
legacy-example = {
|
|
plugins = {
|
|
lsp = {
|
|
enable = true;
|
|
|
|
servers.gopls = {
|
|
enable = true;
|
|
onAttach.function = ''
|
|
x = 12
|
|
'';
|
|
};
|
|
};
|
|
|
|
lsp-format = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
go = {
|
|
exclude = [ "gopls" ];
|
|
order = [
|
|
"gopls"
|
|
"efm"
|
|
];
|
|
sync = true;
|
|
force = true;
|
|
|
|
# Test the ability to provide extra options for each filetype
|
|
someRandomOption = 42;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
empty = {
|
|
plugins.lspconfig.enable = true;
|
|
plugins.lsp-format.enable = true;
|
|
};
|
|
|
|
none = {
|
|
plugins.lspconfig.enable = true;
|
|
plugins.lsp-format = {
|
|
enable = true;
|
|
lspServersToEnable = "none";
|
|
};
|
|
};
|
|
|
|
example = {
|
|
plugins = {
|
|
lspconfig.enable = true;
|
|
lsp.servers.gopls.enable = true;
|
|
|
|
lsp-format = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
go = {
|
|
exclude = [ "gopls" ];
|
|
order = [
|
|
"gopls"
|
|
"efm"
|
|
];
|
|
sync = true;
|
|
force = true;
|
|
|
|
# Test the ability to provide extra options for each filetype
|
|
someRandomOption = 42;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|