nix-config/users/tacocat/programs/vim.nix

103 lines
2.7 KiB
Nix
Raw Normal View History

{pkgs, ...}:
let
rose-pine-vim = pkgs.vimUtils.buildVimPlugin {
name = "rose-pine-vim";
src = pkgs.fetchFromGitHub {
owner = "rose-pine";
repo = "vim";
rev = "d149980cfa5cdec487df23b2e9963c3256f3a9f3";
sha256 = "a+RCmgSG+snwBVQCzSnp8wVxSoQcLqoJjnTiDviTGqc=";
};
};
vim-spell-en-utf8-dictionary = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/en.utf-8.spl";
sha256 = "0w1h9lw2c52is553r8yh5qzyc9dbbraa57w9q0r9v8xn974vvjpy";
};
vim-spell-en-utf8-suggestions = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/en.utf-8.sug";
sha256 = "1v1jr4rsjaxaq8bmvi92c93p4b14x2y1z95zl7bjybaqcmhmwvjv";
};
vim-spell-en-latin1-dictionary = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/en.latin1.spl";
sha256 = "0i8q2si2bm8c0556j3c0gjin3bixgs055yqqk1irvz4wszy9w3b2";
};
vim-spell-en-latin1-suggestions = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/en.latin1.sug";
sha256 = "00ibcbj2b2krwd5zl9zl671db44k3fl59sz1yymb9ydkpkj9gpp6";
};
in {
2024-02-01 20:45:19 +00:00
programs.vim = {
enable = true;
settings = {
copyindent = true;
expandtab = false;
hidden = true;
history = 100;
ignorecase = false;
modeline = true;
mousefocus = false;
number = true;
relativenumber = true;
shiftwidth = 2;
tabstop = 2;
};
2024-02-02 16:08:59 +00:00
plugins = with pkgs.vimPlugins; [
everforest
catppuccin-vim
sonokai
2024-02-03 04:33:39 +00:00
vim-colors-solarized
2024-02-09 02:23:11 +00:00
gruvbox
rose-pine-vim
2024-02-02 16:08:59 +00:00
terminus
vim-fugitive
vim-gitgutter
tabular
vim-markdown
2024-02-02 16:08:59 +00:00
];
extraConfig = ''
if has('termguicolors')
set termguicolors
endif
set background=dark
2024-02-09 02:23:11 +00:00
colorscheme rosepine_moon
2024-02-02 16:08:59 +00:00
set scrolloff=5
set hlsearch
2024-02-03 04:20:12 +00:00
set signcolumn=yes
set updatetime=100
2024-02-04 22:56:33 +00:00
set cursorline
set autoindent
set belloff=all
2024-02-04 22:56:33 +00:00
nnoremap <C-@> :call system("wl-copy", @")<CR>
nnoremap <C-q> :nohlsearch<CR>
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_math = 1
2024-02-02 16:08:59 +00:00
'';
2024-02-01 20:45:19 +00:00
};
2024-02-03 04:20:12 +00:00
home.file.".vim/after/plugin/terminus.vim".text = ''
let &t_SI="\e[6 q"
let &t_EI="\e[2 q"
let &t_Cs = "\e[4:3m"
let &t_Ce = "\e[4:0m"
2024-02-03 04:20:12 +00:00
'';
home.file.".vim/after/ftplugin/markdown.vim".text = ''
setlocal spell spelllang=en_us
setlocal nomodeline
'';
home.file."/.vim/spell/en.utf-8.spl".source = vim-spell-en-utf8-dictionary;
home.file."/.vim/spell/en.utf-8.sug".source = vim-spell-en-utf8-suggestions;
home.file."/.vim/spell/en.latin1.spl".source = vim-spell-en-latin1-dictionary;
home.file."/.vim/spell/en.latin1.sug".source = vim-spell-en-latin1-suggestions;
2024-02-01 20:45:19 +00:00
}