rust-analyzer
This commit is contained in:
parent
02fd943224
commit
6198f8c63a
2 changed files with 13 additions and 6 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
vscode-langservers-extracted
|
vscode-langservers-extracted
|
||||||
gopls
|
gopls
|
||||||
nil
|
nil
|
||||||
|
rust-analyzer
|
||||||
];
|
];
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
vim-surround
|
vim-surround
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,26 @@
|
||||||
-- Setup language servers.
|
-- Setup language servers.
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
lspconfig.tsserver.setup {
|
local on_attach = function(client)
|
||||||
on_attach = function(client)
|
require'completion'.on_attach(client)
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
lspconfig.tsserver.setup {
|
||||||
|
on_attach = on_attach
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig.eslint.setup {
|
lspconfig.eslint.setup {
|
||||||
on_attach = function(client)
|
on_attach = on_attach
|
||||||
client.server_capabilities.documentFormattingProvider = true
|
}
|
||||||
end
|
|
||||||
|
lspconfig.rust_analyzer.setup {
|
||||||
|
on_attach = on_attach
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig.gopls.setup {}
|
lspconfig.gopls.setup {}
|
||||||
lspconfig.nil_ls.setup {}
|
lspconfig.nil_ls.setup {}
|
||||||
|
lspconfig.rust_analyzer.setup {}
|
||||||
|
|
||||||
-- Use LspAttach autocommand to only map the following keys
|
-- Use LspAttach autocommand to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue