2022-03-01 15:22:59 +01:00
|
|
|
lua << EOF
|
|
|
|
local lsp = require("lspconfig")
|
|
|
|
local utils = require("ambroisie.utils")
|
|
|
|
|
2022-03-01 15:23:42 +01:00
|
|
|
-- C/C++
|
|
|
|
if utils.is_executable("clangd") then
|
|
|
|
lsp.clangd.setup({
|
|
|
|
on_attach = utils.on_attach,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2022-03-01 15:22:59 +01:00
|
|
|
-- Python
|
|
|
|
if utils.is_executable("pyright") then
|
|
|
|
lsp.pyright.setup({
|
|
|
|
on_attach = utils.on_attach,
|
|
|
|
})
|
|
|
|
end
|
2022-03-01 15:23:20 +01:00
|
|
|
|
|
|
|
-- Rust
|
|
|
|
if utils.is_executable("rust-analyzer") then
|
|
|
|
lsp.rust_analyzer.setup({
|
|
|
|
on_attach = utils.on_attach,
|
|
|
|
})
|
|
|
|
end
|
2022-03-01 15:22:59 +01:00
|
|
|
EOF
|