Commit graph

326 commits

Author SHA1 Message Date
Matt Sturgeon
b5efe91c52
lib/modules: remove explicit specialArgs.lib
`lib.evalModules` will do this internally anyway
2025-01-17 00:21:28 +00:00
Gaetan Lepage
91227dca9e lib/options: add defaultNullOpts.mkFloat 2025-01-04 00:15:16 +01:00
Gaetan Lepage
2e600f5796 lib/options: add defaultNullOpts.mkProportion 2025-01-03 23:31:37 +01:00
Gaetan Lepage
cbddd58c69 lib/maintainers: add jolars 2025-01-02 00:07:27 +01:00
Gaetan Lepage
caef39133f lib/options: mkAttrsOf, mkListOf, mkAttributeSet should accept raw values 2024-12-31 11:00:20 +01:00
Gaetan Lepage
c04dda021b lib/options/mkRaw: automatically convert example strings to rawLua type 2024-12-31 00:10:49 +01:00
Gaetan Lepage
7500425d31 lib/options/mkRaw': handle pluginDefault=null 2024-12-27 23:36:04 +00:00
Heitor Augusto
1671f8618f lib/mk-neovim-plugin: allow lazy-loading without luaConfig 2024-12-26 23:12:15 +00:00
Heitor Augusto
f878289722 lib/plugins: make plugin optional when lazy-loading 2024-12-26 23:00:27 +00:00
Matt Sturgeon
9487403532
modules/context: flake option, provides access to our flake 2024-12-23 12:18:06 +00:00
Matt Sturgeon
6f45ca4a22
lib/modules: flake is now required 2024-12-23 11:55:32 +00:00
Matt Sturgeon
403d5e23c5
lib/modules: remove assertion message for removed check arg 2024-12-23 11:54:35 +00:00
Gaetan Lepage
f1b5c2c593 lib/tests: remove deprecated dontRun 2024-12-23 10:23:39 +00:00
Matt Sturgeon
aefab28b3b
lib/overlay: init
The overlay allows extending any instance of nixpkgs-lib into a
nixvim-compatible "extended" instance.
2024-12-23 09:58:54 +00:00
Matt Sturgeon
214731d355
lib/plugins: deprecate neovim-plugin & vim-plugin aliases 2024-12-22 10:29:38 +00:00
Matt Sturgeon
787844cfe4
lib/plugins: call sub-components with relevant args 2024-12-22 09:35:16 +00:00
Matt Sturgeon
690fc895b5
lib/plugins: extract common logic for package options
Adds `mkPluginPackageModule`.
2024-12-22 09:35:16 +00:00
Matt Sturgeon
896f6be694
lib/plugins: take ownership of modules utils
These util functions were previously defined in `modules`, but
`plugins.utils` is a better home.
2024-12-22 09:35:16 +00:00
Matt Sturgeon
ec97297fd5
lib/plugins: separate main factory functions 2024-12-22 09:35:16 +00:00
Matt Sturgeon
88a1c1b46a
lib/plugins: organise plugin-factory functions in a subdir 2024-12-22 09:35:15 +00:00
Matt Sturgeon
4b3b67fb6f
lib: make overrideable & access via flake
Add a non-system specific `<flake>.lib.nixvim` output, which is
equivalent to the existing `<flake>.lib.<system>.helpers` output.

This is now also wrapped with `lib.makeOverridable` to allow overriding
the function args used to construct the nixvim-lib.

Consistently access nixvim-lib via the new flake output, overriding
where necessary.
2024-12-21 15:17:43 +00:00
Matt Sturgeon
e2ef15a665
lib: add extend function 2024-12-21 15:14:30 +00:00
Matt Sturgeon
f1addaaddf
lib/{neovim,vim}-plugin: remove redundant parens 2024-12-18 20:12:01 +00:00
Matt Sturgeon
6019ce784c
lib/{neovim,vim}-plugin: use loc throughout 2024-12-18 19:47:37 +00:00
Gaetan Lepage
167167e4b3 lib/vim-plugin: expose new helpers settingsOptionDescription and processPrefixedGlobals and mkSettingsOption 2024-12-17 22:46:34 +01:00
Gaetan Lepage
1d50fa4f63 lib: add applyPrefixToAttrs 2024-12-17 21:40:20 +00:00
Gaetan Lepage
0ddf6e39ac lib/mkSettingsRenamedOptionModules: allow attrs value with 'old' and 'new' keys 2024-12-16 10:49:09 +00:00
Matt Sturgeon
bef9feb446
lib/modules: pass inputs.nixpkgs into evalNixvim
Expose our locked nixpkgs as the `nixpkgs.source` module options.

This only happens when `evalNixvim` is part of a lib that was provided
`flake` as an argument.

Stubbed the `nixpkgs.source` option for now. Eventually, this will be
used to construct `pkgs` internally. For now, it's purely informational.
2024-12-15 18:41:23 +00:00
Matt Sturgeon
32027965d8
lib: remove dependency on pkgs 2024-12-15 18:24:57 +00:00
Austin Horstman
63c81b1778
lib/options: mkLazyLoadOption: packPathName -> name 2024-12-13 21:30:36 -06:00
Austin Horstman
c37031d71f
treewide: luaName -> moduleName
Jus to closer align with its usage.
2024-12-13 21:30:36 -06:00
Austin Horstman
a7012e7864
treewide: originalName -> packPathName
We used to only think of it as the plugin repo's name, but we have been
needing to use it for the name of the plugin's packpath location.
2024-12-13 21:29:00 -06:00
Matt Sturgeon
6a192a8604
lib/neovim-plugin: allow configLocation to be wrapped using mkOrder 2024-12-14 02:39:44 +00:00
Austin Horstman
0997b371c7
lib/neovim-plugin: freeform lazy settings
Instead of trying to manage upstream configuration options, just keep
using our freeform options so we can do less finicky logic and
workarounds.
2024-12-10 10:07:38 -06:00
Austin Horstman
c3f9cb721c
lib/neovim-plugin: refactor mkLazyLoadOption 2024-12-10 10:07:38 -06:00
Austin Horstman
3cfde1554c
lib/neovim-plugin: support lz-n lazy config 2024-12-10 08:28:16 -06:00
Austin Horstman
da30527de1
lib/neovim-plugin: use mkLazyLoadOption 2024-12-10 08:28:16 -06:00
psfloyd
6ed719dba8
lib/options: added mkLazyLoadOption 2024-12-10 08:28:16 -06:00
Austin Horstman
301868d380
lib/neovim-plugin: support lazy loading luaConfig.content 2024-12-10 08:28:16 -06:00
Gaetan Lepage
cf7e026c8c mkNeovimPlugin: refactor lua code generation logic 2024-12-09 21:43:12 +00:00
Gaetan Lepage
ae78face8d
treewide: format with latest nixfmt 2024-12-06 15:25:27 +00:00
347Online | Katie Janzen
8507b01e0c lib/maintainers: add 347Online 2024-11-25 17:49:55 -06:00
Matt Sturgeon
63cfc84abe
lib/modules: add applyExtraConfig
Used for
- mkVimPlugin: extraConfig
- mkNeovimPlugin: extraConfig
- mkLsp: extraConfig
- mkLsp: settings
- mkExtension (telecsope): extraConfig
2024-11-20 20:55:16 +00:00
Matt Sturgeon
587b1cbf21
lib/types: allow inline-lua in rawLua type 2024-11-16 17:20:11 +00:00
Matt Sturgeon
be455f7f27
lib/options: use literalLua for defaultNullOpts.mkRaw 2024-11-15 21:46:25 +00:00
Matt Sturgeon
da6e3499d4
lib/utils: add nestedLiteral and nestedLiteralLua
`nestedLiteral` converts a `literalExpression` into a `toPretty` style
pretty-printer.

`nestedLiteralLua` composes `nestedLiteral` and `literalLua` together.
2024-11-15 21:46:25 +00:00
Matt Sturgeon
eb76e62a9b
lib/utils: add literalLua for use in option docs
Creates a `literalExpression` equivalent to using `lib.nixvim.mkRaw`.
2024-11-15 21:46:25 +00:00
Matt Sturgeon
de99f2938f
lib/{vim,neovim}-plugin: installPackage -> packageDecorator
Replace `mkNeovimPlugin`'s `installPackage` parameter with a new
internal module option: `packageDecorator`.

The option is a function that applies some transformation to
`cfg.package`'s value before it is installed.
2024-11-15 21:44:59 +00:00
bpatel347
f8b3f16556 maintainers: add BoneyPatel 2024-11-15 07:27:48 +00:00
Gaetan Lepage
ccae4350d0 options: add defaultNullOpts.mkRaw 2024-11-13 23:38:31 +01:00