Skip to content

Commit

Permalink
feat!: nvim v0.10 support (#1260)
Browse files Browse the repository at this point in the history
* feat: implement inlay virtual text for rust and go (#759)

* 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]>

* workaroud for watchfile problem (#871)

* workaroud for watchfile problem

* fix CI

* Merge branch 'main'

* chore(neodim): remove pin commit (#1142)

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

* fix: remove `specs.nvim` due to long time no update.

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

* Merge branch 'main' into 0.10

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

* refactor: use neovim native inlay-hint.

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

* fix(lsp): adapt to upstream API, eliminate warning.

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

* fix(plugins): add nvim-bqf.

* fix(go.nvim): adapt upstream api.

* feat(plugins): add dropbar.nvim for winbar.

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

* feat(settings): make enable_inlayhint configurable.

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

* fixup: check user input, improve robustness.

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

* fix(clangd): disable clangd for proto.

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

* fixup: clean redundant config files.

* fix(gopls): unify gopls config, allow user overrides.

* fixup: clean code.

* feat(clang_format): enable clang_format for cuda and protobuf.

* fix: inlay_hint error (#1236)

* Merge remote-tracking branch 'origin' into 0.10

* fix: lua_ls workspace settings.

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

* chore: upgrade to new api to judge if is a list.

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

* chore: use builtin grep_string to search selection.

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

* chore: general cleanup

Signed-off-by: Jint-lzxy <[email protected]>

* fix: `inlayhint` -> `inlayhints`

Signed-off-by: Jint-lzxy <[email protected]>

* fix(ts-autotag): update config format

* chore: use vim.uv in place of vim.loop.

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

* chore: use vim.iter():flattern in place of vim.tbl_flattern.

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

* chore: update install scripts for nvim 0.10 stable. (#1271)

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

* chore: replace deprecated apis (#1266)

* chore: use vim.lsp.get_clients in place of vim.lsp.get_active_clients.

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

* chore: use vim.lsp.get_clients in place of vim.lsp.buf_get_clients.

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

---------

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

* fix(toggleterm): use `""` instead of `nil` to fix auto-exit on Windows (#1267)

* fix: utilize `ts-context` in `glance` preview window (#1265)

* set ts-context floatterm zindex to 50 which greater than 45.

default zindex of glance [dnlhc/glance.nvim] floatterm is 45.
It can display on glance.

Signed-off-by: mjkx <[email protected]>

* set trim_scope to inner

Signed-off-by: mjkx <[email protected]>

* perf: add discription

---------

Signed-off-by: mjkx <[email protected]>
Co-authored-by: CharlesChiuGit <[email protected]>

* chore: use vim.o in place of vim.api.nvim_get_option_value. (#1269)

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

* fix(0.10): minor cleanup (#1276)

Signed-off-by: Jint-lzxy <[email protected]>

* feat(scripts): update frequently used functions (#1277)

I recently refactored my frequently used commands and
thought it would be great to also port that here lol

Signed-off-by: Jint-lzxy <[email protected]>

* feat(docs): support v0.10 (#1278)

* feat(docs): support v0.10

Signed-off-by: Jint-lzxy <[email protected]>

* fix instructions

Signed-off-by: Jint-lzxy <[email protected]>

---------

Signed-off-by: Jint-lzxy <[email protected]>

* fix(scripts): typo

Signed-off-by: Jint-lzxy <[email protected]>

* fixup! fix(scripts): typo

* feat(README): supports `0.9` -> `0.10`

Signed-off-by: Jint-lzxy <[email protected]>

* chore: cleanup

Signed-off-by: Jint-lzxy <[email protected]>

* fix(lualine): ensure all components are properly aligned

Signed-off-by: Jint-lzxy <[email protected]>

* unlock rustaceanvim

Signed-off-by: Jint-lzxy <[email protected]>

* feat(lsp): be protective

Signed-off-by: Jint-lzxy <[email protected]>

* fix: `neovim` -> `Neovim`

Signed-off-by: Jint-lzxy <[email protected]>

* Revert "fix(lualine): ensure all components are properly aligned"

This reverts commit 9be7ffe.

* feat: support new options (#1279)

Signed-off-by: Jint-lzxy <[email protected]>

* feat(trouble)!: v3 support (#1281)

* feat(trouble)!: v3 support

This PR includes the following changes:

- *REMOVED* all features unrelated to the original purpose of
  trouble.nvim, such as LSP References (Glance.nvim covers this) and
  qf-list preview (bqf handles this).

- Added a custom mapping for searching project diagnostics. This is
  slightly different from workspace diagnostics: one is defined by
  the language server itself (e.g., see LuaLS's documentation on workspace
  diagnostics), while the other is determined with assistance from Project.nvim.

- General cleanup: I deliberately excluded LspKind support from our
  config this time bc imho it's a feature we likely won't use and
  supporting it is a real hassle.

Signed-off-by: Jint-lzxy <[email protected]>

* fixup! Missing one option

* fix: invoke `utils.load_plugin`

Signed-off-by: Jint-lzxy <[email protected]>

---------

Signed-off-by: Jint-lzxy <[email protected]>

* refactor: overhaul the icon library (#1282)

This PR significantly updates the icon library by expanding its
content, removing duplicates, and organizing icons into more cohesive
groups.

I've also created a custom Dropbar config that uses these icons and
adds toggleterm support.

* fix typo

* Oops... Missing one icon

* fix: invoke `utils.load_plugin`

Signed-off-by: Jint-lzxy <[email protected]>

* feat(lsp): correctly configure diagnostic-signs (#1280)

Signed-off-by: Jint-lzxy <[email protected]>

* feat: disable more plugins for RO (buf|file)types (#1284)

Signed-off-by: Jint-lzxy <[email protected]>

* fix(alpha): cannot cast `string` to `integer` for winheight (#1285)

iirc this is deprecated

Signed-off-by: Jint-lzxy <[email protected]>

* feat(ibl): support per-language indent config (#1287)

* feat(ibl): support per-language indent config

Signed-off-by: Jint-lzxy <[email protected]>

* fixup! feat(ibl): support per-language indent config

---------

Signed-off-by: Jint-lzxy <[email protected]>

* feat(ibl): more language nodes (#1288)

* feat(ibl): more language nodes

Signed-off-by: Jint-lzxy <[email protected]>

* feat(ibl): even more language nodes

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

* chore(ibl): sorting

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

---------

Signed-off-by: Jint-lzxy <[email protected]>
Signed-off-by: Charles Chiu <[email protected]>
Co-authored-by: Charles Chiu <[email protected]>

* feat(luasnip): support ECMAScript regexes (#1291)

As per `:h luasnip-lsp-snippets-transformations`

Signed-off-by: Jint-lzxy <[email protected]>

* feat(core): use the lua API to set options (#1292)

Signed-off-by: Jint-lzxy <[email protected]>

* feat: include several new plugins (#1235)

* feat(cmp): more completion candidates from opened buffers. (#1219)

* buffer completion config

* opts -> option

* chore(lockfile): auto update lazy-lock.json

* chore(plugins): tidying up (#1221)

This commit mainly tweaks the loading events of some plugins to align with
upstream specifications. Additionally, there have been enhancements made to
certain documentation.

Signed-off-by: Jint-lzxy <[email protected]>

* fix(plugins): remove duplicate specifications

Signed-off-by: Jint-lzxy <[email protected]>

* fix: use `init` for vim plugins (#1222)

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

* chore(lockfile): auto update lazy-lock.json

* docs: mention the experimental nature of the 0.10 branch (#1215)

* docs: add note for 0.10 nightly branch in readme.

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

* chore(issue_template): add nightly warning

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

* chore(issue_tempate): linting

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

* docs: update readme for 0.10 branch.

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

* chore(issue_template): add nightly warning

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

* chore(issue_template): add nightly warning

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

---------

Signed-off-by: ayamir <[email protected]>
Signed-off-by: Charles Chiu <[email protected]>
Signed-off-by: Mohu <[email protected]>
Signed-off-by: Jint-lzxy <[email protected]>
Co-authored-by: Charles Chiu <[email protected]>
Co-authored-by: Jint-lzxy <[email protected]>

* fix(ISSUE_TEMPLATE): format code

Signed-off-by: Jint-lzxy <[email protected]>

* fix(README): misplaced content

Signed-off-by: Jint-lzxy <[email protected]>

* fix(todo-comment): add missing keywords (#1225)

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

* chore(lockfile): auto update lazy-lock.json

* fix(options): remove options managed by `vim-sleuth` (#1229)

Since all tab-related stuff is now managed by `vim-sleuth`, I think
it is better to remove the relevant options to avoid confusion.

Signed-off-by: Jint-lzxy <[email protected]>

* chore(lockfile): auto update lazy-lock.json

* fix(rustaceanvim): use `init` for its config (#1231)

Signed-off-by: Jint-lzxy <[email protected]>

* chore(lockfile): auto update lazy-lock.json

* feat!: improve go development experience (#1226)

* chore(go): replace vim-go with go.nvim.

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

* fix: install gopls by mason by default.

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

* feat(keymap): set `n|gi` to goto implementation.

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

* chore(keymap): use `gm` to jump to lsp implementations

Co-authored-by: 冷酔閑吟 <[email protected]>
Signed-off-by: Mohu <[email protected]>

* fixup: remove unused `map_cu`.

* chore: use gopls instead of null-ls to format.

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

* chore: add notes for config options.

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

* fixup: tidy settings for go.nvim and gopls.

* docs: update more notes for how to config go.nvim.

* chore: cleanup

Signed-off-by: Jint-lzxy <[email protected]>

* fix: enable only the options that are truly necessary

Signed-off-by: Jint-lzxy <[email protected]>

* fixup! chore: cleanup

* fix(gopls): invalid config entry

Signed-off-by: Jint-lzxy <[email protected]>

---------

Signed-off-by: ayamir <[email protected]>
Signed-off-by: Mohu <[email protected]>
Signed-off-by: Jint-lzxy <[email protected]>
Co-authored-by: 冷酔閑吟 <[email protected]>
Co-authored-by: neogtliu <[email protected]>

* feat!: add `advanced-git-search.nvim`

* feat!: add `search.nvim` to enhance `telescope`.

* feat: reorganize keymaps for telescope search collections.

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

* fixup: update descriptions for modified keymaps.

* chore: remove single diagnostic disable for undefined-field.

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

* chore: remove diagnostic disable for undefined-field.

* feat!: replace `colorizer.lua` with `nvim-highlight-colors`

* fix: invoke `utils.load_plugin`

Signed-off-by: Jint-lzxy <[email protected]>

* chore(advanced-git-search): remove unused options

Signed-off-by: Jint-lzxy <[email protected]>

* feat(telescope): add collection panel for `search.nvim`

* chore: typo

* feat: more documentation

Signed-off-by: Jint-lzxy <[email protected]>

* chore: clean up

* feat: don't hard-code collection names

* chore: use custom loader

* fix: disable warning

* fix: CI & cleanup

Signed-off-by: Jint-lzxy <[email protected]>

* Revert `lazy-lock.json`

Signed-off-by: Jint-lzxy <[email protected]>

* fix: make luaJIT happy

Signed-off-by: Jint-lzxy <[email protected]>

---------

Signed-off-by: Jint-lzxy <[email protected]>
Signed-off-by: ayamir <[email protected]>
Signed-off-by: Charles Chiu <[email protected]>
Signed-off-by: Mohu <[email protected]>
Co-authored-by: mjkx <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 冷酔閑吟 <[email protected]>
Co-authored-by: Mohu <[email protected]>
Co-authored-by: neogtliu <[email protected]>

* feat: better way to check if the (T|G)UI is running (#1297)

Signed-off-by: Jint-lzxy <[email protected]>

* chore(global): cleanup legacy code (#1296)

Signed-off-by: Jint-lzxy <[email protected]>

* feat: reduce the use of direct syscalls (#1294)

* feat: reduce the use of direct syscalls

Signed-off-by: Jint-lzxy <[email protected]>

* fix: typo

Signed-off-by: Jint-lzxy <[email protected]>

---------

Signed-off-by: Jint-lzxy <[email protected]>

* fix(events): avoid name clashes (#1295)

Signed-off-by: Jint-lzxy <[email protected]>

* Feat/telescope collections keymaps (#1299)

* feat(telescope): add some new plugins for `search.nvim`

* fixup: correct alpha-nvim config.

* feat: more resonable keymap, add notify to misc.

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

---------

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

* fix(gitsigns): upstream breaking changes (#1300)

See lewis6991/gitsigns.nvim@3d7e49c

Signed-off-by: Jint-lzxy <[email protected]>

* fix(core): missing leading path separator (#1301)

Signed-off-by: Jint-lzxy <[email protected]>

* Revert "Feat/telescope collections keymaps (#1299)" (#1302)

This reverts commit 93c06cd.

* Feat/telescope collections keymaps (#1303)

* feat(telescope): add some new plugins for `search.nvim`

* fixup: correct alpha-nvim config.

* feat: more resonable keymap, add notify to misc.

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

* revert: local cmp changes.

* fix: update alpha-nvim config.

* chore: update doc strings

Signed-off-by: Jint-lzxy <[email protected]>

* Update lua/modules/configs/ui/alpha.lua

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

* Update lua/modules/configs/ui/alpha.lua

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

* Update lua/modules/configs/ui/alpha.lua

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

* Update lua/modules/configs/ui/alpha.lua

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

* Update lua/modules/configs/ui/alpha.lua

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

* feat: update dotstutor.

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

* feat: correct several minor issues

Signed-off-by: Jint-lzxy <[email protected]>

* chore: cleanup

Signed-off-by: Jint-lzxy <[email protected]>

* feat!: mnemonic keymaps

Signed-off-by: Jint-lzxy <[email protected]>

---------

Signed-off-by: ayamir <[email protected]>
Signed-off-by: Jint-lzxy <[email protected]>
Signed-off-by: Mohu <[email protected]>
Co-authored-by: CharlesChiuGit <[email protected]>
Co-authored-by: Jint-lzxy <[email protected]>

* feat(treesitter): lessened performance restrictions (#1305)

* feat(treesitter): lessened performance restrictions

This commit lifts some of the performance restrictions previously imposed on
Treesitter when incremental parsing was not yet supported. Specifically:

Treesitter will now only be disabled by default for files exceeding 7,500 lines
or 2 MiB in size. Testing on an Intel i9-9880H with an APPLE SSD AP1024N shows
noticeable lag at these thresholds.

Signed-off-by: Jint-lzxy <[email protected]>

* fixup: return correct value.

---------

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

* chore: update plugin author's name

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

* feat(nixos): add `mergeLazyLock` option (#1310)

* 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

* fix: cmp snippets source selecting issue (#1309)

* migrate(cmp): `cmp_nvim_lsp` capabilities API update

* feat(cmp): make `<CR>` safer

* fix(cmp): occasional inability to select completion items (#1315)

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

* feat: credit all collaborators as copyright holders (#1316)

Signed-off-by: Jint-lzxy <[email protected]>

* feat: make format timeout configurable (#1275)

* 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]>

---------

Signed-off-by: 蔡略 <[email protected]>
Signed-off-by: ayamir <[email protected]>
Signed-off-by: Charles Chiu <[email protected]>
Signed-off-by: Jint-lzxy <[email protected]>
Signed-off-by: mjkx <[email protected]>
Signed-off-by: Mohu <[email protected]>
Signed-off-by: ayamir <[email protected]>
Co-authored-by: ClSlaid <[email protected]>
Co-authored-by: Charles Chiu <[email protected]>
Co-authored-by: Xie Zejian <[email protected]>
Co-authored-by: Jint-lzxy <[email protected]>
Co-authored-by: Mythos_404 <[email protected]>
Co-authored-by: mjkx <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: neogtliu <[email protected]>
Co-authored-by: MiSumiSumi <[email protected]>
  • Loading branch information
10 people authored Jul 1, 2024
1 parent fdda879 commit 5084976
Show file tree
Hide file tree
Showing 57 changed files with 1,534 additions and 594 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
_Before reporting:_ Search [existing issues](https://github.com/ayamir/nvimdots/issues) and check the [FAQ](https://github.com/ayamir/nvimdots/wiki/Issues). Thank you for helping us improve!
> [!IMPORTANT]
> The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
> The `0.11` branch is intended for nightly Neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
- type: checkboxes
id: is-latest-commit
attributes:
Expand Down Expand Up @@ -38,7 +38,7 @@ body:
attributes:
label: "Neovim version"
description: "Paste the output of `nvim --version` here"
placeholder: "NVIM v0.10.0-dev-873+g71ad771ea"
placeholder: "NVIM v0.11.0-dev-194+g6c7677e5d"
validations:
required: true
- type: input
Expand Down Expand Up @@ -69,16 +69,16 @@ body:
description: "Which branch are you currently on? If you are not sure, check the output of `git rev-parse --abbrev-ref HEAD`"
options:
- main (Default/Latest)
- 0.8 (Legacy)
- 0.7 (Deprecated)
- 0.10 (Nightly)
- 0.9 (Legacy)
- 0.8 (Deprecated)
- 0.11 (Nightly)
validations:
required: true
- type: dropdown
id: fetch-pref
attributes:
label: "Fetch Preferences"
description: "In what way do you fetch resources? If you are not sure, check the value of `use_ssh` in `lua/core/settings.lua`"
description: "In what way do you fetch resources? If you are not sure, check the value of `use_ssh` in `lua/user/settings.lua`"
options:
- SSH (use_ssh = true)
- HTTPS (use_ssh = false)
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/custom_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
_Before requesting:_ Make sure you've read through our [Wiki: Usage](https://github.com/ayamir/nvimdots/wiki/Usage) before you start to add things to nvimdots!
> [!IMPORTANT]
> The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
> The `0.11` branch is intended for nightly Neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
- type: checkboxes
id: is-latest-commit
attributes:
Expand All @@ -30,7 +30,7 @@ body:
attributes:
label: "Neovim version"
description: "Paste the output of `nvim --version` here"
placeholder: "NVIM v0.10.0-dev-873+g71ad771ea"
placeholder: "NVIM v0.11.0-dev-194+g6c7677e5d"
validations:
required: true
- type: dropdown
Expand All @@ -40,9 +40,9 @@ body:
description: "This issue template mainly targets `main` branch. Check the output of `git rev-parse --abbrev-ref HEAD` if you're not sure."
options:
- main (Default/Latest)
- 0.8 (Legacy)
- 0.7 (Deprecated)
- 0.10 (Nightly)
- 0.9 (Legacy)
- 0.8 (Deprecated)
- 0.11 (Nightly)
validations:
required: true

Expand Down
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/lsp_issue_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
_Before reporting:_ Search [existing issues](https://github.com/ayamir/nvimdots/issues) and check the [FAQ](https://github.com/ayamir/nvimdots/wiki/Issues). Thank you for helping us improve!
> [!IMPORTANT]
> The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
> The `0.11` branch is intended for nightly Neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
- type: checkboxes
id: is-latest-commit
attributes:
Expand Down Expand Up @@ -38,7 +38,7 @@ body:
attributes:
label: "Neovim version"
description: "Paste the output of `nvim --version` here"
placeholder: "NVIM v0.10.0-dev-873+g71ad771ea"
placeholder: "NVIM v0.11.0-dev-194+g6c7677e5d"
validations:
required: true
- type: input
Expand Down Expand Up @@ -69,16 +69,16 @@ body:
description: "Which branch are you currently on? If you are not sure, check the output of `git rev-parse --abbrev-ref HEAD`"
options:
- main (Default/Latest)
- 0.8 (Legacy)
- 0.7 (Deprecated)
- 0.10 (Nightly)
- 0.9 (Legacy)
- 0.8 (Deprecated)
- 0.11 (Nightly)
validations:
required: true
- type: dropdown
id: fetch-pref
attributes:
label: "Fetch Preferences"
description: "In what way do you fetch resources? If you are not sure, check the value of `use_ssh` in `lua/core/settings.lua`"
description: "In what way do you fetch resources? If you are not sure, check the value of `use_ssh` in `lua/user/settings.lua`"
options:
- SSH (use_ssh = true)
- HTTPS (use_ssh = false)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
- uses: actions/checkout@v4
- uses: lunarmodules/luacheck@v1
with:
args: . --std luajit --globals vim _toggle_lazygit _buf_vtext _command_panel _flash_esc_or_noh _debugging --max-line-length 150 --no-config
args: . --std luajit --globals vim _debugging _command_panel _flash_esc_or_noh _telescope_collections _toggle_lazygit --max-line-length 150 --no-config
41 changes: 25 additions & 16 deletions LICENSE
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
MIT License
BSD 3-Clause License

Copyright (c) 2021 ayamir
Copyright (c) 2022 Jint-lzxy, CharlesChiuGit
Copyright (c) 2023 aarnphm, misumisumi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<br>
<a href="https://github.com/neovim/neovim/releases/tag/stable">
<img
alt="NeoVim Version Capability"
src="https://img.shields.io/badge/Supports%20Nvim-v0.9-A6D895?style=for-the-badge&colorA=363A4F&logo=neovim&logoColor=D9E0EE">
alt="Neovim Version Capability"
src="https://img.shields.io/badge/Supports%20Nvim-v0.10-A6D895?style=for-the-badge&colorA=363A4F&logo=neovim&logoColor=D9E0EE">
</a>
<a href="https://github.com/ayamir/nvimdots/releases">
<img
Expand Down Expand Up @@ -36,23 +36,23 @@

## 🪷 Introduction

This repo hosts our [NeoVim](https://neovim.io/) configuration for Linux [(with NixOS support)](#nixos-support), macOS, and Windows. `init.lua` is the config entry point.
This repo hosts our [Neovim](https://neovim.io/) configuration for Linux [(with NixOS support)](#nixos-support), macOS, and Windows. `init.lua` is the config entry point.

Branch info:

<div align="center">

| Branch | Supported neovim version |
| Branch | Supported Neovim version |
| :----: | :----------------------: |
| main | nvim 0.9 stable |
| 0.10 | nvim 0.10 nightly |
| main | nvim 0.10 stable |
| 0.11 | nvim 0.11 nightly |
| 0.9 | nvim 0.9 |
| 0.8 | nvim 0.8 |
| 0.7 | nvim 0.7 |

</div>

> [!IMPORTANT]
> The `0.10` branch is intended for nightly neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
> The `0.11` branch is intended for nightly Neovim builds and is **not** stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.
We currently manage plugins using [lazy.nvim](https://github.com/folke/lazy.nvim).

Expand All @@ -61,14 +61,14 @@ Chinese introduction is [here](https://zhuanlan.zhihu.com/p/382092667).
### 🎐 Features

- **Fast.** Less than **30ms** to start (Depends on SSD and CPU, tested on Zephyrus G14 2022 version).
- **Simple.** Run out of the box.
- **Simple.** Runs out of the box.
- **Modern.** Pure `lua` config.
- **Modular.** Easy to customize.
- **Powerful.** Full functionality to code.

## 🏗 How to Install

Just run the following interactive bootstrap command, and you're good to go 👍
Simply run the following interactive bootstrap command, and you should be all set 👍

- **Windows** _(Note: This script REQUIRES `pwsh` > `v7.1`)_

Expand Down Expand Up @@ -197,14 +197,16 @@ It's strongly recommended to read [Wiki: Prerequisites](https://github.com/ayami
- [ayamir](https://github.com/ayamir)
- [Jint-lzxy](https://github.com/Jint-lzxy)
- [CharlesChiuGit](https://github.com/CharlesChiuGit)
- [aarnphm](https://github.com/aarnphm)
- [misumisumi](https://github.com/misumisumi)

## 🎉 Acknowledgement

- [glepnir/nvim](https://github.com/glepnir/nvim)

## 📜 License

This NeoVim configuration is released under the MIT license, which grants the following permissions:
This Neovim configuration is released under the BSD 3-Clause license, which grants the following permissions:

- Commercial use
- Distribution
Expand Down
2 changes: 1 addition & 1 deletion lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" },
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
}
}
19 changes: 14 additions & 5 deletions lua/core/event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ local autocmd = {}

function autocmd.nvim_create_augroups(definitions)
for group_name, definition in pairs(definitions) do
vim.api.nvim_command("augroup " .. group_name)
-- Prepend an underscore to avoid name clashes
vim.api.nvim_command("augroup _" .. group_name)
vim.api.nvim_command("autocmd!")
for _, def in ipairs(definition) do
local command = table.concat(vim.tbl_flatten({ "autocmd", def }), " ")
local command = table.concat(vim.iter({ "autocmd", def }):flatten(math.huge):totable(), " ")
vim.api.nvim_command(command)
end
vim.api.nvim_command("augroup END")
end
end

-- defer setting LSP-related keymaps till LspAttach
-- Hold off on configuring anything related to the LSP until LspAttach
local mapping = require("keymap.completion")
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("LspKeymapLoader", { clear = true }),
callback = function(event)
if not _G._debugging then
-- LSP Keymaps
mapping.lsp(event.buf)

-- LSP Inlay Hints
local inlayhints_enabled = require("core.settings").lsp_inlayhints
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.server_capabilities.inlayHintProvider ~= nil then
vim.lsp.inlay_hint.enable(inlayhints_enabled == true, { bufnr = event.buf })
end
end
end,
})
Expand All @@ -32,7 +41,7 @@ vim.api.nvim_create_autocmd("BufEnter", {
local layout = vim.api.nvim_call_function("winlayout", {})
if
layout[1] == "leaf"
and vim.api.nvim_get_option_value("filetype", { buf = vim.api.nvim_win_get_buf(layout[2]) }) == "NvimTree"
and vim.bo[vim.api.nvim_win_get_buf(layout[2])].filetype == "NvimTree"
and layout[3] == nil
then
vim.api.nvim_command([[confirm quit]])
Expand All @@ -59,7 +68,7 @@ vim.api.nvim_create_autocmd("FileType", {
},
callback = function(event)
vim.bo[event.buf].buflisted = false
vim.api.nvim_buf_set_keymap(event.buf, "n", "q", "<CMD>close<CR>", { silent = true })
vim.api.nvim_buf_set_keymap(event.buf, "n", "q", "<Cmd>close<CR>", { silent = true })
end,
})

Expand Down
10 changes: 4 additions & 6 deletions lua/core/global.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
local global = {}
local os_name = vim.loop.os_uname().sysname
local os_name = vim.uv.os_uname().sysname

function global:load_variables()
self.is_mac = os_name == "Darwin"
self.is_linux = os_name == "Linux"
self.is_windows = os_name == "Windows_NT"
self.is_wsl = vim.fn.has("wsl") == 1
self.vim_path = vim.fn.stdpath("config")
local path_sep = self.is_windows and "\\" or "/"
local home = self.is_windows and os.getenv("USERPROFILE") or os.getenv("HOME")
self.cache_dir = home .. path_sep .. ".cache" .. path_sep .. "nvim" .. path_sep
self.modules_dir = self.vim_path .. path_sep .. "modules"
self.home = home
self.cache_dir = vim.fn.stdpath("cache")
self.data_dir = string.format("%s/site/", vim.fn.stdpath("data"))
self.modules_dir = self.vim_path .. "/modules"
self.home = self.is_windows and os.getenv("USERPROFILE") or os.getenv("HOME")
end

global:load_variables()
Expand Down
40 changes: 20 additions & 20 deletions lua/core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ local global = require("core.global")

-- Create cache dir and data dirs
local createdir = function()
local data_dir = {
global.cache_dir .. "backup",
global.cache_dir .. "session",
global.cache_dir .. "swap",
global.cache_dir .. "tags",
global.cache_dir .. "undo",
local data_dirs = {
global.cache_dir .. "/backup",
global.cache_dir .. "/session",
global.cache_dir .. "/swap",
global.cache_dir .. "/tags",
global.cache_dir .. "/undo",
}
-- Only check whether cache_dir exists, this would be enough.
if vim.fn.isdirectory(global.cache_dir) == 0 then
os.execute("mkdir -p " .. global.cache_dir)
for _, v in pairs(data_dir) do
if vim.fn.isdirectory(v) == 0 then
os.execute("mkdir -p " .. v)
---@diagnostic disable-next-line: param-type-mismatch
vim.fn.mkdir(global.cache_dir, "p")
for _, dir in pairs(data_dirs) do
if vim.fn.isdirectory(dir) == 0 then
vim.fn.mkdir(dir, "p")
end
end
end
Expand Down Expand Up @@ -135,12 +136,13 @@ You're recommended to install PowerShell for better experience.]],

local basecmd = "-NoLogo -MTA -ExecutionPolicy RemoteSigned"
local ctrlcmd = "-Command [console]::InputEncoding = [console]::OutputEncoding = [System.Text.Encoding]::UTF8"
vim.api.nvim_set_option_value("shell", vim.fn.executable("pwsh") == 1 and "pwsh" or "powershell", {})
vim.api.nvim_set_option_value("shellcmdflag", string.format("%s %s;", basecmd, ctrlcmd), {})
vim.api.nvim_set_option_value("shellredir", "-RedirectStandardOutput %s -NoNewWindow -Wait", {})
vim.api.nvim_set_option_value("shellpipe", "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode", {})
vim.api.nvim_set_option_value("shellquote", nil, {})
vim.api.nvim_set_option_value("shellxquote", nil, {})
local set_opts = vim.api.nvim_set_option_value
set_opts("shell", vim.fn.executable("pwsh") == 1 and "pwsh" or "powershell", {})
set_opts("shellcmdflag", string.format("%s %s;", basecmd, ctrlcmd), {})
set_opts("shellredir", "-RedirectStandardOutput %s -NoNewWindow -Wait", {})
set_opts("shellpipe", "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode", {})
set_opts("shellquote", "", {})
set_opts("shellxquote", "", {})
end
end

Expand All @@ -160,10 +162,8 @@ local load_core = function()
require("core.pack")
require("keymap")

local colorscheme = settings.colorscheme
local background = settings.background
vim.api.nvim_command("set background=" .. background)
vim.api.nvim_command("colorscheme " .. colorscheme)
vim.api.nvim_set_option_value("background", settings.background, {})
vim.cmd.colorscheme(settings.colorscheme)
end

load_core()
1 change: 1 addition & 0 deletions lua/core/mapping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ local core_map = {
["n|<C-q>"] = map_cr("wq"):with_desc("edit: Save file and quit"),
["n|<A-S-q>"] = map_cr("q!"):with_desc("edit: Force quit"),
["n|<leader>o"] = map_cr("setlocal spell! spelllang=en_us"):with_desc("edit: Toggle spell check"),
["n|<leader>bn"] = map_cu("enew"):with_noremap():with_silent():with_desc("buffer: New"),
["n|tn"] = map_cr("tabnew"):with_noremap():with_silent():with_desc("tab: Create a new tab"),
["n|tk"] = map_cr("tabnext"):with_noremap():with_silent():with_desc("tab: Move to next tab"),
["n|tj"] = map_cr("tabprevious"):with_noremap():with_silent():with_desc("tab: Move to previous tab"),
Expand Down
Loading

0 comments on commit 5084976

Please sign in to comment.