nix: Finish adding vim plugins

This commit is contained in:
Geoffrey Frogeye 2023-11-02 15:42:17 +01:00
parent 9b450cc22f
commit d811d025e6
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
12 changed files with 34 additions and 65 deletions

View file

@ -15,30 +15,3 @@
" Theme
source ~/.config/vim/theme.vim
" Undo management
{{ use_plugin('undotree') }}
" Git helpers
{{ use_plugin('fugitive') }}
{% if variant == 'nvim' %}
{{ use_plugin('gitsigns') }}
{% else %}
{{ use_plugin('gitgutter') }}
{% endif %}
" Language-specific stuff
{{ use_plugin('tcomment') }}
{{ use_plugin('languagetool') }}
{{ use_plugin('pandoc') }}
{% if variant == 'nvim' %}
{{ use_plugin('dap') }}
{{ use_plugin('colorizer') }}
{% else %}
{% if 'c' in dev_stuffs or 'c++' in dev_stuffs %}
{{ use_plugin('vebugger') }}
{% endif %}
{% endif %}
{% if 'ansible' in dev_stuffs %}
{{ use_plugin('ansible') }}
{% endif %}

View file

@ -1,2 +0,0 @@
{# Various for Ansible #}
{{ add_source('pearofducks/ansible-vim', { 'do': './UltiSnips/generate.sh'}) -}}

View file

@ -1,7 +0,0 @@
{# Display the actual color for color codes " #}
{{ add_source('norcalli/nvim-colorizer.lua') -}}
set termguicolors
lua << EOF
require'colorizer'.setup()
EOF
{# TODO Enable for css functions too #}

View file

@ -1,2 +0,0 @@
{# Debug Adapter Protocol client #}
{{ add_source('mfussenegger/nvim-dap') -}}

View file

@ -1,4 +0,0 @@
{# Git basics #}
{{ add_source('tpope/vim-fugitive') -}}
{# Open files in GitLab #}
{{ add_source('shumphrey/fugitive-gitlab.vim') -}}

View file

@ -1,2 +0,0 @@
{# Show changed git lines in the gutter #}
{{ add_source('airblade/vim-gitgutter') -}}

View file

@ -1,7 +0,0 @@
{# Show changed git lines in the gutter #}
{{ add_source('lewis6991/gitsigns.nvim') -}}
{# Dependency #}
{{ add_source('nvim-lua/plenary.nvim') -}}
lua << EOF
require('gitsigns').setup()
EOF

View file

@ -1,3 +0,0 @@
{# Check grammar for human languages #}
{{ add_source('dpelle/vim-LanguageTool') -}}
let g:languagetool_jar = "/usr/share/java/languagetool/languagetool-commandline.jar"

View file

@ -1,6 +0,0 @@
{# Pandoc specific stuff because there's no LSP for it #}
{{ add_source('vim-pandoc/vim-pandoc') -}}
{{ add_source('vim-pandoc/vim-pandoc-syntax') -}}
let g:pandoc#modules#disabled = ["folding"]
let g:pandoc#spell#enabled = 0
let g:pandoc#syntax#conceal#use = 0

View file

@ -1,2 +0,0 @@
{# Language-aware (un)commenting #}
{{ add_source('tomtom/tcomment_vim') -}}

View file

@ -1,3 +0,0 @@
{# Navigate undo #}
{{ add_source('mbbill/undotree') -}}
nmap <space>u :UndotreeToggle<CR>

View file

@ -175,6 +175,16 @@ in
};
# TODO Investigate https://github.com/nvim-treesitter/nvim-treesitter-textobjects
indent-blankline.enable = true; # 23.11 integrate with rainbow-delimiters and use more of the options
undotree.enable = true; # Navigate edition history
# Git
fugitive.enable = true; # Git basics
gitsigns.enable = true; # Show changed lines in the gutter
# Language-specific
# dap.enable = true; # Debug Adapter Protocol client # 23.11
nvim-colorizer.enable = true; # Display colors of color-codes
};
extraPlugins = with pkgs.vimPlugins; [
nvim-scrollview # Scroll bar
@ -219,6 +229,18 @@ in
# Auto-completion
nvim-compe
# TODO Archived. Maybe use nvim-cmp and plugins instead?
# Git
fugitive-gitlab-vim # Open files in GitLab
# TODO Connect it!
# Language-specific
tcomment_vim # Language-aware (un)commenting
vim-LanguageTool # Check grammar for human languages
vim-pandoc # Pandoc-specific stuff because there's no LSP for it
vim-pandoc-syntax
nvim-dap # Debug Adapter Protocol client
ansible-vim # FIXME See if it doesn't require to do ./UltiSnips/generate.sh
];
extraConfigLua = lib.strings.concatMapStringsSep "\n" (f: builtins.readFile f) [
./vim/feline.lua
@ -240,6 +262,15 @@ in
inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 })
inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 })
" languagetool
let g:languagetool_cmd = "${pkgs.languagetool}/bin/languagetool-commandline"
" TODO Doesn't work
" vim-pandox
let g:pandoc#modules#disabled = ["folding"]
let g:pandoc#spell#enabled = 0
let g:pandoc#syntax#conceal#use = 0
'';
autoCmd = [
# vim-easy-align: Align Markdown tables
@ -271,6 +302,9 @@ in
# symbols-outline-nvim
normal."<Space>s" = { action = "<Cmd>SymbolsOutline<CR>"; silent = true; };
# undotree
normal."<Space>u" = { action = "<Cmd>UndotreeToggle<CR>"; silent = true; };
};
};
}