Commit graph

28 commits

Author SHA1 Message Date
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