You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.
After updating my config to the new recommended method (not using on_server_ready, I'm having issues with any language server installed by nvim-lsp-installer.
❯ ls
gopls nvim-lsp-installer-receipt.json
~/.local/share/nvim/lsp_servers/gopls ❯
This is not specific to just gopls, but any language server installed.
Relevant nvim config:
use({
"williamboman/nvim-lsp-installer",
config = function()
require("nvim-lsp-installer").setup({
automatic_installation = true,
})
end,
})
use({
"neovim/nvim-lspconfig",
config = function()
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = false }
vim.api.nvim_set_keymap("n", "<space>e", "<cmd>lua vim.diagnostic.open_float({focus=false})<CR>", opts)
vim.api.nvim_set_keymap("n", "<space>q", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
vim.api.nvim_buf_set_keymap(
bufnr,
"n",
"<space>wa",
"<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>",
opts
)
vim.api.nvim_buf_set_keymap(
bufnr,
"n",
"<space>wr",
"<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>",
opts
)
vim.api.nvim_buf_set_keymap(
bufnr,
"n",
"<space>wl",
"<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>",
opts
)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
-- aerials.nvim
local aerial = require("aerial")
aerial.setup({
show_guides = true,
})
aerial.on_attach(client, bufnr)
end
-- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
local lspconfig = require("lspconfig")
lspconfig.gopls.setup({ on_attach = on_attach, capabilities = capabilities })
lspconfig.pyright.setup({ on_attach = on_attach, capabilities = capabilities })
lspconfig.sumneko_lua.setup({
on_attach = on_attach,
capabilities = capabilities,
settings = {
Lua = {
version = "LuaJIT",
diagnostics = {
globals = { "vim", "describe", "it", "before_each", "after_each", "pending" },
},
},
},
})
lspconfig.yamlls.setup({
on_attach = on_attach,
capabilities = capabilities,
settings = {
yaml = {
schemas = { ["https://json.schemastore.org/taskfile.json"] = "Taskfile.yaml" },
},
},
})
end,
})
Neovim version (>= 0.6)
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.7.0/share/nvim"
Run :checkhealth for more info
Operating system/version
Darwin seans-mbp.lan 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Yes
Affected language servers
all
Actual behavior
nvim-lsp-installer reports language server installer, but complains it cannot find the executable when attaching to a buffer.
Problem description
After updating my config to the new recommended method (not using
on_server_ready
, I'm having issues with any language server installed by nvim-lsp-installer.This is not specific to just
gopls
, but any language server installed.Relevant nvim config:
Neovim version (>= 0.6)
Operating system/version
Darwin seans-mbp.lan 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Affected language servers
all
Actual behavior
nvim-lsp-installer reports language server installer, but complains it cannot find the executable when attaching to a buffer.
Expected behavior
the language server starts correctly.
LspInstallInfo output
The text was updated successfully, but these errors were encountered: