Added Kakoune hook to compile LaTeX on save.
Added Kakoune settings to disable removing trailing indentation and enable highlighting it.
This commit is contained in:
parent
488d152675
commit
2ae1a7c01c
|
|
@ -9,11 +9,10 @@
|
|||
};
|
||||
hooks = [
|
||||
{
|
||||
# When the filetype=latex option is set in a buffer context (automatically), add a new hook to build the latex file on write
|
||||
name = "BufSetOption";
|
||||
option = "filetype=latex";
|
||||
commands = ''
|
||||
set-option buffer makecmd latexmk -pvc -pdf -e '$pdf_previewer="xdg-open %S"' -e '$pdflatex="pdflatex -interaction=nonstopmode -synctex=1 %O %S"' %opt{documentsrc}
|
||||
'';
|
||||
commands = "hook buffer BufWritePost .* %{ texlab-build }";
|
||||
}
|
||||
];
|
||||
keyMappings = [
|
||||
|
|
@ -36,6 +35,12 @@
|
|||
];
|
||||
};
|
||||
extraConfig = ''
|
||||
# highlight trailing whitespace
|
||||
add-highlighter global/trailing-whitespace regex '\h+$' 0:Error
|
||||
|
||||
# don't remove trailing indent
|
||||
set global disabled_hooks .*-trim-indent
|
||||
|
||||
eval %sh{kak-lsp --kakoune -s $kak_session}
|
||||
lsp-enable
|
||||
'';
|
||||
|
|
|
|||
Loading…
Reference in a new issue