nvim: treesitter

This commit is contained in:
kat witch 2021-08-30 00:42:39 +01:00
parent 92f7f05bc9
commit ead2cd863c
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
3 changed files with 32 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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