Compare commits

...

74 commits

Author SHA1 Message Date
dad9511e8e flake: bump ndg
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964075af959c6e20f0eb9772e17922b2531
2025-11-14 18:56:37 +01:00
0045159706 flake: bump ndg
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69649ea7dd5c40657b8b8a30324b5f710ca9
2025-11-14 18:54:23 +01:00
09f29ba544 docs: remove dupliate page
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964ab066fe88fe52b53b619971a27f23a5b
2025-11-14 18:54:23 +01:00
67e2d87778 docs: restructure to allow a clean migration to new documentation util
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964afba43bdda6a2cbf037404ca3fa4f8c9
2025-11-14 18:54:23 +01:00
Ching Pei Yang
b305b92dba
docs: move release-notes to manual/ 2025-11-14 18:42:36 +01:00
e0b58a57c6 docs: rename entrypoing to index for ndg compat
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696417907923e7def794fb49c28adb953ea7
2025-11-14 18:26:43 +01:00
348a15a1b2 docs: adapt builder functions for ndg
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964720fae8f3db129835efa5d5df956c3ef
2025-11-14 18:26:43 +01:00
146f0b4ff2 flake: add ndg as an input
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964151352d958f0c64949769d98dd759bdc
2025-11-14 18:26:43 +01:00
Soliprem
cb920c5940
Merge pull request #1223 from Soliprem/vala-fix
languages/vala: add mainProgram attribute to wrapper package
2025-11-14 18:21:10 +01:00
Soliprem
4abd1fec5b
Merge branch 'v0.8' into vala-fix 2025-11-14 18:18:34 +01:00
Ching Pei Yang
7e0ec5bce7
Merge branch 'upstream' into v0.8 2025-11-14 18:11:25 +01:00
raf
10bb103dfa
Merge pull request #1218 from NotAShelf/notashelf/push-oxwuxnlzqysp
ci: simplify dependabot config
2025-11-14 19:55:50 +03:00
Francesco Prem Solidoro
e7955adbba rl: add vala fix entry 2025-11-14 17:47:41 +01:00
Francesco Prem Solidoro
90be13528a languages/vala: add mainProgram attribute to wrapper package 2025-11-14 17:45:56 +01:00
raf
09470524a2
Merge pull request #1219 from michaelvl/feature/upgrade-snacks
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
upgrade folke/snacks.nvim from 2.23.0 to 2.30.0
2025-11-08 20:13:24 +03:00
Michael Vittrup Larsen
67dab85c98
upgrade snacks to 2.30.0 2025-11-08 15:33:45 +01:00
aab08f3056
ci: update plugins & nixpkgs automatically
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib2352ce0917aa0a73a71be3f20e1ea2d6a6a6964
2025-11-06 22:57:12 +03:00
227a55cdf1
ci: simplify dependabot config
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I93ae831ec074eb15ecbdb1099f7c053f6a6a6964
2025-11-06 22:57:08 +03:00
raf
da5c91424e
Merge pull request #1216 from c2fc2f/main
languages/typst: remove typstfmt
2025-11-05 18:10:23 +03:00
c2fc2f
9e9be6d0f2
fix(typst): remove typstfmt 2025-11-05 15:48:43 +01:00
raf
3d3cd87978
Merge pull request #1215 from c2fc2f/main
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
langauges/typst: remove typstfmt
2025-11-05 17:38:47 +03:00
c2fc2f
7919c72128
fix(typst): remove typstfmt 2025-11-05 14:55:48 +01:00
raf
20d8fca94d
Merge pull request #1209 from NotAShelf/notashelf/push-kuokzlukwzxp
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
lib: replace `type // { check = ...; }` with v2-compatible patterns
2025-11-02 17:25:57 +03:00
40a69d81c1
lib/types: be more strict in mergeless list checks
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I90ce0f42984ffbca9dfbdf4d97d2fc636a6a6964
2025-11-01 21:02:42 +03:00
04c8715279
lib: migrate to nixpkgs v2 merge mechanism
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If5bf0e5f302afb9f7018b55a96109c006a6a6964
2025-11-01 20:23:41 +03:00
3e0f704000
flake: bump nixpkgs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I37ded98877013bf232dfb8d575980de46a6a6964
2025-11-01 20:23:40 +03:00
raf
e6b2d28159
Merge pull request #1206 from imnotpoz/v0.8
languages/rust: fix completion source option usage
2025-10-31 17:20:20 +03:00
poz
00498aa46f
languages/rust: fix completion source option usage 2025-10-31 12:28:18 +01:00
Cristian Flores
96ba7b6486
feat: add mellow.nvim theme plugin with lualine support (#1188)
Co-authored-by: Ching Pei Yang <59727193+horriblename@users.noreply.github.com>
2025-10-26 22:42:39 +01:00
raf
4b904de361
Merge pull request #1205 from NotAShelf/dependabot/github_actions/actions/upload-artifact-5
Some checks failed
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
build(deps): bump actions/upload-artifact from 4 to 5
2025-10-26 16:49:00 +03:00
dependabot[bot]
a8f7c6d00c
build(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-24 19:20:31 +00:00
raf
dad8ece966
Merge pull request #1203 from simon-wg/hotfix
hotfix: move mkRenamed-/RemovedOptionModule inside concatLists list
2025-10-23 19:56:44 +03:00
Simon Westlin Green
269e22d0e2
hotfix: move mkRename-/RemovedOptionModule inside concatLists list 2025-10-23 18:08:47 +02:00
raf
9b3e7bcf68
Merge pull request #1201 from kmdtaufik/theme
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
theme: fix tokyonight transparency
2025-10-22 08:53:46 +03:00
raf
15c26bfc1c
Merge pull request #1202 from NotAShelf/notashelf/push-snpzosspqyxk
languages/rust: fix missing commits for migration
2025-10-22 08:14:31 +03:00
raf
a2934aa4d5
Merge pull request #1193 from NotAShelf/notashelf/push-rklptznqyywp
languages/rust: move `crates.nvim` dependency to `extensions` modernize
languages/rust: fix completion option for crates.nvim

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia46fc50738fce058fb3c36a5b7d8a0686a6a6964

Change-Id: I7ca0b77a912fd8cf288b0cd4ac28185f6a6a6964

modules/deprecations: add missing deprecation messages for crates.nvim

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icd7524b45c63da851c690435e625d5536a6a6964
2025-10-22 08:12:19 +03:00
Md Taufik Khan
8327c66c86 theme: fix tokyonight transparency
add optional sidebar and float transparency to stop the backgroudn
mismatch
2025-10-21 23:57:01 +06:00
raf
ea3ee477fa
Merge pull request #1193 from NotAShelf/notashelf/push-rklptznqyywp
languages/rust: move `crates.nvim` dependency to `extensions` modernize
2025-10-18 13:01:33 +03:00
99b003f67f
languages/rust: move crates.nvim dependency to extensions modernize
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69648fea60c9113ac066fcffecc2364c9aae
2025-10-18 12:58:59 +03:00
raf
cbf496cf65
Merge pull request #1192 from alfarelcynthesis/fix-json-langserver-path
languages/json: fix language server cmd package path
2025-10-18 12:54:20 +03:00
alfarel
0982a84b09
languages/json: fix language server default cmd path in package 2025-10-17 20:48:56 +00:00
Gerg-L
3e48f13c3c
lib: rewrite toLuaObject, deprecate everything else (#1178)
* lint: typos

* wrapper/build: passthru mnw stuff

* lib: rewrite toLuaObject, deprecate everything else

* docs: deno fmt

* Emac

---------

Co-authored-by: Ching Pei Yang <59727193+horriblename@users.noreply.github.com>
2025-10-13 18:56:11 +02:00
Ching Pei Yang
3ace0780dd
ci: fix typo in typo fix 2025-10-13 17:55:33 +02:00
raf
9df9d51fd9
Merge pull request #1179 from Gerg-L/typos
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
chore: fix typos
2025-10-11 06:34:27 +03:00
Gerg-L
2cbf07e129
lint: typos 2025-10-10 19:58:36 -04:00
raf
314962bcb4
Merge pull request #1144 from jules-sommer/main
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
completion/blink-cmp: added keymap "inherit" preset
2025-10-08 19:57:11 +03:00
Jules
2c9a8e2857 Merge branch 'main' into main 2025-10-08 09:54:37 -04:00
dde524f7cc
languages/typst: fix missing imports
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69642cd808d064e51f6135421ba47a28933b
2025-10-03 20:20:48 +03:00
raf
88dd4cd48d
Merge pull request #1169 from NotAShelf/notashelf/push-lnklzrqrwnym
Merge branch 'main' into 'v0.8'
2025-10-03 09:12:53 +03:00
raf
171410f6c5
Merge branch 'v0.8' into notashelf/push-lnklzrqrwnym 2025-10-03 09:12:26 +03:00
e48638aef3
tabline/nvim-bufferline: fix Catppuccin integration
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964ecfe08983c1d65145f961e31baf1fca6
2025-10-03 08:27:49 +03:00
6d6dd9bb8e
flake: bump inputs
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964748bcffcb787a4b525bb231f385a2948
2025-10-02 22:53:28 +03:00
b4a759677a
pins: update all plugins
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69644d33bc19ec9489230d99d53afce01d6b
2025-10-02 22:53:05 +03:00
raf
131eb55afc
Merge pull request #1166 from NotAShelf/dependabot/github_actions/peter-evans/find-comment-4
build(deps): bump peter-evans/find-comment from 3 to 4
2025-10-02 22:45:47 +03:00
dependabot[bot]
737b80e2ca
build(deps): bump peter-evans/find-comment from 3 to 4
Bumps [peter-evans/find-comment](https://github.com/peter-evans/find-comment) from 3 to 4.
- [Release notes](https://github.com/peter-evans/find-comment/releases)
- [Commits](https://github.com/peter-evans/find-comment/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/find-comment
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 19:31:01 +00:00
raf
8e73e98f56
Merge pull request #1167 from NotAShelf/dependabot/github_actions/peter-evans/create-or-update-comment-5
build(deps): bump peter-evans/create-or-update-comment from 4 to 5
2025-10-02 22:30:09 +03:00
dependabot[bot]
b8e05a5a33
build(deps): bump peter-evans/create-or-update-comment from 4 to 5
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](https://github.com/peter-evans/create-or-update-comment/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 19:08:24 +00:00
raf
5ff51032a4
Merge pull request #1156 from horriblename/LspAttach-keybinds
attach LSP keybinds + other setup work in LspAttach
2025-09-30 21:43:36 +03:00
Ching Pei Yang
572ea52a25
docs: update release notes 2025-09-29 21:58:05 +02:00
Ching Pei Yang
8e9186e4b8
Merge pull request #1162 from alfarelcynthesis/deadnix-run
deadnix + statix run
2025-09-27 11:43:37 +02:00
Ching Pei Yang
06bc21e75c
Merge pull request #1161 from alfarelcynthesis/less-import
treewide: don't import modules manually
2025-09-27 11:40:42 +02:00
alfarel
8593e0929b
fix: deadnix --edit + statix fix 2025-09-27 01:05:33 +00:00
alfarel
ae1922f6da
treewide: don't import modules manually
Reduces maintenance burden.
2025-09-27 00:33:21 +00:00
Ching Pei Yang
8ff302fadd
Merge pull request #1133 from alfarelcynthesis/markdown-oxide
Add `markdown-oxide` LSP option
2025-09-26 01:30:33 +02:00
Ching Pei Yang
ef508ea10d
Merge branch 'v0.8' into markdown-oxide 2025-09-26 01:28:10 +02:00
Ching Pei Yang
c13edf9961
treewide: remove usage of default_on_attach outside LspAttach 2025-09-26 00:29:27 +02:00
Ching Pei Yang
11fd1b7083
lib/dag: improve dependency cycle error message 2025-09-26 00:29:27 +02:00
Ching Pei Yang
e1fd607e3f
lsp: call default_on_attach in LspAttach autocmd 2025-09-26 00:29:27 +02:00
Ching Pei Yang
d26b9dc896
autocmds: ensure augroups are set up before autocmds 2025-09-26 00:18:57 +02:00
alfarel
74d6fe86e6
languages/markdown: add markdown-oxide server option 2025-09-23 20:39:51 +00:00
Party Wumpus
b7571df4d6
languages/typst: Add inline preview via typst-concealer (#588)
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* add typst-concealer

* Update modules/plugins/languages/typst.nix

Co-authored-by: raf <raf@notashelf.dev>

* add keybinds, resolve review etc

* add changes back (it was easier than a rebase here)

* add the newer conceal_in_normal option

* run deno fmt

* add "typ" to typos

---------

Co-authored-by: raf <raf@notashelf.dev>
2025-09-19 08:47:41 +00:00
raf
1bd9fc1164
Merge pull request #1146 from horriblename/fix-nixd-options
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
nix: fix nixd option
2025-09-15 19:51:11 +03:00
Ching Pei Yang
96e1004e55
nix: fix nixd option 2025-09-15 18:44:30 +02:00
jules
930e71d0ce fix(blink-cmp): added keymap "inherit" preset
"inherit" preset is valid for non-default completion modes (cmdline,
terminal, etc), allowing that mode to inherit the default keymaps.
2025-09-13 11:36:11 -04:00
79 changed files with 1545 additions and 1420 deletions

View file

@ -1,11 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
open-pull-requests-limit: 15
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 15
reviewers:
- NotAShelf
assignees:
- NotAShelf

2
.github/typos.toml vendored
View file

@ -5,8 +5,10 @@ default.extend-ignore-words-re = [
"befores",
"annote",
"viw",
"typ",
"edn",
"esy",
"BA", # somehow "BANanaD3V" is valid, but BA is not...
"Emac"
]

View file

@ -101,7 +101,7 @@ jobs:
run: echo "date=$(date +'%Y-%m-%d-%H%M%S')" >> ${GITHUB_OUTPUT}
- name: Upload doc artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: "${{ matrix.package }}"
path: result/share/doc/nvf

View file

@ -90,7 +90,7 @@ jobs:
echo "Preview can be found at ${URL}" >> "$GITHUB_STEP_SUMMARY"
- name: Find Comment
uses: peter-evans/find-comment@v3
uses: peter-evans/find-comment@v4
id: fc
with:
comment-author: "github-actions[bot]"
@ -98,7 +98,7 @@ jobs:
body-includes: "Live preview deployed"
- name: Post live preview comment
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@v5
env:
COMMENT_ID: ${{ steps.fc.outputs.comment-id }}
URL: ${{ steps.prelude.outputs.URL }}
@ -177,7 +177,7 @@ jobs:
fi
- name: Post cleanup verification
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ github.event.pull_request.number }}
body: |

91
.github/workflows/update.yml vendored Normal file
View file

@ -0,0 +1,91 @@
name: Weekly Dependency Updates
on:
workflow_dispatch:
schedule:
# 8 PM UTC every Friday
- cron: '0 20 * * 5'
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: "Install Nix"
uses: cachix/install-nix-action@v31.8.2
- name: Set up Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "actions@github.com"
- name: Create branch for updates
run: |
DATE=$(date +%Y-%m-%d)
BRANCH_NAME="update/dependencies-$DATE"
git checkout -b $BRANCH_NAME
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Update npins
run: nix run nixpkgs#npins update
# Only update Nixpkgs. mnw might break on update, better to track it manually to avoid
# unexpected breakage.
- name: Update nixpkgs
run: nix flake update nixpkgs
- name: Check for changes
id: check_changes
run: |
if git diff --quiet; then
echo "No changes detected"
echo "changes_detected=false" >> "$GITHUB_OUTPUT"
exit 0
else
echo "Changes detected"
echo "changes_detected=true" >> "$GITHUB_OUTPUT"
fi
# FIXME: Worth adding additional checks for, e.g., fragile plugins
# or modules
# nix build .#checks.<system>.<check-name>
# We'll probably want to handle this with machine tests
- name: Verify changes
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
# Run verification tests to ensure updates don't break anything
nix flake check
- name: Set date variable
run: echo "DATE=$(date +%Y-%m-%d)" >> "$GITHUB_ENV"
- name: Commit and push changes
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
git add .
git commit -m "pins: bump all plugins (${{ env.DATE }})"
git push -u origin $BRANCH_NAME
- name: Create Pull Request
if: steps.check_changes.outputs.changes_detected == 'true'
uses: peter-evans/create-pull-request@v7
with:
branch: ${{ env.BRANCH_NAME }}
base: main
labels: dependencies,automated pr
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "npins: bump all plugins (${{ env.DATE }})"
title: "Weekly Dependency Updates: ${{ env.DATE }}"
body: |
> [!NOTE]
> This PR was automatically generated by the Weekly Dependency Updates workflow. Please wait
> for all CI steps to complete, and test any major changes personally.
Updates Performed:
- Updated dependencies using `npins update`
- Updated nixpkgs using `nix flake update nixpkgs`
If the verification steps have passed, updates should be safe to merge. For failing CI steps
submit a Pull Request targetting ${{ env.BRANCH_NAME }}

View file

@ -92,7 +92,7 @@
# Generate the HTML manual pages
html = pkgs.callPackage ./manual.nix {
inherit release;
inherit inputs release;
inherit (nvimModuleDocs) optionsJSON;
};
in {

View file

@ -1,114 +1,47 @@
{
lib,
stdenvNoCC,
fetchzip,
runCommandLocal,
# build inputs
nixos-render-docs,
documentation-highlighter,
dart-sass,
inputs,
path,
# nrd configuration
release,
stdenvNoCC,
runCommandNoCCLocal,
optionsJSON,
release,
} @ args: let
manual-release = args.release or "unstable";
scss-reset = fetchzip {
url = "https://github.com/Frontend-Layers/scss-reset/archive/refs/tags/1.4.2.zip";
hash = "sha256-cif5Sx8Ca5vxdw/mNAgpulLH15TwmzyJFNM7JURpoaE=";
};
compileStylesheet = runCommandLocal "compile-nvf-stylesheet" {} ''
mkdir -p $out
tmpfile=$(mktemp -d)
trap "rm -r $tmpfile" EXIT
ln -s "${scss-reset}/build" "$tmpfile/scss-reset"
${dart-sass}/bin/sass --load-path "$tmpfile" \
${./static/style.scss} "$out/style.css"
echo "Generated styles"
'';
in
stdenvNoCC.mkDerivation {
name = "nvf-manual";
src = builtins.path {
name = "nvf-manual-${manual-release}";
path = lib.sourceFilesBySuffices ./manual [".md" ".md.in"];
};
runCommandNoCCLocal "nvf-docs-html" {
nativeBuildInputs = [
(inputs.ndg.packages.${stdenvNoCC.system}.ndg.overrideAttrs
{
# FIXME: the tests take too long to build
doCheck = false;
})
];
} ''
mkdir -p $out/share/doc
strictDependencies = true;
nativeBuildInputs = [nixos-render-docs];
# Copy the markdown sources to be processed by ndg. This is not
# strictly necessary, but allows us to modify the Markdown sources
# as we see fit.
cp -rvf ${./manual} ./manual
postPatch = ''
ln -s ${optionsJSON}/share/doc/nixos/options.json ./config-options.json
'';
# Replace variables following the @VARIABLE@ style in the manual
# pages. This can be built into ndg at a later date.
substituteInPlace ./manual/index.md \
--subst-var-by NVF_VERSION ${manual-release}
buildPhase = ''
dest="$out/share/doc/nvf"
mkdir -p "$(dirname "$dest")"
mkdir -p $dest/{highlightjs,script}
# Generate the final manual from a set of parameters. This uses
# feel-co/ndg to render the web manual.
ndg html \
--jobs $NIX_BUILD_CORES --title "NVF" \
--module-options ${optionsJSON}/share/doc/nixos/options.json \
--manpage-urls ${path}/doc/manpage-urls.json \
--options-depth 3 \
--generate-search true \
--highlight-code true \
--input-dir ./manual \
--output-dir "$out/share/doc"
# Copy highlight scripts to /highlights in document root.
cp -vt $dest/highlightjs \
${documentation-highlighter}/highlight.pack.js \
${documentation-highlighter}/LICENSE \
${documentation-highlighter}/mono-blue.css \
${documentation-highlighter}/loader.js
# Copy anchor scripts to the script directory in document root.
cp -vt "$dest"/script \
${./static/script}/anchor-min.js \
${./static/script}/anchor-use.js \
${./static/script}/search.js
substituteInPlace ./options.md \
--subst-var-by OPTIONS_JSON ./config-options.json
substituteInPlace ./manual.md \
--subst-var-by NVF_VERSION ${manual-release}
substituteInPlace ./hacking/additional-plugins.md \
--subst-var-by NVF_REPO "https://github.com/notashelf/nvf/blob/${manual-release}"
# Move compiled stylesheet
cp -vt $dest \
${compileStylesheet}/style.css
# Move release notes
cp -vr ${./release-notes} release-notes
# Generate final manual from a set of parameters. Explanation of the CLI flags are
# as follows:
#
# 1. --manpage-urls will allow you to use manual pages as they are defined in
# the nixpkgs documentation.
# 2. --revision is the project revision as it is defined in 'release.json' in the
# repository root
# 3. --script will inject a given Javascript file into the resulting pages inside
# the <script> tag.
# 4. --toc-depth will determine the depth of the initial Table of Contents while
# --section-toc-depth will determine the depth of per-section Table of Contents
# sections.
nixos-render-docs manual html \
--manpage-urls ${path + "/doc/manpage-urls.json"} \
--revision ${lib.trivial.revisionWithDefault manual-release} \
--stylesheet style.css \
--script highlightjs/highlight.pack.js \
--script highlightjs/loader.js \
--script script/anchor-use.js \
--script script/anchor-min.js \
--script script/search.js \
--toc-depth 1 \
--section-toc-depth 1 \
manual.md \
"$dest/index.xhtml"
# Hydra support. Probably not necessary.
mkdir -p $out/nix-support/
echo "doc manual $dest index.html" >> $out/nix-support/hydra-build-products
'';
}
# Hydra support. Probably not necessary.
mkdir -p $out/nix-support/
echo "doc manual $dest index.html" >> $out/nix-support/hydra-build-products
''

View file

@ -1,6 +1,7 @@
# Configuring nvf {#ch-configuring}
[helpful tips section]: #ch-helpful-tips
[options reference]: /nvf/options.html
nvf allows for _very_ extensive configuration in Neovim through the Nix module
interface. The below chapters describe several of the options exposed in nvf for
@ -8,7 +9,7 @@ your convenience. You might also be interested in the [helpful tips section] for
more advanced or unusual configuration options supported by nvf.
Note that this section does not cover module _options_. For an overview of all
module options provided by nvf, please visit the [appendix](/nvf/options.html)
module options provided by nvf, please visit the [options reference]
```{=include=} chapters
configuring/custom-package.md

View file

@ -1,22 +0,0 @@
# Custom Neovim Package {#ch-custom-package}
As of v0.5, you may now specify the Neovim package that will be wrapped with
your configuration. This is done with the [](#opt-vim.package) option.
```nix
{inputs, pkgs, ...}: {
# using the neovim-nightly overlay
vim.package = inputs.neovim-overlay.packages.${pkgs.stdenv.system}.neovim;
}
```
The neovim-nightly-overlay always exposes an unwrapped package. If using a
different source, you are highly recommended to get an "unwrapped" version of
the neovim package, similar to `neovim-unwrapped` in nixpkgs.
```nix
{ pkgs, ...}: {
# using the neovim-nightly overlay
vim.package = pkgs.neovim-unwrapped;
}
```

View file

@ -21,10 +21,587 @@ ideally also include relevant context in which an issue occurs or a feature
should be implemented. If you wish to make a contribution, but feel stuck -
please do not be afraid to submit a pull request, we will help you get it in.
```{=include=} sections
hacking/getting-started.md
hacking/guidelines.md
hacking/testing.md
hacking/keybinds.md
hacking/additional-plugins.md
## Getting Started {#sec-contrib-getting-started}
You, naturally, would like to start by forking the repository to get started. If
you are new to Git and GitHub, do have a look at GitHub's
[Fork a repo guide](https://help.github.com/articles/fork-a-repo/) for
instructions on how you can do this. Once you have a fork of **nvf**, you should
create a separate branch based on the most recent `main` branch. Give your
branch a reasonably descriptive name (e.g. `feature/debugger` or
`fix/pesky-bug`) and you are ready to work on your changes
Implement your changes and commit them to the newly created branch and when you
are happy with the result, and positive that it fulfills our
[Contributing Guidelines](#sec-guidelines), push the branch to GitHub and
[create a pull request](https://help.github.com/articles/creating-a-pull-request).
The default pull request template available on the **nvf** repository will guide
you through the rest of the process, and we'll gently nudge you in the correct
direction if there are any mistakes.
## Guidelines {#sec-guidelines}
If your contribution tightly follows the guidelines, then there is a good chance
it will be merged without too much trouble. Some of the guidelines will be
strictly enforced, others will remain as gentle nudges towards the correct
direction. As we have no automated system enforcing those guidelines, please try
to double check your changes before making your pull request in order to avoid
"faulty" code slipping by.
If you are uncertain how these rules affect the change you would like to make
then feel free to start a discussion in the
[discussions tab](https://github.com/NotAShelf/nvf/discussions) ideally (but not
necessarily) before you start developing.
### Adding Documentation {#sec-guidelines-documentation}
[Nixpkgs Flavoured Markdown]: https://github.com/NixOS/nixpkgs/blob/master/doc/README.md#syntax
Almost all changes warrant updates to the documentation: at the very least, you
must update the changelog. Both the manual and module options use
[Nixpkgs Flavoured Markdown].
The HTML version of this manual containing both the module option descriptions
and the documentation of **nvf** (such as this page) can be generated and opened
by typing the following in a shell within a clone of the **nvf** Git repository:
```console
$ nix build .#docs-html
$ xdg-open $PWD/result/share/doc/nvf/index.html
```
### Formatting Code {#sec-guidelines-formatting}
Make sure your code is formatted as described in
[code-style section](#sec-guidelines-code-style). To maintain consistency
throughout the project you are encouraged to browse through existing code and
adopt its style also in new code.
### Formatting Commits {#sec-guidelines-commit-message-style}
Similar to [code style guidelines](#sec-guidelines-code-style) we encourage a
consistent commit message format as described in
[commit style guidelines](#sec-guidelines-commit-style).
### Commit Style {#sec-guidelines-commit-style}
The commits in your pull request should be reasonably self-contained. Which
means each and every commit in a pull request should make sense both on its own
and in general context. That is, a second commit should not resolve an issue
that is introduced in an earlier commit. In particular, you will be asked to
amend any commit that introduces syntax errors or similar problems even if they
are fixed in a later commit.
The commit messages should follow the
[seven rules](https://chris.beams.io/posts/git-commit/#seven-rule), except for
"Capitalize the subject line". We also ask you to include the affected code
component or module in the first line. A commit message ideally, but not
necessarily, follow the given template from home-manager's own documentation
```
{component}: {description}
{long description}
```
where `{component}` refers to the code component (or module) your change
affects, `{description}` is a very brief description of your change, and
`{long description}` is an optional clarifying description. As a rare exception,
if there is no clear component, or your change affects many components, then the
`{component}` part is optional. See
[example commit message](#sec-guidelines-ex-commit-message) for a commit message
that fulfills these requirements.
#### Example Commit {#sec-guidelines-ex-commit-message}
The commit
[69f8e47e9e74c8d3d060ca22e18246b7f7d988ef](https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef)
in home-manager contains the following commit message.
```
starship: allow running in Emacs if vterm is used
The vterm buffer is backed by libvterm and can handle Starship prompts
without issues.
```
Similarly, if you are contributing to **nvf**, you would include the scope of
the commit followed by the description:
```
languages/ruby: init module
Adds a language module for Ruby, adds appropriate formatters and Treesitter grammars
```
Long description can be omitted if the change is too simple to warrant it. A
minor fix in spelling or a formatting change does not warrant long description,
however, a module addition or removal does as you would like to provide the
relevant context, i.e. the reasoning behind it, for your commit.
Finally, when adding a new module, say `modules/foo.nix`, we use the fixed
commit format `foo: add module`. You can, of course, still include a long
description if you wish.
In case of nested modules, i.e `modules/languages/java.nix` you are recommended
to contain the parent as well - for example `languages/java: some major change`.
### Code Style {#sec-guidelines-code-style}
#### Treewide {#sec-code-style-treewide}
Keep lines at a reasonable width, ideally 80 characters or less. This also
applies to string literals and module descriptions and documentation.
#### Nix {#sec-code-style-nix}
[alejandra]: https://github.com/kamadorueda/alejandra
**nvf** is formatted by the [alejandra] tool and the formatting is checked in
the pull request and push workflows. Run the `nix fmt` command inside the
project repository before submitting your pull request.
While Alejandra is mostly opinionated on how code looks after formatting,
certain changes are done at the user's discretion based on how the original code
was structured.
Please use one line code for attribute sets that contain only one subset. For
example:
```nix
# parent modules should always be unfolded
# which means module = { value = ... } instead of module.value = { ... }
module = {
value = mkEnableOption "some description" // { default = true; }; # merges can be done inline where possible
# same as parent modules, unfold submodules
subModule = {
# this is an option that contains more than one nested value
# Note: try to be careful about the ordering of `mkOption` arguments.
# General rule of thumb is to order from least to most likely to change.
# This is, for most cases, type < default < description.
# Example, if present, would be between default and description
someOtherValue = mkOption {
type = lib.types.bool;
default = true;
description = "Some other description";
};
};
}
```
If you move a line down after the merge operator, Alejandra will automatically
unfold the whole merged attrset for you, which we **do not** want.
```nix
module = {
key = mkEnableOption "some description" // {
default = true; # we want this to be inline
}; # ...
}
```
For lists, it is mostly up to your own discretion how you want to format them,
but please try to unfold lists if they contain multiple items and especially if
they are to include comments.
```nix
# this is ok
acceptableList = [
item1 # comment
item2
item3 # some other comment
item4
];
# this is not ok
listToBeAvoided = [item1 item2 /* comment */ item3 item4];
# this is ok
acceptableList = [item1 item2];
# this is also ok if the list is expected to contain more elements
acceptableList= [
item1
item2
# more items if needed...
];
```
## Testing Changes {#sec-testing-changes}
Once you have made your changes, you will need to test them thoroughly. If it is
a module, add your module option to `configuration.nix` (located in the root of
this project) inside `neovimConfiguration`. Enable it, and then run the maximal
configuration with `nix run .#maximal -Lv` to check for build errors. If neovim
opens in the current directory without any error messages (you can check the
output of `:messages` inside neovim to see if there are any errors), then your
changes are good to go. Open your pull request, and it will be reviewed as soon
as possible.
If it is not a new module, but a change to an existing one, then make sure the
module you have changed is enabled in the maximal configuration by editing
`configuration.nix`, and then run it with `nix run .#maximal -Lv`. Same
procedure as adding a new module will apply here.
## Keybinds {#sec-keybinds}
As of 0.4, there exists an API for writing your own keybinds and a couple of
useful utility functions are available in the
[extended standard library](https://github.com/NotAShelf/nvf/tree/main/lib). The
following section contains a general overview to how you may utilize said
functions.
## Custom Key Mappings Support for a Plugin {#sec-custom-key-mappings}
To set a mapping, you should define it in `vim.keymaps`.
An example, simple keybinding, can look like this:
```nix
{
vim.keymaps = [
{
key = "<leader>wq";
mode = ["n"];
action = ":wq<CR>";
silent = true;
desc = "Save file and quit";
}
];
}
```
There are many settings available in the options. Please refer to the
[documentation](https://notashelf.github.io/nvf/options.html#opt-vim.keymaps) to
see a list of them.
**nvf** provides a helper function, so that you don't have to write the mapping
attribute sets every time:
- `mkKeymap`, which mimics neovim's `vim.keymap.set` function
You can read the source code of some modules to see them in action, but the
usage should look something like this:
```nix
# plugindefinition.nix
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.binds) mkMappingOption;
in {
options.vim.plugin = {
enable = mkEnableOption "Enable plugin";
# Mappings should always be inside an attrset called mappings
mappings = {
workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "<leader>lwd";
documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "<leader>ld";
lspReferences = mkMappingOption "LSP References [trouble]" "<leader>lr";
quickfix = mkMappingOption "QuickFix [trouble]" "<leader>xq";
locList = mkMappingOption "LOCList [trouble]" "<leader>xl";
symbols = mkMappingOption "Symbols [trouble]" "<leader>xs";
};
}
```
```nix
# config.nix
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.binds) mkKeymap;
cfg = config.vim.plugin;
keys = cfg.mappings;
inherit (options.vim.lsp.trouble) mappings;
in {
config = mkIf cfg.enable {
vim.keymaps = [
(mkKeymap "n" keys.workspaceDiagnostics "<cmd>Trouble toggle diagnostics<CR>" {desc = mappings.workspaceDiagnostics.description;})
(mkKeymap "n" keys.documentDiagnostics "<cmd>Trouble toggle diagnostics filter.buf=0<CR>" {desc = mappings.documentDiagnostics.description;})
(mkKeymap "n" keys.lspReferences "<cmd>Trouble toggle lsp_references<CR>" {desc = mappings.lspReferences.description;})
(mkKeymap "n" keys.quickfix "<cmd>Trouble toggle quickfix<CR>" {desc = mappings.quickfix.description;})
(mkKeymap "n" keys.locList "<cmd>Trouble toggle loclist<CR>" {desc = mappings.locList.description;})
(mkKeymap "n" keys.symbols "<cmd>Trouble toggle symbols<CR>" {desc = mappings.symbols.description;})
];
};
}
```
> [!NOTE]
> If you have come across a plugin that has an API that doesn't seem to easily
> allow custom keybindings, don't be scared to implement a draft PR. We'll help
> you get it done.
## Adding Plugins {#sec-additional-plugins}
There are two methods for adding new Neovim plugins to **nvf**. npins is the
faster option that should be preferred if the plugin consists of pure Lua or
Vimscript code. In which case there is no building required, and we can easily
handle the copying of plugin files. Alternative method, which is required when
plugins try to build their own libraries (e.g., in Rust or C) that need to be
built with Nix to function correctly.
### With npins {#sec-npins-for-plugins}
npins is the standard method of adding new plugins to **nvf**. You simply need
the repository URL for the plugin, and can add it as a source to be built
automatically with one command. To add a new Neovim plugin, use `npins`. For
example:
```bash
nix-shell -p npins # or nix shell nixpkgs#npins if using flakes
```
Then run:
```bash
npins add --name <plugin name> github <owner> <repo> -b <branch>
```
::: {.note}
Be sure to replace any non-alphanumeric characters with `-` for `--name`. For
example
```bash
npins add --name lazydev-nvim github folke lazydev.nvim -b main
```
:::
Once the `npins` command is done, you can start referencing the plugin as a
**string**.
```nix
{
config.vim.startPlugins = ["lazydev-nvim"];
}
```
### Packaging Complex Plugins {#sec-pkgs-for-plugins}
[blink.cmp]: https://github.com/Saghen/blink.cmp
Some plugins require additional packages to be built and substituted to function
correctly. For example [blink.cmp] requires its own fuzzy matcher library, built
with Rust, to be installed or else defaults to a much slower Lua implementation.
In the Blink documentation, you are advised to build with `cargo` but that is
not ideal since we are leveraging the power of Nix. In this case the ideal
solution is to write a derivation for the plugin.
We use `buildRustPackage` to build the library from the repository root, and
copy everything in the `postInstall` phase.
```nix
postInstall = ''
cp -r {lua,plugin} "$out"
mkdir -p "$out/doc"
cp 'doc/'*'.txt' "$out/doc/"
mkdir -p "$out/target"
mv "$out/lib" "$out/target/release"
'';
```
In a similar fashion, you may utilize `stdenv.mkDerivation` and other Nixpkgs
builders to build your library from source, and copy the relevant files and Lua
plugin files in the `postInstall` phase. Do note, however, that you still need
to fetch the plugin sources somehow. npins is, once again, the recommended
option to fetch the plugin sources. Refer to the previous section on how to use
npins to add a new plugin.
Plugins built from source must go into the `flake/pkgs/by-name` overlay. It will
automatically create flake outputs for individual packages. Lastly, you must add
your package to the plugin builder (`pluginBuilders`) function manually in
`modules/wrapper/build/config.nix`. Once done, you may refer to your plugin as a
**string**.
```nix
{
config.vim.startPlugins = ["blink-cmp"];
}
```
### Modular setup options {#sec-modular-setup-options}
Most plugins is initialized with a call to `require('plugin').setup({...})`.
We use a special function that lets you easily add support for such setup
options in a modular way: `mkPluginSetupOption`.
Once you have added the source of the plugin as shown above, you can define the
setup options like this:
```nix
# in modules/.../your-plugin/your-plugin.nix
{lib, ...}:
let
inherit (lib.types) bool int;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.your-plugin = {
setupOpts = mkPluginSetupOption "plugin name" {
enable_feature_a = mkOption {
type = bool;
default = false;
# ...
};
number_option = mkOption {
type = int;
default = 3;
# ...
};
};
};
}
```
```nix
# in modules/.../your-plugin/config.nix
{lib, config, ...}:
let
cfg = config.vim.your-plugin;
in {
vim.luaConfigRC = lib.nvim.dag.entryAnywhere ''
require('plugin-name').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts})
'';
}
```
This above config will result in this Lua script:
```lua
require('plugin-name').setup({
enable_feature_a = false,
number_option = 3,
})
```
Now users can set any of the pre-defined option field, and can also add their
own fields!
```nix
# in user's config
{
vim.your-plugin.setupOpts = {
enable_feature_a = true;
number_option = 4;
another_field = "hello";
size = { # nested fields work as well
top = 10;
};
};
}
```
### Details of toLuaObject {#sec-details-of-toluaobject}
As you've seen above, `toLuaObject` is used to convert our nix attrSet
`cfg.setupOpts`, into a lua table. Here are some rules of the conversion:
1. Nix `null` converts to lua `nil`
2. Number and strings convert to their lua counterparts
3. Nix attribute sets (`{}`) and lists (`[]`) convert into Lua dictionaries and
tables respectively. Here is an example of Nix -> Lua conversion.
- `{foo = "bar"}` -> `{["foo"] = "bar"}`
- `["foo" "bar"]` -> `{"foo", "bar"}`
4. You can write raw Lua code using `lib.generators.mkLuaInline`. This function
is part of nixpkgs, and is accessible without relying on **nvf**'s extended
library.
- `mkLuaInline "function add(a, b) return a + b end"` will yield the
following result:
```nix
{
_type = "lua-inline";
expr = "function add(a, b) return a + b end";
}
```
The above expression will be interpreted as a Lua expression in the final
config. Without the `mkLuaInline` function, you will only receive a string
literal. You can use it to feed plugin configuration tables Lua functions
that return specific values as expected by the plugins.
```nix
{
vim.your-plugin.setupOpts = {
on_init = lib.generators.mkLuaInline ''
function()
print('we can write lua!')
end
'';
};
}
```
### Lazy plugins {#sec-lazy-plugins}
If the plugin can be lazy-loaded, `vim.lazy.plugins` should be used to add it.
Lazy plugins are managed by `lz.n`.
```nix
# in modules/.../your-plugin/config.nix
{config, ...}: let
cfg = config.vim.your-plugin;
in {
vim.lazy.plugins.your-plugin = {
# Instead of vim.startPlugins, use this:
package = "your-plugin";
# ıf your plugin uses the `require('your-plugin').setup{...}` pattern
setupModule = "your-plugin";
inherit (cfg) setupOpts;
# Events that trigger this plugin to be loaded
event = ["DirChanged"];
cmd = ["YourPluginCommand"];
# Plugin Keymaps
keys = [
# We'll cover this in detail in the 'keybinds' section
{
key = "<leader>d";
mode = "n";
action = ":YourPluginCommand";
}
];
};
}
```
This results in the following lua code:
```lua
require('lz.n').load({
{
"name-of-your-plugin",
after = function()
require('your-plugin').setup({
--[[ your setupOpts ]]--
})
end,
event = {"DirChanged"},
cmd = {"YourPluginCommand"},
keys = {
{"<leader>d", ":YourPluginCommand", mode = {"n"}},
},
}
})
```
[`vim.lazy.plugins` spec]: https://notashelf.github.io/nvf/options.html#opt-vim.lazy.plugins
A full list of options can be found in the [`vim.lazy.plugins` spec] on the
rendered manual.

View file

@ -1,266 +0,0 @@
# Adding Plugins {#sec-additional-plugins}
There are two methods for adding new Neovim plugins to **nvf**. npins is the
faster option that should be preferred if the plugin consists of pure Lua or
Vimscript code. In which case there is no building required, and we can easily
handle the copying of plugin files. Alternative method, which is required when
plugins try to build their own libraries (e.g., in Rust or C) that need to be
built with Nix to function correctly.
## With npins {#sec-npins-for-plugins}
npins is the standard method of adding new plugins to **nvf**. You simply need
the repository URL for the plugin, and can add it as a source to be built
automatically with one command. To add a new Neovim plugin, use `npins`. For
example:
```bash
nix-shell -p npins # or nix shell nixpkgs#npins if using flakes
```
Then run:
```bash
npins add --name <plugin name> github <owner> <repo> -b <branch>
```
::: {.note}
Be sure to replace any non-alphanumeric characters with `-` for `--name`. For
example
```bash
npins add --name lazydev-nvim github folke lazydev.nvim -b main
```
:::
Once the `npins` command is done, you can start referencing the plugin as a
**string**.
```nix
{
config.vim.startPlugins = ["lazydev-nvim"];
}
```
## Packaging Complex Plugins {#sec-pkgs-for-plugins}
[blink.cmp]: https://github.com/Saghen/blink.cmp
Some plugins require additional packages to be built and substituted to function
correctly. For example [blink.cmp] requires its own fuzzy matcher library, built
with Rust, to be installed or else defaults to a much slower Lua implementation.
In the Blink documentation, you are advised to build with `cargo` but that is
not ideal since we are leveraging the power of Nix. In this case the ideal
solution is to write a derivation for the plugin.
We use `buildRustPackage` to build the library from the repository root, and
copy everything in the `postInstall` phase.
```nix
postInstall = ''
cp -r {lua,plugin} "$out"
mkdir -p "$out/doc"
cp 'doc/'*'.txt' "$out/doc/"
mkdir -p "$out/target"
mv "$out/lib" "$out/target/release"
'';
```
In a similar fashion, you may utilize `stdenv.mkDerivation` and other Nixpkgs
builders to build your library from source, and copy the relevant files and Lua
plugin files in the `postInstall` phase. Do note, however, that you still need
to fetch the plugin sources somehow. npins is, once again, the recommended
option to fetch the plugin sources. Refer to the previous section on how to use
npins to add a new plugin.
Plugins built from source must go into the `flake/pkgs/by-name` overlay. It will
automatically create flake outputs for individual packages. Lastly, you must add
your package to the plugin builder (`pluginBuilders`) function manually in
`modules/wrapper/build/config.nix`. Once done, you may refer to your plugin as a
**string**.
```nix
{
config.vim.startPlugins = ["blink-cmp"];
}
```
## Modular setup options {#sec-modular-setup-options}
Most plugins is initialized with a call to `require('plugin').setup({...})`.
We use a special function that lets you easily add support for such setup
options in a modular way: `mkPluginSetupOption`.
Once you have added the source of the plugin as shown above, you can define the
setup options like this:
```nix
# in modules/.../your-plugin/your-plugin.nix
{lib, ...}:
let
inherit (lib.types) bool int;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.your-plugin = {
setupOpts = mkPluginSetupOption "plugin name" {
enable_feature_a = mkOption {
type = bool;
default = false;
# ...
};
number_option = mkOption {
type = int;
default = 3;
# ...
};
};
};
}
```
```nix
# in modules/.../your-plugin/config.nix
{lib, config, ...}:
let
cfg = config.vim.your-plugin;
in {
vim.luaConfigRC = lib.nvim.dag.entryAnywhere ''
require('plugin-name').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts})
'';
}
```
This above config will result in this Lua script:
```lua
require('plugin-name').setup({
enable_feature_a = false,
number_option = 3,
})
```
Now users can set any of the pre-defined option field, and can also add their
own fields!
```nix
# in user's config
{
vim.your-plugin.setupOpts = {
enable_feature_a = true;
number_option = 4;
another_field = "hello";
size = { # nested fields work as well
top = 10;
};
};
}
```
## Details of toLuaObject {#sec-details-of-toluaobject}
As you've seen above, `toLuaObject` is used to convert our nix attrSet
`cfg.setupOpts`, into a lua table. Here are some rules of the conversion:
1. Nix `null` converts to lua `nil`
2. Number and strings convert to their lua counterparts
3. Nix attribute sets (`{}`) and lists (`[]`) convert into Lua dictionaries and
tables respectively. Here is an example of Nix -> Lua conversion.
- `{foo = "bar"}` -> `{["foo"] = "bar"}`
- `["foo" "bar"]` -> `{"foo", "bar"}`
4. You can write raw Lua code using `lib.generators.mkLuaInline`. This function
is part of nixpkgs, and is accessible without relying on **nvf**'s extended
library.
- `mkLuaInline "function add(a, b) return a + b end"` will yield the
following result:
```nix
{
_type = "lua-inline";
expr = "function add(a, b) return a + b end";
}
```
The above expression will be interpreted as a Lua expression in the final
config. Without the `mkLuaInline` function, you will only receive a string
literal. You can use it to feed plugin configuration tables Lua functions
that return specific values as expected by the plugins.
```nix
{
vim.your-plugin.setupOpts = {
on_init = lib.generators.mkLuaInline ''
function()
print('we can write lua!')
end
'';
};
}
```
## Lazy plugins {#sec-lazy-plugins}
If the plugin can be lazy-loaded, `vim.lazy.plugins` should be used to add it.
Lazy plugins are managed by `lz.n`.
```nix
# in modules/.../your-plugin/config.nix
{config, ...}: let
cfg = config.vim.your-plugin;
in {
vim.lazy.plugins.your-plugin = {
# Instead of vim.startPlugins, use this:
package = "your-plugin";
# ıf your plugin uses the `require('your-plugin').setup{...}` pattern
setupModule = "your-plugin";
inherit (cfg) setupOpts;
# Events that trigger this plugin to be loaded
event = ["DirChanged"];
cmd = ["YourPluginCommand"];
# Plugin Keymaps
keys = [
# We'll cover this in detail in the 'keybinds' section
{
key = "<leader>d";
mode = "n";
action = ":YourPluginCommand";
}
];
};
}
```
This results in the following lua code:
```lua
require('lz.n').load({
{
"name-of-your-plugin",
after = function()
require('your-plugin').setup({
--[[ your setupOpts ]]--
})
end,
event = {"DirChanged"},
cmd = {"YourPluginCommand"},
keys = {
{"<leader>d", ":YourPluginCommand", mode = {"n"}},
},
}
})
```
[`vim.lazy.plugins` spec]: https://notashelf.github.io/nvf/options.html#opt-vim.lazy.plugins
A full list of options can be found in the [`vim.lazy.plugins` spec] on the
rendered manual.

View file

@ -1,17 +0,0 @@
# Getting Started {#sec-contrib-getting-started}
You, naturally, would like to start by forking the repository to get started. If
you are new to Git and GitHub, do have a look at GitHub's
[Fork a repo guide](https://help.github.com/articles/fork-a-repo/) for
instructions on how you can do this. Once you have a fork of **nvf**, you should
create a separate branch based on the most recent `main` branch. Give your
branch a reasonably descriptive name (e.g. `feature/debugger` or
`fix/pesky-bug`) and you are ready to work on your changes
Implement your changes and commit them to the newly created branch and when you
are happy with the result, and positive that it fulfills our
[Contributing Guidelines](#sec-guidelines), push the branch to GitHub and
[create a pull request](https://help.github.com/articles/creating-a-pull-request).
The default pull request template available on the **nvf** repository will guide
you through the rest of the process, and we'll gently nudge you in the correct
direction if there are any mistakes.

View file

@ -1,188 +0,0 @@
# Guidelines {#sec-guidelines}
If your contribution tightly follows the guidelines, then there is a good chance
it will be merged without too much trouble. Some of the guidelines will be
strictly enforced, others will remain as gentle nudges towards the correct
direction. As we have no automated system enforcing those guidelines, please try
to double check your changes before making your pull request in order to avoid
"faulty" code slipping by.
If you are uncertain how these rules affect the change you would like to make
then feel free to start a discussion in the
[discussions tab](https://github.com/NotAShelf/nvf/discussions) ideally (but not
necessarily) before you start developing.
## Adding Documentation {#sec-guidelines-documentation}
[Nixpkgs Flavoured Markdown]: https://github.com/NixOS/nixpkgs/blob/master/doc/README.md#syntax
Almost all changes warrant updates to the documentation: at the very least, you
must update the changelog. Both the manual and module options use
[Nixpkgs Flavoured Markdown].
The HTML version of this manual containing both the module option descriptions
and the documentation of **nvf** (such as this page) can be generated and opened
by typing the following in a shell within a clone of the **nvf** Git repository:
```console
$ nix build .#docs-html
$ xdg-open $PWD/result/share/doc/nvf/index.html
```
## Formatting Code {#sec-guidelines-formatting}
Make sure your code is formatted as described in
[code-style section](#sec-guidelines-code-style). To maintain consistency
throughout the project you are encouraged to browse through existing code and
adopt its style also in new code.
## Formatting Commits {#sec-guidelines-commit-message-style}
Similar to [code style guidelines](#sec-guidelines-code-style) we encourage a
consistent commit message format as described in
[commit style guidelines](#sec-guidelines-commit-style).
## Commit Style {#sec-guidelines-commit-style}
The commits in your pull request should be reasonably self-contained. Which
means each and every commit in a pull request should make sense both on its own
and in general context. That is, a second commit should not resolve an issue
that is introduced in an earlier commit. In particular, you will be asked to
amend any commit that introduces syntax errors or similar problems even if they
are fixed in a later commit.
The commit messages should follow the
[seven rules](https://chris.beams.io/posts/git-commit/#seven-rule), except for
"Capitalize the subject line". We also ask you to include the affected code
component or module in the first line. A commit message ideally, but not
necessarily, follow the given template from home-manager's own documentation
```
{component}: {description}
{long description}
```
where `{component}` refers to the code component (or module) your change
affects, `{description}` is a very brief description of your change, and
`{long description}` is an optional clarifying description. As a rare exception,
if there is no clear component, or your change affects many components, then the
`{component}` part is optional. See
[example commit message](#sec-guidelines-ex-commit-message) for a commit message
that fulfills these requirements.
## Example Commit {#sec-guidelines-ex-commit-message}
The commit
[69f8e47e9e74c8d3d060ca22e18246b7f7d988ef](https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef)
in home-manager contains the following commit message.
```
starship: allow running in Emacs if vterm is used
The vterm buffer is backed by libvterm and can handle Starship prompts
without issues.
```
Similarly, if you are contributing to **nvf**, you would include the scope of
the commit followed by the description:
```
languages/ruby: init module
Adds a language module for Ruby, adds appropriate formatters and Treesitter grammars
```
Long description can be omitted if the change is too simple to warrant it. A
minor fix in spelling or a formatting change does not warrant long description,
however, a module addition or removal does as you would like to provide the
relevant context, i.e. the reasoning behind it, for your commit.
Finally, when adding a new module, say `modules/foo.nix`, we use the fixed
commit format `foo: add module`. You can, of course, still include a long
description if you wish.
In case of nested modules, i.e `modules/languages/java.nix` you are recommended
to contain the parent as well - for example `languages/java: some major change`.
## Code Style {#sec-guidelines-code-style}
### Treewide {#sec-code-style-treewide}
Keep lines at a reasonable width, ideally 80 characters or less. This also
applies to string literals and module descriptions and documentation.
### Nix {#sec-code-style-nix}
[alejandra]: https://github.com/kamadorueda/alejandra
**nvf** is formatted by the [alejandra] tool and the formatting is checked in
the pull request and push workflows. Run the `nix fmt` command inside the
project repository before submitting your pull request.
While Alejandra is mostly opinionated on how code looks after formatting,
certain changes are done at the user's discretion based on how the original code
was structured.
Please use one line code for attribute sets that contain only one subset. For
example:
```nix
# parent modules should always be unfolded
# which means module = { value = ... } instead of module.value = { ... }
module = {
value = mkEnableOption "some description" // { default = true; }; # merges can be done inline where possible
# same as parent modules, unfold submodules
subModule = {
# this is an option that contains more than one nested value
# Note: try to be careful about the ordering of `mkOption` arguments.
# General rule of thumb is to order from least to most likely to change.
# This is, for most cases, type < default < description.
# Example, if present, would be between default and description
someOtherValue = mkOption {
type = lib.types.bool;
default = true;
description = "Some other description";
};
};
}
```
If you move a line down after the merge operator, Alejandra will automatically
unfold the whole merged attrset for you, which we **do not** want.
```nix
module = {
key = mkEnableOption "some description" // {
default = true; # we want this to be inline
}; # ...
}
```
For lists, it is mostly up to your own discretion how you want to format them,
but please try to unfold lists if they contain multiple items and especially if
they are to include comments.
```nix
# this is ok
acceptableList = [
item1 # comment
item2
item3 # some other comment
item4
];
# this is not ok
listToBeAvoided = [item1 item2 /* comment */ item3 item4];
# this is ok
acceptableList = [item1 item2];
# this is also ok if the list is expected to contain more elements
acceptableList= [
item1
item2
# more items if needed...
];
```

View file

@ -1,97 +0,0 @@
# Keybinds {#sec-keybinds}
As of 0.4, there exists an API for writing your own keybinds and a couple of
useful utility functions are available in the
[extended standard library](https://github.com/NotAShelf/nvf/tree/main/lib). The
following section contains a general overview to how you may utilize said
functions.
## Custom Key Mappings Support for a Plugin {#sec-custom-key-mappings}
To set a mapping, you should define it in `vim.keymaps`.
An example, simple keybinding, can look like this:
```nix
{
vim.keymaps = [
{
key = "<leader>wq";
mode = ["n"];
action = ":wq<CR>";
silent = true;
desc = "Save file and quit";
}
];
}
```
There are many settings available in the options. Please refer to the
[documentation](https://notashelf.github.io/nvf/options.html#opt-vim.keymaps) to
see a list of them.
**nvf** provides a helper function, so that you don't have to write the mapping
attribute sets every time:
- `mkKeymap`, which mimics neovim's `vim.keymap.set` function
You can read the source code of some modules to see them in action, but the
usage should look something like this:
```nix
# plugindefinition.nix
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.binds) mkMappingOption;
in {
options.vim.plugin = {
enable = mkEnableOption "Enable plugin";
# Mappings should always be inside an attrset called mappings
mappings = {
workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "<leader>lwd";
documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "<leader>ld";
lspReferences = mkMappingOption "LSP References [trouble]" "<leader>lr";
quickfix = mkMappingOption "QuickFix [trouble]" "<leader>xq";
locList = mkMappingOption "LOCList [trouble]" "<leader>xl";
symbols = mkMappingOption "Symbols [trouble]" "<leader>xs";
};
}
```
```nix
# config.nix
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.binds) mkKeymap;
cfg = config.vim.plugin;
keys = cfg.mappings;
inherit (options.vim.lsp.trouble) mappings;
in {
config = mkIf cfg.enable {
vim.keymaps = [
(mkKeymap "n" keys.workspaceDiagnostics "<cmd>Trouble toggle diagnostics<CR>" {desc = mappings.workspaceDiagnostics.description;})
(mkKeymap "n" keys.documentDiagnostics "<cmd>Trouble toggle diagnostics filter.buf=0<CR>" {desc = mappings.documentDiagnostics.description;})
(mkKeymap "n" keys.lspReferences "<cmd>Trouble toggle lsp_references<CR>" {desc = mappings.lspReferences.description;})
(mkKeymap "n" keys.quickfix "<cmd>Trouble toggle quickfix<CR>" {desc = mappings.quickfix.description;})
(mkKeymap "n" keys.locList "<cmd>Trouble toggle loclist<CR>" {desc = mappings.locList.description;})
(mkKeymap "n" keys.symbols "<cmd>Trouble toggle symbols<CR>" {desc = mappings.symbols.description;})
];
};
}
```
::: {.note}
If you have come across a plugin that has an API that doesn't seem to easily
allow custom keybindings, don't be scared to implement a draft PR. We'll help
you get it done.
:::

View file

@ -1,15 +0,0 @@
# Testing Changes {#sec-testing-changes}
Once you have made your changes, you will need to test them thoroughly. If it is
a module, add your module option to `configuration.nix` (located in the root of
this project) inside `neovimConfiguration`. Enable it, and then run the maximal
configuration with `nix run .#maximal -Lv` to check for build errors. If neovim
opens in the current directory without any error messages (you can check the
output of `:messages` inside neovim to see if there are any errors), then your
changes are good to go. Open your pull request, and it will be reviewed as soon
as possible.
If it is not a new module, but a change to an existing one, then make sure the
module you have changed is enabled in the maximal configuration by editing
`configuration.nix`, and then run it with `nix run .#maximal -Lv`. Same
procedure as adding a new module will apply here.

View file

@ -1,4 +1,18 @@
# Try it out {#ch-try-it-out}
# Introduction {#nvf-manual}
Version @NVF_VERSION@
## Preface {#ch-preface}
### What is nvf {#sec-what-is-it}
**nvf** is a highly modular, configurable, extensible and easy to use Neovim
configuration framework built and designed to be used with Nix. Boasting
flexibility, robustness and ease of use, this projecct allows you to configure a
fully featured Neovim instance with a few lines of Nix with lots of options for
advanced users as well.
## Try it out {#ch-try-it-out}
Thanks to the portability of Nix, you can try out nvf without actually
installing it to your machine. Below are the commands you may run to try out
@ -29,10 +43,11 @@ $ nix run github:notashelf/nvf#maximal
### Available Configurations {#sec-available-configs}
::: {.info}
The below configurations are provided for demonstration purposes, and are
**not** designed to be installed as is. You may
> [!NOTE]
> The below configurations are provided for demonstration purposes, and are
> **not** designed to be installed as is. You may refer to the installation
> steps below and the helpful tips section for details on creating your own
> configurations.
#### Nix {#sec-configs-nix}
@ -42,6 +57,7 @@ default package, you will build Neovim with this config.
```bash
$ nix run github:notashelf/nvf#nix test.nix
# => This will open a file called `test.nix` with Nix LSP and syntax highlighting
```
This command will start Neovim with some opinionated plugin configurations, and
@ -57,16 +73,29 @@ mind, however, that this will pull a lot of dependencies.
```bash
$ nix run github:notashelf/nvf#maximal -- test.nix
# => This will open a file called `test.nix` with a variety of plugins available
```
It uses the same configuration template with the [Nix](#sec-configs-nix)
configuration, but supports many more languages, and enables more utility,
companion or fun plugins.
::: {.warning}
> [!WARNING]
> Running the maximal config will download _a lot_ of packages as it is
> downloading language servers, formatters, and more. If CPU time and bandwidth
> are concerns, please use the default package instead.
Running the maximal config will download _a lot_ of packages as it is
downloading language servers, formatters, and more. If CPU time and bandwidth
are concerns, please use the default package instead.
## Installing nvf {#ch-installation}
:::
[module installation section]: #ch-module-installation
There are multiple ways of installing nvf on your system. You may either choose
the standalone installation method, which does not depend on a module system and
may be done on any system that has the Nix package manager or the appropriate
modules for NixOS and home-manager as described in the
[module installation section].
```{=include=}
installation/custom-configuration.md
installation/modules.md
```

View file

@ -1,14 +0,0 @@
# Installing nvf {#ch-installation}
[module installation section]: #ch-module-installation
There are multiple ways of installing nvf on your system. You may either choose
the standalone installation method, which does not depend on a module system and
may be done on any system that has the Nix package manager or the appropriate
modules for NixOS and home-manager as described in the
[module installation section].
```{=include=} chapters
installation/custom-configuration.md
installation/modules.md
```

View file

@ -1,30 +0,0 @@
# nvf manual {#nvf-manual}
## Version @NVF_VERSION@
```{=include=} preface
preface.md
try-it-out.md
```
```{=include=} parts
installation.md
configuring.md
tips.md
```
```{=include=} chapters
hacking.md
```
```{=include=} appendix html:into-file=//quirks.html
quirks.md
```
```{=include=} appendix html:into-file=//options.html
options.md
```
```{=include=} appendix html:into-file=//release-notes.html
release-notes/release-notes.md
```

View file

@ -1,21 +0,0 @@
# nvf Configuration Options {#ch-options}
Below are the module options provided by nvf, in no particular order. Most
options will include useful comments, warnings or setup tips on how a module
option is meant to be used as well as examples in complex cases.
An offline version of this page is bundled with nvf as a part of the manpages
which you can access with `man 5 nvf`. Please let us know if you believe any of
the options below are missing useful examples.
<!--
In the manual, individual options may be referenced in Hyperlinks as follows:
[](#opt-vim.*) If changing the prefix here, do keep in mind the #opt- suffix will have
to be changed everywhere.
-->
```{=include=} options
id-prefix: opt-
list-id: nvf-options
source: @OPTIONS_JSON@
```

View file

@ -1,20 +0,0 @@
# Preface {#ch-preface}
## What is nvf {#sec-what-is-it}
nvf is a highly modular, configurable, extensible and easy to use Neovim
configuration in Nix. Designed for flexibility and ease of use, nvf allows you
to easily configure your fully featured Neovim instance with a few lines of Nix.
## Bugs & Suggestions {#sec-bugs-suggestions}
[issue tracker]: https://github.com/notashelf/nvf/issues
[discussions tab]: https://github.com/notashelf/nvf/discussions
[pull requests tab]: https://github.com/notashelf/nvf/pulls
If you notice any issues with nvf, or this documentation, then please consider
reporting them over at the [issue tracker]. Issues tab, in addition to the
[discussions tab] is a good place as any to request new features.
You may also consider submitting bugfixes, feature additions and upstreamed
changes that you think are critical over at the [pull requests tab].

View file

@ -5,9 +5,41 @@ be it a result of generating Lua from Nix, or the state of packaging. This page,
in turn, will list any known modules or plugins that are known to misbehave, and
possible workarounds that you may apply.
<!-- If adding a new known quirk, please create a new page in quirks/ and include
the name of the file here.-->
## NodeJS {#ch-quirks-nodejs}
```{=include=} chapters
quirks/nodejs.md
```
### eslint-plugin-prettier {#sec-eslint-plugin-prettier}
When working with NodeJS, everything works as expected, but some projects have
settings that can fool nvf.
If [this plugin](https://github.com/prettier/eslint-plugin-prettier) or similar
is included, you might get a situation where your eslint configuration diagnoses
your formatting according to its own config (usually `.eslintrc.js`).
The issue there is your formatting is made via prettierd.
This results in auto-formatting relying on your prettier config, while your
eslint config diagnoses formatting
[which it's not supposed to](https://prettier.io/docs/en/comparison.html))
In the end, you get discrepancies between what your editor does and what it
wants.
Solutions are:
1. Don't add a formatting config to eslint, and separate prettier and eslint.
2. PR this repo to add an ESLint formatter and configure nvf to use it.
## Bugs & Suggestions {#ch-bugs-suggestions}
[issue tracker]: https://github.com/notashelf/nvf/issues
[discussions tab]: https://github.com/notashelf/nvf/discussions
[pull requests tab]: https://github.com/notashelf/nvf/pulls
Some quirks are not exactly quirks, but bugs in the module systeme. If you
notice any issues with nvf, or this documentation, then please consider
reporting them over at the [issue tracker]. Issues tab, in addition to the
[discussions tab] is a good place as any to request new features.
You may also consider submitting bugfixes, feature additions and upstreamed
changes that you think are critical over at the [pull requests tab].

View file

@ -1,24 +0,0 @@
# NodeJS {#ch-quirks-nodejs}
## eslint-plugin-prettier {#sec-eslint-plugin-prettier}
When working with NodeJS, everything works as expected, but some projects have
settings that can fool nvf.
If [this plugin](https://github.com/prettier/eslint-plugin-prettier) or similar
is included, you might get a situation where your eslint configuration diagnoses
your formatting according to its own config (usually `.eslintrc.js`).
The issue there is your formatting is made via prettierd.
This results in auto-formatting relying on your prettier config, while your
eslint config diagnoses formatting
[which it's not supposed to](https://prettier.io/docs/en/comparison.html))
In the end, you get discrepancies between what your editor does and what it
wants.
Solutions are:
1. Don't add a formatting config to eslint, and separate prettier and eslint.
2. PR this repo to add an ESLint formatter and configure nvf to use it.

View file

@ -0,0 +1,15 @@
# Release Notes {#ch-release-notes}
This section lists the release notes for tagged version of **nvf** and the
current main current main branch
```{=include=} chapters
release-notes/rl-0.1.md
release-notes/rl-0.2.md
release-notes/rl-0.3.md
release-notes/rl-0.4.md
release-notes/rl-0.5.md
release-notes/rl-0.6.md
release-notes/rl-0.7.md
release-notes/rl-0.8.md
```

View file

@ -1,4 +1,4 @@
# Release 0.1 {#sec-release-0.1}
# Release 0.1 {#sec-release-0-1}
This is the current master branch and information here is not final. These are
changes from the v0.1 tag.
@ -7,7 +7,7 @@ Special thanks to [home-manager](https://github.com/nix-community/home-manager/)
for this release. Docs/manual generation, the new module evaluation system, and
DAG implementation are from them.
## Changelog {#sec-release-0.1-changelog}
## Changelog {#sec-release-0-1-changelog}
[jordanisaacs](https://github.com/jordanisaacs):

View file

@ -1,8 +1,8 @@
# Release 0.2 {#sec-release-0.2}
# Release 0.2 {#sec-release-0-2}
Release notes for release 0.2
## Changelog {#sec-release-0.2-changelog}
## Changelog {#sec-release-0-2-changelog}
[notashelf](https://github.com/notashelf):
@ -10,55 +10,39 @@ Release notes for release 0.2
default, while `minimap.vim` is available with its code-minimap dependency.
- A complementary plugin, `obsidian.nvim` and the Neovim alternative for Emacs'
orgmode with `orgmode.nvim` have been added. Both will be disabled by default.
- Smooth scrolling for ANY movement command is now available with
`cinnamon.nvim`
- You will now notice a dashboard on startup. This is provided by the
`alpha.nvim` plugin. You can use any of the three available dashboard plugins,
or disable them entirely.
- There is now a scrollbar on active buffers, which can highlight errors by
hooking to your LSPs. This is on by default, but can be toggled off under
`vim.visuals` if seen necessary.
- Discord Rich Presence has been added through `presence.nvim` for those who
want to flex that they are using the _superior_ text editor.
- An icon picker is now available with telescope integration. You can use
`:IconPickerInsert` or `:IconPickerYank` to add icons to your code.
- A general-purpose cheatsheet has been added through `cheatsheet.nvim`. Forget
no longer!
- `ccc.nvim` has been added to the default plugins to allow picking colors with
ease.
- Most UI components of Neovim have been replaced through the help of
`noice.nvim`. There are also notifications and custom UI elements available
for Neovim messages and prompts.
- A (floating by default) terminal has been added through `toggleterm.nvim`.
- Harness the power of ethical (`tabnine.nvim`) and not-so-ethical
(`copilot.lua`) AI by those new assistant plugins. Both are off by default,
TabNine needs to be wrapped before it's working.
- Experimental mouse gestures have been added through `gesture.nvim`. See plugin
page and the relevant module for more details on how to use.
- Re-open last visited buffers via `nvim-session-manager`. Disabled by default
as deleting buffers seems to be problematic at the moment.
- Most of NvimTree's configuration options have been changed with some options
being toggled to off by default.
- Lualine had its configuration simplified and style toned down. Less color,
more info.
- Modules where multiple plugin configurations were in the same directory have
been simplified. Each plugin inside a single module gets its directory to be
imported.
- Separate config options with the same parent attribute have been merged into
one for simplicity.

View file

@ -1,4 +1,4 @@
# Release 0.3 {#sec-release-0.3}
# Release 0.3 {#sec-release-0-3}
Release 0.3 had to come out before I wanted it to due to Neovim 0.9 dropping
into nixpkgs-unstable. The Treesitter changes have prompted a Treesitter rework,
@ -7,7 +7,7 @@ those are downstreamed from the original repository. The feature requests that
was originally planned for 0.3 have been moved to 0.4, which should come out
soon.
## Changelog {#sec-release-0.3-changelog}
## Changelog {#sec-release-0-3-changelog}
- We have transitioned to flake-parts, from flake-utils to extend the
flexibility of this flake. This means the flake structure is different than

View file

@ -1,4 +1,4 @@
# Release 0.4 {#sec-release-0.4}
# Release 0.4 {#sec-release-0-4}
Following the release of v0.3, I have decided to release v0.4 with a massive new
change: customizable keybinds. As of the 0.4 release, keybinds will no longer be
@ -12,7 +12,7 @@ as `lazygit` integration and the new experimental Lua loader of Neovim 0.9
thanks to our awesome contributors who made this update possible during my
absence.
## Changelog {#sec-release-0.4-changelog}
## Changelog {#sec-release-0-4-changelog}
[n3oney](https://github.com/n3oney):

View file

@ -1,8 +1,6 @@
# Release 0.5 {#sec-release-0.5}
# Release 0.5 {#sec-release-0-5}
Release notes for release 0.5
## Changelog {#sec-release-0.5-changelog}
## Changelog {#sec-release-0-5-changelog}
[vagahbond](https://github.com/vagahbond):

View file

@ -1,4 +1,4 @@
# Release 0.6 {#sec-release-0.6}
# Release 0.6 {#sec-release-0-6}
Release notes for release 0.6

View file

@ -1,4 +1,4 @@
# Release 0.7 {#sec-release-0.7}
# Release 0.7 {#sec-release-0-7}
Release notes for release 0.7

View file

@ -1,4 +1,4 @@
# Release 0.8 {#sec-release-0.8}
# Release 0.8 {#sec-release-0-8}
## Breaking changes
@ -28,6 +28,12 @@
align with the "hunks" themed mapping and avoid conflict with the new [neogit]
group.
- LSP keybinds and related plugin integrations are now attached in an LspAttach
autocmd event. If you were calling `default_on_attach()` in your LSP setup you
can remove them now.
## Changelog {#sec-release-0-8-changelog}
[NotAShelf](https://github.com/notashelf):
[typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim
@ -111,6 +117,9 @@
- Add [hunk.nvim], Neovim plugin & tool for splitting diffs in Neovim. Available
as `vim.git.hunk-nvim`
- Move `crates.nvim` into `languages.rust.extensions and support` `setupOpts`
for the plugin. Deprecates the top level "crates" option in `languages.rust`.
[sjcobb2022](https://github.com/sjcobb2022):
- Migrate all current lsp configurations to `vim.lsp.server` and remove internal
@ -135,6 +144,8 @@
- Moved code setting `additionalRuntimePaths` and `enableLuaLoader` out of
`luaConfigPre`'s default to prevent being overridden
- Use conform over custom autocmds for LSP format on save
- Move LSP keybinds and other related plugin integrations into an LspAttach
event.
[diniamo](https://github.com/diniamo):
@ -289,10 +300,13 @@
- Fix [blink.cmp] breaking when built-in sources were modified.
- Fix [conform.nvim] not allowing disabling formatting on and after save. Use
`null` value to disable them if conform is enabled.
- Add [markdown-oxide](https://github.com/Feel-ix-343/markdown-oxide) option to
markdown language module.
- Fix Helm-YAML language module integration. YAML diagnostics will now remain in
`helmfile`s when both are enabled.
- Fix YAML language module not activating LSP keybinds if the Helm language
module was also enabled.
- Fix `json` language module (default) language server not activating.
[TheColorman](https://github.com/TheColorman):
@ -492,6 +506,7 @@
- fix broken `neorg` grammars
- remove obsolete warning in the `otter` module
- add mainProgram attribute to vala language server wrapper
[JManch](https://github.com/JManch):
@ -556,8 +571,23 @@
- Add [nvim-highlight-colors] plugin in `vim.ui.nvim-highlight-colors` with
`enable` and `setupOpts`
[simon-wg](https://github.com/simon-wg):
- Fix [blink.cmp] keymap preset types to allow alternate cmdline, terminal, etc
modes to `inherit` the default mode keymaps. This is an option as per the
[blink.cmp] docs and is now supported in nvf.
[PartyWumpus](https://github.com/PartyWumpus):
[typst-concealer]: https://github.com/PartyWumpus/typst-concealer
- Add inline typst concealing support under `vim.languages.typst` using
[typst-concealer]. [simon-wg](https://github.com/simon-wg):
- Update `python` language module to use correct lsp binary.
- Fix `python` pyright and basedpyright language servers not using default on
attach behavior.
[critical](https://github.com/critical):
[mellow.nvim]: https://github.com/mellow-theme/mellow.nvim
- Add [mellow.nvim] plugin for vim and lualine theme support

View file

@ -6,7 +6,7 @@ documentation, configuring **nvf** with pure Lua and using custom plugin sources
in **nvf** in this section. For general configuration tips, please see previous
chapters.
```{=include=} chapters
```{=include=}
tips/debugging-nvf.md
tips/offline-docs.md
tips/pure-lua-config.md

67
flake.lock generated
View file

@ -16,6 +16,21 @@
"url": "https://git.lix.systems/lix-project/flake-compat.git"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -23,11 +38,11 @@
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
@ -38,11 +53,11 @@
},
"mnw": {
"locked": {
"lastModified": 1756659871,
"narHash": "sha256-v6Rh4aQ6RKjM2N02kK9Usn0Ix7+OY66vNpeklc1MnGE=",
"lastModified": 1758834834,
"narHash": "sha256-Y7IvY4F8vajZyp3WGf+KaiIVwondEkMFkt92Cr9NZmg=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "ed6cc3e48557ba18266e598a5ebb6602499ada16",
"rev": "cfbc7d1cc832e318d0863a5fc91d940a96034001",
"type": "github"
},
"original": {
@ -51,13 +66,48 @@
"type": "github"
}
},
"ndg": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1760777965,
"narHash": "sha256-PHmDh1GxoBixpgtRCrBCvXJee/tCb6T57MLbwKfIURg=",
"owner": "feel-co",
"repo": "ndg",
"rev": "30b955582f0cd869a86007f491252bbffde48f8b",
"type": "github"
},
"original": {
"owner": "feel-co",
"repo": "ndg",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1761880412,
"narHash": "sha256-QoJjGd4NstnyOG4mm4KXF+weBzA2AH/7gn1Pmpfcb0A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8913c168d1c56dc49a7718685968f38752171c3b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1756696532,
"narHash": "sha256-6FWagzm0b7I/IGigOv9pr6LL7NQ86mextfE8g8Q6HBg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "58dcbf1ec551914c3756c267b8b9c8c86baa1b2f",
"rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386",
"type": "github"
},
"original": {
@ -72,7 +122,8 @@
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"mnw": "mnw",
"nixpkgs": "nixpkgs",
"ndg": "ndg",
"nixpkgs": "nixpkgs_2",
"systems": "systems"
}
},

View file

@ -105,5 +105,8 @@
# Alternate neovim-wrapper
mnw.url = "github:Gerg-L/mnw";
# Alternative documentation generator
ndg.url = "github:feel-co/ndg";
};
}

View file

@ -3,7 +3,6 @@
pkgs,
config,
self',
inputs',
...
}: {
devShells = {

View file

@ -8,7 +8,7 @@
# - the addition of the function `entryBefore` indicating a "wanted
# by" relationship.
{lib}: let
inherit (builtins) isAttrs attrValues attrNames elem all head tail length toJSON isString;
inherit (builtins) isAttrs attrValues attrNames elem all head tail length toJSON isString removeAttrs;
inherit (lib.attrsets) filterAttrs mapAttrs;
inherit (lib.lists) toposort;
inherit (lib.nvim.dag) empty isEntry entryBetween entryAfter entriesBetween entryAnywhere topoSort;
@ -169,10 +169,11 @@ in {
else value)
dag;
sortedDag = topoSort finalDag;
loopDetail = map (loops: removeAttrs loops ["data"]) sortedDag.loops;
result =
if sortedDag ? result
then mapResult sortedDag.result
else abort ("Dependency cycle in ${name}: " + toJSON sortedDag);
else abort ("Dependency cycle in ${name}: " + toJSON loopDetail);
in
result;
}

View file

@ -1,92 +1,52 @@
# Helpers for converting values to lua
{lib}: let
inherit (builtins) hasAttr head throw typeOf isList isAttrs isBool isInt isString isPath isFloat toJSON;
inherit (lib.attrsets) mapAttrsToList filterAttrs;
inherit (lib.strings) concatStringsSep concatMapStringsSep stringToCharacters;
inherit (lib.trivial) boolToString warn;
in rec {
# Convert a null value to lua's nil
nullString = value:
if value == null
then "nil"
else "'${value}'";
# convert an expression to lua
expToLua = exp:
if isList exp
then listToLuaTable exp # if list, convert to lua table
else if isAttrs exp
then attrsetToLuaTable exp # if attrs, convert to table
else if isBool exp
then boolToString exp # if bool, convert to string
else if isInt exp
then toString exp # if int, convert to string
else if exp == null
then "nil"
else (toJSON exp); # otherwise jsonify the value and print as is
# convert list to a lua table
listToLuaTable = list:
"{ " + (concatStringsSep ", " (map expToLua list)) + " }";
# convert attrset to a lua table
attrsetToLuaTable = attrset:
"{ "
+ (
concatStringsSep ", "
(
mapAttrsToList (
name: value:
name
+ " = "
+ (expToLua value)
)
attrset
)
)
+ " }";
# Convert a list of lua expressions to a lua table. The difference to listToLuaTable is that the elements here are expected to be lua expressions already, whereas listToLuaTable converts from nix types to lua first
luaTable = items: ''{${concatStringsSep "," items}}'';
isLuaInline = object: (object._type or null) == "lua-inline";
toLuaObject = args:
if isAttrs args
then
if isLuaInline args
then args.expr
else if hasAttr "__empty" args
then
warn ''
Using `__empty` to define an empty lua table is deprecated. Use an empty attrset instead.
'' "{ }"
else
"{"
+ (concatStringsSep ","
(mapAttrsToList
(n: v:
if head (stringToCharacters n) == "@"
then toLuaObject v
else "[${toLuaObject n}] = " + (toLuaObject v))
(filterAttrs
(_: v: v != null)
args)))
+ "}"
else if isList args
then "{" + concatMapStringsSep "," toLuaObject args + "}"
else if isString args
then
# This should be enough!
toJSON args
else if isPath args
then toJSON (toString args)
else if isBool args
then "${boolToString args}"
else if isFloat args
then "${toString args}"
else if isInt args
then "${toString args}"
else if (args == null)
then "nil"
else throw "could not convert object of type `${typeOf args}` to lua object";
}
{
int = toString args;
float = toString args;
# escapes \ and quotes
string = builtins.toJSON args;
path = builtins.toJSON args;
bool = lib.boolToString args;
null = "nil";
list = "{${lib.concatMapStringsSep ",\n" toLuaObject args}}";
set =
if lib.isDerivation args
then ''"${args}"''
else if isLuaInline args
then args.expr
else "{${
lib.pipe args [
(lib.filterAttrs (_: v: v != null))
(builtins.mapAttrs (
n: v:
if lib.hasPrefix "@" n
then toLuaObject v
else "[${toLuaObject n}] = ${toLuaObject v}"
))
builtins.attrValues
(lib.concatStringsSep ",\n")
]
}}";
}
.${
builtins.typeOf args
}
or (builtins.throw "Could not convert object of type `${builtins.typeOf args}` to lua object");
in
{
inherit isLuaInline toLuaObject;
luaTable = x: (toLuaObject (map lib.mkLuaInline x));
}
// lib.genAttrs [
"nullString"
"expToLua"
"listToLuaTable"
"attrsetToLuaTable"
] (name: lib.warn "${name} is deprecated use toLuaObject instead" toLuaObject)

View file

@ -4,13 +4,11 @@
inherit (lib.strings) isString stringLength match;
inherit (lib.types) listOf mkOptionType coercedTo;
in {
mergelessListOf = elemType: let
super = listOf elemType;
in
super
// {
mergelessListOf = elemType:
mkOptionType {
name = "mergelessListOf";
description = "mergeless ${super.description}";
description = "mergeless list of ${elemType.description or "values"}";
inherit (lib.types.listOf elemType) check;
merge = mergeEqualOption;
};

View file

@ -62,7 +62,13 @@ in rec {
inherit (elemType) getSubModules;
getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name>"]);
substSubModules = m: dagOf (elemType.substSubModules m);
functor = (defaultFunctor name) // {wrapped = elemType;};
functor = {
name = name;
type = dagOf;
wrapped = elemType;
payload = elemType;
binOp = a: b: a;
};
nestedTypes.elemType = elemType;
};
}

View file

@ -259,6 +259,16 @@ in {
(mkRenamedLspServer "zig")
(mkRemovedLspPackage "zig")
# 2025-10-22
(mkRenamedOptionModule ["vim" "languages" "rust" "crates" "enable"] ["vim" "languages" "rust" "extensions" "crates-nvim" "enable"])
(mkRemovedOptionModule ["vim" "languages" "rust" "crates" "codeActions"] ''
'vim.languages.rust.crates' option has been moved to 'vim.languages.rust.extensions.crates-nvim' in full and the
codeActions option has been removed. To set up code actions again, you may use the the new 'setupOpts' option
located under 'vim.languages.rust.extensions.crates-nvim'. Refer to crates.nvim documentation for setup steps:
<https://github.com/Saecki/crates.nvim/wiki/Documentation-v0.7.1#in-process-language-server>
'')
]
# Migrated via batchRenameOptions. Further batch renames must be below this line.

View file

@ -9,7 +9,7 @@
inherit (lib.types) nullOr submodule listOf str bool;
inherit (lib.nvim.types) luaInline;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAfter;
inherit (lib.nvim.dag) entryAfter entryBetween;
autocommandType = submodule {
options = {
@ -144,7 +144,7 @@ in {
enabledAutogroups = filter (au: au.enable) cfg.augroups;
in {
luaConfigRC = {
augroups = entryAfter ["pluginConfigs"] (optionalString (enabledAutogroups != []) ''
augroups = entryBetween ["autocmds"] ["pluginConfigs"] (optionalString (enabledAutogroups != []) ''
local nvf_autogroups = {}
for _, group in ipairs(${toLuaObject enabledAutogroups}) do
if group.name then

View file

@ -77,7 +77,6 @@ in {
{
vim.lsp.servers."*" = {
capabilities = mkDefault (mkLuaInline "capabilities");
on_attach = mkDefault (mkLuaInline "default_on_attach");
};
}

View file

@ -9,7 +9,7 @@
inherit (lib.strings) concatLines concatStringsSep optionalString;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.types) listOf str attrsOf;
inherit (lib.nvim.lua) listToLuaTable;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAfter;
cfg = config.vim.spellcheck;
@ -152,7 +152,7 @@ in {
vim.api.nvim_create_augroup("nvf_autocmds", {clear = false})
vim.api.nvim_create_autocmd({ "FileType" }, {
group = "nvf_autocmds",
pattern = ${listToLuaTable cfg.ignoredFiletypes},
pattern = ${toLuaObject cfg.ignoredFiletypes},
callback = function()
vim.opt_local.spell = false
end,

View file

@ -3,7 +3,6 @@
lib,
...
}: let
inherit (builtins) filter;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.dag) entryBefore;

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -10,8 +11,7 @@
cfg = config.vim.assistant.chatgpt;
self = import ./chatgpt.nix {inherit lib;};
mappingDefinitions = self.options.vim.assistant.chatgpt.mappings;
mappingDefinitions = options.vim.assistant.chatgpt.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
maps = mkMerge [
(mkSetBinding mappings.editWithInstructions "<cmd>ChatGPTEditWithInstruction<CR>")

View file

@ -93,7 +93,7 @@ in {
accept = mkOption {
type = nullOr str;
default = "<M-l>";
description = "Accept suggetion";
description = "Accept suggestion";
};
acceptWord = mkOption {

View file

@ -9,7 +9,7 @@
freeformType = attrsOf (listOf (either str luaInline));
options = {
preset = mkOption {
type = enum ["default" "none" "super-tab" "enter" "cmdline"];
type = enum ["inherit" "default" "none" "super-tab" "enter" "cmdline"];
default = "none";
description = "keymap presets";
};

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -10,8 +11,7 @@
cfg = config.vim.git.git-conflict;
self = import ./git-conflict.nix {inherit lib config;};
gcMappingDefinitions = self.options.vim.git.git-conflict.mappings;
gcMappingDefinitions = options.vim.git.git-conflict.mappings;
gcMappings = addDescriptionsToMappings cfg.mappings gcMappingDefinitions;
in {

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (builtins) toJSON;
@ -12,8 +13,7 @@
cfg = config.vim.git.gitsigns;
self = import ./gitsigns.nix {inherit lib config;};
gsMappingDefinitions = self.options.vim.git.gitsigns.mappings;
gsMappingDefinitions = options.vim.git.gitsigns.mappings;
gsMappings = addDescriptionsToMappings cfg.mappings gsMappingDefinitions;
in {

View file

@ -26,8 +26,6 @@
workspace_required = true;
on_attach = mkLuaInline ''
function(client, bufnr)
default_on_attach(client, bufnr)
local function switch_source_header(bufnr)
local method_name = "textDocument/switchSourceHeader"
local params = vim.lsp.util.make_text_document_params(bufnr)
@ -77,8 +75,6 @@
};
on_attach = mkLuaInline ''
function(client, bufnr)
default_on_attach(client, bufnr)
local function switch_source_header(bufnr)
local method_name = "textDocument/switchSourceHeader"
local client = vim.lsp.get_clients({ bufnr = bufnr, name = "clangd", })[1]

View file

@ -8,10 +8,8 @@
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str;
inherit (lib.types) enum listOf package;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.attrsets) mapListToAttrs;
cfg = config.vim.languages.clojure;

View file

@ -63,12 +63,11 @@
};
on_attach = mkLuaInline ''
function(client, bufnr)
default_on_attach(client, bufnr)
local oe = require("omnisharp_extended")
${mkLspBinding "goToDefinition" "oe.lsp_definition"}
${mkLspBinding "goToType" "oe.lsp_type_definition"}
${mkLspBinding "listReferences" "oe.lsp_references"}
${mkLspBinding "listImplementations" "oe.lsp_implementation"}
local oe = require("omnisharp_extended")
${mkLspBinding "goToDefinition" "oe.lsp_definition"}
${mkLspBinding "goToType" "oe.lsp_type_definition"}
${mkLspBinding "listReferences" "oe.lsp_references"}
${mkLspBinding "listImplementations" "oe.lsp_implementation"}
end
'';
settings = {

View file

@ -161,7 +161,6 @@ in {
},
capabilities = capabilities,
on_attach = default_on_attach;
},
${optionalString cfg.dap.enable ''
debugger = {

View file

@ -10,13 +10,11 @@
inherit (lib.strings) optionalString;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.dag) entryAfter entryBefore;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAfter;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.meta) getExe';
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.attrsets) mapListToAttrs;
inherit (pkgs) haskellPackages;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.languages.haskell;
@ -34,7 +32,6 @@
''
function(client, bufnr)
local ht = require("haskell-tools")
default_on_attach(client, bufnr, ht)
local opts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', '<localleader>cl', vim.lsp.codelens.run, opts)
vim.keymap.set('n', '<localleader>hs', ht.hoogle.hoogle_signature, opts)
@ -122,7 +119,7 @@ in {
dap = {
cmd = ${
if isList cfg.dap.package
then expToLua cfg.dap.package
then toLuaObject cfg.dap.package
else ''{"${cfg.dap.package}/bin/haskell-debug-adapter"}''
},
},

View file

@ -17,7 +17,7 @@
defaultServers = ["jsonls"];
servers = {
jsonls = {
cmd = [(getExe' pkgs.vscode-langservers-extracted "vscode-json-languageserver") "--stdio"];
cmd = [(getExe' pkgs.vscode-langservers-extracted "vscode-json-language-server") "--stdio"];
filetypes = ["json" "jsonc"];
init_options = {provideFormatter = true;};
root_markers = [".git"];

View file

@ -23,6 +23,13 @@
filetypes = ["markdown" "markdown.mdx"];
root_markers = [".marksman.toml" ".git"];
};
markdown-oxide = {
enable = true;
cmd = [(getExe pkgs.markdown-oxide)];
filetypes = ["markdown"];
root_markers = [".git" ".obsidian" ".moxide.toml"];
};
};
defaultFormat = "deno_fmt";

View file

@ -42,7 +42,6 @@
};
on_attach = mkLuaInline ''
function(client, bufnr)
default_on_attach(client, bufnr);
vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightOrganizeImports', function()
local params = {
command = 'pyright.organizeimports',
@ -89,7 +88,6 @@
};
on_attach = mkLuaInline ''
function(client, bufnr)
default_on_attach(client, bufnr);
vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightOrganizeImports', function()
local params = {
command = 'basedpyright.organizeimports',

View file

@ -4,16 +4,15 @@
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkOption mkEnableOption literalMD;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.lists) isList;
inherit (lib.attrsets) attrNames;
inherit (lib.types) bool package str listOf either enum;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
inherit (lib.nvim.lua) expToLua toLuaObject;
inherit (lib.nvim.dag) entryAfter entryAnywhere;
cfg = config.vim.languages.rust;
@ -33,15 +32,6 @@ in {
package = mkGrammarOption pkgs "rust";
};
crates = {
enable = mkEnableOption "crates-nvim, tools for managing dependencies";
codeActions = mkOption {
description = "Enable code actions through null-ls";
type = bool;
default = true;
};
};
lsp = {
enable = mkEnableOption "Rust LSP support (rust-analyzer with extra tools)" // {default = config.vim.lsp.enable;};
package = mkOption {
@ -103,25 +93,32 @@ in {
default = pkgs.lldb;
};
};
extensions = {
crates-nvim = {
enable = mkEnableOption "crates.io dependency management [crates-nvim]";
setupOpts = mkPluginSetupOption "crates-nvim" {
completion.cmp.enable = mkOption {
type = bool;
default = config.vim.autocomplete.nvim-cmp.enable;
defaultText = "{option}`config.vim.autocomplete.nvim-cmp.enable`";
description = ''
Whether to add crates.nvim as a source for completion plugins. The following
plugins are supported by crates.nvim:
* nvim-cmp
* coq.nvim
However nvf only supports auto-setup for nvim-cmp.
'';
};
};
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.crates.enable {
vim = {
startPlugins = ["crates-nvim"];
lsp.null-ls.enable = mkIf cfg.crates.codeActions true;
autocomplete.nvim-cmp.sources = {crates = "[Crates]";};
pluginRC.rust-crates = entryAnywhere ''
require('crates').setup {
null_ls = {
enabled = ${boolToString cfg.crates.codeActions},
name = "crates.nvim",
}
}
'';
};
})
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
@ -140,7 +137,6 @@ in {
(mkIf (cfg.lsp.enable || cfg.dap.enable) {
vim = {
startPlugins = ["rustaceanvim"];
pluginRC.rustaceanvim = entryAfter ["lsp-setup"] ''
vim.g.rustaceanvim = {
${optionalString cfg.lsp.enable ''
@ -199,5 +195,28 @@ in {
'';
};
})
(mkIf cfg.extensions.crates-nvim.enable {
vim = let
withCompletion = cfg.extensions.crates-nvim.setupOpts.completion.cmp.enable;
in
mkMerge [
{
startPlugins = ["crates-nvim"];
pluginRC.rust-crates = entryAnywhere ''
require("crates").setup(${toLuaObject cfg.extensions.crates-nvim.setupOpts})
'';
}
# FIXME: this will not be necessary once crates.nvim creates a new release that
# ships improvements to the in-progress LSP module. If updating > 0.7.1, remember
# to update this section.
# See:
# <https://github.com/saecki/crates.nvim/wiki/Documentation-unstable#auto-completion>
(mkIf withCompletion {
autocomplete.nvim-cmp.sources = {crates = "[Crates]";};
})
];
})
]);
}

View file

@ -50,8 +50,6 @@
};
on_attach = mkLuaInline ''
function(client, bufnr)
default_on_attach(client, bufnr);
-- ts_ls provides `source.*` code actions that apply to the whole file. These only appear in
-- `vim.lsp.buf.code_action()` if specified in `context.only`.
vim.api.nvim_buf_create_user_command(0, 'LspTypescriptSourceAction', function()
@ -106,7 +104,6 @@
};
on_attach = mkLuaInline ''
function(client, bufnr)
default_on_attach(client, bufnr)
vim.api.nvim_buf_create_user_command(0, 'LspDenolsCache', function()
client:exec_cmd({
command = 'deno.cache',

View file

@ -4,15 +4,16 @@
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) nullOr enum attrsOf listOf package str;
inherit (lib.types) nullOr enum attrsOf listOf package str bool int;
inherit (lib.attrsets) attrNames;
inherit (lib.meta) getExe;
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption singleOrListOf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.attrsets) mapListToAttrs;
inherit (lib.nvim.binds) mkKeymap mkMappingOption;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.languages.typst;
@ -91,11 +92,8 @@
};
};
defaultFormat = "typstfmt";
defaultFormat = "typstyle";
formats = {
typstfmt = {
package = pkgs.typstfmt;
};
# https://github.com/Enter-tainer/typstyle
typstyle = {
package = pkgs.typstyle;
@ -178,6 +176,57 @@ in {
};
};
};
typst-concealer = {
enable = mkEnableOption ''
[typst-concealer]: https://github.com/PartyWumpus/typst-concealer
Inline typst preview for Neovim via [typst-concealer]
'';
mappings = {
toggleConcealing = mkMappingOption "Enable typst-concealer in buffer" "<leader>TT";
};
setupOpts = mkPluginSetupOption "typst-concealer" {
do_diagnostics = mkOption {
type = nullOr bool;
default = !cfg.lsp.enable;
description = "Should typst-concealer provide diagnostics on error?";
};
color = mkOption {
type = nullOr str;
default = null;
example = "rgb(\"#f012be\")";
description = "What color should typst-concealer render text/stroke with? (only applies when styling_type is 'colorscheme')";
};
enabled_by_default = mkOption {
type = nullOr bool;
default = null;
description = "Should typst-concealer conceal newly opened buffers by default?";
};
styling_type = mkOption {
type = nullOr (enum ["simple" "none" "colorscheme"]);
default = null;
description = "What kind of styling should typst-concealer apply to your typst?";
};
ppi = mkOption {
type = nullOr int;
default = null;
description = "What PPI should typst render at. Plugin default is 300, typst's normal default is 144.";
};
typst_location = mkOption {
type = str;
default = getExe pkgs.typst;
description = "Where should typst-concealer look for your typst binary?";
example = ''lib.getExe pkgs.typst'';
};
conceal_in_normal = mkOption {
type = nullOr bool;
default = null;
description = "Should typst-concealer still conceal when the normal mode cursor goes over a line.";
};
};
};
};
};
config = mkIf cfg.enable (mkMerge [
@ -212,5 +261,18 @@ in {
require("typst-preview").setup(${toLuaObject cfg.extensions.typst-preview-nvim.setupOpts})
'';
})
(mkIf cfg.extensions.typst-concealer.enable {
vim.lazy.plugins.typst-concealer = {
event = "BufRead *.typ";
package = "typst-concealer";
setupModule = "typst-concealer";
setupOpts = cfg.extensions.typst-concealer.setupOpts;
keys = [
(mkKeymap "n" cfg.extensions.typst-concealer.mappings.toggleConcealing "<cmd>lua require('typst-concealer').toggle_buf()<CR>" {desc = "Toggle typst-concealer in buffer";})
];
};
})
]);
}

View file

@ -23,6 +23,7 @@
(getExe (pkgs.symlinkJoin {
name = "vala-language-server-wrapper";
paths = [pkgs.vala-language-server];
meta.mainProgram = "vala-language-server-wrapper";
buildInputs = [pkgs.makeBinaryWrapper];
postBuild = ''
wrapProgram $out/bin/vala-language-server \

View file

@ -15,18 +15,18 @@
cfg = config.vim.languages.yaml;
on_attach = mkLuaInline (
on_attach =
if config.vim.languages.helm.lsp.enable && config.vim.languages.helm.enable
then ''
function(client, bufnr)
default_on_attach()
local filetype = vim.bo[bufnr].filetype
if filetype == "helm" then
client.stop()
then
mkLuaInline ''
function(client, bufnr)
local filetype = vim.bo[bufnr].filetype
if filetype == "helm" then
client.stop()
end
end
end''
else "default_on_attach"
);
''
else null;
defaultServers = ["yaml-language-server"];
servers = {

View file

@ -1,7 +1,7 @@
{
config,
lib,
pkgs,
options,
...
}: let
inherit (lib.generators) mkLuaInline;
@ -10,20 +10,21 @@
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.binds) addDescriptionsToMappings;
inherit (lib.nvim.dag) entryBefore;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.lsp;
usingNvimCmp = config.vim.autocomplete.nvim-cmp.enable;
usingBlinkCmp = config.vim.autocomplete.blink-cmp.enable;
self = import ./module.nix {inherit config lib pkgs;};
conformCfg = config.vim.formatter.conform-nvim;
conformFormatOnSave = conformCfg.enable && conformCfg.setupOpts.format_on_save != null;
augroup = "nvf_lsp";
mappingDefinitions = self.options.vim.lsp.mappings;
mappingDefinitions = options.vim.lsp.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
mkBinding = binding: action:
if binding.value != null
then "vim.keymap.set('n', '${binding.value}', ${action}, {buffer=bufnr, noremap=true, silent=true, desc='${binding.description}'})"
then "vim.keymap.set('n', ${toLuaObject binding.value}, ${action}, {buffer=bufnr, noremap=true, silent=true, desc=${toLuaObject binding.description}})"
else "";
in {
config = mkIf cfg.enable {
@ -35,20 +36,26 @@ in {
augroups = [{name = augroup;}];
autocmds =
(optional cfg.inlayHints.enable {
group = augroup;
event = ["LspAttach"];
desc = "LSP on-attach enable inlay hints autocmd";
callback = mkLuaInline ''
function(event)
local bufnr = event.buf
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr })
[
{
group = augroup;
event = ["LspAttach"];
desc = "LSP on-attach add keybinds, enable inlay hints, and other plugin integrations";
callback = mkLuaInline ''
function(event)
local bufnr = event.buf
local client = vim.lsp.get_client_by_id(event.data.client_id)
default_on_attach(client, bufnr)
${optionalString cfg.inlayHints.enable ''
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr })
end
''}
end
end
'';
})
'';
}
]
++ (optional (!conformFormatOnSave) {
group = augroup;
event = ["BufWritePre"];
@ -87,7 +94,7 @@ in {
'';
});
pluginRC.lsp-setup = ''
pluginRC.lsp-setup = entryBefore ["autocmds"] ''
vim.g.formatsave = ${boolToString cfg.formatOnSave};
local attach_keymaps = function(client, bufnr)

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -9,9 +10,8 @@
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.lsp.nvim-docs-view;
self = import ./nvim-docs-view.nix {inherit lib;};
mappingDefinitions = self.options.vim.lsp.nvim-docs-view.mappings;
mappingDefinitions = options.vim.lsp.nvim-docs-view.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
in {
config = mkIf cfg.enable {

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -10,8 +11,7 @@
cfg = config.vim.lsp;
self = import ./otter.nix {inherit lib;};
mappingDefinitions = self.options.vim.lsp.otter-nvim.mappings;
mappingDefinitions = options.vim.lsp.otter-nvim.mappings;
mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions;
in {
config = mkIf (cfg.enable && cfg.otter-nvim.enable) {

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -9,9 +10,7 @@
cfg = config.vim.minimap.codewindow;
self = import ./codewindow.nix {inherit lib;};
mappingDefinitions = self.options.vim.minimap.codewindow.mappings;
mappingDefinitions = options.vim.minimap.codewindow.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
in {
config = mkIf cfg.enable {

View file

@ -1,7 +1,7 @@
{
pkgs,
config,
lib,
options,
...
}: let
inherit (lib.modules) mkMerge mkIf;
@ -9,8 +9,7 @@
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.notes.todo-comments;
self = import ./todo-comments.nix {inherit pkgs lib;};
inherit (self.options.vim.notes.todo-comments) mappings;
inherit (options.vim.notes.todo-comments) mappings;
in {
config = mkIf cfg.enable {
vim = {

View file

@ -5,4 +5,5 @@
"oxocarbon"
"gruvbox"
"nord"
"mellow"
]

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -9,8 +10,8 @@
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.tabline.nvimBufferline;
self = import ./nvim-bufferline.nix {inherit config lib;};
inherit (self.options.vim.tabline.nvimBufferline) mappings;
inherit (options.vim.tabline.nvimBufferline) mappings;
in {
config = mkIf cfg.enable {
vim = {

View file

@ -32,7 +32,7 @@ in {
then
mkLuaInline ''
(function()
local integration = require("catppuccin.groups.integrations.bufferline")
local integration = require("catppuccin.special.bufferline")
return (integration.get_theme or integration.get)()
end)()
''
@ -40,7 +40,7 @@ in {
defaultText = literalMD ''
```lua
(function()
local integration = require("catppuccin.groups.integrations.bufferline")
local integration = require("catppuccin.special.bufferline")
return (integration.get_theme or integration.get)()
end)()
```

View file

@ -46,6 +46,18 @@ in {
}: ''
require('tokyonight').setup {
transparent = ${boolToString transparent};
styles = {
sidebars = ${
if transparent
then ''"transparent"''
else ''"dark"''
},
floats = ${
if transparent
then ''"transparent"''
else ''"dark"''
},
},
}
vim.cmd[[colorscheme tokyonight-${style}]]
'';
@ -303,4 +315,13 @@ in {
styles = ["hard" "medium" "soft"];
};
mellow = {
setup = {transparent ? false, ...}: ''
-- Mellow configuration
vim.g.mellow_transparent = ${boolToString transparent}
vim.cmd.colorscheme("mellow")
'';
};
}

View file

@ -1,7 +1,7 @@
{
config,
pkgs,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -12,8 +12,7 @@
cfg = config.vim.treesitter;
self = import ./treesitter.nix {inherit pkgs lib;};
mappingDefinitions = self.options.vim.treesitter.mappings;
mappingDefinitions = options.vim.treesitter.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
in {
config = mkIf cfg.enable {

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -9,9 +10,7 @@
cfg = config.vim.gestures.gesture-nvim;
self = import ./gesture-nvim.nix {inherit lib;};
mappingDefinitions = self.options.vim.gestures.gesture-nvim.mappings;
mappingDefinitions = options.vim.gestures.gesture-nvim.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
in {
config = mkIf cfg.enable {

View file

@ -14,7 +14,7 @@ in {
"flash-nvim" = {
package = "flash-nvim";
setupModule = "flash";
setupOpts = cfg.setupOpts;
inherit (cfg) setupOpts;
lazy = true;

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf;
@ -9,9 +10,7 @@
cfg = config.vim.utility.motion.hop;
self = import ./hop.nix {inherit lib;};
mappingDefinitions = self.options.vim.utility.motion.hop.mappings;
mappingDefinitions = options.vim.utility.motion.hop.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
in {
config = mkIf cfg.enable {

View file

@ -2,6 +2,7 @@
pkgs,
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -9,10 +10,7 @@
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.utility.preview.glow;
self = import ./glow.nix {
inherit lib config pkgs;
};
inherit (self.options.vim.utility.preview.glow) mappings;
inherit (options.vim.utility.preview.glow) mappings;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["glow-nvim"];

View file

@ -130,6 +130,9 @@
# In systems where we only have a package and no module, this can be used
# to access the built init.lua
initLua = dummyInit;
mnwConfig = neovim-wrapped.passthru.config;
mnwConfigDir = neovim-wrapped.passthru.configDir;
};
meta =

File diff suppressed because it is too large Load diff