about summary refs log tree commit diff
path: root/doc/languages-frameworks
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-03-19 09:41:32 +0100
committerNaïm Favier <n@monade.li>2022-03-25 00:12:02 +0100
commit7ab1fd262ffae10c85f4100027872d5954e60797 (patch)
tree2ea99f07fad9a9b3b65279e33da00518f50733c7 /doc/languages-frameworks
parent488869f602eea53e3fe08c89bdb655811877cde0 (diff)
vimUtils.makeCustomizable: rewrite to include more things
The current wrapper only includes vim, gvim and the man pages
(optionally). This rewrite distinguishes two scenarios, which I expect
cover the majority of use cases:

- standalone mode, when `name != "vim"`, means the user already has a
  vim in scope and only wants to add a customized version with a
  different name. In this case we only include wrappers for `/bin/*vim`.
- non-standalone mode, when `name == "vim"`, means the user expects a
  normal vim package that uses the specified configuration. In this case
  we include everything in the original derivation, with wrappers for
  all the executables that accept a vimrc.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r--doc/languages-frameworks/vim.section.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md
index a615d585b151c..04cb271a43be4 100644
--- a/doc/languages-frameworks/vim.section.md
+++ b/doc/languages-frameworks/vim.section.md
@@ -18,7 +18,7 @@ Adding custom .vimrc lines can be done using the following code:
 
 ```nix
 vim_configurable.customize {
-  # `name` specifies the name of the executable and package
+  # `name` optionally specifies the name of the executable and package
   name = "vim-with-plugins";
 
   vimrcConfig.customRC = ''
@@ -28,6 +28,9 @@ vim_configurable.customize {
 ```
 
 This configuration is used when Vim is invoked with the command specified as name, in this case `vim-with-plugins`.
+You can also omit `name` to customize Vim itself. See the
+[definition of `vimUtils.makeCustomizable`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-utils.nix#L408)
+for all supported options.
 
 For Neovim the `configure` argument can be overridden to achieve the same: