diff --git a/config/users/kat/base/vim/default.nix b/config/users/kat/base/vim/default.nix index 8f376a1b..83d8aee3 100644 --- a/config/users/kat/base/vim/default.nix +++ b/config/users/kat/base/vim/default.nix @@ -27,13 +27,12 @@ in vimAlias = true; viAlias = true; plugins = with pkgs.vimPlugins; [ - vim-nix vim-cool vim-lastplace vim-hexokinase vim-easymotion notmuch-vim - rust-vim + vim-nix fzf-vim vim-fugitive vim-startify diff --git a/config/users/kat/dev/vim/default.nix b/config/users/kat/dev/vim/default.nix index fb431dd2..95d38159 100644 --- a/config/users/kat/dev/vim/default.nix +++ b/config/users/kat/dev/vim/default.nix @@ -1,6 +1,21 @@ { config, pkgs, ... }: -let cocvim = pkgs.callPackage +let initvim = pkgs.callPackage + ({ stdenv, elinks, nodejs }: stdenv.mkDerivation { + name = "init.vim"; + src = ./init.vim; + inherit nodejs elinks; + buildInputs = [ + elinks + nodejs + ]; + phases = [ "buildPhase" ]; + buildPhase = '' + substituteAll $src $out + ''; + }) + { }; + cocvim = pkgs.callPackage ({ stdenv, elinks, nodejs }: stdenv.mkDerivation { name = "coc.vim"; src = ./coc.vim; @@ -18,9 +33,11 @@ in { programs.neovim = { extraConfig = '' + source ${initvim} source ${cocvim} ''; plugins = with pkgs.vimPlugins; [ + nvim-treesitter coc-yaml coc-git coc-css diff --git a/config/users/kat/dev/vim/init.vim b/config/users/kat/dev/vim/init.vim new file mode 100644 index 00000000..851afebe --- /dev/null +++ b/config/users/kat/dev/vim/init.vim @@ -0,0 +1,13 @@ +lua << EOF +require'nvim-treesitter.configs'.setup { + ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages + ignore_install = { }, -- List of parsers to ignore installing + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true, + }, +} +EOF