Compare commits

...

2 commits

Author SHA1 Message Date
vorboyvo 7589d38ec7 Removed manual tex building.
Added wrap in Kakoune for text types.
2025-03-14 09:22:23 -04:00
vorboyvo 5c247da3d9 Configured SyncTeX. 2025-03-14 09:20:03 -04:00
3 changed files with 24 additions and 13 deletions

View file

@ -206,6 +206,11 @@ rec {
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
synctex = "true";
synctex-editor-command = "texlab inverse-search -i %{input} -l %{line}";
};
};
programs.pandoc = { enable = true; };

View file

@ -25,22 +25,21 @@
commands = "set buffer filetype typst";
option = ".*\.typ";
}
# {
# # 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 = "hook buffer BufWritePost .* %{ texlab-build }";
# }
{
name = "BufSetOption";
option = "filetype=markdown";
commands = "add-highlighter buffer/ wrap -word -indent -width 79";
}
{
# 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 = "hook buffer BufWritePost .* %{ texlab-build }";
}
{
name = "BufSetOption";
option = "filetype=typst";
commands = "hook buffer BufWritePost .* %{ nop %sh{ typst compile $kak_buffile } }";
}
{
# When the filetype=markdown option is set (automatically), set word wrap on
name = "WinSetOption";
option = "filetype=markdown";
commands = "set-option window lintcmd \"proselint\"";
commands = "add-highlighter buffer/ wrap -word -indent -width 79";
}
{
name = "BufSetOption";
@ -52,6 +51,11 @@
option = ".*\.Rmd";
commands = "hook buffer BufWritePost .* %{ nop %sh{ Rscript -e \"rmarkdown::render(\\\"$kak_buffile\\\", 'pdf_document')\" } }";
}
{
name = "BufCreate";
option = ".*\.qmd";
commands = "hook buffer BufWritePost .* %{ echo %sh{ quarto render $kak_buffile --to pdf } }";
}
];
keyMappings = [
# Define select all

View file

@ -392,6 +392,8 @@ command = "texlab"
#
# Preview configuration for zathura with SyncTeX search.
# For other PDF viewers see https://github.com/latex-lsp/texlab/wiki/Previewing
build.forwardSearchAfter = true
build.onSave = true
forwardSearch.executable = "zathura"
forwardSearch.args = [
"%p",