AutoYADM commit: 2025-05-24 16:42:39
This commit is contained in:
parent
ecef17a8f5
commit
cf46ae2f4d
1 changed files with 38 additions and 19 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue