[migration] Nvim 0.8 Support
NeoVim 0.8 stable was released two days ago and introduced tons of changes, which would cause multiple plugins to have outdated configurations. However, changing these configurations (or adding new features) will certainly affect users who do not have the ability to update to version 0.8 (e.g., Treesitter [nvim-treesitter/nvim-treesitter#3365], Lspsaga [*#241]). Therefore, we may need to provide two simultaneously maintained configuration files. The current proposal is as follows:
- File Hierarchy:
[BRANCH] main/
├── .github
├── .gitignore
├── latest/
│ └── lua/
│ └── [[V0.8 Specific / Latest Configs]]
├── legacy/
│ └── lua/
│ └── [[Backward Compatibility]]
├── LICENSE
├── README.md
├── format_disabled_dirs.txt
├── init.lua
└── stylua.toml
-
init.lua(at root)
local init_path = debug.getinfo(1, "S").source:sub(2)
local base_dir = init_path:match("(.*[/\\])"):sub(1, -2)
local function append_rtp(dir)
if not vim.tbl_contains(vim.opt.rtp:get(), dir) then
vim.opt.rtp:append(dir)
end
end
if not vim.g.vscode then
if vim.version().minor < 8 then -- neovim 0.7 or lower compatibility
append_rtp(base_dir .. "/legacy")
else
append_rtp(base_dir .. "/latest")
end
require("core")
end
Besides, many plugins have provided new features specific to 0.8 (such as the generic highlight method of Treesitter and Symbol in Winbar of Lspsaga). Some changes are necessary since they would lead to incorrect behavior (such as the highlight of catppuccin), while others are optional (such as clickable widgets of dapui). This will be collected and discussed below.
-
MANDATORY CHANGES
- [x] Highlight integration for
catppuccin<==> https://github.com/ayamir/nvimdots/pull/243 - [x] #251
- [x] #250 <==> https://github.com/ayamir/nvimdots/pull/252
- [ ] #248
- [x] Highlight integration for
-
NEW FEATURES
- [x] Symbol in Winbar for
lspsaga<==> https://github.com/ayamir/nvimdots/commit/f11d867c831ce26326d4d4a6ff4e2ef2158872fc - [x] Control widgets of
dapui<==> https://github.com/ayamir/nvimdots/pull/244 - [x] Refactor
install script<==> https://github.com/ayamir/nvimdots/pull/245
- [x] Symbol in Winbar for
@ayamir Shall we discuss the feasibility of the current proposal and make changes when appropriate?
I prefer to use different branches to do this, then 0.8 will be merged into main. Because 0.7 or 0.8 or even 0.9 will be legacy, maintaining all of their specific configs is unrealistic, We'd better keep config with latest nvim version.
In fact, I encountered some minor problems with 8.0 branch, for example:
lualine often refreshes when the cursor moves, and I noticed that when it refreshes, it shows the gps information provided by lspsaga.
In fact, I encountered some minor problems with 8.0 branch, for example:
lualineoften refreshes when the cursor moves, and I noticed that when it refreshes, it shows thegpsinformation provided bylspsaga.
My fault, fixed at a48a36df5903f815607a280c27403b933f5a4037
In fact, I encountered some minor problems with 8.0 branch, for example:
lualineoften refreshes when the cursor moves, and I noticed that when it refreshes, it shows thegpsinformation provided bylspsaga.My fault, fixed at a48a36d
It works fine now! Thanks for ayamir's effort!
Sorry, one more question. I found that configuration in branch 0.8 will cause the problem that:
There is a noticeable stutter in the cursor movement, probably due to some configuration slowing it down. In contrast, with the previous configuration there is no such feeling at all.This would be an important issue.
Maybe it caused by lspsaga symbol method. link
@jczhang02 It seems like there is a problem with upstream support for Winbar. Current suggestion is to temporarily disable related features 😕.
@Jint-lzxy Have u experienced this issue?
yep, everything went fine after I switched to navic again 👍 . @jczhang02
I think maybe it's time to merge 0.8 into main, the rest of new options is less important, and our commits for 0.8 will bring a lot of exciting features and bug fix.
We're all set 🎉
@Jint-lzxy Have u encounted the problem that metioned in comment.