working fennel-ls wowsa
This commit is contained in:
parent
708e0fec3a
commit
a90219e7cd
|
@ -505,22 +505,6 @@ in
|
||||||
format = lspkind.cmp_format({
|
format = lspkind.cmp_format({
|
||||||
mode = 'symbol_text',
|
mode = 'symbol_text',
|
||||||
maxwidth = 50,
|
maxwidth = 50,
|
||||||
-- old format
|
|
||||||
-- format = function(entry, vim_item)
|
|
||||||
-- -- fancy icons and a name of kind
|
|
||||||
-- vim_item.kind = require("lspkind").presets.default[vim_item.kind] ..
|
|
||||||
-- " " .. vim_item.kind
|
|
||||||
-- -- set a name for each source
|
|
||||||
-- vim_item.menu = ({
|
|
||||||
-- buffer = "[Buffer]",
|
|
||||||
-- nvim_lsp = "[LSP]",
|
|
||||||
-- look = "[Look]",
|
|
||||||
-- path = "[Path]",
|
|
||||||
-- spell = "[Spell]",
|
|
||||||
-- calc = "[Calc]",
|
|
||||||
-- })[entry.source.name]
|
|
||||||
-- return vim_item
|
|
||||||
-- end
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
|
@ -625,11 +609,20 @@ in
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
|
||||||
|
|
||||||
|
-- fennel-ls is bleeding edge
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua', 'fennel-ls' }
|
require("lspconfig.configs")["fennel-ls"] = {
|
||||||
|
default_config = {
|
||||||
|
cmd = {"fennel-ls"},
|
||||||
|
filetypes = {"fennel"},
|
||||||
|
root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end,
|
||||||
|
settings = {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua'}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
|
@ -640,12 +633,20 @@ in
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
-- rnix doesn't support gps
|
-- rnix doesn't support gps
|
||||||
require('lspconfig').rnix.setup {
|
lspconfig['rnix'].setup {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
format.on_attach(client)
|
format.on_attach(client)
|
||||||
end,
|
end,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
|
-- fennel-ls doesn't support gps
|
||||||
|
lspconfig['fennel-ls'].setup {
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
format.on_attach(client)
|
||||||
|
end,
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
|
|
||||||
-- deprecated pylsp
|
-- deprecated pylsp
|
||||||
-- require('lspconfig').pylsp.setup {
|
-- require('lspconfig').pylsp.setup {
|
||||||
-- on_attach = function(client, bufnr)
|
-- on_attach = function(client, bufnr)
|
||||||
|
|
Loading…
Reference in a new issue