AutoYADM commit: 2025-05-24 16:42:39

This commit is contained in:
Daniel Fichtinger 2025-05-24 16:42:39 -04:00
parent ecef17a8f5
commit cf46ae2f4d

View file

@ -23,13 +23,32 @@ define-command -hidden -override lsp-hide-code-actions %{
# Server Config
set-option global lsp_debug false
declare-option str-list lsp_filetypes python go rust bash fish typst yaml json jsonc
# list of filetypes for which LSP will be activated in the window scope
declare-option str-list lsp_filetypes python %{
# programming
python
go
rust
bash
fish
c
cpp
# markup
typst
markdown
# config
yaml
json
jsonc
}
define-command -hidden lsp-filetype-hooks-update %{
try %{ remove-hooks window lsp-filetypes }
# convert the str-list into regex of form (a|b|c|...)
hook -group lsp-filetypes global WinSetOption %exp~filetype=%sh{
printf '%s' "(${kak_opt_lsp_filetypes// /|})"
}~ %{
# commands to execute for lsp window settings
lsp-enable-window
lsp-inlay-hints-enable window
}