diff --git a/config/automatrop/roles/vim/templates/pluginlist.j2 b/config/automatrop/roles/vim/templates/pluginlist.j2 index 2dff490..e592df2 100644 --- a/config/automatrop/roles/vim/templates/pluginlist.j2 +++ b/config/automatrop/roles/vim/templates/pluginlist.j2 @@ -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 %} diff --git a/config/automatrop/roles/vim/templates/plugins/ansible.j2 b/config/automatrop/roles/vim/templates/plugins/ansible.j2 deleted file mode 100644 index 0fb51fa..0000000 --- a/config/automatrop/roles/vim/templates/plugins/ansible.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{# Various for Ansible #} -{{ add_source('pearofducks/ansible-vim', { 'do': './UltiSnips/generate.sh'}) -}} diff --git a/config/automatrop/roles/vim/templates/plugins/colorizer.j2 b/config/automatrop/roles/vim/templates/plugins/colorizer.j2 deleted file mode 100644 index 2ce1848..0000000 --- a/config/automatrop/roles/vim/templates/plugins/colorizer.j2 +++ /dev/null @@ -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 #} diff --git a/config/automatrop/roles/vim/templates/plugins/dap.j2 b/config/automatrop/roles/vim/templates/plugins/dap.j2 deleted file mode 100644 index 616b124..0000000 --- a/config/automatrop/roles/vim/templates/plugins/dap.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{# Debug Adapter Protocol client #} -{{ add_source('mfussenegger/nvim-dap') -}} diff --git a/config/automatrop/roles/vim/templates/plugins/fugitive.j2 b/config/automatrop/roles/vim/templates/plugins/fugitive.j2 deleted file mode 100644 index 6abf2e7..0000000 --- a/config/automatrop/roles/vim/templates/plugins/fugitive.j2 +++ /dev/null @@ -1,4 +0,0 @@ -{# Git basics #} -{{ add_source('tpope/vim-fugitive') -}} -{# Open files in GitLab #} -{{ add_source('shumphrey/fugitive-gitlab.vim') -}} diff --git a/config/automatrop/roles/vim/templates/plugins/gitgutter.j2 b/config/automatrop/roles/vim/templates/plugins/gitgutter.j2 deleted file mode 100644 index d6b4fad..0000000 --- a/config/automatrop/roles/vim/templates/plugins/gitgutter.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{# Show changed git lines in the gutter #} -{{ add_source('airblade/vim-gitgutter') -}} diff --git a/config/automatrop/roles/vim/templates/plugins/gitsigns.j2 b/config/automatrop/roles/vim/templates/plugins/gitsigns.j2 deleted file mode 100644 index ca5608f..0000000 --- a/config/automatrop/roles/vim/templates/plugins/gitsigns.j2 +++ /dev/null @@ -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 diff --git a/config/automatrop/roles/vim/templates/plugins/languagetool.j2 b/config/automatrop/roles/vim/templates/plugins/languagetool.j2 deleted file mode 100644 index a677f9a..0000000 --- a/config/automatrop/roles/vim/templates/plugins/languagetool.j2 +++ /dev/null @@ -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" diff --git a/config/automatrop/roles/vim/templates/plugins/pandoc.j2 b/config/automatrop/roles/vim/templates/plugins/pandoc.j2 deleted file mode 100644 index f2acc5d..0000000 --- a/config/automatrop/roles/vim/templates/plugins/pandoc.j2 +++ /dev/null @@ -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 diff --git a/config/automatrop/roles/vim/templates/plugins/tcomment.j2 b/config/automatrop/roles/vim/templates/plugins/tcomment.j2 deleted file mode 100644 index 0539d77..0000000 --- a/config/automatrop/roles/vim/templates/plugins/tcomment.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{# Language-aware (un)commenting #} -{{ add_source('tomtom/tcomment_vim') -}} diff --git a/config/automatrop/roles/vim/templates/plugins/undotree.j2 b/config/automatrop/roles/vim/templates/plugins/undotree.j2 deleted file mode 100644 index 2ad56b1..0000000 --- a/config/automatrop/roles/vim/templates/plugins/undotree.j2 +++ /dev/null @@ -1,3 +0,0 @@ -{# Navigate undo #} -{{ add_source('mbbill/undotree') -}} -nmap u :UndotreeToggle diff --git a/config/nix/hm/vim.nix b/config/nix/hm/vim.nix index 7c72942..63c6729 100644 --- a/config/nix/hm/vim.nix +++ b/config/nix/hm/vim.nix @@ -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 compe#scroll({ 'delta': +4 }) inoremap 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."s" = { action = "SymbolsOutline"; silent = true; }; + # undotree + normal."u" = { action = "UndotreeToggle"; silent = true; }; + }; }; }