diff --git a/hm/dev/prose.nix b/hm/dev/prose.nix index 5c68cc8..f271c6d 100644 --- a/hm/dev/prose.nix +++ b/hm/dev/prose.nix @@ -12,11 +12,26 @@ # TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr ]; }; - programs.nixvim.plugins.none-ls = { - enable = true; - sources = { - code_actions.ltrs.enable = true; - diagnostics.ltrs.enable = true; + programs.nixvim = { + autoCmd = [ + # vim-easy-align: Align Markdown tables with | + { event = "FileType"; pattern = "markdown"; command = "vmap :EasyAlign*"; } + ]; + extraPlugins = with pkgs.vimPlugins; lib.optionals config.programs.pandoc.enable [ + vim-pandoc # Pandoc-specific stuff because there's no LSP for it + vim-pandoc-syntax + ]; + extraConfigVim = lib.optionalString config.programs.pandoc.enable '' + let g:pandoc#modules#disabled = ["folding"] + let g:pandoc#spell#enabled = 0 + let g:pandoc#syntax#conceal#use = 0 + ''; + plugins.none-ls = { + enable = true; + sources = { + code_actions.ltrs.enable = true; + diagnostics.ltrs.enable = true; + }; }; }; }; diff --git a/hm/vim/default.nix b/hm/vim/default.nix index 1107ea6..125fe37 100644 --- a/hm/vim/default.nix +++ b/hm/vim/default.nix @@ -87,31 +87,14 @@ # Language-specific tcomment_vim # Language-aware (un)commenting - ] ++ lib.optionals config.programs.pandoc.enable [ - vim-pandoc # Pandoc-specific stuff because there's no LSP for it - vim-pandoc-syntax ] ++ lib.optionals config.frogeye.dev.ansible [ ansible-vim # Doesn't generate snippets, but those are for UltiSnip anyways ]; extraConfigVim = '' - " GENERAL - " Avoid showing message extra message when using completion set shortmess+=c - - " PLUGINS - '' + lib.optionalString config.programs.pandoc.enable '' - " 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 - { event = "FileType"; pattern = "markdown"; command = "vmap :EasyAlign*"; } - ]; userCommands = { Reload = { command = "source ${config.xdg.configHome}/nvim/init.lua"; force = false; };