Skip to content

Commit e77d79d

Browse files
authored
Merge branch 'main' into docs-touchup
2 parents 9afe574 + 9443273 commit e77d79d

File tree

16 files changed

+387
-46
lines changed

16 files changed

+387
-46
lines changed

configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ isMaximal: {
176176
icon-picker.enable = isMaximal;
177177
surround.enable = isMaximal;
178178
diffview-nvim.enable = true;
179+
yanky-nvim.enable = false;
179180
motion = {
180181
hop.enable = true;
181182
leap.enable = true;

docs/man/header.5

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
.TH "nvf" "5" "01/01/1980" "nvf"
1+
.TH "nvf" "5" "January 1, 1980" "nvf"
22
.\" disable hyphenation
33
.nh
44
.\" disable justification (adjust text to left margin only)
55
.ad l
66
.\" enable line breaks after slashes
77
.cflags 4 /
8+
89
.SH "NAME"
9-
nvf configuration specification
10-
.SH "OPTIONS"
11-
.PP
12-
You can use the following options to configure nvf:
13-
.PP
10+
nvf \- Configuration specification for the nvf.
11+
12+
.SH "DESCRIPTION"
13+
The nvf configuration specification provides a declarative structure for configuring Neovim using Nix with few
14+
lines of Nix. This document outlines the available options and their usage to create modular, reusable, and
15+
reproducible configurations using nvf's module system options. For tips, tricks and possible quirks with available
16+
plugins please visit https://notashelf.github.io/nvf/

docs/man/nvf.1

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,52 @@
11
.Dd January 1, 1980
2-
.Dt nvf 1
2+
.Dt NVF 1
33
.Os nvf
44
.\" disable hyphenation
55
.nh
66
.\" disable justification (adjust text to left margin only)
77
.ad l
88
.\" enable line breaks after slashes
99
.cflags 4 /
10+
1011
.Sh NAME
1112
.Nm nvf
12-
.Nd A highly modular, extensible and distro-agnostic Neovim configuration framework for Nix/NixOS.
13-
.
13+
.Nd A modular, extensible, and distro-agnostic Neovim configuration framework for Nix/NixOS.
14+
15+
.Sh DESCRIPTION
16+
.Nm nvf
17+
is a highly modular, configurable, extensible, and easy-to-use Neovim configuration in Nix.
18+
Designed for flexibility and ease of use, nvf allows you to easily configure your fully featured
19+
Neovim instance with a few lines of Nix.
20+
21+
.Sh COMMANDS
22+
The following commands are bundled with nvf to allow easier debugging of your configuration.
23+
24+
.Bl -tag -width Ds
25+
.It Nm nvf-print-config
26+
Outputs the full configuration of the current `nvf` setup. This command is useful for debugging
27+
or inspecting the applied configuration.
28+
.Pp
29+
.It Nm nvf-print-config-path
30+
Prints the file path to the configuration file currently in use. This command is helpful for locating
31+
the source configuration file for troubleshooting or easily sharing it via online paste utilities.
32+
.El
33+
1434
.Sh BUGS
1535
.Pp
16-
Please report any bugs that you might encounter on the
17-
\m[blue]\fBproject issue tracker\fR\m[]\&.
36+
Please report any bugs on the project issue tracker:
37+
.Lk https://github.com/notashelf/nvf/issues
1838

1939
.Sh SEE ALSO
2040
.Pp
21-
\fBnvf\fR(5)
41+
.Fn nvf 5
2242

2343
.Sh AUTHOR
2444
.Pp
25-
\fBnvf contributors\fR
45+
.Fn nvf contributors
2646
.RS 4
27-
Author.
47+
Primary contributors and maintainers of the project.
2848
.RE
2949

3050
.Sh COPYRIGHT
31-
.br
32-
Copyright \(co 2023\(en2024 nvf contributors
33-
.br
51+
.Pp
52+
Copyright (c) 2023–2025 nvf contributors.

docs/release-notes/rl-0.8.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
[typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim
66
[render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim
7+
[yanky.nvim]: https://github.com/gbprod/yanky.nvim
78

89
- Add [typst-preview.nvim] under
910
`languages.typst.extensions.typst-preview-nvim`.
@@ -31,6 +32,15 @@
3132
your Editorconfig configuration, or use an autocommand to set indentation
3233
values for buffers with the Nix filetype.
3334

35+
- Add [](#opt-vim.lsp.lightbulb.autocmd.enable) for manually managing the
36+
previously managed lightbulb autocommand.
37+
38+
- A warning will occur if [](#opt-vim.lsp.lightbulb.autocmd.enable) and
39+
`vim.lsp.lightbulb.setupOpts.autocmd.enabled` are both set at the same time.
40+
Pick only one.
41+
42+
- Add [yanky.nvim] to available plugins, under `vim.utility.yanky-nvim`.
43+
3444
[amadaluzia](https://github.com/amadaluzia):
3545

3646
[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim
@@ -59,7 +69,8 @@
5969
- Add `vim.snippets.luasnip.setupOpts`, which was previously missing.
6070
- Add `"prettierd"` as a formatter option in
6171
`vim.languages.markdown.format.type`.
62-
- Add the following plugins from [mini.nvim](https://github.com/echasnovski/mini.nvim)
72+
- Add the following plugins from
73+
[mini.nvim](https://github.com/echasnovski/mini.nvim)
6374
- `mini.ai`
6475
- `mini.align`
6576
- `mini.animate`
@@ -102,7 +113,9 @@
102113
- `mini.trailspace`
103114
- `mini.visits`
104115
- Add [fzf-lua](https://github.com/ibhagwan/fzf-lua) in `vim.fzf-lua`
105-
- Add [rainbow-delimiters](https://github.com/HiPhish/rainbow-delimiters.nvim) in `vim.visuals.rainbow-delimiters`
116+
- Add [rainbow-delimiters](https://github.com/HiPhish/rainbow-delimiters.nvim)
117+
in `vim.visuals.rainbow-delimiters`
118+
- Add options to define highlights under [](#opt-vim.highlight)
106119

107120
[kaktu5](https://github.com/kaktu5):
108121

@@ -121,3 +134,8 @@
121134
[ruff]: (https://github.com/astral-sh/ruff)
122135

123136
- Add [ruff] as a formatter option in `vim.languages.python.format.type`.
137+
138+
[ARCIII](https://github.com/ArmandoCIII):
139+
140+
- Add `vim.languages.zig.dap` support through pkgs.lldb dap adapter. Code
141+
Inspiration from `vim.languages.clang.dap` implementation.

flake.lock

Lines changed: 25 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,11 @@
592592
flake = false;
593593
};
594594

595+
plugin-yanky-nvim = {
596+
url = "github:gbprod/yanky.nvim";
597+
flake = false;
598+
};
599+
595600
# Note-taking
596601
plugin-obsidian-nvim = {
597602
url = "github:epwalsh/obsidian.nvim";
@@ -642,7 +647,7 @@
642647
};
643648

644649
plugin-nvim-colorizer-lua = {
645-
url = "github:NvChad/nvim-colorizer.lua";
650+
url = "github:catgoose/nvim-colorizer.lua";
646651
flake = false;
647652
};
648653

modules/neovim/init/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
imports = [
33
./basic.nix
44
./debug.nix
5+
./highlight.nix
56
./spellcheck.nix
67
];
78
}

modules/neovim/init/highlight.nix

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
config,
3+
lib,
4+
...
5+
}: let
6+
inherit (lib.options) mkOption;
7+
inherit (lib.types) nullOr attrsOf listOf submodule bool ints str enum;
8+
inherit (lib.strings) hasPrefix concatLines;
9+
inherit (lib.attrsets) mapAttrsToList;
10+
inherit (lib.nvim.dag) entryBetween;
11+
inherit (lib.nvim.lua) toLuaObject;
12+
inherit (lib.nvim.types) hexColor;
13+
14+
mkColorOption = target:
15+
mkOption {
16+
type = nullOr hexColor;
17+
default = null;
18+
example = "#ebdbb2";
19+
description = ''
20+
The ${target} color to use. Written as color name or hex "#RRGGBB".
21+
'';
22+
};
23+
24+
mkBoolOption = name:
25+
mkOption {
26+
type = nullOr bool;
27+
default = null;
28+
example = false;
29+
description = "Whether to enable ${name}";
30+
};
31+
32+
cfg = config.vim.highlight;
33+
in {
34+
options.vim.highlight = mkOption {
35+
type = attrsOf (submodule {
36+
# See :h nvim_set_hl
37+
options = {
38+
bg = mkColorOption "background";
39+
fg = mkColorOption "foreground";
40+
sp = mkColorOption "special";
41+
blend = mkOption {
42+
type = nullOr (ints.between 0 100);
43+
default = null;
44+
description = "Blend as an integer between 0 and 100";
45+
};
46+
bold = mkBoolOption "bold";
47+
standout = mkBoolOption "standout";
48+
underline = mkBoolOption "underline";
49+
undercurl = mkBoolOption "undercurl";
50+
underdouble = mkBoolOption "underdouble";
51+
underdotted = mkBoolOption "underdotted";
52+
underdashed = mkBoolOption "underdashed";
53+
strikethrough = mkBoolOption "strikethrough";
54+
italic = mkBoolOption "italic";
55+
reverse = mkBoolOption "reverse";
56+
nocombine = mkBoolOption "nocombine";
57+
link = mkOption {
58+
type = nullOr str;
59+
default = null;
60+
description = "The name of another highlight group to link to";
61+
};
62+
default = mkOption {
63+
type = nullOr bool;
64+
default = null;
65+
description = "Don't override existing definition";
66+
};
67+
ctermfg = mkOption {
68+
type = nullOr str;
69+
default = null;
70+
description = "The cterm foreground color to use";
71+
};
72+
ctermbg = mkOption {
73+
type = nullOr str;
74+
default = null;
75+
description = "The cterm background color to use";
76+
};
77+
cterm = mkOption {
78+
type = nullOr (listOf (enum [
79+
"bold"
80+
"underline"
81+
"undercurl"
82+
"underdouble"
83+
"underdotted"
84+
"underdashed"
85+
"strikethrough"
86+
"reverse"
87+
"inverse"
88+
"italic"
89+
"standout"
90+
"altfont"
91+
"nocombine"
92+
"NONE"
93+
]));
94+
default = null;
95+
description = "The cterm arguments to use. See ':h highlight-args'";
96+
};
97+
force = mkBoolOption "force update";
98+
};
99+
});
100+
default = {};
101+
example = {
102+
SignColumn = {
103+
bg = "#282828";
104+
};
105+
};
106+
description = "Custom highlights to apply";
107+
};
108+
109+
config = {
110+
vim.luaConfigRC.highlight = let
111+
highlights =
112+
mapAttrsToList (
113+
name: value: ''vim.api.nvim_set_hl(0, ${toLuaObject name}, ${toLuaObject value})''
114+
)
115+
cfg;
116+
in
117+
entryBetween ["lazyConfigs" "pluginConfigs" "extraPluginConfigs"] ["theme"] (concatLines highlights);
118+
};
119+
}

modules/plugins/languages/ts.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
ls_sources,
8383
null_ls.builtins.formatting.prettier.with({
8484
command = "${cfg.format.package}/bin/prettier",
85-
filetypes = { "typescript" },
85+
filetypes = { "typescript", "javascript" },
8686
})
8787
)
8888
'';

0 commit comments

Comments
 (0)