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
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
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
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
Matt Sturgeon
cd76b4feb8
lib: remove helpers
from internal usage
2024-09-29 14:41:41 +01:00
Matt Sturgeon
2f49c76a6a
lib: remove nixvimTypes
alias
2024-09-27 08:31:07 +01:00
Quentin Boyer
d2f9e011d9
lib/neovim-plugin: Add lua configuration scoped to the plugin
...
This commit adds a `plugins.<name>.luaConfig` section controlling the
plugin specific configuration.
The section contains the internal `init` option, containing the plugin's
initialization code.
It also contains the public `pre` and `post` options, that allow to add
code before & after the `init` section
Finally, it contains the `final` option, being the concatenation of the
three previous options.
2024-09-22 16:15:27 +00:00
Austin Horstman
35788bbc5a
lib: cleanup with lib
2024-09-03 22:12:33 -05:00
Matt Sturgeon
1fd4b6c739
plugins: migrate defaultPackage
-> package
...
Migrate all users of `mkVimPlugin` and `mkNeovimPlugin` to use the new
`package` argument instead of the old `defaultPackage` argument.
2024-09-04 03:29:34 +01:00
Matt Sturgeon
285f6cbd7b
lib/*-plugin: use lib.mkPackageOption
internally
...
Instead of maintainers providing an actual `defaultPackage`, they should
specify the pkg name which we'll use when calling `lib.mkPackageOption`.
This makes `mkVimPlugin` and `mkNeovimPlugin` compliant with #1950 .
2024-09-04 03:07:49 +01:00
Matt Sturgeon
18b7597e6c
lib/neovim-plugin: drop config
arg
2024-09-02 10:35:52 +01:00
Austin Horstman
db4c4e5b17
lib/deprecation: expose mkSettingsRenamedOptionModules
publicly
...
Extracted the `optionsRenamedToSettings` implementation
from`mkVimPlugin` and `mkNeovimPlugin` into a new public helper.
2024-08-14 11:20:17 +00:00
Matt Sturgeon
0e98d9cf1e
lib/helpers: build recursively
2024-07-28 22:30:11 +01:00
Stanislav Asunkin
9317537848
modules: avoid setting empty strings to extraConfig* options
...
Problem: Some modules are setting empty strings to extraConfig* options
with the intention to not generate any config. But empty
strings are also values, so they are still concatenated in the
final value of extraConfig* options. This results in a
multiple empty strings in extraConfigs.
Solution: Avoid using optionalString when setting values to extraConfig*
options. Use mkIf instead.
This commit also fixes mkIf condition in autocmd module.
`mkNeovimPlugin` is a special case. To avoid evaluating
caller's arguments mkMerge/optionalAttrs pattern is used
instead.
2024-07-22 23:18:53 +02:00
Matt Sturgeon
843fb302eb
lib/neovim-plugin: allow disabling installPackage
...
Some plugins may wish to handle package installation themselves.
2024-07-06 13:01:07 +01:00
Matt Sturgeon
7c35bdb3f7
lib/neovim-plugin: allow overriding settings description
...
- The `setup` function name can be overridden with `setup`
(default ".setup")
- The entire `settings` option description can be overridden with
`settingsDescription`
- `luaName` and `setup` are used in the default description
2024-06-28 22:58:31 +01:00
Matt Sturgeon
c351c175ec
lib/neovim-plugin: support not having settings
...
Allow callers to explicitly set `settingsOptions = null` to disable
creating the `settings` option.
`settingsOptions` still defaults to `{ }`.
2024-06-28 22:58:30 +01:00
Matt Sturgeon
f34fda8d99
meta: extend meta.nixvimInfo
support treewide
...
Rather than supplying a `kind` and `name` pair, we now supply a raw
path.
This path could point to any nixvim option.
2024-06-07 22:22:55 +01:00
Gaetan Lepage
ef63d3477f
colorschemes: set the colorscheme as mkDefault to allow for overriding
2024-05-28 21:30:43 +02:00
Gaetan Lepage
26367692da
lib/options: rename mkPackageOption to mkPluginPackageOption
2024-05-17 22:15:47 +02:00
traxys
62f32bfc71
treewide: Reformat with nixfmt
2024-05-05 22:00:40 +02:00
Gaetan Lepage
848543d527
docs: optionally add a description to plugins
2024-03-22 13:15:41 +01:00
Gaetan Lepage
cf7102c6d2
helpers: refactor mk[Neo]vimPlugin for colorschemes handling
2024-03-12 23:00:17 +01:00
Gaetan Lepage
3c9a4b67ae
helpers/neovim-plugin/mkNeovimPlugin: add a colorscheme argument and factor out logic
2024-03-12 20:34:31 +01:00
Gaetan Lepage
9d4d529ee7
helpers/neovim-plugin/mkNeovimPlugin: allow lists in optionsRenamedToSettings
2024-02-22 10:11:19 +01:00
traxys
82a24d0d42
docs: Allow to add an url in the online documentation ( #1139 )
...
* plugin/committia: Use correct maintainers import
* plugins/neocord: Remove redyf as the entry is not in the list
* docs: Allow to add an URL to the plugin
2024-02-20 21:20:59 +01:00
Gaetan Lepage
6974a6a200
helpers/neovim-plugin/mkNeovimPlugin: fix typo for deprecateExtraOptions
2024-02-19 08:30:28 +01:00
Gaetan Lepage
efdd9f2688
helpers/neovim-plugin/mkNeovimPlugin: add deprecateExtraConfig and optionsRenamedToSettings options
2024-02-18 13:51:17 +01:00
Gaetan Lepage
7f57d0b1b8
helpers/neovim-plugin/mkNeovimPlugin: add callSetup option (default true)
2024-02-18 13:51:17 +01:00
Gaetan Lepage
44949348cb
helpers/neovim-plugin: add mkNeovimPlugin
2024-02-14 09:53:29 +01:00
Gaetan Lepage
100876b7a3
helpers/neovim-plugin: make use of helpers.mkSettingsOption
2024-02-12 18:46:13 +01:00
Gabriel Arazas
0b5800a2a2
docs: clean up descriptions ( #1061 )
2024-02-11 13:51:34 +01:00
Gaetan Lepage
2e18333dd2
helpers/neovim-plugin/mkSettingsOption: fix typo
2024-02-07 14:23:58 +01:00
Gaetan Lepage
ac0ef61339
helpers/neovim-plugin: mkSetupOptionsOption -> mkSettingsOption
2024-02-02 10:42:38 +01:00
Gaetan Lepage
43f3cb7ab2
lib/helpers: init neovim-plugin.mkSetupOptionsOption
2024-01-28 23:39:14 +01:00
Gaetan Lepage
e2c3459d1d
lib/helpers: extraOptionsOptions -> neovim-plugin.extraOptionsOptions
2024-01-28 23:39:14 +01:00