{ config, pkgs, ... }: { programs.neovim = { enable = true; viAlias = true; vimAlias = true; vimdiffAlias = true; package = pkgs.neovim-nightly; plugins = with pkgs.vimPlugins; [ coc-css coc-html coc-nvim coc-eslint coc-json coc-rust-analyzer coc-tsserver coc-yaml ctrlp-vim lualine-nvim nerdtree tokyonight-nvim vim-fugitive vim-nix vim-repeat vim-signify vim-surround (nvim-treesitter.withPlugins (p: with p; [ tree-sitter-comment tree-sitter-c-sharp tree-sitter-html tree-sitter-javascript tree-sitter-jsdoc tree-sitter-json tree-sitter-lua tree-sitter-nix tree-sitter-php tree-sitter-regex tree-sitter-rust tree-sitter-toml tree-sitter-typescript tree-sitter-tsx tree-sitter-yaml ])) ]; withNodeJs = true; extraConfig = '' " configuration syntax enable set relativenumber number set cursorline set noswapfile set hlsearch set ignorecase set incsearch set title set clipboard^=unnamed set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab set expandtab set updatetime=100 let g:yaml_recommended_style=0 " signify set signcolumn=yes:3 let g:signify_priority = 5 let g:signify_sign_show_count = 0 let g:signify_sign_add = '┃' let g:signify_sign_delete = g:signify_sign_add let g:signify_sign_delete_first_line = '┏━' let g:signify_sign_change = g:signify_sign_add let g:signify_sign_change_delete = g:signify_sign_delete " theming let g:tokyonight_style='night' colorscheme tokyonight " using tab for trigger completion function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~ '\s' endfunction inoremap \ pumvisible() ? "\" : \ check_back_space() ? "\" : \ coc#refresh() inoremap pumvisible() ? "\" : "\u\" inoremap coc#refresh() " various aliases nnoremap rs :source $MYVIMRC nnoremap :NERDTreeToggle nnoremap h nnoremap j nnoremap k nnoremap l nnoremap :q nnoremap gd (coc-definition) nmap ref (coc-references) nmap gd :Gdiff nmap rn (coc-rename) command! -nargs=0 Sw w !doas tee % > /dev/null " disable read-only warning au BufEnter * set noro " set filetype=html for handlebar templates au BufRead,BufNewFile *.hbs set filetype=html " disable empty line tildes set fcs=eob:\ lua <