Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions doc/languages-frameworks/vim.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ At the moment we support three different methods for managing plugins:
Adding custom .vimrc lines can be done using the following code:

```nix
vim_configurable.customize {
vim-configurable.customize {
# `name` specifies the name of the executable and package
name = "vim-with-plugins";

Expand Down Expand Up @@ -61,7 +61,7 @@ neovim-qt.override {
To store you plugins in Vim packages (the native Vim plugin manager, see `:help packages`) the following example can be used:

```nix
vim_configurable.customize {
vim-configurable.customize {
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
start = [ youcompleteme fugitive ];
Expand Down Expand Up @@ -100,7 +100,7 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n
```nix
{
packageOverrides = pkgs: with pkgs; {
myVim = vim_configurable.customize {
myVim = vim-configurable.customize {
# `name` specifies the name of the executable and package
name = "vim-with-plugins";
# add here code from the example section
Expand Down Expand Up @@ -187,7 +187,7 @@ To use [vim-plug](https://github.com/junegunn/vim-plug) to manage your Vim
plugins the following example can be used:

```nix
vim_configurable.customize {
vim-configurable.customize {
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
plug.plugins = [ youcompleteme fugitive phpCompletion elm-vim ];
Expand Down Expand Up @@ -237,7 +237,7 @@ Create a default.nix file:

```nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }
nixpkgs.vim-configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }
```

Create a generate.vim file:
Expand Down Expand Up @@ -266,7 +266,7 @@ You can add your Vim to your system's configuration file like this and start it
my-vim =
let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
copy paste output1 here
}; in vim_configurable.customize {
}; in vim-configurable.customize {
name = "vim-my";

vimrcConfig.vam.knownPlugins = plugins; # optional
Expand Down
7 changes: 7 additions & 0 deletions nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1966,6 +1966,13 @@ Superuser created successfully.
<literal>1.5.4</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>vim_configurable</literal> has been renamed to
<literal>vim-configurable</literal>,
<literal>vim_configurable</literal> is now an alias to it.
</para>
</listitem>
</itemizedlist>
</section>
</section>
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2111.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,3 +539,5 @@ In addition to numerous new and upgraded packages, this release has the followin
- Loki has had another release. Some default values have been changed for the configuration and some configuration options have been renamed. For more details, please check [the upgrade guide](https://grafana.com/docs/loki/latest/upgrading/#240).

- `julia` now refers to `julia-stable` instead of `julia-lts`. In practice this means it has been upgraded from `1.0.4` to `1.5.4`.

- `vim_configurable` has been renamed to `vim-configurable`, `vim_configurable` is now an alias to it.
2 changes: 1 addition & 1 deletion pkgs/applications/editors/neovim/tests.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ vimUtils, vim_configurable, writeText, neovim, vimPlugins
{ vimUtils, vim-configurable, writeText, neovim, vimPlugins
, lib, fetchFromGitHub, neovimUtils, wrapNeovimUnstable
, neovim-unwrapped
, fetchFromGitLab
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/spacevim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, git
, fzf
, makeWrapper
, vim_configurable
, vim-configurable
, vimPlugins
, fetchFromGitHub
, lib
Expand All @@ -14,7 +14,7 @@

let
format = formats.toml { };
vim-customized = vim_configurable.customize {
vim-customized = vim-configurable.customize {
name = "vim";
# Not clear at the moment how to import plugins such that
# SpaceVim finds them and does not auto download them to
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/editors/vim/configurable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ let

in stdenv.mkDerivation rec {

pname = "vim_configurable";
pname = "vim-configurable";

inherit (common) version postPatch hardeningDisable enableParallelBuilding meta;

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vim/macvim-configurable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ let
makeCustomizable = macvim: macvim // {
# configure expects the same args as vimUtils.vimrcFile.
# This is the same as the value given to neovim.override { configure = … }
# or the value of vim_configurable.customize { vimrcConfig = … }
# or the value of vim-configurable.customize { vimrcConfig = … }
#
# Note: Like neovim and vim_configurable, configuring macvim disables the
# Note: Like neovim and vim-configurable, configuring macvim disables the
# sourcing of the user's vimrc. Use `customRC = "source $HOME/.vim/vimrc"`
# if you want to preserve that behavior.
configure = let
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vim/vimacs.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ lib, stdenv, config, vim_configurable, macvim, vimPlugins
{ lib, stdenv, config, vim-configurable, macvim, vimPlugins
, useMacvim ? stdenv.isDarwin && (config.vimacs.macvim or true)
, vimacsExtraArgs ? "" }:

stdenv.mkDerivation rec {
pname = "vimacs";
version = lib.getVersion vimPackage;
vimPackage = if useMacvim then macvim else vim_configurable;
vimPackage = if useMacvim then macvim else vim-configurable;

buildInputs = [ vimPackage vimPlugins.vimacs ];

Expand Down
8 changes: 4 additions & 4 deletions pkgs/misc/vim-plugins/vim-utils.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# tests available at pkgs/test/vim
{ lib, stdenv, vim, vimPlugins, vim_configurable, buildEnv, writeText, writeScriptBin
{ lib, stdenv, vim, vimPlugins, vim-configurable, buildEnv, writeText, writeScriptBin
, nix-prefetch-hg, nix-prefetch-git
, fetchFromGitHub, runtimeShell
, hasLuaModule
Expand All @@ -15,7 +15,7 @@ USAGE EXAMPLE
Install Vim like this eg using nixos option environment.systemPackages which will provide
vim-with-plugins in PATH:

vim_configurable.customize {
vim-configurable.customize {
name = "vim-with-plugins";

# add custom .vimrc lines like this:
Expand Down Expand Up @@ -128,7 +128,7 @@ fitting the vimrcConfig.vam.pluginDictionaries option.
Thus the most simple usage would be:

vim_with_plugins =
let vim = vim_configurable;
let vim = vim-configurable;
inherit (vimUtil.override {inherit vim}) rtpPath addRtp buildVimPlugin vimHelpTags;
vimPlugins = [
# the derivation list from the buffer created by nix#ExportPluginsForNix
Expand Down Expand Up @@ -461,7 +461,7 @@ rec {
overrideAttrs = f: makeCustomizable (vim.overrideAttrs f);
};

pluginnames2Nix = {name, namefiles} : vim_configurable.customize {
pluginnames2Nix = {name, namefiles} : vim-configurable.customize {
inherit name;
vimrcConfig.vam.knownPlugins = vimPlugins;
vimrcConfig.vam.pluginDictionaries = ["vim2nix"];
Expand Down
14 changes: 7 additions & 7 deletions pkgs/test/vim/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ vimUtils, vim_configurable, writeText, vimPlugins
{ vimUtils, vim-configurable, writeText, vimPlugins
, lib, fetchFromGitHub
, pkgs
}:
Expand All @@ -13,27 +13,27 @@ in

### vim tests
##################
vim_with_vim2nix = vim_configurable.customize {
vim_with_vim2nix = vim-configurable.customize {
name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ];
};

# test cases:
test_vim_with_vim_nix_using_vam = vim_configurable.customize {
test_vim_with_vim_nix_using_vam = vim-configurable.customize {
name = "vim-with-vim-addon-nix-using-vam";
vimrcConfig.vam.pluginDictionaries = [{name = "vim-nix"; }];
};

test_vim_with_vim_nix_using_pathogen = vim_configurable.customize {
test_vim_with_vim_nix_using_pathogen = vim-configurable.customize {
name = "vim-with-vim-addon-nix-using-pathogen";
vimrcConfig.pathogen.pluginNames = [ "vim-nix" ];
};

test_vim_with_vim_nix_using_plug = vim_configurable.customize {
test_vim_with_vim_nix_using_plug = vim-configurable.customize {
name = "vim-with-vim-addon-nix-using-plug";
vimrcConfig.plug.plugins = with vimPlugins; [ vim-nix ];
};

test_vim_with_vim_nix = vim_configurable.customize {
test_vim_with_vim_nix = vim-configurable.customize {
name = "vim-with-vim-addon-nix";
vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ];
};
Expand All @@ -42,7 +42,7 @@ in
# The user may have specified their own plugins which may not be formatted
# exactly as the generated ones. In particular, they may not have the `pname`
# attribute.
test_vim_with_custom_plugin = vim_configurable.customize {
test_vim_with_custom_plugin = vim-configurable.customize {
name = "vim_with_custom_plugin";
vimrcConfig.vam.knownPlugins =
vimPlugins // ({
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ mapAliases ({
vdirsyncerStable = vdirsyncer; # added 2020-11-08, see https://github.com/NixOS/nixpkgs/issues/103026#issuecomment-723428168
vimbWrapper = vimb; # added 2015-01
vimprobable2 = throw "vimprobable2 has been removed from nixpkgs. It relied on webkitgtk24x that has been removed."; # added 2019-12-05
vim_configurable = vim-configurable; # added 2021-11-10
vimprobable2-unwrapped = vimprobable2; # added 2019-12-05
virtviewer = virt-viewer; # added 2015-12-24
virtmanager = virt-manager; # added 2019-10-29
Expand Down
8 changes: 4 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23970,7 +23970,7 @@ with pkgs;
assign-lb-ip = callPackage ../applications/networking/cluster/assign-lb-ip { };

astroid = callPackage ../applications/networking/mailreaders/astroid {
vim = vim_configurable.override { features = "normal"; gui = "auto"; };
vim = vim-configurable.override { features = "normal"; gui = "auto"; };
};

aucatctl = callPackage ../applications/audio/aucatctl { };
Expand Down Expand Up @@ -28712,16 +28712,16 @@ with pkgs;

macvim = callPackage ../applications/editors/vim/macvim-configurable.nix { stdenv = clangStdenv; };

vimHugeX = vim_configurable;
vimHugeX = vim-configurable;

vim_configurable = vimUtils.makeCustomizable (callPackage ../applications/editors/vim/configurable.nix {
vim-configurable = vimUtils.makeCustomizable (callPackage ../applications/editors/vim/configurable.nix {
inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa Foundation CoreData;
inherit (darwin) libobjc;
gtk2 = if stdenv.isDarwin then gtk2-x11 else gtk2;
gtk3 = if stdenv.isDarwin then gtk3-x11 else gtk3;
});

vim-darwin = (vim_configurable.override {
vim-darwin = (vim-configurable.override {
config = {
vim = {
gui = "none";
Expand Down