vim: move to neovim

This commit is contained in:
kat witch 2021-08-23 00:10:26 +01:00
parent 88721ea1cb
commit 31d35be90f
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
3 changed files with 32 additions and 57 deletions

View file

@ -1,15 +1,16 @@
{ config, lib, pkgs, ... }:
{
home.sessionVariables.EDITOR = "vim";
programs.vim = {
home.sessionVariables.EDITOR = "nvim";
programs.neovim = {
enable = true;
settings = { };
package = pkgs.vim_configurable-pynvim;
#withPython3 = true;
extraConfig = import ./vimrc.nix { inherit pkgs config; };
vimAlias = true;
viAlias = true;
plugins = with pkgs.vimPlugins; [
nerdtree
vim-nix
notmuch-vim
rust-vim
coc-nvim
coc-rust-analyzer
@ -27,33 +28,23 @@
vim-lastplace
base16-vim
];
#extraPackages = with pkgs;
# [ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; };
};
xdg.dataFile = {
"vim/undo/.keep".text = "";
"vim/swap/.keep".text = "";
"vim/backup/.keep".text = "";
};
xdg.configFile = {
"vim/coc/coc-settings.json".text = builtins.toJSON {
"rust.rustfmt_path" = "${pkgs.rustfmt}/bin/rustfmt";
"rust-analyzer.serverPath" = "rust-analyzer";
"rust-analyzer.updates.prompt" = false;
"rust-analyzer.notifications.cargoTomlNotFound" = false;
"rust-analyzer.notifications.workspaceLoaded" = false;
"rust-analyzer.procMacro.enable" = true;
"rust-analyzer.cargo.loadOutDirsFromCheck" = true;
"rust-analyzer.cargo-watch.enable" =
true;
"rust-analyzer.completion.addCallParenthesis" =
false; # consider using this?
"rust-analyzer.hoverActions.linksInHover" = true;
"rust-analyzer.diagnostics.disabled" = [
"inactive-code" # it has strange cfg support..?
];
coc = {
enable = true;
settings = {
"rust.rustfmt_path" = "${pkgs.rustfmt}/bin/rustfmt";
"rust-analyzer.serverPath" = "rust-analyzer";
"rust-analyzer.updates.prompt" = false;
"rust-analyzer.notifications.cargoTomlNotFound" = false;
"rust-analyzer.notifications.workspaceLoaded" = false;
"rust-analyzer.procMacro.enable" = true;
"rust-analyzer.cargo.loadOutDirsFromCheck" = true;
"rust-analyzer.cargo-watch.enable" = true;
"rust-analyzer.completion.addCallParenthesis" = false; # consider using this?
"rust-analyzer.hoverActions.linksInHover" = true;
"rust-analyzer.diagnostics.disabled" = [
"inactive-code" # it has strange cfg support..?
];
};
};
};
}