AutoYADM commit: 2025-05-24 16:26:55
This commit is contained in:
parent
d7b67cc6a5
commit
ecef17a8f5
1 changed files with 14 additions and 4 deletions
|
@ -22,13 +22,23 @@ 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
|
||||
|
||||
hook global WinSetOption filetype=.* %{
|
||||
lsp-enable-window
|
||||
lsp-inlay-hints-enable window
|
||||
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// /|})"
|
||||
}~ %{
|
||||
lsp-enable-window
|
||||
lsp-inlay-hints-enable window
|
||||
}
|
||||
}
|
||||
lsp-filetype-hooks-update
|
||||
|
||||
hook global WinSetOption lsp_filetypes=.* lsp-filetype-hooks-update
|
||||
hook global BufSetOption lsp_filetypes=.* lsp-filetype-hooks-update
|
||||
hook global GlobalSetOption lsp_filetypes=.* lsp-filetype-hooks-update
|
||||
|
||||
# TODO: set up toggle binding for this
|
||||
# or even better, show them on hover...?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue