You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
781 B
Lua

local on_attach = require'keybindings'.on_attach
-- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local lspconfig = require('lspconfig')
-- SERVERS
-- rust_analyzer
vim.g.rustfmt_autosave = 1
lspconfig.rust_analyzer.setup{
on_attach = on_attach,
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
procMacro = {
enable = true,
},
checkOnSave = {
command = 'clippy',
extraArgs = { "--", "-W", "clippy::pedantic" }
},
}
}
}
lspconfig.gopls.setup {
on_attach = on_attach,
capabilities=capabilities,
}
-- clangd
lspconfig.clangd.setup{
on_attach = on_attach,
capabilities = capabilities,
}