Commit graph

33 commits

Author SHA1 Message Date
Matt Sturgeon
f7e009d29e
lib/options: add mkEnum' argument assertions 2024-06-02 03:18:11 +01:00
Matt Sturgeon
a2443ac0d6
lib/options: add more defaultNullOpts 'variants
All `defaultNullOpts` functions now have a prime variant.
2024-06-02 03:18:10 +01:00
Matt Sturgeon
87d6654a9f
lib/options: remove mkStr assert
If a non-string is passed in, it'll be formatted here. This is okay
because `mkDesc` will not re-format anyway.
2024-06-01 15:08:14 +01:00
Matt Sturgeon
297aa6d0a2
lib/options: make mkPackageOption use mkNullOrOption' 2024-06-01 14:33:43 +01:00
Matt Sturgeon
1bb4cb9c6c
lib/options: add mkAttrsOf' & mkListOf' (etc) 2024-06-01 14:33:43 +01:00
Matt Sturgeon
e0b60bac8b
lib/options: add mkNullableWithRaw' variant 2024-06-01 14:33:42 +01:00
Matt Sturgeon
84b2b0d90c
lib/options: add mkNullable' variant 2024-06-01 14:33:42 +01:00
Matt Sturgeon
ed56221499
lib/options: add mkNullOrStrLuaFnOr' variant 2024-06-01 14:33:42 +01:00
Matt Sturgeon
5bcb6184b0
lib/options: add mkNullOrStrLuaOr' variant 2024-06-01 14:33:41 +01:00
Matt Sturgeon
56ee982cb4
lib/options: add mkNullOrLuaFn' variant 2024-06-01 14:33:41 +01:00
Matt Sturgeon
207bfc6e69
lib/options: add mkNullOrLua' variant 2024-06-01 14:33:41 +01:00
Matt Sturgeon
3a151bbf09
lib/options: add mkNullOrStr' variant 2024-06-01 14:33:41 +01:00
Matt Sturgeon
9bf7724b98
lib/options: add mkCompositeOption' variant 2024-06-01 14:33:40 +01:00
Matt Sturgeon
fc542329cd
lib/options: add mkNullOrOption' variant 2024-06-01 14:33:40 +01:00
Matt Sturgeon
57003fea4e
lib/options: inline mkDefaultDesc into mkDesc
And add function documentation.
2024-06-01 14:33:40 +01:00
Matt Sturgeon
51240cef0e
lib/options: defaultNullOpts delegate string rendering 2024-05-30 14:27:37 +01:00
Matt Sturgeon
ff1ab1700c
lib/options: mkEnum quote default if string
As there's only a handful of call-sites to fix, ensure all `mkEnum`
defaults are passed in as the correct type (tree wide) and change
`mkEnum` to now correctly render string-type defaults "quoted" (like
`mkString` does).
2024-05-30 14:27:37 +01:00
Matt Sturgeon
b113bc69ea
lib/options: mkStr quote default string 2024-05-29 09:50:03 +01:00
Matt Sturgeon
cedc1e4799
lib/options: use code-block for multiline defaults
Detect whether a plugin default is multiline using `hasInfix "\n"`.

Also remove `multiline=false` from the `toPretty` call.
2024-05-29 09:25:55 +01:00
Matt Sturgeon
daa6b0f5cf
lib/options: defaultNullOpts support non-string defaults 2024-05-28 20:16:17 +01:00
Gaetan Lepage
7c4fe30f81 lib/options: introduce new mkPackageOption for dependencies 2024-05-17 22:15:47 +02:00
Gaetan Lepage
26367692da lib/options: rename mkPackageOption to mkPluginPackageOption 2024-05-17 22:15:47 +02:00
Gaetan Lepage
3766e36335 lib/options: change "default: ..." to "Plugin default: ..." 2024-05-17 15:03:21 +02:00
Gaetan Lepage
7697a1cc5a lib/options: refactor 2024-05-17 15:03:21 +02:00
Gaetan Lepage
72ff1489c7 lib/options: make use of previously unused mkNullableWithRaw internally 2024-05-16 22:36:51 +02:00
traxys
62f32bfc71 treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
Gaetan Lepage
d348bb3e03 lib/types: factor out logLevel enum for standalone use 2024-04-07 11:30:24 +02:00
Gaetan Lepage
bd6e7e969e helpers/vim-plugin/mkVimPlugin: remove useless 'with types;' 2024-02-13 10:34:49 +01:00
Gaetan Lepage
e3e14dbe1d helpers/options: add mkSettingsOption 2024-02-12 18:46:13 +01:00
Gaetan Lepage
06e4a4e0c8 helpers/options: allow raw values for border options 2024-02-03 12:45:36 +01:00
Gaetan Lepage
e2c3459d1d lib/helpers: extraOptionsOptions -> neovim-plugin.extraOptionsOptions 2024-01-28 23:39:14 +01:00
Gaetan Lepage
7164a89f72 lib/helpers: factor out nixvimUtils 2024-01-25 17:05:03 +01:00
Gaetan Lepage
98dbe8a89b lib/helpers: internal refactoring 2024-01-25 16:38:59 +01:00