Neovim LSP Components: How They Work Together
Component Overview
nvim-lspconfig
Purpose: Provides pre-configured setups for 200+ language servers
- Contains default configurations for each language server
- Exposes a simple API:
require('lspconfig').server_name.setup(config)
mason-lspconfig
Purpose: Bridges Mason package manager with nvim-lspconfig
- Automatically calls
setup() for language servers installed by Mason
- Maps Mason package names to lspconfig server names
AstroLSP
Purpose: Unified configuration interface for LSP in AstroNvim
- Provides a single location to configure all LSP settings
- Some configuration tables:
servers: List servers not auto-handled by mason-lspconfig
config: Default configurations passed to servers setup() calls
Neovim LSP Components: How They Work Together
Component Overview
nvim-lspconfig
Purpose: Provides pre-configured setups for 200+ language servers
require('lspconfig').server_name.setup(config)mason-lspconfig
Purpose: Bridges Mason package manager with nvim-lspconfig
setup()for language servers installed by MasonAstroLSP
Purpose: Unified configuration interface for LSP in AstroNvim
servers: List servers not auto-handled by mason-lspconfigconfig: Default configurations passed to serverssetup()calls