When setting up Language Server Protocol on Neovim, what plugins do what can be pretty confusing. So this table is a list of the most common plugins people use and what they are and why they are.
Plugin | Role | Why? |
---|---|---|
lspconfig | Configuring the language servers | You can use neovim's built in vim.lsp.start() function, but often we don't know all the command line arguments and options needed to pass to that function, so lspconfig is really just a database of a bunch of configurations for lsps |
mason | Installing language servers | Mason will automatically download and install the actual language server programs. This is optional because if you install an LSP server in your $PATH manually you don't necessarily need this |
mason-lspconfig | Automatically setting up lsps when you install them | This glues lspconfig and mason together, So when an lsp is configured the setup function for it will be automatically called, not necessary if you want to manage your LSPs manually |
nvim-cmp | Autocompletion plugin | This provides the infrastructure for powering all autocompletion in neovim. This of this as a meta-plugin, other plugins will add sources and other capabilities to this so they appear in the completion menu |