Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: nvim v0.10 support #1260

Merged
merged 86 commits into from
Jul 1, 2024
Merged

feat!: nvim v0.10 support #1260

merged 86 commits into from
Jul 1, 2024

Conversation

ayamir
Copy link
Owner

@ayamir ayamir commented May 20, 2024

There are few problems need to be solved.

  • Error when open a lua file firstly.
image image

Nvim 0.10 changes are in here: https://neovim.io/doc/user/news-0.10.html

ClSlaid and others added 30 commits May 23, 2023 16:24
* feat: implement inlay virtual text for rust and go

Signed-off-by: 蔡略 <[email protected]>

* fix: go-nvim use lsp-inlayhints.nvim only

Signed-off-by: 蔡略 <[email protected]>

* refactor: move inlay-hints to `completion`

Signed-off-by: 蔡略 <[email protected]>

* feat: lua support

Signed-off-by: 蔡略 <[email protected]>

* chore(inlay-hints): remove `sumneko_lua`

* fix: set inlay-hints debug mode off

Signed-off-by: 蔡略 <[email protected]>

---------

Signed-off-by: 蔡略 <[email protected]>
Co-authored-by: Charles Chiu <[email protected]>
Signed-off-by: ayamir <[email protected]>
* workaroud for watchfile problem

* fix CI
@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Jun 26, 2024

I've rewritten the wiki, could you please check it?

tho i just casted an eye on it, but it looks great! tks for your effort!

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Jun 26, 2024

https://lazy.folke.io/news

lazy.nvim just released it's 11.x version.
Maybe we need to take a look at it?
Especially this part:

Spec Resolution & Merging: the code that resolves a final spec from a plugin's fragments has been rewritten. This should be a tiny bit faster, but more importantly, fixes some issues and is easier to maintain.

@misumisumi
Copy link
Collaborator

misumisumi commented Jun 26, 2024

I'm sorry it's so close to release...

Now, nixos support allows you to choose whether or not to place lazy-lock.json under nix management.
If you put it under management, it will be difficult for users to update it, but you can control it more strictly.

As an intermediate method for this, you can place lazy-lock.json managed by nix as lazy-lock.nix.json in $XDG_CONFIG_DIR/nvim, and use lazy-lock.json when changing the configuration. I think it is possible to provide an option to copy to json.
The advantage is that lazy.nvim makes it easy to update and add plugins.
The disadvantage is that even if you obtain a newer version locally, it will overwrite the lazy-lock.json that is managed by nix.

Do you have any good thoughts on this?

@misumisumi
Copy link
Collaborator

misumisumi commented Jun 26, 2024

Spec Resolution & Merging: the code that resolves a final spec from a plugin's fragments has been rewritten. This should be a tiny bit faster, but more importantly, fixes some issues and is easier to maintain.

At least the user settings part does not depend on lazy.nvim, so I don't think it will be a problem.
I took a look at the relevant commit, and I think the reason for this is that maintenance has become easier because parts of the processing are now managed in separate files.,

@Jint-lzxy
Copy link
Collaborator

I've finished revising the FAQ; it should now include more information for expert users 🤠

@Jint-lzxy
Copy link
Collaborator

Finished adding some tips on locating keymaps within the editor :D

@Jint-lzxy
Copy link
Collaborator

Finally made up my mind to redo the dependencies diagram lol it really sucks in its own way, given the MANY changes since my last update (thanks to my own laziness lmao 💀).

@Jint-lzxy
Copy link
Collaborator

Jint-lzxy commented Jun 26, 2024

lazy.nvim just released it's 11.x version. Maybe we need to take a look at it? Especially this part:

Spec Resolution & Merging: the code that resolves a final spec from a plugin's fragments has been rewritten. This should be a tiny bit faster, but more importantly, fixes some issues and is easier to maintain.

@CharlesChiuGit Just checked it out, but I don't think we need to make any changes. It affects how lazy.nvim internally merges plugin specs, whereas our merging happens even before lazy.nvim is loaded lol

@Jint-lzxy
Copy link
Collaborator

Do you have any good thoughts on this?

@misumisumi How about creating a sym / hard link?

@misumisumi
Copy link
Collaborator

misumisumi commented Jun 26, 2024

How about creating a sym / hard link?

My idea is ...

Now,

.
├── init.lua -> /nix/store/foobar-home-manager-files/.config/nvim/init.lua
├── lazy-lock.json -> /nix/store/foobar-home-manager-files/.config/nvim/lazy-lock.json
├── lua -> /nix/store/foobar-home-manager-files/.config/nvim/lua
├── snips -> /nix/store/foobar-home-manager-files/.config/nvim/snips
└── tutor -> /nix/store/foobar-home-manager-files/.config/nvim/tutor

change,

{
  # actualy, provide as option
  home.activation.lazyLockActivatioinAction = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
    cp ${config.xdg.configHome}/nvim/lazy-lock.nix.json ${config.xdg.configHome}nvim/lazy-lock.json
  '';
}
.
├── init.lua -> /nix/store/foobar-home-manager-files/.config/nvim/init.lua
├── lazy-lock.nix.json -> /nix/store/foobar-home-manager-files/.config/nvim/lazy-lock.json
├── lazy-lock.json
├── lua -> /nix/store/foobar-home-manager-files/.config/nvim/lua
├── snips -> /nix/store/foobar-home-manager-files/.config/nvim/snips
└── tutor -> /nix/store/foobar-home-manager-files/.config/nvim/tutor

This is not something that is urgent, so there is no problem if you pass it up for now.

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Jun 26, 2024

cp ${config.xdg.configHome}/nvim/lazy-lock.nix.json ${config.xdg.configHome}nvim/lazy-lock.json

lol i finally knew what u meant.
yeah, i think it's a nice way to keep track of the upstream changes while keeping the flexibility to lazy.nvim.
it's just few line changes in the code and some in the doc. i think we can put this in before this pr got merged.

* feat(nixos): add copyLazyLock option

* fix(nixos): fix code style

accepted modification proposed by nixd
see more nix's code style best practice below url
https://nix.dev/guides/best-practices

* fix(nixos): rename copyLazyLock to mergeLazyLock

* fix(nixos): fix discription
@misumisumi
Copy link
Collaborator

add #1310's discription to wiki

CharlesChiuGit and others added 4 commits July 1, 2024 09:09
* migrate(cmp): `cmp_nvim_lsp` capabilities API update

* feat(cmp): make `<CR>` safer
* feat&refactor: make format timeout configurable, refactor format-related
options.

* chore(settings): set `format_modifications_only` to `false` to prevent possible ci issues

Signed-off-by: Charles Chiu <[email protected]>

* fix: set timeout for null-ls considering range format capability.

this commit also revert the settings structure b/c we can refactor it in
another PR.

* fixup: fix ci.

* fix: remove redundant notification.

* fixup: fix notify logic and CI.

* fixup: merge judgements.

Co-authored-by: jint_lzxy_ <[email protected]>
Signed-off-by: Mohu <[email protected]>

* fixup: remove redundant judge.

* docs: more accurate comment note.

Co-authored-by: jint_lzxy_ <[email protected]>
Signed-off-by: ayamir <[email protected]>

* fix: wrong require source.

Co-authored-by: jint_lzxy_ <[email protected]>
Signed-off-by: ayamir <[email protected]>

---------

Signed-off-by: Charles Chiu <[email protected]>
Signed-off-by: Mohu <[email protected]>
Signed-off-by: ayamir <[email protected]>
Co-authored-by: Charles Chiu <[email protected]>
Co-authored-by: jint_lzxy_ <[email protected]>
@Jint-lzxy Jint-lzxy marked this pull request as ready for review July 1, 2024 02:07
@Jint-lzxy
Copy link
Collaborator

I'm currently drafting a release note lol

@Jint-lzxy
Copy link
Collaborator

Do u guys accord to add our configuration to neovimcraft? It would help promote it as well lol

Copy link
Collaborator

@Jint-lzxy Jint-lzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! The draft release note can be previewed here.

@CharlesChiuGit
Copy link
Collaborator

the link seems to be private?
image

@Jint-lzxy
Copy link
Collaborator

the link seems to be private?

Oops, I thought collaborators should be able to view that. Anyway, here it is lol

Draft Release Note (Markdown)

## SUMMARY
This release is **not** backwards-compatible since Neovim 0.10 [has been officially released](https://github.com/neovim/neovim/releases/tag/v0.10.0). While many changes have occurred since the last release, here are a few notable ones:
- The license has officially been changed to the [BSD 3-Clause License](https://www.tldrlegal.com/license/bsd-3-clause-license-revised). It allows you almost unlimited freedom with the software so long as you include the BSD copyright and license notice in it.
- The install scripts **no longer** support Neovim 0.7, and that branch is no longer maintained. The 0.8 branch is also deprecated.
- The [LSP inlay hints](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint) feature has been implemented and is enabled by default. Disable it in your user settings by specifying `settings["lsp_inlayhints"] = false`.
- The wiki pages and `dotstutor` have been significantly updated. Check them out!
- NixOS support has been extensively refactored. Refer to the [wiki](https://github.com/ayamir/nvimdots/wiki/NixOS-Support) page [and](https://github.com/ayamir/nvimdots/pull/1250) [relevant](https://github.com/ayamir/nvimdots/pull/1212) [PRs](https://github.com/ayamir/nvimdots/pull/1310) for details.
- Performance restrictions for Treesitter have been relaxed, as incremental parsing is now supported in 0.10. Please kindly report any performance issues encountered, as testing has been limited to a few devices.
- The built-in completion engine has updated its completion parameters. See #1279 for details.
- [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) will now provide completion results from the texts in all opened buffers.
- Go development experience has been greatly improved. See #1226 for details.
- Horizontal terminals will no longer obscure [nvim-tree](https://github.com/nvim-tree/nvim-tree.lua).
- `<C-e>` for open-in-place inside [nvim-tree](https://github.com/nvim-tree/nvim-tree.lua) has been disabled.
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) will no longer pre-select any items, and the selected candidate won't be completed by default until you've accepted it (e.g., by pressing `<CR>`).
- [trouble.nvim](https://github.com/folke/trouble.nvim) `v3` is supported.
- The icon library has been overhauled to support [dropbar.nvim](https://github.com/Bekaboo/dropbar.nvim).
- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) now provides support on a per-language basis. See #1283 for details.
- [LuaSnip](https://github.com/L3MON4D3/LuaSnip) now supports ECMAScript Regexes. Check the [wiki](https://github.com/ayamir/nvimdots/wiki/Issues#how-do-i-add-my-custom-snippets) for details.
- Format timeout is now configurable using `settings["format_timeout"]`.
- [advanced-git-search.nvim](https://github.com/aaronhallaert/advanced-git-search.nvim) and [search.nvim](https://github.com/FabianWirth/search.nvim) have been introduced, while [nvim-colorizer.lua](https://github.com/NvChad/nvim-colorizer.lua) has been replaced by [nvim-highlight-colors](https://github.com/brenoprata10/nvim-highlight-colors). Check out `:Tutor dots` for introductory tutorials on them!
> [!WARNING]  
> The keymaps for Telescope have been changed. See https://github.com/ayamir/nvimdots/pull/1303#issuecomment-2181965329 for the rationale behind this.

Check out the "What's Changed" section and the [tracking issue](https://github.com/ayamir/nvimdots/issues/1259) for minor updates.

## What's Changed
* feat: implement inlay virtual text for rust and go by @ClSlaid in https://github.com/ayamir/nvimdots/pull/759
* workaroud for watchfile problem by @fecet in https://github.com/ayamir/nvimdots/pull/871
* chore(neodim): remove pin commit (#1139 #1138) by @CharlesChiuGit in https://github.com/ayamir/nvimdots/pull/1142
* revert: reintroduce `diffview` and `wilder` by @ayamir in https://github.com/ayamir/nvimdots/pull/1216
* chore: cleanup and minor syntax improvements by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1217
* feat(cmp): more completion candidates from opened buffers. by @mjkx5 in https://github.com/ayamir/nvimdots/pull/1219
* chore(plugins): tidying up by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1221
* fix: use init for vim plugins config. by @ayamir in https://github.com/ayamir/nvimdots/pull/1222
* docs: mention the experimental nature of the 0.10 branch by @ayamir in https://github.com/ayamir/nvimdots/pull/1215
* fix(todo-comment): add missing keywords by @CharlesChiuGit in https://github.com/ayamir/nvimdots/pull/1225
* fix(options): remove options managed by `vim-sleuth` by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1229
* fix(rustaceanvim): use `init` for its config by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1231
* feat!: improve go development experience by @ayamir in https://github.com/ayamir/nvimdots/pull/1226
* fix: inlay_hint error by @Mythos-404 in https://github.com/ayamir/nvimdots/pull/1236
* fix(lualine): disable default separators for custom separator by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1233
* fix: prevent horizontal terminal from obscuring `nvim-tree` by @ayamir in https://github.com/ayamir/nvimdots/pull/1237
* pref: disable `<C-e>` for open-in-place inside nvim-tree by @ayamir in https://github.com/ayamir/nvimdots/pull/1238
* fix(lua_ls): disable diagnostics for undefined-field by @ayamir in https://github.com/ayamir/nvimdots/pull/1239
* feat(catppuccin): remove all styles of `@property` by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1240
* Improve nixos by @misumisumi in https://github.com/ayamir/nvimdots/pull/1212
* fix(dashboard_image): replace predefined dashboard_image with user defined image instead of extending it by @csyJoy in https://github.com/ayamir/nvimdots/pull/1244
* chore: minor patches by @CharlesChiuGit in https://github.com/ayamir/nvimdots/pull/1248
* fix: set cmp preselect to none. by @ayamir in https://github.com/ayamir/nvimdots/pull/1247
* Fix/nixos by @misumisumi in https://github.com/ayamir/nvimdots/pull/1250
* Fixed 'direrctory' typo in UI. by @Ohkthx in https://github.com/ayamir/nvimdots/pull/1254
* fix: set rustaceanvim version to ^4 by @mjkx5 in https://github.com/ayamir/nvimdots/pull/1261
* feat(events): make changes only locally for FileType autocmds by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1263
* chore: update install scripts for nvim 0.10 stable. by @ayamir in https://github.com/ayamir/nvimdots/pull/1271
* Update crates.nvim option name from `src` to `completion` by @fioncat in https://github.com/ayamir/nvimdots/pull/1272
* chore: replace deprecated apis by @ayamir in https://github.com/ayamir/nvimdots/pull/1266
* fix toggleterm auto-exit on Windows by @CharlesChiuGit in https://github.com/ayamir/nvimdots/pull/1267
* fix: utilize `ts-context` in `glance` preview window by @mjkx5 in https://github.com/ayamir/nvimdots/pull/1265
* Chore: unify the way when get option by @ayamir in https://github.com/ayamir/nvimdots/pull/1269
* fix(0.10): minor cleanup by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1276
* feat(scripts): update frequently used functions by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1277
* feat(docs): support v0.10 by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1278
* feat: support new options by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1279
* feat(trouble)!: v3 support by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1281
* refactor: overhaul the icon library by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1282
* feat(lsp): correctly configure diagnostic-signs by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1280
* feat: disable more plugins for RO (buf|file)types by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1284
* fix(alpha): cannot cast `string` to `integer` for winheight by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1285
* feat(ibl): support per-language indent config by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1287
* feat(ibl): more language nodes by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1288
* feat(luasnip): support ECMAScript regexes by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1291
* feat(core): use the lua API to set options by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1292
* feat: include several new plugins by @CharlesChiuGit in https://github.com/ayamir/nvimdots/pull/1235
* feat: better way to check if the (T|G)UI is running by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1297
* chore(global): cleanup legacy code by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1296
* feat: reduce the use of direct syscalls by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1294
* fix(events): avoid name clashes by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1295
* Feat/telescope collections keymaps by @CharlesChiuGit in https://github.com/ayamir/nvimdots/pull/1299
* fix(gitsigns): upstream breaking changes by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1300
* fix(core): missing leading path separator by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1301
* feat(treesitter): lessened performance restrictions by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1305
* feat(nixos): add mergeLazyLock option by @misumisumi in https://github.com/ayamir/nvimdots/pull/1310
* fix: cmp snippets source selecting issue by @CharlesChiuGit in https://github.com/ayamir/nvimdots/pull/1309
* fix(cmp): occasional inability to select completion items by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1315
* feat: credit all collaborators as copyright holders by @Jint-lzxy in https://github.com/ayamir/nvimdots/pull/1316
* feat: make format timeout configurable. by @ayamir in https://github.com/ayamir/nvimdots/pull/1275

## New Contributors
* @mjkx5 made their first contribution in https://github.com/ayamir/nvimdots/pull/1219
* @Mythos-404 made their first contribution in https://github.com/ayamir/nvimdots/pull/1236
* @Ohkthx made their first contribution in https://github.com/ayamir/nvimdots/pull/1254

**Full Changelog**: https://github.com/ayamir/nvimdots/compare/v3.6.0...v4.0.0

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Jul 1, 2024

i think this pr is ready to gooooo

@Jint-lzxy Jint-lzxy merged commit 5084976 into main Jul 1, 2024
4 checks passed
@Jint-lzxy Jint-lzxy deleted the 0.10 branch July 1, 2024 04:56
@Jint-lzxy
Copy link
Collaborator

Do u guys accord to add our configuration to neovimcraft? It would help promote it as well lol

Done! Check out rockerBOO/awesome-neovim#1238 🥳

This was referenced Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[migration] Nvim 0.10 Support replace vim.tbl_islist() with vim.islist() after NVIM v0.10.0-dev-2560
9 participants