From 84b6e95316d9a6c3ebc87b217b03f748781d493b Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Tue, 10 Oct 2023 13:53:39 +0200 Subject: [PATCH] Enable semantic tokens for scala --- home/kakoune/kak.nix | 6 +++--- home/kakoune/kakrc | 2 +- home/modules/programs/my-kakoune/kak-lsp.nix | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/home/kakoune/kak.nix b/home/kakoune/kak.nix index 791e569..a69f5c6 100644 --- a/home/kakoune/kak.nix +++ b/home/kakoune/kak.nix @@ -231,10 +231,10 @@ in InfoDiagnosticInformation = "@Information"; InfoDiagnosticWarning = "@DiagnosticWarning"; # Extra faces - macro = "+b@function"; - method = "+i@function"; + macro = "+u@function"; + method = "@function"; format_specifier = "+i@string"; - mutable_variable = "+u@variable"; + mutable_variable = "+i@variable"; class = "+b@variable"; }; programs.my-kakoune.autoload = [ diff --git a/home/kakoune/kakrc b/home/kakoune/kakrc index c835cb0..8690e0c 100644 --- a/home/kakoune/kakrc +++ b/home/kakoune/kakrc @@ -114,7 +114,7 @@ hook global WinSetOption filetype=(rust|scala|fsharp) %{ lsp-inlay-hints-enable window } -hook global WinSetOption filetype=(rust|go|fsharp|typst) %{ +hook global WinSetOption filetype=(rust|go|fsharp|typst|scala) %{ hook window -group semantic-tokens BufReload .* lsp-semantic-tokens hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens diff --git a/home/modules/programs/my-kakoune/kak-lsp.nix b/home/modules/programs/my-kakoune/kak-lsp.nix index 33e898f..8be9899 100644 --- a/home/modules/programs/my-kakoune/kak-lsp.nix +++ b/home/modules/programs/my-kakoune/kak-lsp.nix @@ -169,8 +169,8 @@ let { face = "string"; token = "string"; } { face = "format_specifier"; token = "formatSpecifier"; } # Variables - { face = "mutable_variable"; token = "variable"; modifiers = [ "mutable" ]; } - { face = "variable"; token = "variable"; } + { face = "variable"; token = "variable"; modifiers = [ "readonly" ]; } + { face = "mutable_variable"; token = "variable"; } { face = "module"; token = "namespace"; } { face = "variable"; token = "type_parameter"; } { face = "class"; token = "enum"; }