AutoYADM commit: 2025-06-12 18:46:28

This commit is contained in:
Daniel Fichtinger 2025-06-12 18:46:28 -04:00
parent df37195ea8
commit 5cfce025d3
2 changed files with 34 additions and 2 deletions

View file

@ -25,7 +25,7 @@ define-command -hidden -override lsp-hide-code-actions %{
set-option global lsp_debug false set-option global lsp_debug false
# list of filetypes for which LSP will be activated in the window scope # 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 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 remove-hooks global lsp-filetype-javascript
hook -group lsp-filetype-javascript global BufSetOption filetype=(?:javascript|typescript) %{ hook -group lsp-filetype-javascript global BufSetOption filetype=(?:javascript|typescript) %{
set-option buffer lsp_servers %{ set-option buffer lsp_servers %{
@ -132,7 +163,6 @@ hook -group lsp-filetype-javascript global BufSetOption filetype=(?:javascript|t
[typescript-language-server.settings._] [typescript-language-server.settings._]
# quotePreference = "double" # quotePreference = "double"
# typescript.format.semicolons = "insert" # typescript.format.semicolons = "insert"
} }
} }

View file

@ -1,4 +1,6 @@
set selection-clipboard clipboard set selection-clipboard clipboard
set synctex true
set synctex-editor-command "texlab inverse-search -i %{input} -l %{line}"
map <C-i> zoom in map <C-i> zoom in
map <C-o> zoom out map <C-o> zoom out
map N navigate next map N navigate next