Vim: Difference between revisions
Starfish2228 (talk | contribs) Replace vim_configurable with vim-full |
Replace dead link. |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 58: | Line 58: | ||
<!--T:11--> | <!--T:11--> | ||
You can configure home-manager to install spelling files into your user directory by packaging individual spell files. Here' an example for neovim and French: | You can configure home-manager to install spelling files into your user directory by packaging individual spell files. Here' an example for [[neovim]] and French: | ||
</translate> | </translate> | ||
| Line 107: | Line 107: | ||
</translate> | </translate> | ||
< | <syntaxhighlight lang="nix"> | ||
{ pkgs, ... }: | { pkgs, ... }: | ||
{ | { | ||
| Line 113: | Line 113: | ||
enable = true; | enable = true; | ||
defaultEditor = true; | defaultEditor = true; | ||
package = (pkgs. | package = (pkgs.vim-full.override { }).customize{ | ||
name = "vim"; | name = "vim"; | ||
<translate> | <translate> | ||
| Line 140: | Line 140: | ||
}; | }; | ||
} | } | ||
</ | </syntaxhighlight> | ||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> | ||
{ pkgs, ... }: | { pkgs, ... }: | ||
| Line 191: | Line 191: | ||
<!--T:27--> | <!--T:27--> | ||
A lot of documentation about package management and configuration of vim in nix is stored at [https://github.com/NixOS/nixpkgs/blob/master/ | A lot of documentation about package management and configuration of vim in nix is stored at [https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/vim.section.md] in nixpkgs. | ||
=== Customizations === <!--T:28--> | === Customizations === <!--T:28--> | ||
| Line 202: | Line 202: | ||
</translate> | </translate> | ||
< | <syntaxhighlight lang="nix"> | ||
{ | { | ||
packageOverrides = pkgs: with pkgs; { | packageOverrides = pkgs: with pkgs; { | ||
myVim = | myVim = vim-full.customize { | ||
name = "vim-with-plugins"; | name = "vim-with-plugins"; | ||
<translate> | <translate> | ||
| Line 232: | Line 232: | ||
}; | }; | ||
} | } | ||
</ | </syntaxhighlight> | ||
<translate> | <translate> | ||
| Line 246: | Line 246: | ||
</translate> | </translate> | ||
< | <syntaxhighlight lang="nix"> | ||
vim-full.customize { | |||
name = "vim-with-plugins"; | name = "vim-with-plugins"; | ||
<translate> | <translate> | ||
| Line 258: | Line 258: | ||
''; | ''; | ||
} | } | ||
</ | </syntaxhighlight> | ||
<translate> | <translate> | ||
| Line 267: | Line 267: | ||
</translate> | </translate> | ||
< | <syntaxhighlight lang="nix"> | ||
vim-full.customize { | |||
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { | vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { | ||
<translate> | <translate> | ||
| Line 287: | Line 287: | ||
} | } | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
<translate> | <translate> | ||
| Line 329: | Line 329: | ||
</translate> | </translate> | ||
< | <syntaxhighlight lang="nix"> | ||
let | let | ||
vim-better-whitespace = pkgs.vimUtils.buildVimPlugin { | vim-better-whitespace = pkgs.vimUtils.buildVimPlugin { | ||
| Line 342: | Line 342: | ||
in { | in { | ||
users.users.<yourNickname>.packages = [ | users.users.<yourNickname>.packages = [ | ||
(pkgs. | (pkgs.vim-full.customize { | ||
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { | vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { | ||
start = [ vim-better-whitespace ]; | start = [ vim-better-whitespace ]; | ||
| Line 349: | Line 349: | ||
]; | ]; | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
<translate> | <translate> | ||
| Line 411: | Line 411: | ||
<!--T:59--> | <!--T:59--> | ||
The following snippet will make a full featured python IDE. | The following snippet will make a full featured [[python]] IDE. | ||
==== Using language client ==== <!--T:60--> | ==== Using language client ==== <!--T:60--> | ||
</translate> | </translate> | ||
< | <syntaxhighlight lang="nix"> | ||
vim-full.customize { | |||
vimrcConfig = { | vimrcConfig = { | ||
customRC = '' | customRC = '' | ||
| Line 435: | Line 435: | ||
} | } | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
<translate> | <translate> | ||