mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
Port lsp-format to use non-deprecated setup instructions
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
This commit is contained in:
parent
4016854bcc
commit
64cd675ece
2 changed files with 73 additions and 22 deletions
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
empty = {
|
||||
legacy-empty = {
|
||||
plugins.lsp.enable = true;
|
||||
plugins.lsp-format.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
legacy-example = {
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
|
@ -37,4 +37,43 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue