2021-12-16 02:15:56 -06:00
|
|
|
local lsp_installer = require("nvim-lsp-installer")
|
|
|
|
lsp_installer.on_server_ready(function(server)
|
2021-12-16 05:35:15 -06:00
|
|
|
local opts = {
|
2021-12-25 00:21:52 -06:00
|
|
|
-- Coq configuration, ensure coq actual has capabilties shown
|
2021-12-16 05:35:15 -06:00
|
|
|
capabilities = require("coq").lsp_ensure_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
2021-12-16 02:15:56 -06:00
|
|
|
}
|
2021-12-25 00:21:52 -06:00
|
|
|
|
2021-12-25 00:36:45 -06:00
|
|
|
-- In the scenario we're using rust it makes more sense to use rust-tools
|
2021-12-25 00:21:52 -06:00
|
|
|
-- see: https://github.com/williamboman/nvim-lsp-installer/wiki/Rust
|
2021-12-25 00:36:45 -06:00
|
|
|
--
|
|
|
|
-- NOTE: Requires rust_analyzer
|
2021-12-16 05:35:15 -06:00
|
|
|
if server.name == "rust_analyzer" then
|
|
|
|
require("rust-tools").setup{
|
|
|
|
server = vim.tbl_deep_extend("force", server:get_default_options(), opts),
|
|
|
|
}
|
|
|
|
server:attach_buffers()
|
|
|
|
else
|
2021-12-25 00:21:52 -06:00
|
|
|
-- I use ansible a lot, define exceptions for servers that can use
|
|
|
|
-- server:setup & vim.cmd at the bottom here
|
2021-12-23 10:32:57 -06:00
|
|
|
if server.name == "ansiblels" then
|
|
|
|
opts.settings = {
|
|
|
|
ansible = {
|
|
|
|
ansible = {
|
|
|
|
path = "ansible"
|
|
|
|
},
|
|
|
|
ansibleLint = {
|
|
|
|
enabled = true,
|
|
|
|
path = "ansible-lint"
|
|
|
|
},
|
|
|
|
python = {
|
|
|
|
interpreterPath = "python3"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
2021-12-16 05:35:15 -06:00
|
|
|
server:setup(opts)
|
2021-12-23 10:32:57 -06:00
|
|
|
vim.cmd [[ do User LspAttachBuffers ]]
|
2021-12-16 05:35:15 -06:00
|
|
|
end
|
2021-12-16 02:15:56 -06:00
|
|
|
end)
|
2021-12-16 05:35:15 -06:00
|
|
|
|