This commit is contained in:
ksyasuda
2022-05-16 23:52:25 -07:00
parent 8c30d6f1d6
commit 164aa942e0
7 changed files with 27 additions and 11 deletions

View File

@@ -184,10 +184,8 @@ lsp_installer.on_server_ready(function(server)
server:setup(DEFAULT_SETTINGS)
end)
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
-- local servers = { 'pyright', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'dotls', 'rust_analyzer', 'clangd', 'ansiblels' }
local servers = { 'jedi_language_server', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'dotls', 'rust_analyzer', 'clangd', 'ansiblels' }
local servers = { 'jedi_language_server', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'rust_analyzer', 'clangd', 'ansiblels' }
for _, lsp in pairs(servers) do
require('lspconfig')[lsp].setup {
on_attach = on_attach,
@@ -197,3 +195,5 @@ for _, lsp in pairs(servers) do
}
}
end
require 'lspconfig'.bashls.setup {}

View File

@@ -3,7 +3,7 @@ local helpers = require("null-ls.helpers")
require("null-ls").setup({
on_attach = function(client)
if client.resolved_capabilities.document_formatting then
if client.supports_method "textDocument/formatting" then
vim.cmd([[
augroup LspFormatting
autocmd! * <buffer>

View File

@@ -94,7 +94,7 @@ cmp.setup({
-- }
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
local lspconfig = require('lspconfig')
local servers = { 'bashls', 'pyright', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls' }
local servers = { 'bashls', 'jedi_language_server', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
-- on_attach = my_custom_on_attach,