Some shuffling in kak-lsp options

This commit is contained in:
Natsu Kagami 2022-05-12 18:57:09 -04:00
parent 060b4cd98d
commit 667c81d349
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51

View file

@ -120,16 +120,18 @@ hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c
map global normal <c-l> ": enter-user-mode lsp<ret>" map global normal <c-l> ": enter-user-mode lsp<ret>"
lsp-auto-hover-enable lsp-auto-hover-enable
# lsp-auto-hover-insert-mode-enable # lsp-auto-hover-insert-mode-enable
set buffer lsp_hover_anchor true set window lsp_hover_anchor true
lsp-inlay-diagnostics-enable buffer
} }
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|haskell|nix) %{ hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|haskell|nix) %{
# Note that fsharp is not here
lsp-inlay-hints-enable buffer
# Format the document if possible # Format the document if possible
hook window BufWritePre .* %{ lsp-formatting-sync } hook window BufWritePre .* %{ lsp-formatting-sync }
} }
hook global WinSetOption filetype=(rust) %{
# Enable inlay hints
lsp-inlay-hints-enable window
}
hook global WinSetOption filetype=(rust|go|fsharp) %{ hook global WinSetOption filetype=(rust|go|fsharp) %{
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
@ -143,7 +145,10 @@ hook global WinSetOption filetype=(rust|go|fsharp) %{
map global insert <a-a> '<esc>A' map global insert <a-a> '<esc>A'
hook global WinSetOption filetype=(fsharp) %{ hook global WinSetOption filetype=(fsharp) %{
set-option buffer comment_line "//" set-option window comment_line "//"
# Set up formatting
set-option window formatcmd "~/.dotnet/tools/fantomas --stdin --stdout"
hook window -group fsharp-format BufWritePre .* %{ format }
} }
hook global WinSetOption filetype=(ocaml) %{ hook global WinSetOption filetype=(ocaml) %{