vim: Move more things to prose

This commit is contained in:
Geoffrey Frogeye 2024-01-20 19:30:46 +01:00
parent a57c6527ce
commit 7cd77af9bf
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
2 changed files with 20 additions and 22 deletions

View file

@ -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 <Bar> :EasyAlign*<Bar><Enter>"; }
];
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;
};
};
};
};

View file

@ -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 <Bar> :EasyAlign*<Bar><Enter>"; }
];
userCommands = {
Reload = { command = "source ${config.xdg.configHome}/nvim/init.lua"; force = false; };