Files
nixos/home/modules/baseline/vim.nix
T

127 lines
2.8 KiB
Nix
Raw Normal View History

2022-04-18 11:38:06 -05:00
{ pkgs, ... }:
let
vim-stabs = pkgs.vimUtils.buildVimPlugin {
name = "vim-stabs";
src = pkgs.fetchFromGitHub {
owner = "Thyrum";
repo = "vim-stabs";
rev = "4654d4e000680e1f608b40f155af08873446ed63";
sha256 = "0hi1c5zv38hwxbyrf11fz97r728jgbppz4is7fwzwhfrzhwbw0ga";
};
};
2022-11-14 23:49:23 -06:00
vim-xonsh = pkgs.vimUtils.buildVimPlugin {
name = "vim-xonsh";
src = pkgs.fetchFromGitHub {
owner = "meatballs";
repo = "vim-xonsh";
rev = "2028aac";
sha256 = "sha256-0+dqtlz8LeyOoSiS12rv8aLdzOMj31PuYAyDYWnpNzw=";
};
};
2022-04-18 11:38:06 -05:00
in
{
2023-06-15 15:37:57 -05:00
home.packages = with pkgs; [
ansible-language-server
pyright
];
2024-06-10 11:06:04 -05:00
programs.nixvim = {
2022-04-18 11:38:06 -05:00
enable = true;
2024-06-10 11:06:04 -05:00
colorschemes.gruvbox.enable = true;
2023-06-20 19:28:14 -05:00
globals = {
indent_guides_enable_on_vim_startup = 1;
nix_recommended_style = 0;
};
2024-06-10 11:06:04 -05:00
opts = {
2023-06-20 19:28:14 -05:00
background = "dark";
backup = false;
copyindent = true;
cursorline = true;
expandtab = false;
hidden = true;
hlsearch = true;
ignorecase = true;
lazyredraw = true;
list = true;
listchars = "tab:→ ,extends:→,precedes:←,trail:·,eol:¬";
mouse = "a";
number = true;
preserveindent = true;
relativenumber = true;
shiftwidth = 4;
showcmd = true;
showmatch = true;
signcolumn = "yes";
smartcase = true;
softtabstop = 4;
tabstop = 4;
# Setting for CtrlP
wildignore = "*.swp,*.pyc,*.class,.tox";
wrap = false;
writebackup = false;
};
2024-06-10 11:06:04 -05:00
keymaps = let
winMove = key: { mode = "n"; key = "<C-${key}>"; action = "<C-w>${key}<C-w><CR>"; };
in [ {
mode = "n";
key = "<C-e>";
2024-06-10 11:34:53 -05:00
action = "<Esc>:BufExplorer<CR>";
2024-06-10 11:06:04 -05:00
} {
mode = "n";
key = "<C-t>";
2024-06-24 16:04:48 -04:00
action = "<Esc>:NERDTreeToggle<CR>";
2024-06-10 11:06:04 -05:00
}
(winMove "h")
(winMove "j")
(winMove "k")
(winMove "l")
];
2023-06-20 19:28:14 -05:00
plugins = {
2024-06-24 16:04:48 -04:00
airline.enable = true;
cmp.enable = true;
direnv.enable = true;
2023-06-20 19:28:14 -05:00
gitgutter.enable = true;
fugitive.enable = true;
2024-06-24 16:04:48 -04:00
fzf-lua = {
enable = true;
iconsEnabled = true;
keymaps = {
"<C-o>" = {
action = "files";
settings = {
previewers.cat.cmd = "${pkgs.coreutils}/bin/cat";
winopts.height = 0.5;
};
};
"<C-p>" = {
action = "git_files";
settings = {
previewers.cat.cmd = "${pkgs.coreutils}/bin/cat";
winopts.height = 0.5;
};
};
};
profile = "fzf-vim";
};
2023-06-20 19:28:14 -05:00
notify.enable = true;
};
2024-03-28 09:36:46 -05:00
extraConfigLua = builtins.replaceStrings [ "@git@" ] [ "${pkgs.git}/bin/git" ] (builtins.readFile ./vim/extra.lua);
2023-06-20 19:28:14 -05:00
extraConfigVim = builtins.readFile ./vim/extra.vimrc;
extraPlugins = with pkgs.vimPlugins; [
2022-04-18 11:38:06 -05:00
bufexplorer
2024-06-24 16:04:48 -04:00
nerdtree
nvim-web-devicons # Be sure to install Hack Nerd Font and set it to your term default: https://gist.github.com/matthewjberger/7dd7e079f282f8138a9dc3b045ebefa0
2023-11-03 12:38:27 -05:00
packer-nvim
2023-06-15 15:37:57 -05:00
2022-11-15 23:31:05 -06:00
context-vim
2022-04-18 11:38:06 -05:00
vim-flake8
vim-indent-guides
2022-11-14 23:49:23 -06:00
vim-xonsh
2022-04-18 11:38:06 -05:00
];
2023-06-20 19:28:14 -05:00
viAlias = true;
vimAlias = true;
2022-04-18 11:38:06 -05:00
};
}