Compare commits

..

211 commits

Author SHA1 Message Date
Noire
8997e62b3b
utility/precognition: init module (#437)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* utility/precognition: init

* utility/precognition: fix priority example, add default

* utility/precognition: add files to default.nix

* utility/precognition: fix typos, manual fmt

* utility/precognition: remove useless mappings

i was going to add binds to toggle/enable/disable but ehhh
idk

* utility/precognition: fix hints option

it broke

* utility/precognition: update gutter hints, new description

* utility/precognition: add files to motion defaults

* utility/precognition: add plugin to flake

* utility/precognition: remove comment reference

oops

* utility/precognition: add precognition to maximal configuration

it does work!

* utility/precognition: update descriptions

needs docs link, desc is somewhat obscure.

* docs: add credit to release notes

* utility/precognition: format

* utility/precognition: de-linkify descriptions

* utility/precognition: no more rec

* utility/precognition: convert to setupOpts

honestly raf was cooking with this one.
it's much nicer to use compared to interpolation lol

* utility/precognition: remove unnecessary function parameter

* utility/precognition: format

* utility/precognition: add description to disabled_fts

oops

* utility/precognition: manual format

* utility/precognition: remove periods at the end of descriptions

* utility/precognition: fix configuration.nix entry

oops lol

* utility/precognition: format

* utility/precognition: expand `vim`

* precognition: consistency changes

Just my minor nits.

---------

Co-authored-by: NotAShelf <raf@notashelf.dev>
2024-11-08 09:32:02 +00:00
ppenguin
8ff50562d7 fix markdown-preview config error
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-10-30 12:03:39 +00:00
Ching Pei Yang
0947ab38c0
configuration: enable lua for maximal (#411)
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
* configuration: enable lua for maximal
---

Co-authored-by: raf <raf@notashelf.dev>
2024-10-08 09:16:19 +00:00
Ching Pei Yang
e77632e4eb
lib: remove pointless type restriction (#408)
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
2024-10-06 23:19:39 +00:00
614ad33a60
meta: add changelog reminder to the pull request template
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-10-06 01:46:59 +03:00
fdd0642c7d
docs: update 0.7 release notes 2024-10-06 01:40:02 +03:00
379d2a9f16
meta: improve github pull request template 2024-10-06 01:39:58 +03:00
Charlie Root
f01e404b2e
languages/elixir.nix: fix elixir-tools setup (#401) 2024-10-06 00:56:33 +03:00
poz
cc14a1c1f6
plugins/neo-tree: fix file icons (#397)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-10-04 17:00:17 +03:00
diniamo
108cfd8383
themes/catppuccin: enable navic integration (#395)
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-10-02 19:21:45 +03:00
raf
9ea9995b92
statusline/lualine: update & add missing themes (#393)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* statusline/lualine: update & add missing themes

* docs: document lualine update
2024-10-01 08:18:29 +03:00
7417c6e4f3
docs: fix missing documentation link in README 2024-10-01 08:12:06 +03:00
3cba3ca30c
statusline/lualine: disable LSP indicator on neo-tree
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-09-30 01:10:33 +03:00
c727528b6f
CI: clean up stale branches periodically
Some checks failed
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
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
2024-09-28 23:44:22 +03:00
38fc01b9c6
docs: wording 2024-09-28 23:43:15 +03:00
raf
d6bbae1a91
docs: re-format README; clean up sections (#387)
* docs: re-format README; clean up sections

* docs: update README with features section
2024-09-28 23:36:07 +03:00
cef3aefabb
flake: add formatting check 2024-09-28 23:32:25 +03:00
Soliprem
69cd77630b
lsp/otter: init (#385)
* r: implementing lsp

* r: version bump to context fixes treesitter bug

* r: changing treesitter package definition to mkGrammarOption

* added changelog entry

* created otter file

* created otter file

* update

* update

* otter: fixing fixing input

* committing flake.lock

* fixed typo

* configuration: disabling ccc and enabling otter

* added assertion to make sure ccc and otter aren't enabled at the same time

* configuration: otter set for isMaximal

* otter: changelog

* otter: better changelog

* otter-nvim: renamed from otter to otter-nvim

* otter: added setupopts

---------

Co-authored-by: raf <raf@notashelf.dev>
2024-09-28 23:21:27 +03:00
bce45d4eeb
docs: add missing changelog entries
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Waiting to run
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
2024-09-28 22:27:20 +03:00
ccea1a6159
dashboard/dashboard-nvim: add setupOpts 2024-09-28 22:18:28 +03:00
raf
ab9a7c1600
modules/wrapper: add vim.options (#386)
* wrapper/rc: add `vim.options`

Translates an attribute set of values into `vim.o` values in a key-value format.

* docs: document addition of optionsScript

* wrapper/rc: don't filter null values in {options,global}Script

* wrapper/rc: add examples to vim.options & vim.globals; wording
2024-09-28 21:28:17 +03:00
Anthony
c957b23aaa
docs: fix dead links in CONTRIBUTING + put PR template in its appropriate location (#384) 2024-09-26 18:07:04 +03:00
Gerg-L
b4c06c71dc
docs: fix declerations (#381)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* docs: fix declerations

* fix: formatting for your baldness
2024-09-26 01:46:47 +03:00
a56a83bd46
flake: bump neo-tree 2024-09-26 00:29:52 +03:00
Soliprem
8e96f0aaa3
R: adding LSP (#378)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* r: implementing lsp

* r: version bump to context fixes treesitter bug

* r: changing treesitter package definition to mkGrammarOption

* added changelog entry

* docs: wording

---------

Co-authored-by: raf <raf@notashelf.dev>
2024-09-24 12:00:31 +00:00
316f25a0f6
docs: minor formatting changes
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Waiting to run
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Gerg I swear to god...
2024-09-24 06:27:06 +03:00
raf
842b45b969
languages/ts: update lspconfig; rename tsserver to ts_ls (#379)
Silence lspconfig, Microsoft naming convention is speaking.
2024-09-24 06:20:56 +03:00
27b3524508
flake: bump nixpkgs 2024-09-24 06:07:44 +03:00
a85ac83182
flake: minor cleanup
- Get rid of Zig input (nixpkgs one is alright.)
- Minor typo fixes
2024-09-24 06:06:28 +03:00
Gerg-L
57be605ed4
lib.neovimConfiguration: deprecated extraModules and configuration (#377)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* lib.neovimConfiguration: deprecated extraModules and configuration

* docs: various fixes
2024-09-22 22:52:10 +03:00
diniamo
99ace503ad
fastaction: add module (#376)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* plugins/lsp: add code-actions module; add fastaction.nvim

* deprecate nvimCodeActionMenu

* fastaction-nvim: move range_code_action to visual maps

* fastaction: move to vim.ui, remove mappings, enable register_ui_select by default

* fastaction: add missing documentation

* fastaction: support vim.ui.borders

* treewide: clean up nvim-code-action-menu remnants

* docs: add missing section ids

---------

Co-authored-by: NotAShelf <raf@notashelf.dev>
2024-09-20 18:51:11 +03:00
raf
e40d7a2a56
neovim/basic: add undofile options (#367)
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
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
`vim.undoFile.enable` and `vim.undoFile.path` can be used to manipulate whether undofile will be enabled, and the location if it is enabled.
2024-09-19 22:07:25 +03:00
raf
cb7ff874e2
languages/python: add basedpyright & python-lsp-server (#372)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* languages/python: add basedpyright LSP

* languages/python: make basedpyright the default language server

* languages/python: add python-lsp-server

* docs: update 0.7 release notes
2024-09-16 13:28:33 +03:00
raf
eb037b7bff
ui/breadcrumbs: allow lualine winbar component to be disabled (#371)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-09-13 20:54:08 +03:00
TheSunCat
b9dcbec29c
docs: fix typo in custom-plugins.md (#373) 2024-09-13 20:01:33 +03:00
Ching Pei Yang
b499151527
treewide: standardize border type (#341)
* ui: allow custom listOf str border type

* lib: extract shared borderType

* remove TODO

* allow ["|" "HighlightGroup"] for border char

* docs: update rl notes

---------

Co-authored-by: raf <raf@notashelf.dev>
2024-09-13 19:34:21 +03:00
b347757f8a
flake: bump nixpkgs input
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
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
Fixes #368
2024-09-13 12:07:46 +03:00
99de583e21
flake: bump mnw
Prioritize nvf's instance of neovim over pkgs.neovim
2024-09-13 11:59:53 +03:00
ppenguin
9eb6159ca3
Telescope: fix projects binding, add Telescope resume in default (#370)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* Telescope: fix projects binding, add Telescope resume in default

The projects command had a typo preventing it from working; the
keybinding description was the same as for Telescope files.
Added `<leader>fr` for Telescope resume per default.

* Add info to release notes
2024-09-08 15:44:42 +00:00
diniamo
67abc51902
treewide: remove the theme section from the DAG order dependance (#369)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* treewide: remove the theme section from the DAG order dependance

* docs/dag-entries: correct theme entry note
2024-09-05 18:06:24 +00:00
c757d28ff7
flake: update nixpkgs input
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
2024-08-27 22:27:51 +03:00
Ching Pei Yang
e949a51c55
rust/clang: update lldb binary name (#365)
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
2024-08-24 17:48:20 +00:00
Ching Pei Yang
473ebea4cf
theme: fix broken function signatures (#364)
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
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
2024-08-24 12:12:20 +00:00
Gerg-L
fc2e5998e7
flake.lock: Update (#363)
Flake lock file updates:

• Updated input 'mnw':
    'github:Gerg-L/mnw/e06b48c51291cc1df08adcd34a8796f86d5b235e?narHash=sha256-qimVBdes%2B2gNRRcyFoIUA1RyOKV0Ee40hUaVVf7ZsNs%3D' (2024-08-22)
  → 'github:Gerg-L/mnw/c261925dbbf02f523af0e8add844df64fddf0359?narHash=sha256-SMgnviF6ofBPbyV3%2BrljPGcX0Hn9HBOhgXE10Cyjaic%3D' (2024-08-23)
2024-08-24 10:47:26 +00:00
Gerg-L
25fe1c4625
flake.lock: Update (#362)
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Flake lock file updates:

• Updated input 'mnw':
    'github:Gerg-L/mnw/c7b289f3f5a31b6e744be37d83fc231816621231?narHash=sha256-YF//iMALbrd2Ni9aju7w8NniH16Qz6RFTRD6md5UkDc%3D' (2024-07-28)
  → 'github:Gerg-L/mnw/e06b48c51291cc1df08adcd34a8796f86d5b235e?narHash=sha256-qimVBdes%2B2gNRRcyFoIUA1RyOKV0Ee40hUaVVf7ZsNs%3D' (2024-08-22)
2024-08-22 23:42:51 +00:00
fd90cf7fd5
flake: revert 37dbdbb06d4d99297ee94adf6733893242b979c7
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
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
The bald frog balded again...
2024-08-12 19:26:09 +03:00
Gerg-L
7d824d6711
modules: fix build (#353)
Some checks failed
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
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* flake.lock: lock

* remove ussage of mapAttrsFlatten

* flake.lock: update mnw

* modules/default.nix makeNeovimConfig -> mnw

* modules/default.nix use buildVimPlugin (sad)

dont build when possible
2024-08-12 00:08:53 +00:00
diniamo
de20ff2c51
style: improve modules/default.nix code, rename helper scripts (#351)
Co-authored-by: raf <raf@notashelf.dev>
2024-08-11 21:10:55 +00:00
poz
fd65c83956
plugins/new-file-template: init module (#350)
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
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
* plugins/new-file-template: init module

* docs: add release note entry about new-file-template.nvim

* docs: update jacekpoz's link

* plugins/new-file-template: remove _: in default.nix

* plugins/new-file-template: add example for disableSpecific

* plugins/new-file-template: add docs on how to add custom templates

* plugins/new-file-template: fix disableSpecific example

* plugins/new-file-template: improve documentation

* plugins/new-file-template: remove redundant example

* plugins/new-file-template: more compact docs

* plugins/new-file-template: more doc improvements

* plugins/new-file-template: fix formatting issue
2024-08-08 18:45:33 +00:00
773186d93d
flake: update nixpkgs & mnw 2024-07-29 21:06:50 +03:00
Ching Pei Yang
0984e84444
wrapper: fix additionalRuntimePaths lua script (#349) 2024-07-29 14:02:00 +00:00
Gerg-L
21f4e5b9ab
flake.lock: Update (#348)
Flake lock file updates:

• Updated input 'mnw':
    'github:Gerg-L/mnw/4ea225024677e7c3a96080af8624fd3aa5dfa1b6?narHash=sha256-PF/FbgCUZ6mQrKp28G2YoVDlSThBy8AxIT9d2Ju3kTY%3D' (2024-07-20)
  → 'github:Gerg-L/mnw/81e98e83d863d4fad506ed932d432570030cedd3?narHash=sha256-ejkSFN5qHf161CnFq73b2LZlnJzYidBwUEtdx5/hNiY%3D' (2024-07-26)
2024-07-27 04:03:44 +00:00
Gerg-L
589b86d378
fix buildPlug patches, update mnw (#343)
* bald frog (gerg-l)

* modules/default.nix: make patches work on built plugins

* flake.lock: Update

Flake lock file updates:

• Updated input 'mnw':
    'github:Gerg-L/mnw/302b18ddb8498aa9a7e0c01f7026e49d545e6898?narHash=sha256-4Z2FtCuL0lT%2BsM2gb1JMcXOUkeYrWeYZjjs1HuVTlOs%3D' (2024-07-14)
  → 'github:Gerg-L/mnw/4ea225024677e7c3a96080af8624fd3aa5dfa1b6?narHash=sha256-PF/FbgCUZ6mQrKp28G2YoVDlSThBy8AxIT9d2Ju3kTY%3D' (2024-07-20)

---------

Co-authored-by: raf <raf@notashelf.dev>
2024-07-21 15:37:45 +00:00
2b8d0af2e6
modules: add meta.mainProgram to symlinkJoined Neovim wrapper 2024-07-20 16:55:56 +03:00
raf
8b15271f63
modules: add helper scripts (#346)
* modules: add helpers to display init.lua and its store path

* docs: update 0.7 release notes

* modules: use writeDashBin for helpers
2024-07-20 13:01:40 +00:00
diniamo
f9789432f9
treewide: make the entire generated config lua based (#333)
* modules: switch to gerg's neovim-wrapper

* modules: use initViml instead of writing the file

* treewide: make the entire generated config lua based

* docs: remove mentions of configRC

* plugins/treesitter: remove vim.cmd hack

* treewide: move resolveDag to lib

* modules/wrapper(rc): fix typo

* treewide: migrate to pluginRC for correct DAG order

The "new" DAG order is as follows:
- (luaConfigPre)
- globalsScript
- basic
- theme
- pluginConfigs
- extraPluginConfigs
- mappings
- (luaConfigPost)

* plugins/theme: fix theme DAG place

* plugins/theme: fix fixed theme DAG place

* modules/wrapper(rc): add removed option module for configRC

* docs: add dag-entries chapter, add release note entry

* fix: formatting CI

* languages/nix: add missing `local`

* docs: fix page link

* docs: add mention of breaking changes at the start of the release notes

* plugins/neo-tree: convert to pluginRC

* modules/wrapper(rc): add back entryAnywhere

* modules/wrapper(rc): expose pluginRC

* apply raf patch

---------

Co-authored-by: NotAShelf <raf@notashelf.dev>
2024-07-20 08:30:48 +00:00
diniamo
cbff0e4715
flake: fix neovimConfiguration in top-level lib (#345) 2024-07-20 08:22:13 +00:00
Ching Pei Yang
9c93e9a9c0
Switch to rustaceanvim (#335)
* flake: use rustaceanvim instead of rust-tools

* rust: switch to rustaceanvim

* docs: update release notes

* flake: update nixpkgs

* docs: wording

---------

Co-authored-by: raf <raf@notashelf.dev>
2024-07-18 11:48:28 +02:00
Frothy
0f17147d52
modules: fix unused src and version attrs in buildPlug (#340)
* modules: fix unused src and version attrs in buildPlug

* docs: add entry for buildPlug fix
2024-07-16 08:00:50 +00:00
raf
a4d35b4419
plugins/neo-tree: init module (#248)
* plugins/neo-tree: init module

* filetree/neo-tree: add setup options until border styles

* plugins/filetree: rename module name

* docs: update changelogs

Mention the addition of neo-tree.
2024-07-14 18:30:12 +00:00
Gerg-L
1426c83ce6
gerg: switch to new repo (#338)
* gerg: switch to new repo

* modules/default: fix buildPlug
2024-07-14 03:47:21 +00:00
Gerg-L
f6a058d1ed
flake.lock: Update (#337)
Flake lock file updates:

• Updated input 'neovim-wrapper':
    'github:Gerg-L/neovim-wrapper/be1a9ec41230708ac72cabb1c5f4492f4f01f6d1?narHash=sha256-hQ%2B%2Be9r03DPy9UByZ3aSweRn74EUx3HuoBTaUzYdE0E%3D' (2024-07-13)
  → 'github:Gerg-L/neovim-wrapper/bdcac428162888855b84fb703b29db76c1de6e73?narHash=sha256-ei4ap9Y076Livf7HNi0DeCG3FNfuKfnrmjqMkF4UbLs%3D' (2024-07-13)
2024-07-13 23:20:45 +00:00
Gerg-L
ce0b361bca
flake.lock: update neovim-wrapper (#336)
* flake.lock: update neovim-wrapper

* modules/default: half size of plugins
2024-07-13 22:04:10 +00:00
raf
5fab82ba91
modules: switch to gerg's neovim-wrapper (#325)
* modules: switch to gerg's neovim-wrapper

* Use initViml instead of writeText (#330)

---------

Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>
2024-07-13 15:05:21 +00:00
diniamo
32d231395f
plugins/visuals(indent-blankline): move to setupOpts (#329)
* plugins/visuals(indent-blankline): move to setupOpts

* configuration: match indentblankline part with changes
2024-07-12 15:47:33 +00:00
diniamo
901363d1ac
treewide: refactor custom lib, merge lists in hm/nixos module (#323)
* treewide: refactor custom lib, merge lists in hm/nixos module

* lib/types(custom): clarify anythingConcatLists code

---------

Co-authored-by: raf <raf@notashelf.dev>
2024-07-11 22:49:44 +00:00
Ching Pei Yang
0c444830f6
lualine: use mkDefault on backwards compat configs (#318)
Co-authored-by: Pei Yang Ching <pei.ching@check24.de>
2024-07-10 21:07:04 +00:00
Ching Pei Yang
9b48c30e20
Feat noice setup opts (#297)
* noice: add setupOpts

* noice: add filter

* noice: use setupOpts

* docs: update release notes

* noice: allow null option

* noice: add descriptions for some options
2024-07-10 21:02:48 +00:00
diniamo
82d67cbc66
lib/types: expose pluginType (#322) 2024-07-10 21:58:37 +02:00
0dca62eaa2
languages/ts: use typescript-language-server from top-level 2024-07-10 12:44:54 +03:00
d33fdda463
flake: update nixpkgs input 2024-07-10 12:44:03 +03:00
Ching Pei Yang
8071bfdb72
Fix typos (#326)
* fix: typo

* docs: wrong link
2024-07-09 23:37:07 +00:00
Gerg-L
8d5f23035d
treewide: cleanup (#324)
* statix, deadnix, alejandra

* _file

* _module.args

* concatStringsSep "\n" -> concatLines
concatStringsSep "\n" map -> concatMapStringsSep "\n"

* mkShell nativeBuildInputs -> packages
2024-07-08 21:57:58 +00:00
diniamo
f1849c0ce5
languages/clang: use clangd by default (#321) 2024-07-06 19:14:36 +00:00
Ching Pei Yang
3f5ed9e979
languages/go: use dap-go for dap configurations (#319)
* deps: add nvim-dap-go

* go: use dap-go plugin for dap configurations

* docs: update release notes

---------

Co-authored-by: Pei Yang Ching <pei.ching@check24.de>
2024-07-03 18:42:26 +00:00
Frothy
9c4aabd0a6
Merge pull request #305 from diniamo/finish-bufferline-setupopts
tabline/bufferline: add missing options, add back bindings
2024-06-28 15:19:21 -04:00
diniamo
a20d860b45 docs: add release note entry for bufferline setupOpts 2024-06-28 16:45:37 +02:00
diniamo
72ff44c1eb tabline/bufferline: fix default value of highlights 2024-06-28 16:09:19 +02:00
diniamo
dde2b5cac4 tabline/bufferline: add missing separator_style variations 2024-06-27 10:03:22 +02:00
diniamo
d9a62eff17 fixup! tabline/bufferline: add separator_style 2024-06-27 10:03:22 +02:00
diniamo
7df75f5b55 tabline/bufferline: fix grammar mistakes 2024-06-27 10:03:22 +02:00
diniamo
71064e8865 tabline/bufferline: enable auto_toggle_bufferline by default
This is due because this function is also used to show the bar intially.
2024-06-27 10:03:22 +02:00
diniamo
42447cd3bf tabline/bufferline: add highlights 2024-06-27 10:03:22 +02:00
diniamo
c66854fc7f tabline/bufferline: add separator_style 2024-06-27 10:03:21 +02:00
diniamo
187d924509 tabline/bufferline: fix default mode 2024-06-27 10:03:21 +02:00
Ching Pei Yang
415954595e lib/lua: picked wrong conflict version 2024-06-27 10:03:21 +02:00
diniamo
83b7632297 tabline/bufferline: add back bindings 2024-06-27 10:03:21 +02:00
diniamo
c96181e739 tabline/bufferline: add missing options 2024-06-27 10:03:21 +02:00
Frothy
506b29c726 lib: avoid filtering null values to be used as nil 2024-06-27 10:03:21 +02:00
954470581e tabline/bufferline: convert to setupOpts
this is pretty much WIP and contains a bunch of bugs that I haven't tackled yet.
2024-06-27 10:03:21 +02:00
raf
b0af809b95
Merge pull request #320 from diniamo/catppuccin-set-term-colors
themes/catppuccin: set term colors
2024-06-26 17:55:36 +00:00
1bb901edeb
languages/clang: unpin clang-tools package 2024-06-25 22:32:12 +03:00
diniamo
bb2a78272b themes/catppuccin: set term colors 2024-06-25 19:19:58 +02:00
raf
155bc8e1cc
Merge pull request #317 from diniamo/autopairs-use-booltostring
modules/autopairs: use boolToString instead of toLuaObject
2024-06-25 12:12:40 +00:00
diniamo
a145f997f3 modules/autopairs: use boolToString instead of toLuaObject 2024-06-25 14:01:44 +02:00
raf
688a457a3d
Merge pull request #316 from diniamo/fix-autopairs-cr
modules/nvim-cmp: add edge case for autopairs in cr mapping
2024-06-25 09:09:04 +00:00
diniamo
c2c85d70ee modules/nvim-cmp: add edge case for autopairs in cr mapping 2024-06-25 11:06:18 +02:00
raf
335fbea0c0
Merge pull request #315 from FrothyMarrow/fix-smartcolumn
ui/smartcolumn: change `custom_colorcolumn` type to expected type string
2024-06-24 20:06:54 +00:00
Frothy
216cb34caf docs: add entry for changed smartcolumn.setupOpts.custom_colorcolumn type 2024-06-24 14:26:00 -04:00
Frothy
2e99a21010 ui/smartcolumn: change custom_colorcolumn type to expected type string 2024-06-24 14:23:55 -04:00
raf
7b719d0044
Merge pull request #313 from NotAShelf/ts-error-translator
languages/ts: add `ts-error-translator.nvim` as an extension plugin
2024-06-24 17:40:06 +00:00
ba803c8684
docs: update release notes
Mention ts-error-translator's addition to the module system
2024-06-24 20:07:17 +03:00
f00ecd4eb9
languages/ts: add ts-error-translator.nvim as an extension plugin 2024-06-24 20:05:57 +03:00
raf
35c7327f81
Merge pull request #314 from diniamo/rustfmt
languages/rust: add format
2024-06-24 17:05:13 +00:00
diniamo
8a0cddd9bb languages/rust: add format 2024-06-24 19:02:04 +02:00
raf
923481640e
Merge pull request #306 from diniamo/fix-theme-dag
modules/theme: fix dag location
2024-06-24 16:29:53 +00:00
raf
2759b9caae
Merge pull request #310 from jacekpoz/orgmode
plugins/orgmode: remove deprecated ts setup call
2024-06-23 17:05:04 +00:00
jacekpoz
abdcb62941
flake: bump nixpkgs input 2024-06-23 19:02:40 +02:00
jacekpoz
d873bc0667
plugins/orgmode: remove deprecated ts setup call 2024-06-23 15:14:10 +02:00
raf
f66c40b687
Merge pull request #309 from FrothyMarrow/nixpkgs-branch
flake: switch nixpkgs branch to nixpkgs-unstable
2024-06-22 23:45:01 +00:00
Frothy
ad22bca3d7 flake: switch nixpkgs branch to nixpkgs-unstable 2024-06-22 19:28:54 -04:00
95615ec308
flake: update nixpkgs; use new bash-language-server pkg 2024-06-21 02:18:54 +03:00
diniamo
d6cd853520 modules/theme: fix dag location 2024-06-16 13:46:20 +02:00
raf
a86c59457c
Merge pull request #303 from diniamo/which-key-register-allow-null
which-key: allow null in registers
2024-06-12 06:14:15 +00:00
diniamo
a437dbd158 which-key: allow null in registers 2024-06-12 01:24:03 +02:00
raf
c1b3900846
Merge pull request #302 from diniamo/fix-flake-nix-typo
flake: fix typo
2024-06-10 07:47:50 +00:00
diniamo
9cff1b03d6 flake: fix typo 2024-06-10 09:33:45 +02:00
dfa2718bb3
flake: bump nixpkgs input 2024-06-09 12:07:26 +03:00
raf
fcab30e7bb
Merge pull request #301 from rice-cracker-dev/patch-1
languages: changed python lsp package to pyright
2024-06-09 09:06:15 +00:00
Phan Đăng Khoa
68b0647936
languages: changed python lsp package to pyright 2024-06-09 15:57:55 +07:00
c50522f6b0
languages: avoid using package aliases 2024-06-08 19:44:25 +03:00
raf
ae45cdf92a
Merge pull request #300 from jacekpoz/main
Emac
2024-06-08 16:07:15 +00:00
jacekpoz
8eb8326bd6
plugins/orgmode: fix typo 2024-06-08 17:58:08 +02:00
200a45ec73
flake: update inputs
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/04496f014fcf27fdcede464d5de8558e12b5710c?narHash=sha256-ewjE7eVBVmjh8faip3RW%2BI3WzQZ3iywQVyxZfjunfH0%3D' (2024-05-18)
  → 'github:nixos/nixpkgs/b5995681aa319d0e33a6d83a31710d6c6f092820?narHash=sha256-mdBp0b4VIQ71aUK2uBRROUkENk93RUUubjlQkvskNO0%3D' (2024-05-26)
• Updated input 'plugin-catppuccin':
    'github:catppuccin/nvim/d97387aea8264f484bb5d5e74f2182a06c83e0d8?narHash=sha256-aRrhVHQSCyo1Ti1j8ogWJ8e0eJWiTw5%2BabIpyUxky/M%3D' (2024-05-08)
  → 'github:catppuccin/nvim/5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe?narHash=sha256-UDPS%2B1o8FQGkfqiG4GX4DNUI2pU5hIvagmfnWTKDb44%3D' (2024-05-26)
• Updated input 'plugin-diffview-nvim':
    'github:sindrets/diffview.nvim/9bdd5537575c2ea7925b71ae06585b934beea13d?narHash=sha256-jbAeMJRybHQnsmTY2xeca4QJXXxdYVEK83d8NUSSnfQ%3D' (2024-05-18)
  → 'github:sindrets/diffview.nvim/1ec7b56b959dab18f7030f541c33ae60e18a6f88?narHash=sha256-sCrswSN/ERirije4hukg81t%2BX8sVG6EnG8SPK/P1Bts%3D' (2024-05-24)
• Updated input 'plugin-dressing-nvim':
    'github:stevearc/dressing.nvim/572314728cb1ce012e825fd66331f52c94acac12?narHash=sha256-zL%2Bu9SUwzPZEYxaGZiRnezNUkcr8ZkdOMyGKSXF5xcQ%3D' (2024-05-16)
  → 'github:stevearc/dressing.nvim/3c38ac861e1b8d4077ff46a779cde17330b29f3a?narHash=sha256-AXY1%2BnA6Q/kWbuwOAqwVdd3QrjkHGVdVMHShvSIfLwM%3D' (2024-05-22)
• Updated input 'plugin-elixir-tools':
    'github:elixir-tools/elixir-tools.nvim/51eddb03a7a8c9f00d6415b356a4d3b75d8e75b6?narHash=sha256-U6db1n/RIpT7Dd54e9iI/PjO1BhDpMyNPfaph%2BdUk7k%3D' (2024-05-02)
  → 'github:elixir-tools/elixir-tools.nvim/815cf0b0aab0421f8490199c0dd7442d22a7c1b7?narHash=sha256-ESL/H/l5Yarcuo3MjBplKwox8E6CBxvWrpciyJeaES0%3D' (2024-05-23)
• Updated input 'plugin-fidget-nvim':
    'github:j-hui/fidget.nvim/a2ece932b663898d4015f458ce7ad92c389690ba?narHash=sha256-WT1KnFXC/jjd9tQEiJ7f5mU9FMK%2B%2BTSOItxZyl6G8GM%3D' (2024-05-18)
  → 'github:j-hui/fidget.nvim/ef99df04a1c53a453602421bc0f756997edc8289?narHash=sha256-Gpk/G0ByOAIE8uX4Xr94CvAjJBSJMEOwBuvrhmYYGsg%3D' (2024-05-19)
• Updated input 'plugin-flutter-tools':
    'github:akinsho/flutter-tools.nvim/c19f94576f866888f1b84aa73c690b30de4b86fb?narHash=sha256-nMP1LVUViKeL2BaYr/oAbqVKmOZ1SomWozKz4OYaovU%3D' (2024-05-18)
  → 'github:akinsho/flutter-tools.nvim/990a1349c29f7d474a0cd51355aba773ccc9deea?narHash=sha256-dRcWCqFHtDMOEGjKji3lxYQZKBhlhss/i51pX6FZxuI%3D' (2024-05-19)
• Updated input 'plugin-gitsigns-nvim':
    'github:lewis6991/gitsigns.nvim/805610a9393fa231f2c2b49cb521bfa413fadb3d?narHash=sha256-v21qTJfiv57vSUDGCJ4wM%2BL0Ixwh2b3pkoESFAHBrDM%3D' (2024-05-06)
  → 'github:lewis6991/gitsigns.nvim/cdfcd9d39d23c46ae9a040de2c6a8b8bf868746e?narHash=sha256-TTC3uvRsq4v6PBdS/3YAGpyhVt0w3/SGkPE3fu1zW94%3D' (2024-05-23)
• Updated input 'plugin-gruvbox':
    'github:ellisonleao/gruvbox.nvim/4f8e2dc9e8cdfdd3a988227c2c347043a46f51a4?narHash=sha256-BDBNeXf189K7l53IaWKWo0eta79cAuYKW0kP6jYfV1w%3D' (2024-05-17)
  → 'github:ellisonleao/gruvbox.nvim/96a8ec336fb48a11cefbd57508888361431aac26?narHash=sha256-BLhZGijGF03UFiyMJ66C1ZLDRqAo1C80ekHcBm1PGoY%3D' (2024-05-18)
• Updated input 'plugin-image-nvim':
    'github:3rd/image.nvim/da64ce69598875c9af028afe129f916b02ccc42e?narHash=sha256-2f7ss/QTohYSp0EqaFnBtQeOjI%2B3fIn%2BWmgy/TcfbDk%3D' (2024-05-17)
  → 'github:3rd/image.nvim/2a618c86d9f8fd9f7895d12b55ec2f31fd14fa05?narHash=sha256-6nFzUchDQIvaTOv4lZ10q66m/ntU3dgVnlfBRodW%2B0Y%3D' (2024-05-21)
• Updated input 'plugin-indent-blankline':
    'github:lukas-reineke/indent-blankline.nvim/ece00d5fb44d196680a81fd2761062d2fa44663b?narHash=sha256-qlFoZ/GDsbnIhMoT%2BesNxheC3I9guxiV2DQYlY9kcMM%3D' (2024-05-18)
  → 'github:lukas-reineke/indent-blankline.nvim/d98f537c3492e87b6dc6c2e3f66ac517528f406f?narHash=sha256-K5y0UQAXc0N6%2B1kqncX2eClpvZb7jlg7GhSerHQVZX0%3D' (2024-05-23)
• Updated input 'plugin-leap-nvim':
    'github:ggandor/leap.nvim/b1ecfb63c0b8babfd0dcd6b5ca6de37bbf3526cd?narHash=sha256-vRL%2B%2BRVDywO6nP5dHQiO1NSQ17SMmHm4AgjTQfv642o%3D' (2024-05-14)
  → 'github:ggandor/leap.nvim/8f4d3ab9fe5c906c5745150191831c5ee0a427a0?narHash=sha256-O/wN5v8GhlEECBIhJQvWhKcpQrqT7J%2BBNkd/fIh0TIQ%3D' (2024-05-20)
• Updated input 'plugin-lsp-lines':
    'sourcehut:~whynothugo/lsp_lines.nvim/d2facc98064934ebd480cd563212a84d957075fe?narHash=sha256-C3m91uwldDwaZlYjb6j2sPlvO6ADqhl0AmUWZVYEDHo%3D' (2024-05-17)
  → 'sourcehut:~whynothugo/lsp_lines.nvim/7d9e2748b61bff6ebba6e30adbc7173ccf21c055?narHash=sha256-QsvmPOer7JgO7Y%2BN/iaNJD7Kmy69gnlV4CeyaQesNvA%3D' (2024-05-19)
• Updated input 'plugin-lsp-signature':
    'github:ray-x/lsp_signature.nvim/aed5d1162b0f07bb3af34bedcc5f70a2b6466ed8?narHash=sha256-f4AuZnt2m2VA90baSbZt6%2BelzjXmJKPFTO28v8auoYc%3D' (2024-05-10)
  → 'github:ray-x/lsp_signature.nvim/529e8861d0410389f0163a5e5c2199d4a4ef5bf6?narHash=sha256-4Abo4HGwzZtqEHcS9lsQdw%2BDsn7tkQoeq5QyfTEEwnA%3D' (2024-05-25)
• Updated input 'plugin-noice-nvim':
    'github:folke/noice.nvim/9f6f6ba74f8bfbf7e43d6302cf86b070362f6203?narHash=sha256-/dtOpAjzgMJHSjV9AZcR991I/r9xaMnpg0/1c6NdItg%3D' (2024-05-18)
  → 'github:folke/noice.nvim/f119045f38792ad5311e5f9be7a879e4c1a95fe0?narHash=sha256-GrgFjVDIQcCfg5qyO6FnhlGUCrz6rwAFh81yZXUJra4%3D' (2024-05-23)
• Updated input 'plugin-nvim-autopairs':
    'github:windwp/nvim-autopairs/b0b79e42a28f09719a7da9534c3731fa37319d9b?narHash=sha256-qcfYChucUpRFKMfB%2BIphmIPzH/HgobVDK44wDtVXSnU%3D' (2024-05-16)
  → 'github:windwp/nvim-autopairs/c15de7e7981f1111642e7e53799e1211d4606cb9?narHash=sha256-YEAqjlzVrS/VLrkwGo3L7cNOE1LuyLYlBtkR2HA5oVk%3D' (2024-05-19)
• Updated input 'plugin-nvim-bufferline-lua':
    'github:akinsho/nvim-bufferline.lua/73540cb95f8d95aa1af3ed57713c6720c78af915?narHash=sha256-bHlmaNXfZTlTm/8v48FwCde9ljZFLv25efYF5355bnw%3D' (2024-04-22)
  → 'github:akinsho/nvim-bufferline.lua/99337f63f0a3c3ab9519f3d1da7618ca4f91cffe?narHash=sha256-8PCkY1zrlMrPGnQOb7MjqDXNlkeX46jrT4ScIL%2BMOwM%3D' (2024-05-24)
• Updated input 'plugin-nvim-dap':
    'github:mfussenegger/nvim-dap/5a2f7121869394502521c52b2bc581ab22c69447?narHash=sha256-UZm2DA19uBeL2L5JKAZilqBTTPSA5X3ZEcAVJUq65p8%3D' (2024-05-16)
  → 'github:mfussenegger/nvim-dap/922ebc75c2fa9305e36402fbd8c984c8638770a0?narHash=sha256-uzivFy0ZNLxAXDqkYNrNy1SSHPRrGv3OLVCNCRDiikU%3D' (2024-05-26)
• Updated input 'plugin-nvim-dap-ui':
    'github:rcarriga/nvim-dap-ui/5934302d63d1ede12c0b22b6f23518bb183fc972?narHash=sha256-26g4dlxzTGaR5OrXpPo4A2erM/eSkgedb0Bl2pK362M%3D' (2024-04-28)
  → 'github:rcarriga/nvim-dap-ui/334cf3038c4756e6ab999cbac67c847fb654c190?narHash=sha256-paiyLNzqUq9G3U8qn8yl1AjHJzTTa17exA05QO09nGA%3D' (2024-05-20)
• Updated input 'plugin-nvim-lspconfig':
    'github:neovim/nvim-lspconfig/6d2ae9fdc3111a6e8fd5db2467aca11737195a30?narHash=sha256-Ofat8It2TCjxnMPHmQ5fZTeJDpMTIrDMGHXle66IWe8%3D' (2024-05-18)
  → 'github:neovim/nvim-lspconfig/b972e7154bc94ab4ecdbb38c8edbccac36f83996?narHash=sha256-PMMqPDnq4Q8gWeKQ2WPE%2BpOf1R1G61wJ%2BbAWkHpQlzE%3D' (2024-05-23)
• Updated input 'plugin-nvim-navbuddy':
    'github:SmiteshP/nvim-navbuddy/f34237e8a41ebc6e2716af2ebf49854d8c5289c8?narHash=sha256-EZXzFjGsZHkb2Ui5uvOottPHA8X15F6xyikab4dBlYk%3D' (2024-03-24)
  → 'github:SmiteshP/nvim-navbuddy/f22bac988f2dd073601d75ba39ea5636ab6e38cb?narHash=sha256-sZ1M27qNbLMHKR4Zu0NfJoBcQxJbhmW7Cx74Acirlww%3D' (2024-05-19)
• Updated input 'plugin-nvim-nio':
    'github:nvim-neotest/nvim-nio/8765cbc4d0c629c8158a5341e1b4305fd93c3a90?narHash=sha256-VfoJOXXtMhalFcnfhVzweq7TVmB8WjRP%2BZ5Z5Z24Pzc%3D' (2024-05-02)
  → 'github:nvim-neotest/nvim-nio/632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a?narHash=sha256-UffuTu7mF96LHk0MQRNrsgDyo1QWa/1i5eJKjZkuG8k%3D' (2024-05-22)
• Updated input 'plugin-nvim-session-manager':
    'github:Shatur/neovim-session-manager/a0b9d25154be573bc0f99877afb3f57cf881cce7?narHash=sha256-SrJJWC/newJRB879zMUbLzOJQ8qtcHfLF/7GLPFlSRQ%3D' (2024-05-11)
  → 'github:Shatur/neovim-session-manager/b552ee8667037be5d0291229279a35af25e515fb?narHash=sha256-A6oHIg8PG84L7QIRpo9WXKzMq4EUe92jQIxObOxpFmg%3D' (2024-05-24)
• Updated input 'plugin-nvim-tree-lua':
    'github:nvim-tree/nvim-tree.lua/2bc725a3ebc23f0172fb0ab4d1134b81bcc13812?narHash=sha256-YqHAEztx6gEEm0GoDXC5djnIP030oGGRcskp8LPqVoc%3D' (2024-05-14)
  → 'github:nvim-tree/nvim-tree.lua/517e4fbb9ef3c0986da7047f44b4b91a2400f93c?narHash=sha256-E6J9d0LJMK%2BOwj/iWbGVZBiVL/NI1xd5P0NNQpUmXj4%3D' (2024-05-26)
• Updated input 'plugin-nvim-treesitter-context':
    'github:nvim-treesitter/nvim-treesitter-context/55e29081e73d2e4b2d62fb4dc3eebe21bf66a1e2?narHash=sha256-CriN45mFfyjTt14RJnmzXidACHJXUaA6XPwAoEtQUzg%3D' (2024-05-17)
  → 'github:nvim-treesitter/nvim-treesitter-context/f62bfe19e0fbc13ae95649dfb3cf22f4ff85b683?narHash=sha256-EY5Si6t7LXcxOP3ubGAAMd3lgbeaCOCIybSKi1Ucx98%3D' (2024-05-22)
• Updated input 'plugin-nvim-ts-autotag':
    'github:windwp/nvim-ts-autotag/aeb7090098722ffce16597bd0331105495640153?narHash=sha256-gh%2BDhC7%2B8O4z4lG/RIaMJgumnq/Vg5eWa6j/P8MQk0s%3D' (2024-05-18)
  → 'github:windwp/nvim-ts-autotag/8ae54b90e36ef1fc5267214b30c2cbff71525fe4?narHash=sha256-gy6OVR2iH361XMDDo0dqxJsAxo%2B5nXr3wP42pieeCUg%3D' (2024-05-22)
• Updated input 'plugin-nvim-web-devicons':
    'github:nvim-tree/nvim-web-devicons/e37bb1feee9e7320c76050a55443fa843b4b6f83?narHash=sha256-1trRSUVyWFl3K%2B7xHXQGNl/EwE0ggyigQpZ%2BkmRPsk8%3D' (2024-05-13)
  → 'github:nvim-tree/nvim-web-devicons/b77921fdc44833c994fdb389d658ccbce5490c16?narHash=sha256-fmbsnNVZ6nBorBILwPfEgcDDWZCkh9YZH/aC343FxP4%3D' (2024-05-25)
• Updated input 'plugin-obsidian-nvim':
    'github:epwalsh/obsidian.nvim/7b59d907a3ee6952c58e07139cf021a205692338?narHash=sha256-PiaPmQ11Wx57ojCG4G50Rwr%2BphanvuoBqbPHg3N4eGw%3D' (2024-05-17)
  → 'github:epwalsh/obsidian.nvim/0890a3f4e1711d98b5aa78bf40d2c5b81ef3c39f?narHash=sha256-R7q3PmDMYQtDTE1JZgQtvArBq55MnvNdcChOsuivSCo%3D' (2024-05-23)
• Updated input 'plugin-orgmode-nvim':
    'github:nvim-orgmode/orgmode/dbcff9e8d9df48bfff95f7204ca483c11864a755?narHash=sha256-vhygnZNJceJHq4gQm6h0zv/Cgp9%2BfSeWuL1Varrws1U%3D' (2024-05-17)
  → 'github:nvim-orgmode/orgmode/cb3c9bf6caf3411af88a9a1a0b7eb9be57b9741c?narHash=sha256-3xsdklkUuJwUzUieZT6eGIgDZUdVEGeyhxxUe99TOAA%3D' (2024-05-26)
• Updated input 'plugin-plenary-nvim':
    'github:nvim-lua/plenary.nvim/08e301982b9a057110ede7a735dd1b5285eb341f?narHash=sha256-vy0MXEoSM4rvYpfwbc2PnilvMOA30Urv0FAxjXuvqQ8%3D' (2024-04-25)
  → 'github:nvim-lua/plenary.nvim/a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683?narHash=sha256-5Jf2mWFVDofXBcXLbMa417mqlEPWLA%2BcQIZH/vNEV1g%3D' (2024-05-20)
• Updated input 'plugin-rose-pine':
    'github:rose-pine/neovim/b6fe88c3282cf9f117a3e836d761c2d78d02f417?narHash=sha256-AdPSz5%2BnCOnLWexBasHuxRxEKbL4WVg%2BuV78//W5nLs%3D' (2024-05-14)
  → 'github:rose-pine/neovim/87aa437172357ad8f916942bca249ceadc6c68b1?narHash=sha256-mpBx0R9tR4KrOMO9J0gg2aOeHtiU9zK8xoa7Ebkx0n8%3D' (2024-05-26)
• Updated input 'plugin-telescope':
    'github:nvim-telescope/telescope.nvim/0c12735d5aff6a48ffd8111bf144dc2ff44e5975?narHash=sha256-%2Bh0L5vpwXFNDuzE5Dne5zWuKtZ1mquAhdplHcUxPg8w%3D' (2024-05-17)
  → 'github:nvim-telescope/telescope.nvim/349660c0d35da06459ee8589af77de2086b652ce?narHash=sha256-JXdpKfrSvrzpTqy%2Bg9Bg85/vIDTUZfDr%2BZhxH8wJDxA%3D' (2024-05-26)
• Updated input 'plugin-todo-comments':
    'github:folke/todo-comments.nvim/a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d?narHash=sha256-BJNU01iTRDNrPv48fgiJRS%2BouaHkoqw2AYXKDRgDzfw%3D' (2024-03-27)
  → 'github:folke/todo-comments.nvim/e1549807066947818113a7d7ed48f637e49620d3?narHash=sha256-ZJp0emoHogSdhXPIH74MH4CznxhCmMbO243dqxAZMJo%3D' (2024-05-22)
• Updated input 'plugin-toggleterm-nvim':
    'github:akinsho/toggleterm.nvim/066cccf48a43553a80a210eb3be89a15d789d6e6?narHash=sha256-mM5bGgAemsRJD9U6U5K6ia5qb8NaTusM99x6xrtEBfw%3D' (2024-04-22)
  → 'github:akinsho/toggleterm.nvim/fee58a0473fd92b28c34f8f724e4918b15ba30a3?narHash=sha256-h82zisizLm0FOt4l8lzgC/spFk3R5Gx25A5YgULwW8U%3D' (2024-05-19)
• Updated input 'plugin-tokyonight':
    'github:folke/tokyonight.nvim/634015fff1457ed66cf5364213a2bbbc51a82d6c?narHash=sha256-lJjBsAguMDA765lfxfUwU0I0tWmAESLCv9yiVrhTYDo%3D' (2024-05-16)
  → 'github:folke/tokyonight.nvim/0fae425aaab04a5f97666bd431b96f2f19c36935?narHash=sha256-ZWxK0q8kUYHOk%2BykH1m4901trnuHN8O9hkOZR6HdC%2BY%3D' (2024-05-26)
• Updated input 'plugin-trouble':
    'github:folke/trouble.nvim/b9cf677f20bb2faa2dacfa870b084e568dca9572?narHash=sha256-kIQ72fqAsiMF9jq0MzC6peaHJddYn5PRNXfYFHTQB5Q%3D' (2024-03-29)
  → 'github:folke/trouble.nvim/a8264a65a0b894832ea642844f5b7c30112c458f?narHash=sha256-D3dqI4NRgEG4BCDLQ3ci9lgYxt90XyWDQXlk4/uuR6M%3D' (2024-05-19)
• Updated input 'plugin-vim-fugitive':
    'github:tpope/vim-fugitive/5a9bd42dd8dd127779f3cd8982a0419b7ca9c7f5?narHash=sha256-517q3oPvshwUBhXEDuB23S0RPuHvSZWK/1tr6wDhEyA%3D' (2024-05-17)
  → 'github:tpope/vim-fugitive/4f59455d2388e113bd510e85b310d15b9228ca0d?narHash=sha256-nyNtb3nsS/zFdSNRyXabcGIabAwgivJIUFB2c62vXmA%3D' (2024-05-19)
• Updated input 'zig':
    'github:mitchellh/zig-overlay/03303bf01701b04ec87c55ce5d8d6f5ecf86d0a7?narHash=sha256-CCqc3c3yvXgRaTW18epSHlF2HeikwNXqxnlrRs2sl3Y%3D' (2024-05-15)
  → 'github:mitchellh/zig-overlay/93b02a697561ecd438cfa5779727b5a1c300cb4c?narHash=sha256-LIz08gALt2wlutGXAEhNroEoIuPV5ePQB8LI4WzXcy8%3D' (2024-05-26)
2024-05-27 03:31:42 +03:00
Frothy
08547724e4
modules/theme: use inherited optionalString 2024-05-25 20:37:51 +03:00
raf
5748bb5eb9
Merge pull request #299 from FrothyMarrow/transparent-oxocarbon
theme: add minimal transparency support for oxocarbon
2024-05-23 14:30:47 +00:00
Frothy
367320dcd9 docs: add entry for transparency support for oxocarbon 2024-05-23 10:28:06 -04:00
Frothy
fc4e471490 theme: add minimal transparency support for oxocarbon 2024-05-23 10:28:04 -04:00
Yoni Firroloni
1061c920be
docs: add quirk about using nodejs (#298)
* doc: add quircks about nodejs

* doc: make shorter sentences
2024-05-23 01:32:12 +00:00
9bbdb8d48a
docs/manual: add plugins page
This should be helpful for listing known plugin behaviour where the behaviour is undesirable, but also unfixable
2024-05-23 03:27:23 +03:00
f9343f1bc7
statusline/lualine: equalize padding 2024-05-23 03:20:21 +03:00
raf
6624841e63
Merge pull request #283 from horriblename/fix-colorizer
Fix colorizer
2024-05-22 01:22:05 +00:00
Ching Pei Yang
9baebb0d82 colorizer: remove unneeded freeform module 2024-05-21 22:55:54 +02:00
Frothy
2c9a9b4d29
Merge pull request #289 from horriblename/lua-include-empty-attrs
lib: do not filter out empty attrs in toLuaObject
2024-05-21 07:16:03 -04:00
Frothy
68ca227a87 lib: remove alias lib.warn 2024-05-21 07:08:17 -04:00
Frothy
69257c03a3 docs: add entry for __empty deprecation 2024-05-21 06:55:46 -04:00
Frothy
ac20dfbdd4 lib: add deprecation warning for __empty 2024-05-21 06:51:56 -04:00
raf
9074b6e5e7
Merge pull request #295 from NotAShelf/dependabot/github_actions/cachix/cachix-action-15
build(deps): bump cachix/cachix-action from 14 to 15
2024-05-21 07:36:16 +00:00
dependabot[bot]
011f662fa0
---
updated-dependencies:
- dependency-name: cachix/cachix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 19:43:05 +00:00
raf
f59a915da9
Merge pull request #294 from NotAShelf/smaller-nixpkgs-input
flake: switch to nixos-unstable-small
2024-05-18 21:50:55 +00:00
60d9ebb3f0
flake: bump plugin inputs 2024-05-19 00:44:13 +03:00
bb06827474
flake: switch to nixos-unstable-small 2024-05-18 16:45:56 +03:00
Ching Pei Yang
af72dc105d lib: remove unused __empty special case in toLuaObject 2024-05-18 14:52:40 +02:00
9d0247c599
statusline/lualine: add a left separator to the searchcount component 2024-05-17 19:10:58 +03:00
f0f2c08e9f
lsp/null-ls: use string type for diagnostic format 2024-05-16 19:35:19 +03:00
cfbed8ceb1
modules/wrapper: remove redundant instances of literalExpression 2024-05-16 19:13:44 +03:00
1ce25d7ca3
modules: reorder args 2024-05-16 19:11:39 +03:00
eefc7a9d1d
lsp/null-lsp: allow null-ls options to be configured
This should probably still be converted to setupOpts. Missing docs
2024-05-16 19:11:37 +03:00
74c94b8a54
flake: fix recursive module alias 2024-05-16 19:11:36 +03:00
raf
74df3a5f03
Merge pull request #292 from jacekpoz/main
languages/ocaml: init
2024-05-16 13:32:44 +00:00
jacekpoz
7224c1e6af
languages/ocaml: add ocaml to maximal config 2024-05-16 14:39:43 +02:00
jacekpoz
f343ab8b3a
languages/ocaml: add formatter to nvf's env 2024-05-16 14:25:23 +02:00
jacekpoz
208d1e6741
languages/ocaml: follow other languages' format 2024-05-16 14:25:07 +02:00
493854e44f
lualine: improve consistency between components; add more diagnostic sources 2024-05-16 07:45:15 +03:00
jacekpoz
cc0aba4e21
languages/ocaml: add formatting support 2024-05-15 21:09:46 +02:00
jacekpoz
db810bbf9f
languages/ocaml: init 2024-05-15 20:40:15 +02:00
raf
1fd4a2a1b8
Merge pull request #291 from NotAShelf/lualine-refactor
lualine: increase theme compatibility; fix component definitions
2024-05-15 15:38:15 +00:00
7cafa56cdb
docs: update 0.7 release notes 2024-05-15 13:09:46 +03:00
b5f38b8e5e
lualine: increase theme compatibility; fix component definitions 2024-05-15 13:09:45 +03:00
355d4830e5
flake: update inputs 2024-05-15 13:09:19 +03:00
Ching Pei Yang
8aa3a23e97 lib: do not filter out empty attrs in toLuaObject 2024-05-12 03:17:04 +02:00
Ching Pei Yang
7d9f1e0481 colorizer: add example 2024-05-12 03:15:04 +02:00
Ching Pei Yang
82e92a56da colorizer: move back to setupOpts 2024-05-12 02:11:59 +02:00
Ching Pei Yang
981fe07075 colorizer: allow null for all options 2024-05-12 01:46:57 +02:00
raf
2615c568f8
Merge pull request #288 from NotAShelf/additional-luafile
wrapper/rc: add vim.extraLuaFiles
2024-05-10 12:37:47 +00:00
407ecf00d5
wrapper/rc: add vim.additionaLuafiles
Allows the user to specify a list of lua files that will be called via `luafile`. All paths
that are passed to this option are checked by `builtins.isPath` so attempting to source paths
that do not exist do not result in a broken Lua configuration.
2024-05-09 00:44:58 +03:00
7c1a8e2c1e
flake: bump inputs 2024-05-08 23:05:58 +03:00
ea5f229efd
languages/markdown: convert extra ft list to lua table 2024-05-08 00:31:23 +03:00
41f7abcdc3
languagess/markdown: add missing config section 2024-05-08 00:22:12 +03:00
a85bf963e6
CI: don't build tidal output 2024-05-07 23:57:09 +03:00
raf
26755a6b93
Merge pull request #286 from NotAShelf/minor-lang-refactor
modules/languages: minor refactor; add bash formatter
2024-05-07 20:53:35 +00:00
96b92b5652
configuration.nix: disable nim by default
It is broken on Darwin, and pkgs is not in scope here to check
2024-05-07 15:40:08 +03:00
544c98a03b
Merge branch 'main' of github.com:NotAShelf/nvf into minor-lang-refactor 2024-05-07 01:04:47 +03:00
e96897f6b3
languages/elixir: readd; format module options 2024-05-07 00:52:33 +03:00
raf
12fd9d69dc
Merge pull request #287 from FrothyMarrow/mappings-fix
plugins/lsp: filter out null mappings
2024-05-06 21:42:22 +00:00
Frothy
dc0fa76295 docs: entry for fixed null lsp mappings 2024-05-06 17:01:16 -04:00
e0790f2bdb
docs: remove remaining references to elixir & vim-tidal related pkgs 2024-05-06 23:43:35 +03:00
bf090172d2
modules/extra: init deprecations module; warn for elixir & vim-tidal 2024-05-06 23:43:34 +03:00
7481423bed
docs: update 0.7 release notes 2024-05-06 23:43:33 +03:00
6eba2a5585
languages: move bash & dart configurations to standalone files 2024-05-06 23:43:32 +03:00
1847b9f1bf
languages/tidal: remove 2024-05-06 23:43:31 +03:00
d06ff3d7db
languages/markdown: move to standalone file; add deno formatter 2024-05-06 23:43:30 +03:00
Frothy
83583e9b64 plugins/lsp: filter out null mappings 2024-05-06 16:05:43 -04:00
raf
efd8b44ce1
Merge pull request #284 from FrothyMarrow/del-dupl-telescope
utility/telescope: remove duplicate telescope module
2024-05-06 12:53:12 +00:00
Frothy
9fe96ce010 utility/telescope: remove duplicate telescope module 2024-05-06 08:46:04 -04:00
raf
a777941eed
Merge pull request #280 from NotAShelf/rename-module-opts
flake/modules: alias `programs.nvf` to `programs.neovim-flake`
2024-05-06 06:54:59 +00:00
raf
a20f84edfb
Merge pull request #278 from horriblename/fix-ts-context-keybind
treesitter: fix ts incremental selection keybinds
2024-05-05 00:42:35 +00:00
Ching Pei Yang
666de6a5be docs: update changelog 2024-05-05 02:38:26 +02:00
Pei Yang Ching
3ad560ea30 treesitter: fix ts context keybinds 2024-05-05 02:37:57 +02:00
Pei Yang Ching
2c37513012 colorizer: fix nonsense options 2024-05-05 02:18:19 +02:00
ab2685579a
flake/modules: alias programs.nvf to programs.neovim-flake
I will deprecate it in a future date, but for now it is fine.
2024-05-05 02:51:03 +03:00
raf
5b982fafa0
docs: fix missing header in README 2024-05-03 09:56:57 +00:00
d25492788c
Merge pull request #272 from FrothyMarrow/fix-fidget-overrides
visuals/fidget: use submodule for notification group overrides
2024-05-02 03:21:53 +00:00
Frothy
e1edeb5189 docs: entry for modified type in fidget display overrides 2024-05-01 23:19:46 -04:00
Frothy
4df41ae0d0 visuals/fidget: use submodule for notification group overrides 2024-05-01 23:19:44 -04:00
0ae4408fd8
Merge pull request #276 from NotAShelf/NotAShelf-patch-1
docs: fix license URLs
2024-05-01 18:52:03 +00:00
32615fca69
docs: fix license URLs 2024-05-01 18:51:50 +00:00
768449eff7
Merge pull request #275 from NotAShelf/NotAShelf-patch-1
nvf: let people pay me
2024-05-01 18:50:03 +00:00
4d41469b3d
nvf: let people pay me
I initially removed the ability to fund me due to this project being a soft-fork of JordanIsaac's neovim-flake. However, the project has changed *enough* to justify it being a standalone and therefore unaffiliated project. With the number of commits and the time spent in mind, I am allowing funding again.
2024-05-01 18:49:47 +00:00
fbc138a51b
Merge pull request #273 from FrothyMarrow/typst-docs-entry
docs: add entry for typst language support
2024-05-01 16:08:19 +00:00
d5fde3f445
docs: wording 2024-05-01 16:05:12 +00:00
Frothy
90ee038794 docs: add entry for typst language support 2024-04-29 07:47:07 -04:00
f66a879dce
Merge pull request #274 from FrothyMarrow/disable-wakatime
configuration: disable wakatime in maximal output
2024-04-29 05:28:14 +00:00
Frothy
ee240a1483 configuration: disable wakatime in maximal output 2024-04-28 22:33:00 -04:00
94ffd5ec9f
Merge pull request #271 from FrothyMarrow/typst-lang-support
languages/typst: add typst language support
2024-04-28 20:23:33 +00:00
ItsSorae
4056deb411 languages/typst: add typst language support 2024-04-28 15:07:41 -04:00
6e8bb14567
docs: fix alignment issues in README 2024-04-28 21:00:57 +03:00
2a37873f8a
docs: move maintenance notice to FAQ 2024-04-28 20:41:54 +03:00
a12a26e405
CI: use the correct path in pages 2024-04-28 20:35:31 +03:00
d2d2c2a227
CI: remove docker builds 2024-04-28 20:35:15 +03:00
fde298805c
Merge pull request #231 from NotAShelf/v0.6
v0.6
2024-04-28 17:29:40 +00:00
181 changed files with 4820 additions and 3063 deletions

View file

@ -16,7 +16,7 @@ If you have any questions regarding those files, feel free to open an issue or [
## Contributing
The contribution process is mostly documented in the [pull request template](.github/pull_request_template.md). You will find a checklist of items to complete before submitting a pull request. Please make sure you complete it before submitting a pull request. If you are unsure about any of the items, please ask.
The contribution process is mostly documented in the [pull request template](pull_request_template.md). You will find a checklist of items to complete before submitting a pull request. Please make sure you complete it before submitting a pull request. If you are unsure about any of the items, please ask.
### Guidelines

4
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,4 @@
github: NotAShelf
ko_fi: NotAShelf
liberapay: NotAShelf

View file

@ -1,39 +0,0 @@
# Description
A clear and concise description of the aim of your Pull Request.
**If your pull request aims to fix an open issue or a present bug, please link the relevant issue below. If not, please remove this section**
Fixes #(issue)
## Type of change
Please delete any options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- Translation/Language update
- Docs
- Other
## Checklist
Please try to check at least a majority of the checklist before opening your pull request. Exceptions to this will be reviewed on a case by case basis.
- [ ] My code follows the style and contributing guidelines of this project.
- [ ] I ran Alejandra to format my code (`nix fmt`).
- [ ] I have performed a self-review of my own code and tested it.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] My changes generate no new warnings.
- [ ] This change requires a documentation update.
- [ ] I have updated the documentation accordingly.
## Screenshots & Logs
You are kindly requested to attach screenshots of your changes in actions and preferably your build/run logs for all available packages. If you are not sure how to do this, you can refer to the [documentation](https://notashelf.github.io/neovim-flake/).
**Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.**
```console
# Paste your logs here
```

210
.github/README.md vendored
View file

@ -1,7 +1,9 @@
<div align="center">
<img src="assets/nvf-logo-work.svg" alt="nvf Logo" width="200">
<br/>
<h1>nvf</h1>
</div>
<h1 align="center">❄️ nvf</h1>
<div align="center">
<p>
<a href="https://github.com/NotAShelf/nvf/releases/latest">
@ -23,6 +25,7 @@
<img alt="Repo Size" src="https://img.shields.io/github/repo-size/NotAShelf/nvf?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
</a>
</p>
</div>
<p align="center">
<img src="https://stars.medv.io/NotAShelf/nvf.svg", title="stars"/>
@ -30,34 +33,17 @@
<div align="center">
<a>
A highly modular, configurable, extensible and easy to use Neovim configuration
framework in Nix. Designed for flexibility and ease of use, this flake
allows you to easily configure your Neovim instance with a few lines of
Nix code.
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.
</a>
</div>
<br/>
> [!WARNING]
> Main branch is only updated for small, non-breaking changes. For the latest version of neovim-flake, please see
> [the list of branches](https://github.com/NotAShelf/neovim-flake/branches) or
> [open pull requests](https://github.com/NotAShelf/neovim-flake/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc).
> neovim-flake, at the time, is still being actively developed - and will continue to be so for the foreseeable
> future.
---
<div align="center"><p>
**[<kbd><br>Get Started<br></kbd>][Get Started]**
**[<kbd><br>Documentation<br></kbd>][Documentation]**
**[<kbd><br>Help<br></kbd>][Help]**
**[<kbd><br>Contribute<br></kbd>][Contribute]**
**[<kbd><br>FAQ<br></kbd>][Faq]**
**[<kbd><br>Credits<br></kbd>][Credits]**
</p></div>
[Features]: #features
[Get Started]: #get-started
[Documentation]: #documentation
[Help]: #help
@ -65,100 +51,156 @@
[FAQ]: #faq
[Credits]: #credits
**[<kbd><br>Features <br></kbd>][Features]**
**[<kbd><br>Get Started<br></kbd>][Get Started]**
**[<kbd><br>Documentation<br></kbd>][Documentation]**
**[<kbd><br>Help<br></kbd>][Help]**
**[<kbd><br>Contribute<br></kbd>][Contribute]**
**[<kbd><br>FAQ<br></kbd>][Faq]** **[<kbd><br>Credits<br></kbd>][Credits]**
</p></div>
---
## Features
- **Reproducible**: Your configuration will behave the same _anywhere_. No
surprises, promise!
- **Portable**: nvf depends _solely_ on your Nix store, and nothing else. No
more global binaries! Works on all platforms, without hassle.
- **Customizable**: There are _almost no defaults_ to annoy you. nvf is fully
customizable through the Nix module system.
- **Well-documented**: Documentation is priority. You will _never_ face
undocumented, obscure behaviour.
- **Idiomatic**: nvf does things ✨ _the right way_ ✨ - the codebase is, and
will, remain maintainable for myself and any contributors.
## Get Started
### Using `nix` CLI
[nvf manual]: https://notashelf.github.io/nvf/
[issue tracker]: https://github.com/NotAShelf/nvf/issues
If you would like to try out the configuration before even thinking about
installing it, you can run the following command
If you are not sold on the concepts of **nvf**, and would like to try out the
default configuration before even _thinking about_ installing it, you may run
the following in order to take **nvf** out for a spin.
```console
```bash
# Run the default package
nix run github:notashelf/nvf
```
This will get you a feel for the base configuration and UI design.
The flake exposes `#nix` as the default package, providing minimal
language support and various utilities.You may also use `#nix`,
`#tidal` or `#maximal` to get try out different configurations.
This will get you a feel for the base configuration and UI design. Though, none
of the configuration options are final as **nvf** is designed to be modular and
configurable.
It is as simple as changing the target output to get a different
configuration. For example, to get a configuration with `tidal` support, run:
> [!TIP]
> The flake exposes `#nix` as the default package, providing minimal language
> support and various utilities. You may also use the `#nix` or `#maximal`
> packages provided by the this flake to get try out different configurations.
```console
nix run github:notashelf/nvf#tidal
It is as simple as changing the target output to get a different configuration.
For example, to get a configuration with large language coverage, run:
```bash
# Run the maximal package
nix run github:notashelf/nvf#maximal
```
Similar instructions will apply for `nix profile install`. However, you are
recommended to instead use the module system as described in the manual.
> [!NOTE]
> The `maximal` configuration is _massive_ and will take a while to build.
> To get a feel for the configuration, use the default `nix` or `tidal`
> configurations. Should you choose to try out the `maximal` configuration,
> using the binary cache as described in the manual is _strongly_ recommended.
> The `maximal` configuration is quite large, and might take a while to build.
> To get a feel for the configuration, use the default `nix` configuration.
> Should you choose to try out the `maximal` configuration, using the binary
> cache as described in the manual is _strongly_ recommended.
If you are convinced, proceed to the next section to view the installation
instructions.
## Documentation
See the [**nvf** Manual](https://notashelf.github.io/nvf/) for
detailed installation guides, configurations, available options, release notes
and more. Tips for installing userspace plugins is also contained in the
documentation.
The _recommended_ way of installing **nvf** is using either the NixOS or the
Home-Manager module, though it is completely possible and no less supported to
install **nvf** as a standalone package, or a flake output.
If you want to dive right into trying **nvf** you can get a fully
featured configuration with `nix` language support by running:
See the rendered [nvf manual] for detailed and up-to-date installation guides,
configurations, available options, release notes and more. Tips for installing
userspace plugins is also contained in the documentation.
```console
nix run github:notashelf/nvf#nix
```
> [!TIP]
> While using NixOS or Home-Manager modules,
> `programs.nvf.enableManpages = true;` will allow you to view option
> documentation from the comfort of your terminal via `man 5 nvf`. The more you
> know.
Please create an issue on the [issue tracker](../../../issues) if you find
the documentation lacking or confusing. I also appreciate any contributions
to the documentation.
Please create an issue on the [issue tracker] if you find the documentation
lacking or confusing. Any improvements to the documentation through pull
requests are also welcome, and appreciated.
## Help
You can create an issue on the [issue tracker](../../../issues) to ask questions
or report bugs. I am not yet on spaces like matrix or IRC, so please use the issue
tracker for now.
You can create an issue on the [issue tracker] to ask questions or report bugs.
I am not yet on spaces like matrix or IRC, so please use the issue tracker for
now.
## Contributing
I am always looking for new ways to help improve this flake. If you would like
to contribute, please read the [contributing guide](CONTRIBUTING.md) before
submitting a pull request. You can also create an issue on the
[issue tracker](../../../issues) before submitting a pull request if you would
like to discuss a feature or bug fix.
submitting a pull request. You can also create an issue on the [issue tracker]
before submitting a pull request if you would like to discuss a feature or bug
fix.
## FAQ
[appropriate issue template]: https://github.com/NotAShelf/nvf/issues/new/choose
[list of branches]: https://github.com/NotAShelf/nvf/branches
[list of open pull requests]: https://github.com/NotAShelf/nvf/pulls
**Q**: What platforms are supported?
<br/> **A**: nvf actively supports Linux and Darwin platforms using standalone
Nix, NixOS or Home-Manager. Please take a look at the
**Q**: Can you add _X_?
<br/>
**A**: Maybe! It is not one of our goals to support each and every Neovim
plugin, however, I am always open to new modules and plugin setup additions
to **nvf**. Use the [appropritate issue
template](https://github.com/NotAShelf/nvf/issues/new/choose) and I will
consider a module addition.
<br/> **A**: Maybe! It is not one of our goals to support each and every Neovim
plugin, however, I am always open to new modules and plugin setup additions to
**nvf**. Use the [appropriate issue template] and I will consider a module
addition. As mentioned before, PRs adding new features are also welcome.
**Q**: A plugin I need is not available in **nvf**. What to do?
<br/>
**A**: **nvf** exposes several APIs for you to be able to add your own
plugin configurations! Please see the documentation on how you may do
this.
<br/> **A**: **nvf** exposes several APIs for you to be able to add your own
plugin configurations! Please see the documentation on how you may do this.
**Q**: Main branch is awfully silent, is the project dead?
<br/> **A**: No! Sometimes we branch out (e.g. `v0.6`) to avoid breaking
userspace and work in a separate branch until we make sure the new additions are
implemented in the most comfortable way possible for the end user. If you have
not noticed any activity on the main branch, consider taking a look at the
[list of branches] or the [list of open pull requests]. You may also consider
_testing_ those release branches to get access to new features ahead of time and
better prepare to breaking changes.
## Credits
### Contributors
Special thanks to
Special, heart-felt thanks to
- [@fufexan](https://github.com/fufexan) - For the transition to flake-parts
- [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to work
- [@n3oney](https://github.com/n3oney) - For making custom keybinds finally possible
- [@horriblename](https://github.com/horriblename) - For actively implementing planned features and quality of life updates
- [@FlafyDev](https://github.com/FlafyDev) - For getting the home-manager to
work
- [@n3oney](https://github.com/n3oney) - For making custom keybinds finally
possible
- [@horriblename](https://github.com/horriblename) - For actively implementing
planned features and quality of life updates
- [@Yavko](https://github.com/Yavko) - For the amazing **nvf** logo
- [@FrothyMarrow](https://github.com/FrothyMarrow) - For seeing mistakes that I could not
- [@FrothyMarrow](https://github.com/FrothyMarrow) - For seeing mistakes that I
could not
- [@Diniamo](https://github.com/Diniamo) - For actively submitting PRs, pull
requests and overall assistence
- [@Gerg-l](https://github.com/gerg-l) - For the modern Neovim wrapper, mnw and
occasional code improvements
and everyone who has submitted issues or pull requests!
@ -167,10 +209,18 @@ and everyone who has submitted issues or pull requests!
This configuration borrows from and is based on a few other configurations,
including:
- [@jordanisaacs's](https://github.com/jordanisaacs) [neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake is originally based on.
- [@sioodmy's](https://github.com/sioodmy) [dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design choices.
- [@wiltaylor's](https://github.com/wiltaylor) [neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and design ideas.
- [@gvolpe's](https://github.com/gvolpe) [neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and nix concepts.
- [@jordanisaacs's](https://github.com/jordanisaacs)
[neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake
is originally based on.
- [@sioodmy's](https://github.com/sioodmy)
[dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design
choices.
- [@wiltaylor's](https://github.com/wiltaylor)
[neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and
design ideas.
- [@gvolpe's](https://github.com/gvolpe)
[neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and
nix concepts.
I am grateful for their previous work and inspiration, and I wholeheartedly
recommend checking their work out.
@ -178,9 +228,13 @@ recommend checking their work out.
## License
Following the [original neovim-flake](https://github.com/jordanisaacs/neovim-flake)
**nvf** has been made available under the **MIT License**. However, all assets
are published under the [CC BY License].
Following the license of the
[original neovim-flake](https://github.com/jordanisaacs/neovim-flake), **nvf**
has been made available under the [**MIT License**](LICENSE). However, all
assets and documentation are published under the
[**CC BY License**](https://github.com/NotAShelf/nvf/blob/main/.github/assets/LICENSE).
<h6 align="center">Yes, this includes the logo work too. Stop taking artwork that is not yours!</h6>
---

57
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,57 @@
<!--
^ Please include a clear and concise description of the aim of your Pull Request above this line ^
For plugin dependency/module additions, please make sure to link the source link of the added plugin
or dependency in this section.
If your pull request aims to fix an open issue or a please bug, please also link the relevant issue
below this line. You may attach an issue to your pull request with `Fixes #<issue number>` outside
this comment.
-->
## Sanity Checking
<!--
Please check all that apply. As before, this section is not a hard requirement but checklists with more checked
items are likely to be merged faster. You may save some time in maintainer review by performing self-reviews here
before submitting your pull request.
If your pull request includes any change or unexpected behaviour not covered below, please do make sure to include
it above in your description.
-->
[editorconfig]: https://editorconfig.org
[changelog]: https://github.com/NotAShelf/nvf/tree/main/docs/release-notes
- [ ] I have updated the [changelog] as per my changes.
- [ ] I have tested, and self-reviewed my code.
- Style and consistency
- [ ] I ran **Alejandra** to format my code (`nix fmt`).
- [ ] My code conforms to the [editorconfig] configuration of the project.
- [ ] My changes are consistent with the rest of the codebase.
- If new changes are particularly complex:
- [ ] My code includes comments in particularly complex areas
- [ ] I have added a section in the manual.
- [ ] _(For breaking changes)_ I have included a migration guide.
- Package(s) built:
- [ ] `.#nix` (default package)
- [ ] `.#maximal`
- [ ] `.#docs-html`
- Tested on platform(s)
- [ ] `x86_64-linux`
- [ ] `aarch64-linux`
- [ ] `x86_64-darwin`
- [ ] `aarch64-darwin`
<!--
If your changes touch upon a portion of the codebase that you do not understand well, please make sure to consult
the maintainers on your changes. In most cases, making an issue before creating your PR will help you avoid duplicate
efforts in the long run.
-->
---
Add a :+1: [reaction] to [pull requests you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[pull requests you find important]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc

View file

@ -19,7 +19,6 @@ jobs:
package:
- default
- nix
- tidal
- maximal
steps:
- uses: easimon/maximize-build-space@v10
@ -38,7 +37,7 @@ jobs:
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
authToken: ${{ secrets.CACHIX_TOKEN }}
extraPullNames: nix-community

View file

@ -48,4 +48,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.package }}"
path: result/share/doc/neovim-flake/
path: result/share/doc/nvf

22
.github/workflows/cleanup.yml vendored Normal file
View file

@ -0,0 +1,22 @@
name: Cleanup
on:
workflow_dispatch:
schedule:
- cron: "0 4 1 * *" # 4AM on 1st of every month
- cron: "0 4 15 * *" # 4AM on the 15th of every month
jobs:
branches:
name: Cleanup old branches
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Delete old branches"
uses: beatlabs/delete-old-branches-action@v0.0.10
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
date: "1 months ago"
dry_run: false
delete_tags: false
exclude_open_pr_branches: true

View file

@ -1,50 +0,0 @@
name: "Publish Docker Image"
on:
workflow_dispatch:
push:
tags: ["v*"]
jobs:
build-docker-image:
name: "Build Docker Image"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build Docker Image
run: nix build .#docker-nix --print-build-logs
- name: Load & Tag Built Docker Image
run: |
docker load -i result &&
docker tag neovim-flake:latest notashelf/neovim-flake:latest
- name: Log into DockerHub
uses: docker/login-action@master
with:
username: notashelf
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Push to DockerHub
run: docker push notashelf/neovim-flake:latest
- name: Log into ghcr
uses: docker/login-action@master
with:
registry: "ghcr.io"
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Publish Docker Image (Github Packages)
run: docker push notashelf/neovim-flake:latest

View file

@ -1,4 +1,5 @@
name: "Build and deploy documentation"
on:
workflow_dispatch:
push:
@ -7,6 +8,7 @@ on:
paths:
# build the manuals only when docs directory is updated
- docs/**
- modules/**
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
@ -20,23 +22,34 @@ concurrency:
cancel-in-progress: true
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v4.1.7
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
publish:
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: actions/checkout@v4.1.7
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build
run: |
nix build '.#docs'
cp -r result/share/doc/neovim-flake public
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
- run: |
nix build .#docs
cp -r result/share/doc/nvf public
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public

View file

@ -1,25 +1,4 @@
inputs: let
modulesWithInputs = import ./modules inputs;
neovimConfiguration = {
modules ? [],
pkgs,
lib ? pkgs.lib,
check ? true,
extraSpecialArgs ? {},
extraModules ? [],
...
}:
modulesWithInputs {
inherit pkgs lib check extraSpecialArgs extraModules;
configuration.imports = modules;
};
tidalConfig = {
config.vim.languages.tidal.enable = true;
};
mainConfig = isMaximal: {
isMaximal: {
config.vim = {
viAlias = true;
vimAlias = true;
@ -38,9 +17,9 @@ inputs: let
lspkind.enable = false;
lightbulb.enable = true;
lspsaga.enable = false;
nvimCodeActionMenu.enable = isMaximal;
trouble.enable = true;
lspSignature.enable = true;
otter-nvim.enable = isMaximal;
lsplines.enable = isMaximal;
nvim-docs-view.enable = isMaximal;
};
@ -58,7 +37,16 @@ inputs: let
enableTreesitter = true;
enableExtraDiagnostics = true;
# Nim LSP is broken on Darwin and therefore
# should be disabled by default. Users may still enable
# `vim.languages.vim` to enable it, this does not restrict
# that.
# See: <https://github.com/PMunch/nimlsp/issues/178#issue-2128106096>
nim.enable = false;
nix.enable = true;
markdown.enable = isMaximal;
html.enable = isMaximal;
css.enable = isMaximal;
sql.enable = isMaximal;
@ -66,14 +54,16 @@ inputs: let
ts.enable = isMaximal;
svelte.enable = isMaximal;
go.enable = isMaximal;
lua.enable = isMaximal;
elixir.enable = isMaximal;
zig.enable = isMaximal;
ocaml.enable = isMaximal;
python.enable = isMaximal;
dart.enable = isMaximal;
elixir.enable = isMaximal;
bash.enable = isMaximal;
terraform.enable = isMaximal;
nim.enable = false;
r.enable = isMaximal;
tailwind.enable = isMaximal;
typst.enable = isMaximal;
clang = {
enable = isMaximal;
lsp.server = "clangd";
@ -81,27 +71,20 @@ inputs: let
rust = {
enable = isMaximal;
crates.enable = true;
crates.enable = isMaximal;
};
};
visuals = {
enable = true;
nvimWebDevicons.enable = true;
scrollBar.enable = true;
scrollBar.enable = isMaximal;
smoothScroll.enable = true;
cellularAutomaton.enable = false;
fidget-nvim.enable = true;
highlight-undo.enable = true;
indentBlankline = {
enable = true;
fillChar = null;
eolChar = null;
scope = {
enabled = true;
};
};
indentBlankline.enable = true;
cursorline = {
enable = true;
@ -174,14 +157,15 @@ inputs: let
};
utility = {
ccc.enable = isMaximal;
vim-wakatime.enable = isMaximal;
ccc.enable = false;
vim-wakatime.enable = false;
icon-picker.enable = isMaximal;
surround.enable = isMaximal;
diffview-nvim.enable = true;
motion = {
hop.enable = true;
leap.enable = true;
precognition.enable = isMaximal;
};
images = {
@ -217,12 +201,13 @@ inputs: let
enable = true;
setupOpts.custom_colorcolumn = {
# this is a freeform module, it's `buftype = int;` for configuring column position
nix = 110;
ruby = 120;
java = 130;
go = [90 130];
nix = "110";
ruby = "120";
java = "130";
go = ["90" "130"];
};
};
fastaction.enable = true;
};
assistant = {
@ -249,7 +234,4 @@ inputs: let
neocord.enable = false;
};
};
};
in {
inherit neovimConfiguration mainConfig tidalConfig;
}

View file

@ -1,20 +1,25 @@
{
inputs,
pkgs,
lib ? import ../lib/stdlib-extended.nix pkgs.lib inputs,
manpageUrls ? pkgs.path + "/doc/manpage-urls.json",
...
lib,
}: let
inherit (lib.modules) mkForce evalModules;
inherit (lib.strings) hasPrefix removePrefix;
inherit (lib.attrsets) isAttrs mapAttrs optionalAttrs recursiveUpdate isDerivation;
inherit (builtins) fromJSON readFile;
inherit ((lib.importJSON ../release.json)) release;
# release data
release-config = fromJSON (readFile ../release.json);
revision = release-config.release;
nvimModuleDocs = pkgs.nixosOptionsDoc {
variablelistId = "nvf-options";
warningsAreErrors = true;
# From home-manager:
inherit
(
(lib.evalModules {
modules =
import ../modules/modules.nix {
inherit lib pkgs;
}
++ [
(
let
# From nixpkgs:
#
# Recursively replace each derivation in the given attribute set
# with the same derivation but with the `outPath` attribute set to
@ -28,131 +33,73 @@
# Caveat: even if the package is reached by a different means, the
# path above will be shown and not e.g.
# `${config.services.foo.package}`.
scrubDerivations = prefixPath: attrs: let
scrubDerivation = name: value: let
pkgAttrName = prefixPath + "." + name;
scrubDerivations = namePrefix: pkgSet:
builtins.mapAttrs (
name: value: let
wholeName = "${namePrefix}.${name}";
in
if isAttrs value
if builtins.isAttrs value
then
scrubDerivations pkgAttrName value
// optionalAttrs (isDerivation value) {
outPath = "\${${pkgAttrName}}";
scrubDerivations wholeName value
// lib.optionalAttrs (lib.isDerivation value) {
inherit (value) drvPath;
outPath = "\${${wholeName}}";
}
else value;
in
mapAttrs scrubDerivation attrs;
# Make sure the used package is scrubbed to avoid actually
# instantiating derivations.
scrubbedPkgsModule = {
imports = [
{
_module.args = {
pkgs = mkForce (scrubDerivations "pkgs" pkgs);
pkgs_i686 = mkForce {};
};
}
];
};
# Specify the path to the module entrypoint
nvimPath = toString ./..;
buildOptionsDocs = args @ {
modules,
includeModuleSystemOptions ? true,
warningsAreErrors ? true,
...
}: let
inherit ((evalModules {inherit modules;})) options;
# Declaration of the Github site URL.
# Takes a user, repo, and subpath, and returns a declaration site
# as a string.
githubDeclaration = user: repo: subpath: let
urlRef = "github.com";
branch = "main";
else value
)
pkgSet;
in {
url = "https://${urlRef}/${user}/${repo}/blob/${branch}/${subpath}";
name = "<${repo}/${subpath}>";
_module = {
check = false;
args.pkgs = lib.mkForce (scrubDerivations "pkgs" pkgs);
};
in
pkgs.buildPackages.nixosOptionsDoc ({
inherit warningsAreErrors;
options =
if includeModuleSystemOptions
then options
else builtins.removeAttrs options ["_module"];
}
)
];
})
)
options
;
transformOptions = opt:
recursiveUpdate opt {
# Clean up declaration sites to not refer to the nvf
# source tree.
declarations = map (decl:
if hasPrefix nvimPath (toString decl)
opt
// {
declarations =
map (
decl:
if lib.hasPrefix (toString ../.) (toString decl)
then
githubDeclaration "notashelf" "nvf"
(removePrefix "/" (removePrefix nvimPath (toString decl)))
lib.pipe decl [
toString
(lib.removePrefix (toString ../.))
(lib.removePrefix "/")
(x: {
url = "https://github.com/NotAShelf/nvf/blob/main/${x}";
name = "<nvf/${x}>";
})
]
else if decl == "lib/modules.nix"
then
# TODO: handle this in a better way (may require upstream
# changes to nixpkgs)
githubDeclaration "NixOS" "nixpkgs" decl
else decl)
then {
url = "https://github.com/NixOS/nixpkgs/blob/master/${decl}";
name = "<nixpkgs/lib/modules.nix>";
}
else decl
)
opt.declarations;
};
}
// builtins.removeAttrs args ["modules" "includeModuleSystemOptions"]);
nvimModuleDocs = buildOptionsDocs {
variablelistId = "nvf-options";
modules =
import ../modules/modules.nix {
inherit lib pkgs;
check = false;
}
++ [scrubbedPkgsModule];
};
# Generate the `man home-configuration.nix` package
nvf-configuration-manual =
pkgs.runCommand "nvf-reference-manpage" {
nativeBuildInputs = [pkgs.buildPackages.installShellFiles pkgs.nixos-render-docs];
allowedReferences = ["out"];
} ''
# Generate manpages.
mkdir -p $out/share/man/man5
mkdir -p $out/share/man/man1
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
--revision ${revision} \
--header ${./man/header.5} \
--footer ${./man/footer.5} \
${nvimModuleDocs.optionsJSON}/share/doc/nixos/options.json \
$out/share/man/man5/nvf.5
cp ${./man/nvf.1} $out/share/man/man1/nvf.1
'';
# Generate the HTML manual pages
nvf-manual = pkgs.callPackage ./manual.nix {
inherit revision manpageUrls;
outputPath = "share/doc/nvf";
options = {
nvf = nvimModuleDocs.optionsJSON;
html = pkgs.callPackage ./manual.nix {
inherit release;
inherit (nvimModuleDocs) optionsJSON;
};
};
html = nvf-manual;
htmlOpenTool = pkgs.callPackage ./html-open-tool.nix {} {inherit html;};
in {
inherit (inputs) nmd;
options = {
# TODO: Use `hmOptionsDocs.optionsJSON` directly once upstream
# `nixosOptionsDoc` is more customizable.
json =
options.json =
pkgs.runCommand "options.json" {
meta.description = "List of nvf options in JSON format";
} ''
@ -165,8 +112,31 @@ in {
'${nvimModuleDocs.optionsJSON}/share/doc/nixos' \
"$out/share/doc/nvf"
'';
};
manPages = nvf-configuration-manual;
manual = {inherit html htmlOpenTool;};
# Generate the `man home-configuration.nix` package
manPages =
pkgs.runCommand "nvf-reference-manpage" {
nativeBuildInputs = [
pkgs.buildPackages.installShellFiles
pkgs.nixos-render-docs
];
allowedReferences = ["out"];
} ''
# Generate manpages.
mkdir -p $out/share/man/{man5,man1}
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
--revision ${release} \
--header ${./man/header.5} \
--footer ${./man/footer.5} \
${nvimModuleDocs.optionsJSON}/share/doc/nixos/options.json \
$out/share/man/man5/nvf.5
cp ${./man/nvf.1} $out/share/man/man1/nvf.1
'';
manual = {
inherit html;
htmlOpenTool = pkgs.callPackage ./html-open-tool.nix {inherit html;};
};
}

View file

@ -2,13 +2,9 @@
writeShellScriptBin,
makeDesktopItem,
symlinkJoin,
}: {
html,
pathName ? "nvf",
projectName ? pathName,
name ? "${pathName}-help",
}: let
helpScript = writeShellScriptBin name ''
helpScript = writeShellScriptBin "nvf-help" ''
set -euo pipefail
if [[ ! -v BROWSER || -z $BROWSER ]]; then
@ -24,20 +20,23 @@
echo "$0: unable to start a web browser; please set \$BROWSER"
exit 1
else
exec "$BROWSER" "${html}/share/doc/${pathName}/index.xhtml"
exec "$BROWSER" "${html}/share/doc/nvf/index.xhtml"
fi
'';
desktopItem = makeDesktopItem {
name = "${pathName}-manual";
desktopName = "${projectName} Manual";
genericName = "View ${projectName} documentation in a web browser";
name = "nvf-manual";
desktopName = "nvf Manual";
genericName = "View nvf documentation in a web browser";
icon = "nix-snowflake";
exec = "${helpScript}/bin/${name}";
exec = "${helpScript}/bin/nvf-help";
categories = ["System"];
};
in
symlinkJoin {
inherit name;
paths = [helpScript desktopItem];
name = "nvf-help";
paths = [
helpScript
desktopItem
];
}

View file

@ -4,11 +4,10 @@
# build inputs
nixos-render-docs,
documentation-highlighter,
path,
# nrd configuration
manpageUrls,
revision,
options,
outputPath ? "share/doc/nvf",
release,
optionsJSON,
}:
stdenvNoCC.mkDerivation {
name = "nvf-manual";
@ -20,9 +19,11 @@ stdenvNoCC.mkDerivation {
nativeBuildInputs = [nixos-render-docs];
buildPhase = ''
mkdir -p out/{highlightjs,media}
dest="$out/share/doc/nvf"
mkdir -p "$(dirname "$dest")"
mkdir -p $dest/{highlightjs,media}
cp -vt out/highlightjs \
cp -vt $dest/highlightjs \
${documentation-highlighter}/highlight.pack.js \
${documentation-highlighter}/LICENSE \
${documentation-highlighter}/mono-blue.css \
@ -31,36 +32,30 @@ stdenvNoCC.mkDerivation {
substituteInPlace ./options.md \
--subst-var-by \
OPTIONS_JSON \
${options.nvf}/share/doc/nixos/options.json
${optionsJSON}/share/doc/nixos/options.json
substituteInPlace ./manual.md \
--subst-var-by \
NVF_VERSION \
${revision}
${release}
# copy stylesheet
cp ${./static/style.css} out/style.css
cp ${./static/style.css} "$dest/style.css"
# copy release notes
cp -vr ${./release-notes} release-notes
# generate manual from
nixos-render-docs manual html \
--manpage-urls ${manpageUrls} \
--revision ${lib.trivial.revisionWithDefault revision} \
--manpage-urls ${path + "/doc/manpage-urls.json"} \
--revision ${lib.trivial.revisionWithDefault release} \
--stylesheet style.css \
--script highlightjs/highlight.pack.js \
--script highlightjs/loader.js \
--toc-depth 2 \
--section-toc-depth 1 \
manual.md \
out/index.xhtml
'';
installPhase = ''
dest="$out/${outputPath}"
mkdir -p "$(dirname "$dest")"
mv out "$dest"
"$dest/index.xhtml"
mkdir -p $out/nix-support/
echo "doc manual $dest index.html" >> $out/nix-support/hydra-build-products

View file

@ -5,4 +5,5 @@ configuring/custom-package.md
configuring/custom-plugins.md
configuring/languages.md
configuring/dags.md
configuring/dag-entries.md
```

View file

@ -1,7 +1,7 @@
# Custom Plugins {#ch-custom-plugins}
**nvf**, by default, exposes a wide variety of plugins as module options
for your convience and bundles necessary dependencies into **nvf**'s runtime.
for your convenience and bundles necessary dependencies into **nvf**'s runtime.
In case a plugin is not available in **nvf**, you may consider making a pull
request to **nvf** to include it as a module or you may add it to your
configuration locally.

View file

@ -1,16 +1,38 @@
# Configuring {#sec-configuring-plugins}
Just making the plugin to your Neovim configuration available might not always
be enough. In that case, you can write custom vimscript or lua config, using
either `config.vim.configRC` or `config.vim.luaConfigRC` respectively. Both of
these options are attribute sets, and you need to give the configuration you're
adding some name, like this:
be enough. In that case, you can write custom lua config using either
`config.vim.extraPlugins` (which has the `setup` field) or
`config.vim.luaConfigRC`. The first option uses an attribute set, which maps DAG
section names to a custom type, which has the fields `package`, `after`,
`setup`. They allow you to set the package of the plugin, the sections its setup
code should be after (note that the `extraPlugins` option has its own DAG
scope), and the its setup code respectively. For example:
```nix
config.vim.extraPlugins = with pkgs.vimPlugins; {
aerial = {
package = aerial-nvim;
setup = "require('aerial').setup {}";
};
harpoon = {
package = harpoon;
setup = "require('harpoon').setup {}";
after = ["aerial"]; # place harpoon configuration after aerial
};
}
```
The second option also uses an attribute set, but this one is resolved as a DAG
directly. The attribute names denote the section names, and the values lua code.
For example:
```nix
{
# this will create an "aquarium" section in your init.vim with the contents of your custom config
# this will create an "aquarium" section in your init.lua with the contents of your custom config
# which will be *appended* to the rest of your configuration, inside your init.vim
config.vim.configRC.aquarium = "colorscheme aquiarum";
config.vim.luaConfigRC.aquarium = "vim.cmd('colorscheme aquiarum')";
}
```

View file

@ -0,0 +1,23 @@
# DAG entries in nvf {#ch-dag-entries}
From the previous chapter, it should be clear that DAGs are useful, because you
can add code that relies on other code. However, if you don't know what the
entries are called, it's hard to do that, so here is a list of the internal
entries in nvf:
## `vim.luaConfigRC` (top-level DAG) {#ch-vim-luaconfigrc}
1. (`luaConfigPre`) - not a part of the actual DAG, instead, it's simply
inserted before the rest of the DAG
2. `globalsScript` - used to set globals defined in `vim.globals`
3. `basic` - used to set basic configuration options
4. `optionsScript` - used to set options defined in `vim.o`
5. `theme` (this is simply placed before `pluginConfigs`, meaning that
surrounding entries don't depend on it) - used to set up the theme, which has
to be done before other plugins
6. `pluginConfigs` - the result of the nested `vim.pluginRC` (internal option,
see the [Custom Plugins](/index.xhtml#ch-custom-plugins) page for adding your
own plugins) DAG, used to set up internal plugins
7. `extraPluginConfigs` - the result of `vim.extraPlugins`, which is not a
direct DAG, but is converted to, and resolved as one internally
8. `mappings` - the result of `vim.maps`

View file

@ -7,7 +7,7 @@ type which is borrowed from home-manager's extended library. This type is most
used for topologically sorting strings. The DAG type allows the attribute set
entries to express dependency relations among themselves. This can, for
example, be used to control the order of configuration sections in your
`configRC` or `luaConfigRC`.
`luaConfigRC`.
The below section, mostly taken from the [home-manager
manual](https://raw.githubusercontent.com/nix-community/home-manager/master/docs/manual/writing-modules/types.md)

View file

@ -17,6 +17,10 @@ configuring.md
hacking.md
```
```{=include=} appendix html:into-file=//plugins.html
plugins.md
```
```{=include=} appendix html:into-file=//options.html
options.md
```

16
docs/manual/plugins.md Normal file
View file

@ -0,0 +1,16 @@
# Plugin specific quirks {#ch-plugins}
At times, certain plugins refuse to play nicely. Be it as a result of generating
lua from Nix, or the state of packaging. This page shall list any plugins that
are known to misbehave, and potential workarounds.
```{=include=} chapters
plugins/nodejs.md
```
<!--
If adding a new section, uncomment this part and add your page to
plugins/<page>.md
```{=include=} chapters
plugins/page.md
```
-->

View file

@ -0,0 +1,18 @@
# NodeJS {#ch-plugins-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-formating 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

@ -5,7 +5,6 @@ Below are the commands you may run to try out different configurations provided
configurations are provided:
- Nix
- Tidal
- Maximal
You may try out any of the provided configurations using the `nix run` command on a system where Nix is installed.
@ -22,7 +21,6 @@ once you garbage collect.
```console
$ nix run github:notashelf/nvf#nix
$ nix run github:notashelf/nvf#tidal
$ nix run github:notashelf/nvf#maximal
```
@ -33,10 +31,6 @@ $ nix run github:notashelf/nvf#maximal
`Nix` configuration by default provides LSP/diagnostic support for Nix alongisde a set of visual and functional plugins.
By running `nix run .#`, which is the default package, you will build Neovim with this config.
#### Tidal {#sec-configs-tidal}
Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.
#### Maximal {#sec-configs-maximal}
`Maximal` is the ultimate configuration that will enable support for more commonly used language as well as additional

View file

@ -10,4 +10,5 @@ rl-0.3.md
rl-0.4.md
rl-0.5.md
rl-0.6.md
rl-0.7.md
```

View file

@ -83,7 +83,7 @@ Release notes for release 0.5
- Updated indent-blankine.nvim to v3 - this comes with a few option changes, which will be migrated with `renamedOptionModule`
[jacekpoz](https://github.com/jacekpoz):
[jacekpoz](https://jacekpoz.pl):
- Fixed scrollOffset not being used

View file

@ -62,7 +62,7 @@ vim.api.nvim_set_keymap('n', '<leader>a', ':lua camelToSnake()<CR>', { noremap =
- Added rose-pine theme.
[jacekpoz](https://github.com/jacekpoz):
[jacekpoz](https://jacekpoz.pl):
- Added `vim.autocomplete.alwaysComplete`. Allows users to have the autocomplete window popup only when manually activated.

View file

@ -0,0 +1,222 @@
# Release 0.7 {#sec-release-0.7}
Release notes for release 0.7
## Breaking Changes and Migration Guide {#sec-breaking-changes-and-migration-guide-0-7}
### `vim.configRC` removed {#sec-vim-configrc-removed}
In v0.7 we are removing `vim.configRC` in favor of making `vim.luaConfigRC` the
top-level DAG, and thereby making the entire configuration Lua based. This
change introduces a few breaking changes:
[DAG entries in nvf manual]: /index.xhtml#ch-dag-entries
- `vim.configRC` has been removed, which means that you have to convert all of
your custom vimscript-based configuration to Lua. As for how to do that, you
will have to consult the Neovim documentation and your search engine.
- After migrating your Vimscript-based configuration to Lua, you might not be
able to use the same entry names in `vim.luaConfigRC`, because those have also
slightly changed. See the new [DAG entries in nvf manual] for more details.
**Why?**
Neovim being an aggressive refactor of Vim, is designed to be mainly Lua based;
making good use of its extensive Lua API. Additionally, Vimscript is slow and
brings unnecessary performance overhead while working with different
configuration formats.
### `vim.lsp.nvimCodeActionMenu` removed in favor of `vim.ui.fastaction` {#sec-nvim-code-action-menu-deprecation}
The nvim-code-action-menu plugin has been archived and broken for a long time,
so it's being replaced with a young, but better alternative called
fastaction.nvim. Simply remove everything set under
`vim.lsp.nvimCodeActionMenu`, and set `vim.ui.fastaction.enable` to `true`.
Note that we are looking to add more alternatives in the future like
dressing.nvim and actions-preview.nvim, in case fastaction doesn't work for
everyone.
## Changelog {#sec-release-0.7-changelog}
[ItsSorae](https://github.com/ItsSorae):
- Add support for [typst](https://typst.app/) under `vim.languages.typst` This
will enable the `typst-lsp` language server, and the `typstfmt` formatter
[frothymarrow](https://github.com/frothymarrow):
- Modified type for
[](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides) from
`anything` to a `submodule` for better type checking.
- Fix null `vim.lsp.mappings` generating an error and not being filtered out.
- Add basic transparency support for `oxocarbon` theme by setting the highlight
group for `Normal`, `NormalFloat`, `LineNr`, `SignColumn` and optionally
`NvimTreeNormal` to `none`.
- Fix [](#opt-vim.ui.smartcolumn.setupOpts.custom_colorcolumn) using the wrong
type `int` instead of the expected type `string`.
[horriblename](https://github.com/horriblename):
- Fix broken treesitter-context keybinds in visual mode
- Deprecate use of `__empty` to define empty tables in Lua. Empty attrset are no
longer filtered and thus should be used instead.
- Add dap-go for better dap configurations
- Make noice.nvim customizable
- Standardize border style options and add custom borders
[rust-tools.nvim]: https://github.com/simrat39/rust-tools.nvim
[rustaceanvim]: https://github.com/mrcjkb/rustaceanvim
- Switch from [rust-tools.nvim] to the more feature-packed [rustaceanvim]. This
switch entails a whole bunch of new features and options, so you are
recommended to go through rustacean.nvim's README to take a closer look at its
features and usage
[jacekpoz](https://jacekpoz.pl):
[ocaml-lsp]: https://github.com/ocaml/ocaml-lsp
[new-file-template.nvim]: https://github.com/otavioschwanck/new-file-template.nvim
[neo-tree.nvim]: https://github.com/nvim-neo-tree/neo-tree.nvim
- Add [ocaml-lsp] support
- Fix "Emac" typo
- Add [new-file-template.nvim] to automatically fill new file contents using
templates
- Make [neo-tree.nvim] display file icons properly by enabling
`visuals.nvimWebDevicons`
[diniamo](https://github.com/diniamo):
- Move the `theme` dag entry to before `luaScript`.
- Add rustfmt as the default formatter for Rust.
- Enabled the terminal integration of catppuccin for theming Neovim's built-in
terminal (this also affects toggleterm).
- Migrate bufferline to setupOpts for more customizability
- Use `clangd` as the default language server for C languages
- Expose `lib.nvim.types.pluginType`, which for example allows the user to
create abstractions for adding plugins
- Migrate indent-blankline to setupOpts for more customizability. While the
plugin's options can now be found under `indentBlankline.setupOpts`, the
previous iteration of the module also included out of place/broken options,
which have been removed for the time being. These are:
- `listChar` - this was already unused
- `fillChar` - this had nothing to do with the plugin, please configure it
yourself by adding `vim.opt.listchars:append({ space = '<char>' })` to your
lua configuration
- `eolChar` - this also had nothing to do with the plugin, please configure it
yourself by adding `vim.opt.listchars:append({ eol = '<char>' })` to your
lua configuration
- Replace `vim.lsp.nvimCodeActionMenu` with `vim.ui.fastaction`, see the
breaking changes section above for more details
[Neovim documentation on `vim.cmd`]: https://neovim.io/doc/user/lua.html#vim.cmd()
- Make Neovim's configuration file entirely Lua based. This comes with a few
breaking changes:
- `vim.configRC` has been removed. You will need to migrate your entries to
Neovim-compliant Lua code, and add them to `vim.luaConfigRC` instead.
Existing vimscript configurations may be preserved in `vim.cmd` functions.
Please see [Neovim documentation on `vim.cmd`]
- `vim.luaScriptRC` is now the top-level DAG, and the internal `vim.pluginRC`
has been introduced for setting up internal plugins. See the "DAG entries in
nvf" manual page for more information.
[NotAShelf](https://github.com/notashelf):
[ts-error-translator.nvim]: https://github.com/dmmulroy/ts-error-translator.nvim
[credo]: https://github.com/rrrene/credo
- Add `deno fmt` as the default Markdown formatter. This will be enabled
automatically if you have autoformatting enabled, but can be disabled manually
if you choose to.
- Add `vim.extraLuaFiles` for optionally sourcing additional lua files in your
configuration.
- Refactor `programs.languages.elixir` to use lspconfig and none-ls for LSP and
formatter setups respectively. Diagnostics support is considered, and may be
added once the [credo] linter has been added to nixpkgs. A pull request is
currently open.
- Remove vim-tidal and friends.
- Clean up Lualine module to reduce theme dependency on Catppuccin, and fixed
blending issues in component separators.
- Add [ts-ereror-translator.nvim] extension of the TS language module, under
`vim.languages.ts.extensions.ts-error-translator` to aid with Typescript
development.
- Add [neo-tree.nvim] as an alternative file-tree plugin. It will be available
under `vim.filetree.neo-tree`, similar to nvimtree.
- Add `nvf-print-config` & `nvf-print-config-path` helper scripts to Neovim
closure. Both of those scripts have been automatically added to your PATH upon
using neovimConfig or `programs.nvf.enable`.
- `nvf-print-config` will display your `init.lua`, in full.
- `nvf-print-config-path` will display the path to _a clone_ of your
`init.lua`. This is not the path used by the Neovim wrapper, but an
identical clone.
- Add `vim.ui.breadcrumbs.lualine` to allow fine-tuning breadcrumbs behaviour on
Lualine. Only `vim.ui.breadcrumbs.lualine.winbar` is supported for the time
being.
- [](#opt-vim.ui.breadcrumbs.lualine.winbar.enable) has been added to allow
controlling the default behaviour of the `nvim-navic` component on Lualine,
which used to occupy `winbar.lualine_c` as long as breadcrumbs are enabled.
- `vim.ui.breadcrumbs.alwaysRender` has been renamed to
[](#opt-vim.ui.breadcrumbs.lualine.winbar.alwaysRender) to be conform to the
new format.
- Add [basedpyright](https://github.com/detachhead/basedpyright) as a Python LSP
server and make it default.
- Add [python-lsp-server](https://github.com/python-lsp/python-lsp-server) as an
additional Python LSP server.
- Add [](#opt-vim.options) to set `vim.o` values in in your nvf configuration
without using additional Lua. See option documentation for more details.
- Add [](#opt-vim.dashboard.dashboard-nvim.setupOpts) to allow user
configuration for [dashboard.nvim](https://github.com/nvimdev/dashboard-nvim)
- Update `lualine.nvim` input and add missing themes:
- Adds `ayu`, `gruvbox_dark`, `iceberg`, `moonfly`, `onedark`,
`powerline_dark` and `solarized_light` themes.
[ppenguin](https://github.com/ppenguin):
- Telescope:
- Fixed `project-nvim` command and keybinding
- Added default ikeybind/command for `Telescope resume` (`<leader>fr`)
[Soliprem](https://github.com/Soliprem):
- Add LSP and Treesitter support for R under `vim.languages.R`.
- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
ccc
[Bloxx12](https://github.com/Bloxx12):
- Fix internal breakage in `elixir-tools` setup.
[Nowaaru](https://github.com/Nowaaru):
- Add `precognition-nvim`.

File diff suppressed because it is too large Load diff

140
flake.nix
View file

@ -1,19 +1,22 @@
{
description = "A neovim flake with a modular configuration";
outputs = {
nixpkgs,
flake-parts,
self,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
# provide overridable systems
# https://github.com/nix-systems/nix-systems
} @ inputs: let
# call the extedended library with `inputs`
# inputs is used to get the original standard library, and to pass inputs to the plugin autodiscovery function
lib = import ./lib/stdlib-extended.nix inputs;
in
flake-parts.lib.mkFlake {
inherit inputs;
specialArgs = {inherit lib;};
} {
# Allow users to bring their own systems.
# «https://github.com/nix-systems/nix-systems»
systems = import inputs.systems;
imports = [
# add lib to module args
{_module.args = {inherit (nixpkgs) lib;};}
./flake/apps.nix
./flake/legacyPackages.nix
./flake/overlays.nix
@ -22,36 +25,32 @@
flake = {
lib = {
inherit (import ./lib/stdlib-extended.nix nixpkgs.lib inputs) nvim;
inherit (import ./configuration.nix inputs) neovimConfiguration;
inherit (lib) nvim;
inherit (lib.nvim) neovimConfiguration;
};
homeManagerModules = {
neovim-flake =
nixpkgs.lib.warn ''
lib.warn ''
homeManagerModules.neovim-flake has been deprecated.
Plese use the homeManagereModules.nvf instead
Plese use the homeManagerModules.nvf instead
''
self.homeManagerModules.nvf;
nvf = {
imports = [(import ./flake/modules/home-manager.nix self.packages inputs)];
};
nvf = import ./flake/modules/home-manager.nix self.packages lib;
default = self.homeManagerModules.nvf;
};
nixosModules = {
neovim-flake =
nixpkgs.lib.warn ''
lib.warn ''
nixosModules.neovim-flake has been deprecated.
Please use the nixosModules.nvf instead
''
self.nixosModules.neovim-flake;
self.nixosModules.nvf;
nvf = {
imports = [(import ./flake/modules/nixos.nix self.packages inputs)];
};
nvf = import ./flake/modules/nixos.nix self.packages lib;
default = self.nixosModules.nvf;
};
@ -63,34 +62,49 @@
pkgs,
...
}: {
formatter = pkgs.alejandra;
devShells = {
default = self'.devShells.lsp;
nvim-nix = pkgs.mkShell {nativeBuildInputs = [config.packages.nix];};
nvim-nix = pkgs.mkShell {packages = [config.packages.nix];};
lsp = pkgs.mkShell {
nativeBuildInputs = with pkgs; [nil statix deadnix alejandra];
packages = with pkgs; [nil statix deadnix alejandra];
};
};
# Provide the default formatter. `nix fmt` in project root
# will format available files with the correct formatter.
# P.S: Please do not format with nixfmt! It messes with many
# syntax elements and results in unreadable code.
formatter = pkgs.alejandra;
# Check if codebase is properly formatted.
# This can be initiated with `nix build .#checks.<system>.nix-fmt`
# or with `nix flake check`
checks = {
nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} ''
alejandra --check ${self} < /dev/null | tee $out
'';
};
};
};
# Flake inputs
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
## Basic Inputs
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-utils.url = "github:numtide/flake-utils";
systems.url = "github:nix-systems/default";
# Alternate neovim-wrapper
mnw.url = "github:Gerg-L/mnw";
# For generating documentation website
nmd = {
url = "sourcehut:~rycee/nmd";
flake = false;
};
# TODO: get zig from the zig overlay instead of nixpkgs
zig.url = "github:mitchellh/zig-overlay";
# Langauge server (use master instead of nixpkgs)
# Language servers (use master instead of nixpkgs)
rnix-lsp.url = "github:nix-community/rnix-lsp";
nil = {
url = "github:oxalica/nil";
@ -98,13 +112,7 @@
inputs.flake-utils.follows = "flake-utils";
};
### Plugins
# Tidal cycles
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix";
inputs.vim-tidal-src.url = "github:tidalcycles/vim-tidal";
};
## Plugins
# LSP plugins
plugin-nvim-lspconfig = {
url = "github:neovim/nvim-lspconfig";
@ -136,8 +144,8 @@
flake = false;
};
plugin-nvim-code-action-menu = {
url = "github:weilbith/nvim-code-action-menu";
plugin-fastaction-nvim = {
url = "github:Chaitanyabsprip/fastaction.nvim";
flake = false;
};
@ -162,14 +170,19 @@
flake = false;
};
# language support
plugin-otter-nvim = {
url = "github:jmbuhr/otter.nvim";
flake = false;
};
# Language support
plugin-sqls-nvim = {
url = "github:nanotee/sqls.nvim";
flake = false;
};
plugin-rust-tools = {
url = "github:simrat39/rust-tools.nvim";
plugin-rustaceanvim = {
url = "github:mrcjkb/rustaceanvim";
flake = false;
};
@ -183,23 +196,13 @@
flake = false;
};
plugin-elixir-ls = {
url = "github:elixir-lsp/elixir-ls";
flake = false;
};
plugin-elixir-tools = {
url = "github:elixir-tools/elixir-tools.nvim";
flake = false;
};
plugin-glow-nvim = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
plugin-image-nvim = {
url = "github:3rd/image.nvim";
plugin-ts-error-translator = {
url = "github:dmmulroy/ts-error-translator.nvim";
flake = false;
};
@ -231,12 +234,22 @@
flake = false;
};
plugin-nvim-dap-go = {
url = "github:leoluz/nvim-dap-go";
flake = false;
};
# Filetrees
plugin-nvim-tree-lua = {
url = "github:nvim-tree/nvim-tree.lua";
flake = false;
};
plugin-neo-tree-nvim = {
url = "github:nvim-neo-tree/neo-tree.nvim";
flake = false;
};
# Tablines
plugin-nvim-bufferline-lua = {
url = "github:akinsho/nvim-bufferline.lua";
@ -502,6 +515,21 @@
flake = false;
};
plugin-glow-nvim = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
plugin-image-nvim = {
url = "github:3rd/image.nvim";
flake = false;
};
plugin-precognition-nvim = {
url = "github:tris203/precognition.nvim";
flake = false;
};
# Note-taking
plugin-obsidian-nvim = {
url = "github:epwalsh/obsidian.nvim";
@ -621,9 +649,15 @@
};
plugin-nvim-nio = {
# (required nvim-dap-ui)
# (required by nvim-dap-ui)
url = "github:nvim-neotest/nvim-nio";
flake = false;
};
plugin-new-file-template-nvim = {
# (required by new-file-template.nvim)
url = "github:otavioschwanck/new-file-template.nvim";
flake = false;
};
};
}

View file

@ -1,21 +1,11 @@
{lib, ...}: {
perSystem = {
system,
config,
...
}: {
apps =
{
nix.program = lib.getExe config.packages.nix;
maximal.program = lib.getExe config.packages.maximal;
{lib, ...}: let
inherit (lib.meta) getExe;
in {
perSystem = {config, ...}: {
apps = {
nix.program = getExe config.packages.nix;
maximal.program = getExe config.packages.maximal;
default = config.apps.nix;
}
// (
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
then {
tidal.program = lib.getExe config.packages.tidal;
}
else {}
);
};
};
}

View file

@ -7,7 +7,6 @@
legacyPackages = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.tidalcycles.overlays.default
inputs.self.overlays.default
(_: _: {
rnix-lsp = inputs'.rnix-lsp.defaultPackage;

View file

@ -1,40 +1,44 @@
# Home Manager module
packages: inputs: {
packages: lib: {
config,
pkgs,
lib ? pkgs.lib,
...
}: let
inherit (lib) maintainers;
inherit (lib.modules) mkIf;
inherit (lib.modules) mkIf mkAliasOptionModule;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
inherit (lib.nvim) neovimConfiguration;
inherit (lib.nvim.types) anythingConcatLists;
cfg = config.programs.neovim-flake;
inherit (import ../../configuration.nix inputs) neovimConfiguration;
cfg = config.programs.nvf;
neovimConfigured = neovimConfiguration {
inherit pkgs;
modules = [cfg.settings];
};
in {
imports = [
(mkAliasOptionModule ["programs" "neovim-flake"] ["programs" "nvf"])
];
meta.maintainers = with maintainers; [NotAShelf];
options.programs.neovim-flake = {
enable = mkEnableOption "neovim-flake, the extensible neovim configuration wrapper";
options.programs.nvf = {
enable = mkEnableOption "nvf, the extensible neovim configuration wrapper";
enableManpages = mkOption {
type = bool;
default = false;
description = "Whether to enable manpages for neovim-flake.";
description = "Whether to enable manpages for nvf.";
};
defaultEditor = mkOption {
type = bool;
default = false;
description = ''
Whether to set `neovim-flake` as the default editor.
Whether to set `nvf` as the default editor.
This will set the `EDITOR` environment variable as `nvim`
if set to true.
@ -46,14 +50,14 @@ in {
visible = false;
readOnly = true;
description = ''
The built neovim-flake package, wrapped with the user's configuration.
The built nvf package, wrapped with the user's configuration.
'';
};
settings = mkOption {
type = attrsOf anything;
type = attrsOf anythingConcatLists;
default = {};
description = "Attribute set of neovim-flake preferences.";
description = "Attribute set of nvf preferences.";
example = literalExpression ''
{
vim.viAlias = false;
@ -63,7 +67,6 @@ in {
formatOnSave = true;
lightbulb.enable = true;
lspsaga.enable = false;
nvimCodeActionMenu.enable = true;
trouble.enable = true;
lspSignature.enable = true;
rust.enable = false;
@ -75,7 +78,7 @@ in {
};
config = mkIf cfg.enable {
programs.neovim-flake.finalPackage = neovimConfigured.neovim;
programs.nvf.finalPackage = neovimConfigured.neovim;
home = {
sessionVariables = mkIf cfg.defaultEditor {EDITOR = "nvim";};
@ -84,4 +87,5 @@ in {
++ optional cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;
};
};
_file = ./home-manager.nix;
}

View file

@ -1,40 +1,44 @@
# NixOS module
packages: inputs: {
packages: lib: {
config,
pkgs,
lib ? pkgs.lib,
...
}: let
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkOverride;
inherit (lib.modules) mkIf mkOverride mkAliasOptionModule;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
inherit (lib.nvim) neovimConfiguration;
inherit (lib.nvim.types) anythingConcatLists;
cfg = config.programs.neovim-flake;
inherit (import ../../configuration.nix inputs) neovimConfiguration;
cfg = config.programs.nvf;
neovimConfigured = neovimConfiguration {
inherit pkgs;
modules = [cfg.settings];
};
in {
imports = [
(mkAliasOptionModule ["programs" "neovim-flake"] ["programs" "nvf"])
];
meta.maintainers = with maintainers; [NotAShelf];
options.programs.neovim-flake = {
enable = mkEnableOption "neovim-flake, the extensible neovim configuration wrapper";
options.programs.nvf = {
enable = mkEnableOption "nvf, the extensible neovim configuration wrapper";
enableManpages = mkOption {
type = bool;
default = false;
description = "Whether to enable manpages for neovim-flake.";
description = "Whether to enable manpages for nvf.";
};
defaultEditor = mkOption {
type = bool;
default = false;
description = ''
Whether to set `neovim-flake` as the default editor.
Whether to set `nvf` as the default editor.
This will set the `EDITOR` environment variable as `nvim`
if set to true.
@ -46,14 +50,14 @@ in {
visible = false;
readOnly = true;
description = ''
The built neovim-flake package, wrapped with the user's configuration.
The built nvf package, wrapped with the user's configuration.
'';
};
settings = mkOption {
type = attrsOf anything;
type = attrsOf anythingConcatLists;
default = {};
description = "Attribute set of neovim-flake preferences.";
description = "Attribute set of nvf preferences.";
example = literalExpression ''
{
vim.viAlias = false;
@ -63,7 +67,6 @@ in {
formatOnSave = true;
lightbulb.enable = true;
lspsaga.enable = false;
nvimCodeActionMenu.enable = true;
trouble.enable = true;
lspSignature.enable = true;
rust.enable = false;
@ -75,7 +78,7 @@ in {
};
config = mkIf cfg.enable {
programs.neovim-flake.finalPackage = neovimConfigured.neovim;
programs.nvf.finalPackage = neovimConfigured.neovim;
environment = {
variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim");
@ -84,4 +87,5 @@ in {
++ optional cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;
};
};
_file = ./nixos.nix;
}

View file

@ -1,21 +1,19 @@
{
inputs,
pkgs,
lib,
...
}: let
inherit (import ../configuration.nix inputs) neovimConfiguration mainConfig;
inherit (lib.nvim) neovimConfiguration;
buildPkg = pkgs: modules: (neovimConfiguration {inherit pkgs modules;}).neovim;
nixConfig = mainConfig false;
maximalConfig = mainConfig true;
tidalConfig = {config.vim.tidal.enable = true;};
nixConfig = import ../configuration.nix false;
maximalConfig = import ../configuration.nix true;
in {
flake.overlays.default = _final: prev: {
inherit neovimConfiguration;
neovim-nix = buildPkg prev [nixConfig];
neovim-maximal = buildPkg prev [maximalConfig];
neovim-tidal = buildPkg prev [tidalConfig];
devPkg = buildPkg pkgs [nixConfig {config.vim.languages.html.enable = pkgs.lib.mkForce true;}];
};
}

View file

@ -1,14 +1,14 @@
{inputs, ...}: {
perSystem = {
system,
config,
pkgs,
lib,
...
}: let
docs = import ../docs {inherit pkgs inputs;};
docs = import ../docs {inherit pkgs inputs lib;};
in {
packages =
{
packages = {
inherit (docs.manual) htmlOpenTool;
# Documentation
docs = docs.manual.html;
docs-html = docs.manual.html;
@ -52,11 +52,6 @@
Volumes = {"/home/neovim/demo" = {};};
};
};
}
// (
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
then {tidal = config.legacyPackages.neovim-tidal;}
else {}
);
};
};
}

View file

@ -66,7 +66,7 @@
mkSetLuaBinding = binding: action:
mkLuaBinding binding.value action binding.description;
pushDownDefault = attr: mapAttrs (_: value: mkDefault value) attr;
pushDownDefault = attr: mapAttrs (_: mkDefault) attr;
};
in
binds

View file

@ -8,10 +8,10 @@
# - the addition of the function `entryBefore` indicating a "wanted
# by" relationship.
{lib}: let
inherit (builtins) isAttrs attrValues attrNames elem all head tail length;
inherit (builtins) isAttrs attrValues attrNames elem all head tail length toJSON isString;
inherit (lib.attrsets) filterAttrs mapAttrs;
inherit (lib.lists) toposort;
inherit (lib.nvim.dag) empty isEntry entryBetween entryAfter entriesBetween;
inherit (lib.nvim.dag) empty isEntry entryBetween entryAfter entriesBetween entryAnywhere topoSort;
in {
empty = {};
@ -84,7 +84,7 @@ in {
normalizedDag =
mapAttrs (n: v: {
name = n;
data = v.data;
inherit (v) data;
after = v.after ++ dagBefore dag n;
})
dag;
@ -117,7 +117,6 @@ in {
entriesBetween = tag: let
go = i: before: after: entries: let
name = "${tag}-${toString i}";
i' = i + 1;
in
if entries == []
then empty
@ -148,8 +147,22 @@ in {
${section.data}
'';
mkVimrcSection = section: ''
" SECTION: ${section.name}
${section.data}
'';
resolveDag = {
name,
dag,
mapResult,
}: let
# When the value is a string, default it to dag.entryAnywhere
finalDag = mapAttrs (_: value:
if isString value
then entryAnywhere value
else value)
dag;
sortedDag = topoSort finalDag;
result =
if sortedDag ? result
then mapResult sortedDag.result
else abort ("Dependency cycle in ${name}: " + toJSON sortedDag);
in
result;
}

View file

@ -11,5 +11,5 @@
languages = import ./languages.nix {inherit lib;};
lists = import ./lists.nix {inherit lib;};
lua = import ./lua.nix {inherit lib;};
vim = import ./vim.nix;
neovimConfiguration = import ../modules {inherit inputs lib;};
}

View file

@ -2,19 +2,9 @@
{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;
inherit (lib.strings) concatStringsSep concatMapStringsSep stringToCharacters concatLines;
inherit (lib.trivial) boolToString warn;
in rec {
wrapLuaConfig = {
luaBefore ? "",
luaConfig,
luaAfter ? "",
}: ''
lua << EOF
${concatStringsSep "\n" [luaBefore luaConfig luaAfter]}
EOF
'';
# Convert a null value to lua's nil
nullString = value:
if value == null
@ -66,7 +56,10 @@ in rec {
if isLuaInline args
then args.expr
else if hasAttr "__empty" args
then "{ }"
then
warn ''
Using `__empty` to define an empty lua table is deprecated. Use an empty attrset instead.
'' "{ }"
else
"{"
+ (concatStringsSep ","
@ -76,10 +69,7 @@ in rec {
then toLuaObject v
else "[${toLuaObject n}] = " + (toLuaObject v))
(filterAttrs
(
_: v:
(v != null) && (toLuaObject v != "{}")
)
(_: v: v != null)
args)))
+ "}"
else if isList args

View file

@ -1,7 +1,7 @@
# Convenience function that returns the given Nixpkgs standard library
# extended with our functions using `lib.extend`.
nixpkgsLib: inputs:
nixpkgsLib.extend (self: super: {
inputs:
inputs.nixpkgs.lib.extend (self: super: {
# WARNING: New functions should not be added here, but to files
# imported by `./default.nix` under their own categories. If your
# function does not fit to any of the existing categories, create

61
lib/types/custom.nix Normal file
View file

@ -0,0 +1,61 @@
{lib}: let
inherit (lib) isStringLike showOption showFiles getFiles mergeOneOption mergeEqualOption mkOptionType;
inherit (lib.types) anything attrsOf;
inherit (lib.nvim.types) anythingConcatLists;
inherit (builtins) typeOf isAttrs any head concatLists stringLength;
in {
# HACK: Does this break anything in our case?
# A modified version of the nixpkgs anything type that concatenates lists
# This isn't the default because the order in which the lists are concatenated depends on the order in which the modules are imported,
# which makes it non-deterministic
anythingConcatLists =
anything
// {
merge = loc: defs: let
getType = value:
if isAttrs value && isStringLike value
then "stringCoercibleSet"
else typeOf value;
# Throw an error if not all defs have the same type
checkType = getType (head defs).value;
commonType =
if any (def: getType def.value != checkType) defs
then throw "The option `${showOption loc}' has conflicting option types in ${showFiles (getFiles defs)}"
else checkType;
mergeFunctions = {
# Recursively merge attribute sets
set = (attrsOf anythingConcatLists).merge;
# Overridden behavior for lists, that concatenates lists
list = _: defs: concatLists (map (e: e.value) defs);
# This means it's a package, only accept a single definition
stringCoercibleSet = mergeOneOption;
# This works by passing the argument to the functions,
# and merging their returns values instead
lambda = loc: defs: arg:
anythingConcatLists.merge
(loc ++ ["<function body>"])
(map (def: {
inherit (def) file;
value = def.value arg;
})
defs);
};
in
# Merge the defs with the correct function from above, if available
# otherwise only allow equal values
(mergeFunctions.${commonType} or mergeEqualOption) loc defs;
};
char = mkOptionType {
name = "char";
description = "character";
descriptionClass = "noun";
check = value: stringLength value < 2;
merge = mergeEqualOption;
};
}

View file

@ -6,8 +6,10 @@
typesDag = import ./dag.nix {inherit lib;};
typesPlugin = import ./plugins.nix {inherit inputs lib;};
typesLanguage = import ./languages.nix {inherit lib;};
typesCustom = import ./custom.nix {inherit lib;};
in {
inherit (typesDag) dagOf;
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline;
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType;
inherit (typesLanguage) diagnostics mkGrammarOption;
inherit (typesCustom) anythingConcatLists char;
}

View file

@ -5,7 +5,7 @@
}: let
inherit (lib.options) mkOption;
inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair;
inherit (lib.strings) hasPrefix removePrefix isString;
inherit (lib.strings) hasPrefix removePrefix;
inherit (lib.types) submodule either package enum str lines attrsOf anything listOf nullOr;
# Get the names of all flake inputs that start with the given prefix.
@ -51,8 +51,12 @@
};
};
};
borderPresets = ["none" "single" "double" "rounded" "solid" "shadow"];
in {
inherit extraPluginType fromInputs;
inherit extraPluginType fromInputs pluginType;
borderType = either (enum borderPresets) (listOf (either str (listOf str)));
pluginsOpt = {
description,
@ -93,7 +97,7 @@ in {
default = {};
type = submodule {
freeformType = attrsOf anything;
freeformType = anything;
options = opts;
};
};

View file

@ -1,26 +0,0 @@
let
inherit (builtins) isInt isBool toJSON toString;
in rec {
# yes? no.
yesNo = value:
if value
then "yes"
else "no";
# convert a boolean to a vim compliant boolean string
mkVimBool = val:
if val
then "1"
else "0";
# convert a literal value to a vim compliant value
valToVim = val:
if (isInt val)
then (toString val)
else
(
if (isBool val)
then (mkVimBool val)
else (toJSON val)
);
}

View file

@ -1,124 +1,134 @@
inputs: {
configuration,
{
inputs,
lib,
}: {
pkgs,
lib ? pkgs.lib,
check ? true,
extraSpecialArgs ? {},
modules ? [],
# deprecated
extraModules ? [],
configuration ? {},
}: let
inherit (builtins) map filter isString toString getAttr;
inherit (pkgs) wrapNeovimUnstable vimPlugins;
inherit (pkgs.vimUtils) buildVimPlugin;
inherit (pkgs.neovimUtils) makeNeovimConfig;
inherit (lib.strings) makeBinPath escapeShellArgs concatStringsSep;
inherit (lib.lists) concatLists optional;
inherit (lib.attrsets) recursiveUpdate;
inherit (lib.asserts) assertMsg;
# call the extedended library with `lib` and `inputs` as arguments
# lib is used to provide the standard library functions to the extended library
# but it can be overridden while this file is being called
# inputs is used to pass inputs to the plugin autodiscovery function
extendedLib = import ../lib/stdlib-extended.nix lib inputs;
inherit (pkgs) vimPlugins;
inherit (lib.strings) isString toString;
inherit (lib.lists) filter map concatLists;
# import modules.nix with `check`, `pkgs` and `lib` as arguments
# check can be disabled while calling this file is called
# to avoid checking in all modules
nvimModules = import ./modules.nix {
inherit check pkgs;
lib = extendedLib;
};
nvimModules = import ./modules.nix {inherit pkgs lib;};
# evaluate the extended library with the modules
# optionally with any additional modules passed by the user
module = extendedLib.evalModules {
specialArgs = recursiveUpdate {modulesPath = toString ./.;} extraSpecialArgs;
modules = concatLists [[configuration] nvimModules extraModules];
module = lib.evalModules {
specialArgs = extraSpecialArgs // {modulesPath = toString ./.;};
modules = concatLists [
nvimModules
modules
(lib.optional (configuration != {}) (lib.warn ''
nvf: passing 'configuration' to lib.neovimConfiguration is deprecated.
''
configuration))
(lib.optionals (extraModules != []) (lib.warn ''
nvf: passing 'extraModules' to lib.neovimConfiguration is deprecated, use 'modules' instead.
''
extraModules))
];
};
# alias to the internal configuration
vimOptions = module.config.vim;
noBuildPlug = {pname, ...} @ attrs: let
src = inputs."plugin-${attrs.pname}";
in
{
version = src.shortRev or src.shortDirtyRev or "dirty";
outPath = src;
passthru.vimPlugin = false;
}
// attrs;
# build a vim plugin with the given name and arguments
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
# instead
buildPlug = {pname, ...} @ args:
assert assertMsg (pname != "nvim-treesitter") "Use buildTreesitterPlug for building nvim-treesitter.";
buildVimPlugin (args
// {
version = "master";
src = getAttr ("plugin-" + pname) inputs;
});
buildPlug = attrs: let
src = inputs."plugin-${attrs.pname}";
in
pkgs.vimUtils.buildVimPlugin (
{
version = src.shortRev or src.shortDirtyRev or "dirty";
inherit src;
}
// attrs
);
buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);
buildConfigPlugins = plugins:
map
(plug: (
if (isString plug)
then
(
if (plug == "nvim-treesitter")
then (buildTreesitterPlug vimOptions.treesitter.grammars)
else if (plug == "flutter-tools-patched")
then
(buildPlug {
pluginBuilders = {
nvim-treesitter = buildTreesitterPlug vimOptions.treesitter.grammars;
flutter-tools-patched = buildPlug {
pname = "flutter-tools";
patches = [../patches/flutter-tools.patch];
})
else (buildPlug {pname = plug;})
)
};
};
buildConfigPlugins = plugins:
map (
plug:
if (isString plug)
then pluginBuilders.${plug} or (noBuildPlug {pname = plug;})
else plug
))
(filter
(f: f != null)
plugins);
) (filter (f: f != null) plugins);
# built (or "normalized") plugins that are modified
builtStartPlugins = buildConfigPlugins vimOptions.startPlugins;
builtOptPlugins = map (package: {
plugin = package;
optional = false;
optional = true;
}) (buildConfigPlugins vimOptions.optPlugins);
# combine built start and optional plugins
# into a single list
plugins = builtStartPlugins ++ builtOptPlugins;
# additional Lua and Python3 packages, mapped to their respective functions
# to conform to the format makeNeovimConfig expects. end user should
# to conform to the format mnw expects. end user should
# only ever need to pass a list of packages, which are modified
# here
extraLuaPackages = ps: map (x: ps.${x}) vimOptions.luaPackages;
extraPython3Packages = ps: map (x: ps.${x}) vimOptions.python3Packages;
extraWrapperArgs =
concatStringsSep " " (optional (vimOptions.extraPackages != []) ''--prefix PATH : "${makeBinPath vimOptions.extraPackages}"'');
# Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to
# generate a wrapped Neovim package.
neovim-wrapped = inputs.mnw.lib.wrap pkgs {
neovim = vimOptions.package;
plugins = builtStartPlugins ++ builtOptPlugins;
appName = "nvf";
extraBinPath = vimOptions.extraPackages;
initLua = vimOptions.builtLuaConfigRC;
luaFiles = vimOptions.extraLuaFiles;
# wrap user's desired neovim package with the desired neovim configuration
# using wrapNeovimUnstable and makeNeovimConfig from nixpkgs.
# the makeNeovimConfig function takes the following arguments:
# - withPython (bool)
# - extraPython3Packages (lambda)
# - withNodeJs (bool)
# - withRuby (bool)
# - extraLuaPackages (lambda)
# - plugins (list)
# - customRC (string)
# and returns the wrapped package
neovimConfigured = makeNeovimConfig {
inherit (vimOptions) viAlias vimAlias withRuby withNodeJs withPython3;
inherit plugins extraLuaPackages extraPython3Packages;
customRC = vimOptions.builtConfigRC;
inherit extraLuaPackages extraPython3Packages;
};
neovim-wrapped = wrapNeovimUnstable vimOptions.package (recursiveUpdate neovimConfigured {
wrapperArgs = escapeShellArgs neovimConfigured.wrapperArgs + " " + extraWrapperArgs;
});
dummyInit = pkgs.writeText "nvf-init.lua" vimOptions.builtLuaConfigRC;
# Additional helper scripts for printing and displaying nvf configuration
# in your commandline.
printConfig = pkgs.writers.writeDashBin "nvf-print-config" "cat ${dummyInit}";
printConfigPath = pkgs.writers.writeDashBin "nvf-print-config-path" "echo -n ${dummyInit}";
in {
inherit (module) options config;
inherit (module._module.args) pkgs;
# expose wrapped neovim-package
neovim = neovim-wrapped;
# Expose wrapped neovim-package for userspace
# or module consumption.
neovim = pkgs.symlinkJoin {
name = "nvf-with-helpers";
paths = [neovim-wrapped printConfig printConfigPath];
postBuild = "echo Helpers added";
meta = {
description = "Wrapped version of Neovim with additional helper scripts";
mainProgram = "nvim";
};
};
}

View file

@ -0,0 +1,18 @@
{lib, ...}: let
inherit (lib.modules) mkRemovedOptionModule;
in {
imports = [
# 2024-06-06
(mkRemovedOptionModule ["vim" "tidal"] ''
Tidalcycles language support has been removed as of 2024-06-06 as it was long unmaintained. If
you depended on this functionality, please open an issue.
'')
# 2024-07-20
(mkRemovedOptionModule ["vim" "lsp" "nvimCodeActionMenu"] ''
nvimCodeActionMenu has been deprecated and removed upstream. As of 0.7, fastaction will be
available under `vim.ui.fastaction` as a replacement. Simply remove everything under
`vim.lsp.nvimCodeActionMenu`, and set `vim.ui.fastaction.enable` to `true`.
'')
];
}

View file

@ -1,11 +1,10 @@
{
pkgs,
lib,
check ? true,
}: let
inherit (lib.modules) mkDefault;
inherit (lib.lists) concatLists;
allModules = let
# The core neovim modules.
# Contains configuration for core neovim features
# such as spellchecking, mappings, and the init script (init.vim).
@ -53,19 +52,21 @@
"warnings"
];
allModules = concatLists [neovim plugins wrapper];
pkgsModule = {config, ...}: {
config = {
_module = {
inherit check;
args = {
# Extra modules, such as deprecation warnings
# or renames in one place.
extra = map (p: ./extra + "/${p}") [
"deprecations.nix"
];
in
concatLists [neovim plugins wrapper extra];
in
allModules
++ [
{
_module.args = {
baseModules = allModules;
pkgsPath = mkDefault pkgs.path;
pkgs = mkDefault pkgs;
};
};
};
};
in
allModules ++ [pkgsModule]
}
]

View file

@ -3,18 +3,21 @@
lib,
...
}: let
inherit (lib.options) mkOption literalExpression;
inherit (lib.options) mkOption mkEnableOption literalExpression literalMD;
inherit (lib.strings) optionalString;
inherit (lib.types) enum bool str int nullOr;
inherit (lib.types) enum bool str int either;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryAfter;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.types) luaInline;
cfg = config.vim;
in {
options.vim = {
leaderKey = mkOption {
type = nullOr str;
default = null;
description = "The leader key to be used internally";
type = str;
default = " ";
description = "The leader key used for `<leader>` mappings";
};
colourTerm = mkOption {
@ -53,12 +56,6 @@ in {
description = "Enable syntax highlighting";
};
mapLeaderSpace = mkOption {
type = bool;
default = true;
description = "Map the space key to leader key";
};
useSystemClipboard = mkOption {
type = bool;
default = false;
@ -163,119 +160,138 @@ in {
default = "sensitive";
description = "Set the case sensitivity of search";
};
undoFile = {
enable = mkEnableOption "undofile for persistent undo behaviour";
path = mkOption {
type = either str luaInline;
default = mkLuaInline "vim.fn.stdpath('state') .. '/undo'";
defaultText = literalMD ''
```nix
mkLuaInline "vim.fn.stdpath('state') .. '/undo'"
```
'';
example = literalMD ''
```nix
mkLuaInline "os.getenv('XDG_DATA_HOME') .. '/nvf/undo'"
```
'';
description = "Path to the directory in which undo history will be stored";
};
};
};
config.vim.configRC.basic = entryAfter ["globalsScript"] ''
" Settings that are set for everything
set encoding=utf-8
set hidden
set shortmess+=c
set expandtab
set mouse=${cfg.mouseSupport}
set tabstop=${toString cfg.tabWidth}
set shiftwidth=${toString cfg.tabWidth}
set softtabstop=${toString cfg.tabWidth}
set cmdheight=${toString cfg.cmdHeight}
set updatetime=${toString cfg.updateTime}
set tm=${toString cfg.mapTimeout}
set cursorlineopt=${toString cfg.cursorlineOpt}
set scrolloff=${toString cfg.scrollOffset}
config = {
vim.luaConfigRC.basic = entryAfter ["globalsScript"] ''
-- Settings that are set for everything
vim.o.encoding = "utf-8"
vim.o.hidden = true
vim.opt.shortmess:append("c")
vim.o.expandtab = true
vim.o.mouse = ${toLuaObject cfg.mouseSupport}
vim.o.tabstop = ${toLuaObject cfg.tabWidth}
vim.o.shiftwidth = ${toLuaObject cfg.tabWidth}
vim.o.softtabstop = ${toLuaObject cfg.tabWidth}
vim.o.cmdheight = ${toLuaObject cfg.cmdHeight}
vim.o.updatetime = ${toLuaObject cfg.updateTime}
vim.o.tm = ${toLuaObject cfg.mapTimeout}
vim.o.cursorlineopt = ${toLuaObject cfg.cursorlineOpt}
vim.o.scrolloff = ${toLuaObject cfg.scrollOffset}
vim.g.mapleader = ${toLuaObject cfg.leaderKey}
vim.g.maplocalleader = ${toLuaObject cfg.leaderKey}
${optionalString cfg.undoFile.enable ''
vim.o.undofile = true
vim.o.undodir = ${toLuaObject cfg.undoFile.path}
''}
${optionalString cfg.splitBelow ''
set splitbelow
vim.o.splitbelow = true
''}
${optionalString cfg.splitRight ''
set splitright
vim.o.splitright = true
''}
${optionalString cfg.showSignColumn ''
set signcolumn=yes
vim.o.signcolumn = "yes"
''}
${optionalString cfg.autoIndent ''
set autoindent
vim.o.autoindent = true
''}
${optionalString cfg.preventJunkFiles ''
set noswapfile
set nobackup
set nowritebackup
vim.o.swapfile = false
vim.o.backup = false
vim.o.writebackup = false
''}
${optionalString (cfg.bell == "none") ''
set noerrorbells
set novisualbell
vim.o.errorbells = false
vim.o.visualbell = false
''}
${optionalString (cfg.bell == "on") ''
set novisualbell
vim.o.visualbell = false
''}
${optionalString (cfg.bell == "visual") ''
set noerrorbells
vim.o.errorbells = false
''}
${optionalString (cfg.lineNumberMode == "relative") ''
set relativenumber
vim.o.relativenumber = true
''}
${optionalString (cfg.lineNumberMode == "number") ''
set number
vim.o.number = true
''}
${optionalString (cfg.lineNumberMode == "relNumber") ''
set number relativenumber
vim.o.number = true
vim.o.relativenumber = true
''}
${optionalString cfg.useSystemClipboard ''
set clipboard+=unnamedplus
''}
${optionalString cfg.mapLeaderSpace ''
let mapleader=" "
let maplocalleader=" "
vim.opt.clipboard:append("unnamedplus")
''}
${optionalString cfg.syntaxHighlighting ''
syntax on
vim.cmd("syntax on")
''}
${optionalString (!cfg.wordWrap) ''
set nowrap
vim.o.wrap = false
''}
${optionalString cfg.hideSearchHighlight ''
set nohlsearch
set incsearch
vim.o.hlsearch = false
vim.o.incsearch = true
''}
${optionalString cfg.colourTerm ''
set termguicolors
set t_Co=256
vim.o.termguicolors = true
''}
${optionalString (!cfg.enableEditorconfig) ''
let g:editorconfig = v:false
''}
${optionalString (cfg.leaderKey != null) ''
let mapleader = "${toString cfg.leaderKey}"
vim.g.editorconfig = false
''}
${optionalString (cfg.searchCase == "ignore") ''
set nosmartcase
set ignorecase
vim.o.smartcase = false
vim.o.ignorecase = true
''}
${optionalString (cfg.searchCase == "smart") ''
set smartcase
set ignorecase
vim.o.smartcase = true
vim.o.ignorecase = true
''}
${optionalString (cfg.searchCase == "sensitive") ''
set nosmartcase
set noignorecase
vim.o.smartcase = false
vim.o.ignorecase = false
''}
'';
};
}

View file

@ -9,8 +9,7 @@
in {
config = {
vim.maps = {
normal =
mkIf cfg.disableArrows {
normal = mkIf cfg.disableArrows {
"<up>" = {
action = "<nop>";
@ -29,11 +28,6 @@ in {
action = "<nop>";
noremap = false;
};
}
// mkIf cfg.mapLeaderSpace {
"<space>" = {
action = "<nop>";
};
};
insert = mkIf cfg.disableArrows {

View file

@ -33,7 +33,7 @@ in {
startPlugins = [
"chatgpt"
];
luaConfigRC.chagpt = entryAnywhere ''
pluginRC.chagpt = entryAnywhere ''
require("chatgpt").setup(${toLuaObject cfg.setupOpts})
'';
maps.normal = mkMerge [

View file

@ -30,14 +30,14 @@ in {
"copilot-lua"
# cfg.copilotNodePackage
]
++ optionals (cfg.cmp.enable) [
++ optionals cfg.cmp.enable [
"copilot-cmp"
];
vim.luaConfigRC.copilot = entryAnywhere ''
vim.pluginRC.copilot = entryAnywhere ''
require("copilot").setup(${toLuaObject cfg.setupOpts})
${lib.optionalString (cfg.cmp.enable) ''
${lib.optionalString cfg.cmp.enable ''
require("copilot_cmp").setup()
''}
'';

View file

@ -4,17 +4,16 @@
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.autopairs;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["nvim-autopairs"];
vim.luaConfigRC.autopairs = entryAnywhere ''
require("nvim-autopairs").setup{}
vim.pluginRC.autopairs = entryAnywhere ''
require("nvim-autopairs").setup({ map_cr = ${boolToString (!config.vim.autocomplete.enable)} })
'';
};
}

View file

@ -41,7 +41,7 @@ in {
(mkBinding cfg.mappings.toggleSelectedBlock "<Plug>(comment_toggle_blockwise_visual)" mappings.toggleSelectedBlock.description)
];
vim.luaConfigRC.comment-nvim = entryAnywhere ''
vim.pluginRC.comment-nvim = entryAnywhere ''
require('Comment').setup({
mappings = { basic = false, extra = false, },
})

View file

@ -61,12 +61,16 @@ in {
(mkSetLuaBinding mappings.complete ''
require('cmp').complete
'')
(mkSetLuaBinding mappings.confirm ''
(let
defaultKeys =
if config.vim.autopairs.enable
then "require('nvim-autopairs').autopairs_cr()"
else "vim.api.nvim_replace_termcodes(${toJSON mappings.confirm.value}, true, false, true)";
in
mkSetLuaBinding mappings.confirm ''
function()
if not require('cmp').confirm({ select = true }) then
local termcode = vim.api.nvim_replace_termcodes(${toJSON mappings.confirm.value}, true, false, true)
vim.fn.feedkeys(termcode, 'n')
vim.fn.feedkeys(${defaultKeys}, 'n')
end
end
'')
@ -182,7 +186,7 @@ in {
# TODO: alternative snippet engines to vsnip
# https://github.com/hrsh7th/nvim-cmp/blob/main/doc/cmp.txt#L82
vim.luaConfigRC.completion = mkIf (cfg.type == "nvim-cmp") (dagPlacement ''
vim.pluginRC.completion = mkIf (cfg.type == "nvim-cmp") (dagPlacement ''
local nvim_cmp_menu_map = function(entry, vim_item)
-- name for each source
vim_item.menu = ({

View file

@ -16,7 +16,7 @@ in {
# the entire credit for this dashboard configuration to https://github.com/Rishabh672003
# honestly, excellent work
vim.luaConfigRC.alpha = entryAnywhere ''
vim.pluginRC.alpha = entryAnywhere ''
local alpha = require("alpha")
local plenary_path = require("plenary.path")
local dashboard = require("alpha.themes.dashboard")

View file

@ -5,16 +5,17 @@
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.dashboard.dashboard-nvim;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
"dashboard-nvim"
];
vim = {
startPlugins = ["dashboard-nvim"];
vim.luaConfigRC.dashboard-nvim = entryAnywhere ''
require("dashboard").setup{}
pluginRC.dashboard-nvim = entryAnywhere ''
require("dashboard").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}

View file

@ -1,7 +1,9 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.dashboard.dashboard-nvim = {
enable = mkEnableOption "Fancy and Blazing Fast start screen plugin of neovim [dashboard.nvim]";
setupOpts = mkPluginSetupOption "dashboard.nvim" {};
};
}

View file

@ -5,7 +5,6 @@
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.vim) mkVimBool;
cfg = config.vim.dashboard.startify;
in {
@ -23,28 +22,28 @@ in {
else cfg.customFooter;
"startify_bookmarks" = cfg.bookmarks;
"startify_lists" = cfg.lists;
"startify_change_to_dir" = mkVimBool cfg.changeToDir;
"startify_change_to_vcs_root" = mkVimBool cfg.changeToVCRoot;
"startify_change_to_dir" = cfg.changeToDir;
"startify_change_to_vcs_root" = cfg.changeToVCRoot;
"startify_change_cmd" = cfg.changeDirCmd;
"startify_skiplist" = cfg.skipList;
"startify_update_oldfiles" = mkVimBool cfg.updateOldFiles;
"startify_session_autoload" = mkVimBool cfg.sessionAutoload;
"startify_update_oldfiles" = cfg.updateOldFiles;
"startify_session_autoload" = cfg.sessionAutoload;
"startify_commands" = cfg.commands;
"startify_files_number" = cfg.filesNumber;
"startify_custom_indices" = cfg.customIndices;
"startify_disable_at_vimenter" = mkVimBool cfg.disableOnStartup;
"startify_enable_unsafe" = mkVimBool cfg.unsafe;
"startify_disable_at_vimenter" = cfg.disableOnStartup;
"startify_enable_unsafe" = cfg.unsafe;
"startify_padding_left" = cfg.paddingLeft;
"startify_use_env" = mkVimBool cfg.useEnv;
"startify_use_env" = cfg.useEnv;
"startify_session_before_save" = cfg.sessionBeforeSave;
"startify_session_persistence" = mkVimBool cfg.sessionPersistence;
"startify_session_delete_buffers" = mkVimBool cfg.sessionDeleteBuffers;
"startify_session_persistence" = cfg.sessionPersistence;
"startify_session_delete_buffers" = cfg.sessionDeleteBuffers;
"startify_session_dir" = cfg.sessionDir;
"startify_skiplist_server" = cfg.skipListServer;
"startify_session_remove_lines" = cfg.sessionRemoveLines;
"startify_session_savevars" = cfg.sessionSavevars;
"startify_session_savecmds" = cfg.sessionSavecmds;
"startify_session_sort" = mkVimBool cfg.sessionSort;
"startify_session_sort" = cfg.sessionSort;
};
};
}

View file

@ -1,8 +1,4 @@
{
config,
lib,
...
}: let
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) listOf attrs bool enum str oneOf int;
in {

View file

@ -18,7 +18,7 @@ in {
(mkIf cfg.enable {
vim.startPlugins = ["nvim-dap"];
vim.luaConfigRC =
vim.pluginRC =
{
# TODO customizable keymaps
nvim-dap = entryAnywhere ''
@ -51,7 +51,7 @@ in {
(mkIf (cfg.enable && cfg.ui.enable) {
vim.startPlugins = ["nvim-dap-ui" "nvim-nio"];
vim.luaConfigRC.nvim-dap-ui = entryAfter ["nvim-dap"] (''
vim.pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] (''
local dapui = require("dapui")
dapui.setup()
''

View file

@ -1,5 +1,6 @@
{
imports = [
./nvimtree
./neo-tree
];
}

View file

@ -0,0 +1,30 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.filetree.neo-tree;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [
# dependencies
"plenary-nvim" # commons library
"image-nvim" # optional for image previews
"nui-nvim" # ui library
# neotree
"neo-tree-nvim"
];
visuals.nvimWebDevicons.enable = true;
pluginRC.neo-tree = entryAnywhere ''
require("neo-tree").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}

View file

@ -1,6 +1,6 @@
{
imports = [
./dart.nix
./config.nix
./neo-tree.nix
];
}

View file

@ -0,0 +1,155 @@
{lib, ...}: let
inherit (lib.types) bool str int submodule enum either listOf;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.filetree.neo-tree = {
enable = mkEnableOption "filetree via neo-tree.nvim";
# Permalink:
# https://github.com/nvim-neo-tree/neo-tree.nvim/blob/22e566aeb075c94f670f34077e05ba95190dfb4a/lua/neo-tree/defaults.lua
setupOpts = mkPluginSetupOption "neo-tree" {
add_blank_line_at_top = mkOption {
type = bool;
default = false;
description = ''
Whether to add a blank line at the top of the tree
'';
};
auto_clean_after_session_restore = mkOption {
type = bool;
default = false;
description = ''
Whether to automatically clean up broken neo-tree buffers
saved in sessions
'';
};
default_source = mkOption {
type = str;
default = "filesystem";
description = ''
You can choose a specific source.
`last` here which indicates the last used source
'';
};
enable_diagnostics = mkEnableOption "diagnostics" // {default = true;};
enable_git_status = mkEnableOption "git status" // {default = true;};
enable_modified_markers = mkEnableOption "markers for files with unsaved changes." // {default = true;};
enable_opened_markers =
mkEnableOption ''
tracking of opened files.
Required for `components.name.highlight_opened_files`
''
// {default = true;};
enable_refresh_on_write =
mkEnableOption ''
Refresh the tree when a file is written.
Only used if `use_libuv_file_watcher` is false.
''
// {default = true;};
enable_cursor_hijack = mkEnableOption ''
cursor hijacking.
If enabled neotree will keep the cursor on the first letter of the filename when moving in the tree
'';
git_status_async = mkEnableOption ''
async git status.
This will make the git status check async and will not block the UI.
'';
/*
git_status_async_options = mkOption {
description = "These options are for people with VERY large git repos";
type = submodule {
batch_size = mkOption {
type = int;
default = 1000;
description = "How many lines of git status results to process at a time";
};
batch_delay = mkOption {
type = int;
default = 10;
description = "Delay, in ms, between batches. Spreads out the workload to let other processes run";
};
max_lines = mkOption {
type = int;
default = 10000;
description = ''
How many lines of git status results to process.
Anything after this will be dropped. Anything before this will be used.
The last items to be processed are the untracked files.
'';
};
};
};
*/
hide_root_node = mkOption {
type = bool;
default = false;
description = ''
Whether to hide the root node of the tree
'';
};
retain_hidden_root_indent = mkOption {
type = bool;
default = false;
description = ''
Whether to retain the indent of the hidden root node
IF the root node is hidden, keep the indentation anyhow.
This is needed if you use expanders because they render in the indent.
'';
};
log_level = mkOption {
type = enum ["trace" "debug" "info" "warn" "error" "fatal"];
default = "info";
description = "Log level for the plugin.";
};
log_to_file = mkOption {
type = either bool str;
default = false;
example = literalExpression "/tmp/neo-tree.log";
description = ''
Must be either a boolean or a path to your log file.
Use :NeoTreeLogs to show the file
'';
};
open_files_in_last_window = mkOption {
type = bool;
default = true;
description = ''
Whether to open files in the last window
If disabled, neo-tree will open files in top left window
'';
};
open_files_do_not_replace_types = mkOption {
type = listOf str;
default = ["terminal" "Trouble" "qf" "edgy"];
description = ''
A list of filetypes that should not be replaced when opening a file
'';
};
};
};
}

View file

@ -29,7 +29,7 @@ in {
"<leader>t" = "+NvimTree";
};
vim.luaConfigRC.nvimtreelua = entryAnywhere ''
vim.pluginRC.nvimtreelua = entryAnywhere ''
${
optionalString cfg.setupOpts.disable_netrw ''
-- disable netrew completely

View file

@ -1,4 +1,4 @@
_: {
{
imports = [
./config.nix
./nvimtree.nix

View file

@ -69,7 +69,7 @@ in {
"<leader>g" = "+Gitsigns";
};
luaConfigRC.gitsigns = entryAnywhere ''
pluginRC.gitsigns = entryAnywhere ''
require('gitsigns').setup{}
'';
};

View file

@ -1,22 +1,24 @@
{
pkgs,
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either package listOf str bool;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.languages) diagnosticsToLua;
inherit (lib.nvim.types) diagnostics mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
cfg = config.vim.languages.bash;
defaultServer = "bash-ls";
servers = {
bash-ls = {
package = pkgs.nodePackages.bash-language-server;
package = pkgs.bash-language-server;
lspConfig = ''
lspconfig.bashls.setup{
capabilities = capabilities;
@ -55,6 +57,7 @@
ls_sources,
null_ls.builtins.diagnostics.shellcheck.with({
command = "${pkg}/bin/shellcheck",
diagnostics_format = "#{m} [#{c}]"
})
)
'';
@ -82,7 +85,7 @@ in {
description = "bash-language-server package, or the command to run as a list of strings";
example = literalExpression ''[lib.getExe pkgs.nodePackages.bash-language-server "start"]'';
type = either package (listOf str);
default = pkgs.nodePackages.bash-language-server;
default = pkgs.bash-language-server;
};
};
@ -114,4 +117,30 @@ in {
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.bash-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.bash-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.extraDiagnostics.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources = diagnosticsToLua {
lang = "bash";
config = cfg.extraDiagnostics.types;
inherit diagnosticsProviders;
};
})
]);
}

View file

@ -1,83 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.lists) isList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.languages) diagnosticsToLua;
cfg = config.vim.languages.bash;
diagnosticsProviders = {
shellcheck = {
package = pkgs.shellcheck;
nullConfig = pkg: ''
table.insert(
ls_sources,
null_ls.builtins.diagnostics.shellcheck.with({
command = "${pkg}/bin/shellcheck",
})
)
'';
};
};
formats = {
shfmt = {
package = pkgs.shfmt;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.shfmt.with({
command = "${pkgs.shfmt}/bin/shfmt",
})
)
'';
};
};
servers = {
bash-ls = {
package = pkgs.nodePackages.bash-language-server;
lspConfig = ''
lspconfig.bashls.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/bash-language-server", "start"}''
};
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.bash-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.bash-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.extraDiagnostics.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources = diagnosticsToLua {
lang = "bash";
config = cfg.extraDiagnostics.types;
inherit diagnosticsProviders;
};
})
]);
}

View file

@ -12,7 +12,7 @@
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.dag) entryAfter;
packageToCmd = package: defaultCmd:
if isList cfg.lsp.package
@ -21,7 +21,7 @@
cfg = config.vim.languages.clang;
defaultServer = "ccls";
defaultServer = "clangd";
servers = {
ccls = {
package = pkgs.ccls;
@ -35,7 +35,7 @@
'';
};
clangd = {
package = pkgs.clang-tools_16;
package = pkgs.clang-tools;
lspConfig = ''
local clangd_cap = capabilities
-- use same offsetEncoding as null-ls
@ -57,7 +57,7 @@
dapConfig = ''
dap.adapters.lldb = {
type = 'executable',
command = '${cfg.dap.package}/bin/lldb-vscode',
command = '${cfg.dap.package}/bin/lldb-dap',
name = 'lldb'
}
dap.configurations.cpp = {
@ -141,7 +141,7 @@ in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.cHeader {
vim.configRC.c-header = entryAnywhere "let g:c_syntax_for_h = 1";
vim.pluginRC.c-header = entryAfter ["basic"] "vim.g.c_syntax_for_h = 1";
})
(mkIf cfg.treesitter.enable {

View file

@ -17,7 +17,7 @@
defaultServer = "vscode-langservers-extracted";
servers = {
vscode-langservers-extracted = {
package = pkgs.nodePackages.vscode-langservers-extracted;
package = pkgs.vscode-langservers-extracted;
lspConfig = ''
-- enable (broadcasting) snippet capability for completion
-- see <https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cssls>

View file

@ -1,18 +1,23 @@
{
config,
lib,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.trivial) boolToString;
inherit (lib.lists) isList;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) enum either listOf package nullOr str bool;
inherit (lib.strings) optionalString;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.dart;
ftcfg = cfg.flutter-tools;
defaultServer = "dart";
servers = {
dart = {
@ -48,15 +53,16 @@ in {
default = defaultServer;
};
package = mkOption {
description = "Dart LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
description = "Dart LSP server package, or the command to run as a list of strings";
};
opts = mkOption {
description = "Options to pass to Dart LSP server";
type = nullOr str;
default = null;
description = "Options to pass to Dart LSP server";
};
};
@ -70,23 +76,26 @@ in {
flutter-tools = {
enable = mkOption {
description = "Enable flutter-tools for flutter support";
type = bool;
default = config.vim.languages.enableLSP;
description = "Enable flutter-tools for flutter support";
};
enableNoResolvePatch = mkOption {
description = ''
Patch flutter-tools so that it doesn't resolve symlinks when detecting flutter path.
This is required if you want to use a flutter package built with nix.
If you are using a flutter SDK installed from a different source and encounter the error "`dart` missing from PATH", disable this option.
'';
type = bool;
default = true;
description = ''
Whether to patch flutter-tools so that it doesn't resolve
symlinks when detecting flutter path.
This is required if you want to use a flutter package built with nix.
If you are using a flutter SDK installed from a different source
and encounter the error "`dart` missing from PATH", disable this option.
'';
};
color = {
enable = mkEnableOption "Whether or mot to highlight color variables at all";
enable = mkEnableOption "highlighting color variables";
highlightBackground = mkOption {
type = bool;
@ -112,4 +121,47 @@ in {
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf ftcfg.enable {
vim.startPlugins =
if ftcfg.enableNoResolvePatch
then ["flutter-tools-patched"]
else ["flutter-tools"];
vim.pluginRC.flutter-tools = entryAnywhere ''
require('flutter-tools').setup {
lsp = {
color = { -- show the derived colours for dart variables
enabled = ${boolToString ftcfg.color.enable}, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = ${boolToString ftcfg.color.highlightBackground}, -- highlight the background
foreground = ${boolToString ftcfg.color.highlightForeground}, -- highlight the foreground
virtual_text = ${boolToString ftcfg.color.virtualText.enable}, -- show the highlight using virtual text
virtual_text_str = ${ftcfg.color.virtualText.character} -- the virtual text character to highlight
},
capabilities = capabilities,
on_attach = default_on_attach;
flags = lsp_flags,
},
${optionalString cfg.dap.enable ''
debugger = {
enabled = true,
},
''}
}
'';
})
]);
}

View file

@ -1,76 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.lists) isList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.dart;
ftcfg = cfg.flutter-tools;
servers = {
dart = {
package = pkgs.dart;
lspConfig = ''
lspconfig.dartls.setup{
capabilities = capabilities;
on_attach=default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/dart", "language-server", "--protocol=lsp"}''
};
${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"}
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf ftcfg.enable {
vim.startPlugins =
if ftcfg.enableNoResolvePatch
then ["flutter-tools-patched"]
else ["flutter-tools"];
vim.luaConfigRC.flutter-tools = entryAnywhere ''
require('flutter-tools').setup {
lsp = {
color = { -- show the derived colours for dart variables
enabled = ${boolToString ftcfg.color.enable}, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = ${boolToString ftcfg.color.highlightBackground}, -- highlight the background
foreground = ${boolToString ftcfg.color.highlightForeground}, -- highlight the foreground
virtual_text = ${boolToString ftcfg.color.virtualText.enable}, -- show the highlight using virtual text
virtual_text_str = ${ftcfg.color.virtualText.character} -- the virtual text character to highlight
},
capabilities = capabilities,
on_attach = default_on_attach;
flags = lsp_flags,
},
${optionalString cfg.dap.enable ''
debugger = {
enabled = true,
},
''}
}
'';
})
]);
}

View file

@ -2,28 +2,29 @@
inherit (lib.nvim.languages) mkEnable;
in {
imports = [
./bash
./dart
./elixir
./markdown
./tidal
./bash.nix
./dart.nix
./clang.nix
./css.nix
./elixir.nix
./go.nix
./html.nix
./java.nix
./lua.nix
./markdown.nix
./nim.nix
./nix.nix
./ocaml.nix
./php.nix
./python.nix
./r.nix
./rust.nix
./sql.nix
./svelte.nix
./tailwind.nix
./terraform.nix
./ts.nix
./typst.nix
./zig.nix
];

View file

@ -0,0 +1,138 @@
{
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.elixir;
defaultServer = "elixirls";
servers = {
elixirls = {
package = pkgs.elixir-ls;
lspConfig = ''
-- elixirls setup
lspconfig.elixirls.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/elixir-ls"}''
}
}
'';
};
};
defaultFormat = "mix";
formats = {
mix = {
package = pkgs.elixir;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.mix.with({
command = "${cfg.format.package}/bin/mix",
})
)
'';
};
};
in {
options.vim.languages.elixir = {
enable = mkEnableOption "Elixir language support";
treesitter = {
enable = mkEnableOption "Elixir treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "elixir";
};
lsp = {
enable = mkEnableOption "Elixir LSP support" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "Elixir LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
};
package = mkOption {
description = "Elixir LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
};
};
format = {
enable = mkEnableOption "Elixir formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "Elixir formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "Elixir formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
elixir-tools = {
enable = mkEnableOption "Elixir tools";
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.elixir-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.elixir-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.elixir-tools.enable {
vim.startPlugins = ["elixir-tools"];
vim.pluginRC.elixir-tools = entryAnywhere ''
local elixir = require("elixir")
local elixirls = require("elixir.elixirls")
-- disable imperative insstallations of various
-- elixir related tools installed by elixir-tools
elixir.setup {
nextls = {
enable = false -- defaults to false
},
credo = {
enable = false -- defaults to true
},
elixirls = {
enable = false, -- defaults to true
}
}
'';
})
]);
}

View file

@ -1,67 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.meta) getExe;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.elixir;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
"elixir-tools"
];
vim.luaConfigRC.elixir-tools = entryAnywhere ''
local elixir = require("elixir")
local elixirls = require("elixir.elixirls")
elixir.setup {
elixirls = {
-- alternatively, point to an existing elixir-ls installation (optional)
-- not currently supported by elixirls, but can be a table if you wish to pass other args `{"path/to/elixirls", "--foo"}`
cmd = "${getExe pkgs.elixir-ls}",
-- default settings, use the `settings` function to override settings
settings = elixirls.settings {
dialyzerEnabled = true,
fetchDeps = false,
enableTestLenses = false,
suggestSpecs = false,
},
on_attach = function(client, bufnr)
local map_opts = { buffer = true, noremap = true}
-- run the codelens under the cursor
vim.keymap.set("n", "<space>r", vim.lsp.codelens.run, map_opts)
-- remove the pipe operator
vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", map_opts)
-- add the pipe operator
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", map_opts)
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", map_opts)
-- bindings for standard LSP functions.
vim.keymap.set("n", "<space>df", "<cmd>lua vim.lsp.buf.format()<cr>", map_opts)
vim.keymap.set("n", "<space>gd", "<cmd>lua vim.diagnostic.open_float()<cr>", map_opts)
vim.keymap.set("n", "<space>dt", "<cmd>lua vim.lsp.buf.definition()<cr>", map_opts)
vim.keymap.set("n", "<space>K", "<cmd>lua vim.lsp.buf.hover()<cr>", map_opts)
vim.keymap.set("n", "<space>gD","<cmd>lua vim.lsp.buf.implementation()<cr>", map_opts)
vim.keymap.set("n", "<space>1gD","<cmd>lua vim.lsp.buf.type_definition()<cr>", map_opts)
-- keybinds for fzf-lsp.nvim: https://github.com/gfanto/fzf-lsp.nvim
-- you could also use telescope.nvim: https://github.com/nvim-telescope/telescope.nvim
-- there are also core vim.lsp functions that put the same data in the loclist
vim.keymap.set("n", "<space>gr", ":References<cr>", map_opts)
vim.keymap.set("n", "<space>g0", ":DocumentSymbols<cr>", map_opts)
vim.keymap.set("n", "<space>gW", ":WorkspaceSymbols<cr>", map_opts)
vim.keymap.set("n", "<leader>d", ":Diagnostics<cr>", map_opts)
end
}
}
'';
};
}

View file

@ -1,7 +0,0 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.vim.languages.elixir = {
enable = mkEnableOption "Elixir language support";
};
}

View file

@ -12,6 +12,7 @@
inherit (lib.types) bool enum either listOf package str;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAfter;
cfg = config.vim.languages.go;
@ -37,40 +38,6 @@
debuggers = {
delve = {
package = pkgs.delve;
dapConfig = ''
dap.adapters.delve = {
type = "server",
port = "''${port}",
executable = {
command = "${getExe cfg.dap.package}",
args = { "dap", "-l", "127.0.0.1:''${port}" },
},
}
dap.configurations.go = {
{
type = "delve",
name = "Debug",
request = "launch",
program = "''${file}",
},
{
type = "delve",
name = "Debug test", -- configuration for debugging test files
request = "launch",
mode = "test",
program = "''${file}",
},
-- works with go.mod packages and sub packages
{
type = "delve",
name = "Debug test (go.mod)",
request = "launch",
mode = "test",
program = "./''${relativeFileDirname}",
},
}
'';
};
};
in {
@ -102,15 +69,17 @@ in {
dap = {
enable = mkOption {
description = "Enable Go Debug Adapter";
description = "Enable Go Debug Adapter via nvim-dap-go plugin";
type = bool;
default = config.vim.languages.enableDAP;
};
debugger = mkOption {
description = "Go debugger to use";
type = enum (attrNames debuggers);
default = defaultDebugger;
};
package = mkOption {
description = "Go debugger package.";
type = package;
@ -131,8 +100,17 @@ in {
})
(mkIf cfg.dap.enable {
vim.debugger.nvim-dap.enable = true;
vim.debugger.nvim-dap.sources.go-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
vim = {
startPlugins = ["nvim-dap-go"];
pluginRC.nvim-dap-go = entryAfter ["nvim-dap"] ''
require('dap-go').setup {
delve = {
path = '${getExe cfg.dap.package}',
}
}
'';
debugger.nvim-dap.enable = true;
};
})
]);
}

View file

@ -36,7 +36,7 @@ in {
grammars = [cfg.treesitter.package];
};
luaConfigRC.html-autotag = mkIf cfg.treesitter.autotagHtml (entryAnywhere ''
pluginRC.html-autotag = mkIf cfg.treesitter.autotagHtml (entryAnywhere ''
require('nvim-ts-autotag').setup()
'');
};

View file

@ -61,7 +61,7 @@ in {
(mkIf cfg.lsp.neodev.enable {
vim.startPlugins = ["neodev-nvim"];
vim.luaConfigRC.neodev = entryBefore ["lua-lsp"] ''
vim.pluginRC.neodev = entryBefore ["lua-lsp"] ''
require("neodev").setup({})
'';
})

View file

@ -4,7 +4,8 @@
lib,
...
}: let
inherit (builtins) attrNames;
inherit (builtins) attrNames concatLists;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.lists) isList;
inherit (lib.types) bool enum either package listOf str;
@ -29,15 +30,31 @@
'';
};
};
defaultFormat = "denofmt";
formats = {
denofmt = {
package = pkgs.deno;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.deno_fmt.with({
filetypes = ${expToLua (concatLists [cfg.format.extraFiletypes ["markdown"]])},
command = "${cfg.format.package}/bin/deno",
})
)
'';
};
};
in {
options.vim.languages.markdown = {
enable = mkEnableOption "Markdown markup language support";
treesitter = {
enable = mkOption {
description = "Enable Markdown treesitter";
type = bool;
default = config.vim.languages.enableTreesitter;
description = "Enable Markdown treesitter";
};
mdPackage = mkGrammarOption pkgs "markdown";
mdInlinePackage = mkGrammarOption pkgs "markdown-inline";
@ -47,17 +64,56 @@ in {
enable = mkEnableOption "Enable Markdown LSP support" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "Markdown LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
description = "Markdown LSP server to use";
};
package = mkOption {
description = "Markdown LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
description = "Markdown LSP server package, or the command to run as a list of strings";
};
};
format = {
enable = mkEnableOption "Markdown formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
type = enum (attrNames formats);
default = defaultFormat;
description = "Markdown formatter to use";
};
package = mkOption {
type = package;
default = formats.${cfg.format.type}.package;
description = "Markdown formatter package";
};
extraFiletypes = mkOption {
type = listOf str;
default = [];
description = "Extra filetypes to format with the Markdown formatter";
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.mdPackage cfg.treesitter.mdInlinePackage];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.markdown-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.markdown-format = formats.${cfg.format.type}.nullConfig;
})
]);
}

View file

@ -1,40 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.nvim.lua) expToLua;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
cfg = config.vim.languages.markdown;
servers = {
marksman = {
package = pkgs.marksman;
lspConfig = ''
lspconfig.marksman.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/marksman", "server"}''
},
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.mdPackage cfg.treesitter.mdInlinePackage];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.markdown-lsp = servers.${cfg.lsp.server}.lspConfig;
})
]);
}

View file

@ -11,7 +11,6 @@
inherit (lib.strings) optionalString;
inherit (lib.types) enum either listOf package str;
inherit (lib.nvim.types) mkGrammarOption diagnostics;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.languages) diagnosticsToLua;
@ -176,8 +175,16 @@ in {
config = mkIf cfg.enable (mkMerge [
{
vim.configRC.nix = entryAnywhere ''
autocmd filetype nix setlocal tabstop=2 shiftwidth=2 softtabstop=2
vim.pluginRC.nix = ''
vim.api.nvim_create_autocmd("FileType", {
pattern = "nix",
callback = function(opts)
local bo = vim.bo[opts.buf]
bo.tabstop = 2
bo.shiftwidth = 2
bo.softtabstop = 2
end
})
'';
}

View file

@ -0,0 +1,105 @@
{
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
inherit (lib.lists) isList;
inherit (lib.types) either enum listOf package str;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
cfg = config.vim.languages.ocaml;
defaultServer = "ocaml-lsp";
servers = {
ocaml-lsp = {
package = pkgs.ocamlPackages.ocaml-lsp;
lspConfig = ''
lspconfig.ocamllsp.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${getExe cfg.lsp.package}"}''
};
}
'';
};
};
defaultFormat = "ocamlformat";
formats = {
ocamlformat = {
package = pkgs.ocamlPackages.ocamlformat;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.ocamlformat.with({
command = "${cfg.format.package}/bin/ocamlformat",
})
)
'';
};
};
in {
options.vim.languages.ocaml = {
enable = mkEnableOption "OCaml language support";
treesitter = {
enable = mkEnableOption "OCaml treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "ocaml";
};
lsp = {
enable = mkEnableOption "OCaml LSP support (ocaml-lsp)" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "OCaml LSP server to user";
type = enum (attrNames servers);
default = defaultServer;
};
package = mkOption {
description = "OCaml language server package, or the command to run as a list of strings";
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
};
};
format = {
enable = mkEnableOption "OCaml formatting support (ocamlformat)" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "OCaml formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "OCaml formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.ocaml-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.ocamlformat = formats.${cfg.format.type}.nullConfig;
vim.extraPackages = [formats.${cfg.format.type}.package];
})
]);
}

View file

@ -14,10 +14,10 @@
cfg = config.vim.languages.python;
defaultServer = "pyright";
defaultServer = "basedpyright";
servers = {
pyright = {
package = pkgs.nodePackages.pyright;
package = pkgs.pyright;
lspConfig = ''
lspconfig.pyright.setup{
capabilities = capabilities;
@ -30,6 +30,36 @@
}
'';
};
basedpyright = {
package = pkgs.basedpyright;
lspConfig = ''
lspconfig.basedpyright.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/basedpyright-langserver", "--stdio"}''
}
}
'';
};
python-lsp-server = {
package = pkgs.python-lsp-server;
lspConfig = ''
lspconfig.pylsp.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/pylsp"}''
}
}
'';
};
};
defaultFormat = "black";
@ -61,11 +91,12 @@
black-and-isort = {
package = pkgs.writeShellApplication {
name = "black";
runtimeInputs = [pkgs.black pkgs.isort];
text = ''
black --quiet - "$@" | isort --profile black -
'';
runtimeInputs = [pkgs.black pkgs.isort];
};
nullConfig = ''
table.insert(
ls_sources,

View file

@ -0,0 +1,78 @@
{
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkEnableOption mkOption literalExpression;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.r;
r-with-languageserver = pkgs.rWrapper.override {
packages = with pkgs.rPackages; [languageserver];
};
defaultServer = "r_language_server";
servers = {
r_language_server = {
package = pkgs.writeShellScriptBin "r_lsp" ''
${r-with-languageserver}/bin/R --slave -e "languageserver::run()"
'';
lspConfig = ''
lspconfig.r_language_server.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${lib.getExe cfg.lsp.package}"}''
}
}
'';
};
};
in {
options.vim.languages.r = {
enable = mkEnableOption "R language support";
treesitter = {
enable = mkEnableOption "R treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "r";
};
lsp = {
enable = mkEnableOption "R LSP support" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "R LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
};
package = mkOption {
description = "R LSP server package, or the command to run as a list of strings";
example = literalExpression "[ (lib.getExe pkgs.jdt-language-server) \"-data\" \"~/.cache/jdtls/workspace\" ]";
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.r-lsp = servers.${cfg.lsp.server}.lspConfig;
})
]);
}

View file

@ -4,17 +4,33 @@
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.lists) isList optionals;
inherit (lib.types) bool package str listOf either;
inherit (lib.types) bool package str listOf either enum;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.rust;
defaultFormat = "rustfmt";
formats = {
rustfmt = {
package = pkgs.rustfmt;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.rustfmt.with({
command = "${cfg.format.package}/bin/rustfmt",
})
)
'';
};
};
in {
options.vim.languages.rust = {
enable = mkEnableOption "Rust language support";
@ -49,6 +65,22 @@ in {
};
};
format = {
enable = mkEnableOption "Rust formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "Rust formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "Rust formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
dap = {
enable = mkOption {
description = "Rust Debug Adapter support";
@ -70,7 +102,7 @@ in {
startPlugins = ["crates-nvim"];
lsp.null-ls.enable = mkIf cfg.crates.codeActions true;
autocomplete.sources = {"crates" = "[Crates]";};
luaConfigRC.rust-crates = entryAnywhere ''
pluginRC.rust-crates = entryAnywhere ''
require('crates').setup {
null_ls = {
enabled = ${boolToString cfg.crates.codeActions},
@ -86,32 +118,46 @@ in {
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.rust-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf (cfg.lsp.enable || cfg.dap.enable) {
vim = {
startPlugins = ["rust-tools"] ++ optionals cfg.dap.enable [cfg.dap.package];
startPlugins = ["rustaceanvim"];
lsp.lspconfig = {
enable = true;
sources.rust-lsp = ''
local rt = require('rust-tools')
rust_on_attach = function(client, bufnr)
luaConfigRC.rustaceanvim = entryAnywhere ''
vim.g.rustaceanvim = {
${optionalString cfg.lsp.enable ''
-- LSP
tools = {
hover_actions = {
replace_builtin_hover = false
},
},
server = {
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/rust-analyzer"}''
},
on_attach = function(client, bufnr)
default_on_attach(client, bufnr)
local opts = { noremap=true, silent=true, buffer = bufnr }
vim.keymap.set("n", "<leader>ris", rt.inlay_hints.set, opts)
vim.keymap.set("n", "<leader>riu", rt.inlay_hints.unset, opts)
vim.keymap.set("n", "<leader>rr", rt.runnables.runnables, opts)
vim.keymap.set("n", "<leader>rp", rt.parent_module.parent_module, opts)
vim.keymap.set("n", "<leader>rm", rt.expand_macro.expand_macro, opts)
vim.keymap.set("n", "<leader>rc", rt.open_cargo_toml.open_cargo_toml, opts)
vim.keymap.set("n", "<leader>rg", function() rt.crate_graph.view_crate_graph("x11", nil) end, opts)
vim.keymap.set("n", "<leader>rr", ":RustLsp runnables<CR>", opts)
vim.keymap.set("n", "<leader>rp", ":RustLsp parentModule<CR>", opts)
vim.keymap.set("n", "<leader>rm", ":RustLsp expandMacro<CR>", opts)
vim.keymap.set("n", "<leader>rc", ":RustLsp openCargo", opts)
vim.keymap.set("n", "<leader>rg", ":RustLsp crateGraph x11", opts)
${optionalString cfg.dap.enable ''
vim.keymap.set("n", "<leader>rd", ":RustDebuggables<cr>", opts)
vim.keymap.set("n", "<leader>rd", ":RustLsp debuggables<cr>", opts)
vim.keymap.set(
"n", "${config.vim.debugger.nvim-dap.mappings.continue}",
function()
local dap = require("dap")
if dap.status() == "" then
vim.cmd "RustDebuggables"
vim.cmd "RustLsp debuggables"
else
dap.continue()
end
@ -120,41 +166,21 @@ in {
)
''}
end
local rustopts = {
tools = {
autoSetHints = true,
hover_with_actions = false,
inlay_hints = {
only_current_line = false,
}
},
server = {
capabilities = capabilities,
on_attach = rust_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/rust-analyzer"}''
},
settings = {
${cfg.lsp.opts}
}
},
''}
${optionalString cfg.dap.enable ''
dap = {
adapter = {
type = "executable",
command = "${cfg.dap.package}/bin/lldb-vscode",
name = "rt_lldb",
command = "${cfg.dap.package}/bin/lldb-dap",
name = "rustacean_lldb",
},
},
''}
}
rt.setup(rustopts)
'';
};
};
})
]);
}

View file

@ -54,7 +54,7 @@
defaultDiagnosticsProvider = ["eslint_d"];
diagnosticsProviders = {
eslint_d = {
package = pkgs.nodePackages.eslint_d;
package = pkgs.eslint_d;
nullConfig = pkg: ''
table.insert(
ls_sources,

View file

@ -1,23 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.tidal;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
# From tidalcycles flake
pkgs.vimPlugins.vim-tidal
];
vim.globals = {
"tidal_target" = "terminal";
"tidal_flash_duration" = 150;
"tidal_sc_enable" = cfg.openSC;
};
};
}

View file

@ -1,6 +0,0 @@
{...}: {
imports = [
./tidal.nix
./config.nix
];
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) int bool;
in {
options.vim.tidal = {
enable = mkEnableOption "tidalcycles tools and plugins";
flash = mkOption {
description = ''When sending a paragraph or a single line, vim-tidal will "flash" the selection for some milliseconds'';
type = int;
default = 150;
};
openSC = mkOption {
description = "Automatically run the supercollider CLI, sclang, alongside the Tidal GHCI terminal.";
type = bool;
default = true;
};
};
}

View file

@ -9,19 +9,20 @@
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.meta) getExe;
inherit (lib.types) enum either listOf package str;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption diagnostics;
inherit (lib.types) enum either listOf package str bool;
inherit (lib.nvim.lua) expToLua toLuaObject;
inherit (lib.nvim.types) mkGrammarOption diagnostics mkPluginSetupOption;
inherit (lib.nvim.languages) diagnosticsToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.ts;
defaultServer = "tsserver";
defaultServer = "ts_ls";
servers = {
tsserver = {
package = pkgs.nodePackages.typescript-language-server;
ts_ls = {
package = pkgs.typescript-language-server;
lspConfig = ''
lspconfig.tsserver.setup {
lspconfig.ts_ls.setup {
capabilities = capabilities;
on_attach = attach_keymaps,
cmd = ${
@ -32,6 +33,7 @@
}
'';
};
denols = {
package = pkgs.deno;
lspConfig = ''
@ -47,6 +49,24 @@
}
'';
};
# Here for backwards compatibility. Still consider tsserver a valid
# configuration in the enum, but assert if it's set to *properly*
# redirect the user to the correct server.
tsserver = {
package = pkgs.typescript-language-server;
lspConfig = ''
lspconfig.ts_ls.setup {
capabilities = capabilities;
on_attach = attach_keymaps,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/typescript-language-server", "--stdio"}''
}
}
'';
};
};
# TODO: specify packages
@ -63,6 +83,7 @@
)
'';
};
prettierd = {
package = pkgs.prettierd;
nullConfig = ''
@ -80,7 +101,7 @@
defaultDiagnosticsProvider = ["eslint_d"];
diagnosticsProviders = {
eslint_d = {
package = pkgs.nodePackages.eslint_d;
package = pkgs.eslint_d;
nullConfig = pkg: ''
table.insert(
ls_sources,
@ -92,6 +113,7 @@
};
};
in {
_file = ./ts.nix;
options.vim.languages.ts = {
enable = mkEnableOption "Typescript/Javascript language support";
@ -143,6 +165,24 @@ in {
inherit defaultDiagnosticsProvider;
};
};
extensions = {
ts-error-translator = {
enable = mkEnableOption ''
Typescript error translation with
[ts-error-translator.nvim](github.com/dmmulroy/ts-error-translator.nvim)
'';
setupOpts = mkPluginSetupOption "ts-error-translator" {
# This is the default configuration behaviour.
auto_override_publish_diagnostics = mkOption {
description = "Automatically override the publish_diagnostics handler";
type = bool;
default = true;
};
};
};
};
};
config = mkIf cfg.enable (mkMerge [
@ -169,5 +209,33 @@ in {
inherit diagnosticsProviders;
};
})
# Extensions
(mkIf cfg.extensions."ts-error-translator".enable {
vim.startPlugins = ["ts-error-translator"];
vim.pluginRC.ts-error-translator = entryAnywhere ''
require("ts-error-translator").setup(${toLuaObject cfg.extensions.ts-error-translator.setupOpts})
'';
})
# Warn the user if they have set the default server name to tsserver to match upstream (us)
# The name "tsserver" has been deprecated in lspconfig, and now should be called ts_ls. This
# is a purely cosmetic change, but emits a warning if not accounted for.
{
assertions = [
{
assertion = cfg.lsp.enable -> cfg.lsp.server != "tsserver";
message = ''
As of a recent lspconfig update, the `tsserver` configuration has been renamed
to `ts_ls` to match upstream behaviour of `lspconfig`, and the name `tsserver`
is no longer considered valid by nvf. Please set `vim.languages.ts.lsp.server`
to `"ts_ls"` instead of to `${cfg.lsp.server}`
Please see <https://github.com/neovim/nvim-lspconfig/pull/3232> for more details
about this change.
'';
}
];
}
]);
}

View file

@ -0,0 +1,100 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str;
inherit (lib.attrsets) attrNames;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.typst;
defaultFormat = "typstfmt";
formats = {
typstfmt = {
package = pkgs.typstfmt;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.typstfmt.with({
command = "${cfg.format.package}/bin/typstfmt",
})
)
'';
};
# https://github.com/Enter-tainer/typstyle
typstyle = {
package = pkgs.typstyle;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.typstfmt.with({
command = "${cfg.format.package}/bin/typstyle",
})
)
'';
};
};
in {
options.vim.languages.typst = {
enable = mkEnableOption "Typst language support";
treesitter = {
enable = mkEnableOption "Typst treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "typst";
};
lsp = {
enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.languages.enableLSP;};
package = mkOption {
description = "typst-lsp package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
type = either package (listOf str);
default = pkgs.typst-lsp;
};
};
format = {
enable = mkEnableOption "Typst document formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "Typst formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "Typst formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.typst-lsp = ''
lspconfig.typst_lsp.setup {
capabilities = capabilities,
on_attach=default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/typst-lsp"}''
},
}
'';
})
]);
}

View file

@ -16,7 +16,10 @@
mappingDefinitions = self.options.vim.lsp.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
mkBinding = binding: action: "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})";
mkBinding = binding: action:
if binding.value != null
then "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})"
else "";
in {
config = mkIf cfg.enable {
vim = {
@ -24,7 +27,7 @@ in {
autocomplete.sources = {"nvim_lsp" = "[LSP]";};
luaConfigRC.lsp-setup = ''
pluginRC.lsp-setup = ''
vim.g.formatsave = ${boolToString cfg.formatOnSave};
local attach_keymaps = function(client, bufnr)
@ -100,11 +103,11 @@ in {
end
end
${optionalString (config.vim.ui.breadcrumbs.enable) ''local navic = require("nvim-navic")''}
${optionalString config.vim.ui.breadcrumbs.enable ''local navic = require("nvim-navic")''}
default_on_attach = function(client, bufnr)
attach_keymaps(client, bufnr)
format_callback(client, bufnr)
${optionalString (config.vim.ui.breadcrumbs.enable) ''
${optionalString config.vim.ui.breadcrumbs.enable ''
-- let navic attach to buffers
if client.server_capabilities.documentSymbolProvider then
navic.attach(client, bufnr)

View file

@ -10,10 +10,10 @@
# lsp plugins
./lspsaga
./nvim-code-action-menu
./trouble
./lsp-signature
./lightbulb
./otter
./lspkind
./lsplines
./nvim-docs-view

View file

@ -12,7 +12,7 @@ in {
vim = {
startPlugins = ["nvim-lightbulb"];
luaConfigRC.lightbulb = entryAnywhere ''
pluginRC.lightbulb = entryAnywhere ''
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
-- Enable trouble diagnostics viewer

View file

@ -20,7 +20,7 @@ in {
handler_opts.border = config.vim.ui.borders.plugins.lsp-signature.style;
};
luaConfigRC.lsp-signature = entryAnywhere ''
pluginRC.lsp-signature = entryAnywhere ''
-- Enable lsp signature viewer
require("lsp_signature").setup(${toLuaObject cfg.lspSignature.setupOpts})
'';

View file

@ -7,6 +7,7 @@
inherit (lib.strings) optionalString;
inherit (lib.attrsets) mapAttrs;
inherit (lib.nvim.dag) entryAfter;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.lsp;
in {
@ -17,19 +18,19 @@ in {
startPlugins = ["nvim-lspconfig"];
luaConfigRC.lspconfig = entryAfter ["lsp-setup"] ''
pluginRC.lspconfig = entryAfter ["lsp-setup"] ''
local lspconfig = require('lspconfig')
${
optionalString config.vim.ui.borders.enable ''
require('lspconfig.ui.windows').default_options.border = '${config.vim.ui.borders.globalStyle}'
require('lspconfig.ui.windows').default_options.border = ${toLuaObject config.vim.ui.borders.globalStyle}
''
}
'';
};
}
{
vim.luaConfigRC = mapAttrs (_: v: (entryAfter ["lspconfig"] v)) cfg.lspconfig.sources;
vim.pluginRC = mapAttrs (_: v: (entryAfter ["lspconfig"] v)) cfg.lspconfig.sources;
}
]);
}

View file

@ -10,7 +10,7 @@
in {
config = mkIf (cfg.enable && cfg.lspkind.enable) {
vim.startPlugins = ["lspkind"];
vim.luaConfigRC.lspkind = entryAnywhere ''
vim.pluginRC.lspkind = entryAnywhere ''
local lspkind = require'lspkind'
local lspkind_opts = {
mode = '${cfg.lspkind.mode}'

View file

@ -10,7 +10,7 @@
in {
config = mkIf (cfg.enable && cfg.lsplines.enable) {
vim.startPlugins = ["lsp-lines"];
vim.luaConfigRC.lsplines = entryAfter ["lspconfig"] ''
vim.pluginRC.lsplines = entryAfter ["lspconfig"] ''
require("lsp_lines").setup()
vim.diagnostic.config({

Some files were not shown because too many files have changed in this diff Show more