Skip to content

Commit 379030c

Browse files
committed
fix(v6_migration): copy edits
1 parent fa8c1bd commit 379030c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/docs/configuration/v6_migration.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ A few plugins have been removed due to being replaced with core Neovim functions
153153

154154
The biggest change for AstroLSP is the migration to using `vim.lsp.config` as the backend for language server configuration. In general, this doesn't change all that much of the configuration. The `config` and `handlers` tables can still be used for configuring language server options as well as how they are actually enabled, but now each table has a `["*"]` key for defining defaults. Below is a walk through of each major configuration change:
155155

156-
- `config["*"]` is now used for the default language server options which in turn call `vim.lsp.config("*", config_table)`. Previously this was done with separate `capabilities` and `flags` tables at the root of the AstroLSP opts. If you have anything in the `capabilities` or `flags` tables, they should be moved to `config["*"].capabilities` and `config["*"].flags` respectively.
156+
- `config["*"]` is now used for the default language server options which in turn calls `vim.lsp.config("*", config_table)`. Previously this was done with separate `capabilities` and `flags` tables at the root of the AstroLSP opts. If you have anything in the `capabilities` or `flags` tables, they should be moved to `config["*"].capabilities` and `config["*"].flags` respectively.
157157

158158
```lua title="lua/plugins/astroui_default_config.lua" del={5-12} ins={13-24}
159159
return {
@@ -184,7 +184,7 @@ The biggest change for AstroLSP is the migration to using `vim.lsp.config` as th
184184
}
185185
```
186186

187-
- The `handlers` table default handler is no longer done through the first entry with no key which blended list like and dictionary like tables. This is now done with the `"*"` key. This makes it clearer to the user which handler is the global one and cleaner to define. The other change is the default handler is now `vim.lsp.enable` by default. Lastly, handler functions here simply provide the server name as a parameter and no longer pass in the server options. Users should use the new `vim.lsp.config[server_name]` built in Neovim LSP API for accessing the resolved language server configuration table.
187+
- The `handlers` table default handler is no longer done through the first entry with no key which blended list-like and dictionary-like tables. This is now done with the `"*"` key. This makes it clearer to the user which handler is the global one and cleaner to define. The other change is the default handler is now `vim.lsp.enable` by default. Lastly, handler functions here simply provide the server name as a parameter and no longer pass in the server options. Users should use the new `vim.lsp.config[server_name]` built in Neovim LSP API for accessing the resolved language server configuration table.
188188

189189
```lua title="lua/plugins/astroui_default_handler.lua" del={6-8} ins={9-14}
190190
return {
@@ -206,7 +206,7 @@ The biggest change for AstroLSP is the migration to using `vim.lsp.config` as th
206206
}
207207
```
208208

209-
- `require("astrolsp").lsp_opts(server_name)` function has been removed, users should replace all usages with `vim.lsp.config[server_name]`. This typically comes up when configuring language server specific plugins. For migration of language server specific plugins, you should also verify with each plugin to make sure they have support for the new `vim.lsp.config` APIs and Neovim v0.11+. Some plugins that are no longer actively maintained may still rely on old `nvim-lspconfig` APIs that are no longer available. Be sure to check out the update [Advanced LSP Setup Documentation](/recipes/advanced_lsp).
209+
- `require("astrolsp").lsp_opts(server_name)` function has been removed, users should replace all usages with `vim.lsp.config[server_name]`. This typically comes up when configuring language server specific plugins. For migration of language server specific plugins, you should also verify with each plugin to make sure they have support for the new `vim.lsp.config` APIs and Neovim v0.11+. Some plugins that are no longer actively maintained may still rely on old `nvim-lspconfig` APIs that are no longer available. Be sure to check out the updated [Advanced LSP Setup Documentation](/recipes/advanced_lsp).
210210

211211
- Previously we had a relatively undocumented configuration table for `mason_lspconfig` which allowed hot patching mason-lspconfig to recognize packages that didn't define their language servers. This is no longer necessary as the Mason Registry maintenance has been improved and the registry provides the mapping to language servers rather than `mason-lspconfig` maintaining the mapping. This configuration table and functionality has been removed, if you happen to use it you should remove all usages.
212212

0 commit comments

Comments
 (0)