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
Copy file name to clipboardExpand all lines: src/content/docs/configuration/v6_migration.mdx
+126-8Lines changed: 126 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Each "Migrating" section below has an link to documentation and/or an example co
76
76
77
77
The [plugin configuration files.](https://github.com/AstroNvim/AstroNvim/tree/main/lua%2Fastronvim%2Fplugins) in the AstroNvim codebase itself are also a good reference to learn how to configure.
78
78
79
-
**Please also read the [Other Breaking Changes section](#other-breaking-changes)** - there are a number of changes that are not just "move some config from one place to another". For example, _TODO_
79
+
**Please also read the [Other Breaking Changes section](#other-breaking-changes)** - there are a number of changes that are not just "move some config from one place to another". For example, updating default plugins to new releases with breaking changes which may require configuration changes if the user has modified them.
80
80
81
81
If you get stuck, people on the [Discord](https://discord.astronvim.com/) forum are active and friendly! Like all humans, sometimes they are grumpy, so be nice to them! The best place to post is most likely the `#help-forum`, but poke around a few of the other channels, you never know what you will find that is useful.
82
82
@@ -99,11 +99,12 @@ A few plugins have been updated to a new name due to changes in the plugin repos
99
99
100
100
A few plugins have been removed due to being replaced with core Neovim functions or no longer support the new Neovim APIs.
|`JoosepAlviste/nvim-ts-context-commentstring`| Not necessary in Neovim v0.11+ and built in commenting |
105
+
|`folke/neoconf.nvim`| Does not support `vim.lsp.config`|
106
+
|`kevinhwang91/nvim-ufo`| Replaced with built in `foldexpr`|
107
+
|`RRethy/vim-illuminate`| Replaced with `snacks.words` module in `folke/snacks.nvim`|
107
108
108
109
#### Details
109
110
@@ -116,9 +117,102 @@ A few plugins have been removed due to being replaced with core Neovim functions
116
117
117
118
- Configuration of Treesitter features in Neovim. With the latest development of the `nvim-treesitter` plugin, the plugin has moved to simply being a download utility for treesitter parsers and it is up to the user to configure treesitter features such as highlighting and folding. This also applies to `nvim-treesitter-textobjects` which now is simply a plugin that provides an API for manually creating key mappings. AstroCore has added a new `treesitter` module to help aid with this and can be configured through the plugin configuration `opts`. This configuration table includes the ability to configure both `nvim-treesitter` and `nvim-treesitter-textobjects` in a similar format to how they were configured before. If you have custom configuration for either plugins you will need to migrate those plugin configurations to AstroCore. For more details, checkout the new [Treesitter Configuration Documentation](/recipes/treesitter)
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:
159
+
160
+
-`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.
- 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.
-- If you need the LSP options for a server use `vim.lsp.config` table
204
+
-- This is useful for cases of setting up language server specific plugins
205
+
localopts=vim.lsp.config[server]
206
+
vim.lsp.enable(server)
207
+
end,
208
+
},
209
+
},
210
+
}
211
+
```
212
+
213
+
-`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).
214
+
215
+
- 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.
122
216
123
217
#### AstroUI
124
218
@@ -127,7 +221,31 @@ A few plugins have been removed due to being replaced with core Neovim functions
127
221
### Other Breaking Changes
128
222
129
223
- Drop support for Neovim v0.9
224
+
-`nvim-treesitter/nvim-treesitter` has been updated to the new (and default) `main` branch with the latest rewrite and development. Verify that user installed treesitter based plugins are updated to use this new version rather than the removed module system of the previous `nvim-treesitter` release.
225
+
-`nvim-treesitter/nvim-treesitter-textobjects` has been updated to the new (and default) `main` branch. This refactors it to no longer be a module for `nvim-treesitter`. If you are doing configuration of this plugin in your user configuration, make sure to follow the AstroCore changes detailed above.
226
+
-`mason-org/mason-lspconfig.nvim` has been updated to v2 which utilizes the new `vim.lsp.config` APIs as well as Mason packages self registering as language servers. Make sure language server specific plugins are not reliant on `mason-lspconfig` v1 if they have any sort of integration.
227
+
-`:LspInfo`, `:LspLog`, `:LspStart`, `:LspRestart`, `:LspStop` commands from `nvim-lspconfig` are removed in Neovim v0.12 and are replaced with the built in `:lsp` command (`:h lsp-commands`). If you are using these commands in your configuration make sure to update them accordingly.
130
228
131
229
### New Features
132
230
133
-
- TODO
231
+
- Full adoption of `vim.lsp.config` which includes support for configuring language servers with `lsp/<server_name>.lua` (`:h lsp-config` for more details)
232
+
- Migration to using `winborder` Neovim option for specifying window border settings. This provides a single option for choosing to remove borders from floating windows.
0 commit comments