From 5cfce025d30587c8f3817025794e357c2118cb07 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Thu, 12 Jun 2025 18:46:28 -0400 Subject: [PATCH] AutoYADM commit: 2025-06-12 18:46:28 --- .config/kak/autoload/lsp.kak | 34 ++++++++++++++++++++++++++++++++-- .config/zathura/zathurarc | 2 ++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index 28c1e6d7..4e11ac91 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -25,7 +25,7 @@ define-command -hidden -override lsp-hide-code-actions %{ set-option global lsp_debug false # list of filetypes for which LSP will be activated in the window scope -declare-option str-list lsp_filetypes python go rust bash fish c cpp typst markdown yaml json jsonc bash sh typescript javascript +declare-option str-list lsp_filetypes python go rust bash fish c cpp typst markdown yaml json jsonc bash sh typescript javascript latex declare-option -hidden bool inlay_enabled false @@ -122,6 +122,37 @@ hook -group lsp-filetype-python global BufSetOption filetype=python %{ } } +remove-hooks global lsp-filetype-latex +hook -group lsp-filetype-latex global BufSetOption filetype=latex %{ + set-option buffer lsp_servers %{ + [texlab] + root_globs = [".git", ".hg"] + [texlab.settings.texlab] + # See https://github.com/latex-lsp/texlab/wiki/Configuration + # + # Preview configuration for zathura with SyncTeX search. + # For other PDF viewers see https://github.com/latex-lsp/texlab/wiki/Previewing + forwardSearch.executable = "zathura" + forwardSearch.args = [ + "%p", + "--synctex-forward", # Support texlab-forward-search + "%l:1:%f", + "--synctex-editor-command", # Inverse search: use Control+Left-Mouse-Button to jump to source. + """ + sh -c ' + echo " + evaluate-commands -client %%opt{texlab_client} %%{ + evaluate-commands -try-client %%opt{jumpclient} %%{ + edit -- %%{input} %%{line} + } + } + " | kak -p $kak_session + ' + """, + ] + } +} + remove-hooks global lsp-filetype-javascript hook -group lsp-filetype-javascript global BufSetOption filetype=(?:javascript|typescript) %{ set-option buffer lsp_servers %{ @@ -132,7 +163,6 @@ hook -group lsp-filetype-javascript global BufSetOption filetype=(?:javascript|t [typescript-language-server.settings._] # quotePreference = "double" # typescript.format.semicolons = "insert" - } } diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index 77b7da72..5ff6f7d1 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -1,4 +1,6 @@ set selection-clipboard clipboard +set synctex true +set synctex-editor-command "texlab inverse-search -i %{input} -l %{line}" map zoom in map zoom out map N navigate next