I’m not really familiar with that plugin. What I can tell you, is that our example configuration works fine when installed via vim-plug, packer.nvim, or paq.
Thats quite possible. I’m able to install the LSP servers using :LspInstall command. I think I will start with a fresh configuration. Thanks for the responses!
It looks like you are using a mix of vimscript and lua… like me while I move things to lua over time. That said, make sure you init.vim or whatever you are using as an entry point to your configuration loads the plugins first. My hybrid config is sensitive to making sure I only depend on lspconfig once it has been loaded.
That need, introduces an issue of how to share the on_attach and capabilities properties. This is required because anytime you write to setup you overwrite the previous value; no merging, just overwrite.
Here are a couple of snippets that may be of use. Others please feel free to comment/improve.
" ------------------------------------------------------------------------------
" ~/dotfiles/init.vim
" symlinked to: ~/.config/nvim/config/init.vim
" last updated: June 7, 2023
" ------------------------------------------------------------------------------
" Note: Sequence of sourcing matters.
" ------------------------------------------------------------------------------
source $HOME/dotfiles/nvim-plugins.vim
source $HOME/dotfiles/nvim-functions.vim
source $HOME/dotfiles/nvim-other.vim
" Lua files
source $HOME/dotfiles/nvim-mason.lua
" -- non-lsp plugin configs
source $HOME/dotfiles/nvim-cmp-npm.lua
source $HOME/dotfiles/nvim-lualine.lua
source $HOME/dotfiles/nvim-cmd.lua
source $HOME/dotfiles/nvim-treesitter.lua
" -- lspconfig is defined here
source $HOME/dotfiles/nvim-lsp.lua
" -- require lspconfig
source $HOME/dotfiles/nvim-rust-tools.lua
source $HOME/dotfiles/nvim-yamlls.lua
source $HOME/dotfiles/nvim-tsserver.lua
source $HOME/dotfiles/nvim-eslint.lua
" -- bindings (also see .config/nvim/lua/user for handlers and env
source $HOME/dotfiles/nvim-bindings.vim
source $HOME/dotfiles/nvim-emoji-bindings.vim
source $HOME/dotfiles/nvim-typo-db.vim
" Options written in lua
source $HOME/dotfiles/nvim-options.lua
Where I setup lspconfig and where I require lspconfig I also import the env and handlers to include in the setup
// lua/user/env
local M = {}
M.capabilities = require("cmp_nvim_lsp").default_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
return M
Similarly, I have a handlers module for specifying the shared keybindings for the lsp features.