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
@@ -7,9 +7,9 @@ LSP configuration is mostly done through the help of [AstroLSP](https://github.c
7
7
8
8
## Configuring Language Servers
9
9
10
-
Our main tool for configuring and setting up language servers is with the [nvim-lspconfig plugin](https://github.com/neovim/nvim-lspconfig). This plugin provides configurations for many common language servers (A full list can be found in [nvim-lspconfig server configurations documentation](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md)). These baseline configuration options are not always sufficient to meet everyone's needs. For the complete set of options that can be used when configuraing language servers, check out `:h lsp-config` in your editor.
10
+
Our main tool for configuring and setting up language servers is with the [nvim-lspconfig plugin](https://github.com/neovim/nvim-lspconfig). This plugin provides configurations for many common language servers (A full list can be found in [nvim-lspconfig server configurations documentation](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md) or `:h lspconfig-all`). These baseline configuration options are not always sufficient to meet everyone's needs. For the complete set of options that can be used when configuraing language servers, check out `:h lsp-config` in your editor.
11
11
12
-
AstroLSP automatically enables language servers installed through Mason and for servers specified manually (See [LSP Setup Without Installer](#lsp-setup-without-installer)). Neovim allows for easy language server customization within the `lsp/` folder in the root of your configuration (Check out `:h lsp-config`). While the `lsp/` directory is the recommended way to configurat language servers, AstroLSP also provides a simple `config` table in the plugin's options for extending the built in server configurations provided by `nvim-lspconfig`. This can be helpful if you want to conditionally make modifications in your plugin configuration.
12
+
AstroLSP automatically enables language servers installed through Mason and for servers specified manually (See [LSP Setup Without Installer](#lsp-setup-without-installer)). Neovim allows for easy language server customization within the `after/lsp/` folder in the root of your configuration (Check out `:h lsp-config`). While the `after/lsp/` directory is the recommended way to configurat language servers, AstroLSP also provides a simple `config` table in the plugin's options for extending the built in server configurations provided by `nvim-lspconfig`. This can be helpful if you want to conditionally make modifications in your plugin configuration.
13
13
14
14
```lua title="lsp/clangd.lua"
15
15
return {
@@ -325,7 +325,7 @@ Many of these can be found pre-configured in the [AstroNvim Community Repository
325
325
326
326
:::
327
327
328
-
There are some plugins available for doing advanced setup of language servers that require the user to not use the `lspconfig` setup call and instead use their own plugin setup for handling this. AstroNvim provides a nice way to do this while still using `mason.nvim` for installing the language servers. You can use the `setup_handlers` table for specifying how language servers should be setup such as using a language specific plugin. This function for each handler has two parameters, the first is the name of the server and the second is the options we would be passing to the `lspconfig` setup call. These options include things such as our built in `capabilities`, `on_attach`, as well as the user defined options in the `config` table. Here are a couple examples for some common LSP plugins:
328
+
There are some plugins available for doing advanced setup of language servers that require the user to not use the `lspconfig` setup call and instead use their own plugin setup for handling this. AstroNvim provides a nice way to do this while still using `mason.nvim` for installing the language servers. You can use the `handlers` table for specifying how language servers should be setup such as using a language specific plugin. This function for each handler can take a single parameter which is the name of the server. The current lsp configuration settings can be retried with `vim.lsp.config[server_name]`. These options include things such as our built in `capabilities`, `on_attach`, as well as the user defined options in and `lsp/<server_name>.lua` and `after/lsp/<server_name>.lua` files the `config` table. Here are a couple examples for some common LSP plugins:
To conditionally enable `tsserver`/`denols` based on the presence of `package.json`/`deno.json`, add the following plugin specs:
386
+
To conditionally enable `tsserver`/`denols` based on the presence of `package.json`/`deno.json`, put the following LSP definitions in your `after/lsp/` directory:
0 commit comments