Have kak-lsp support metals

This commit is contained in:
Natsu Kagami 2023-09-17 20:35:34 +02:00
parent 87d2f63211
commit 5f4668b67b
Signed by: nki
GPG key ID: 55A032EB38B49ADB
4 changed files with 11 additions and 8 deletions

View file

@ -701,15 +701,16 @@
"kak-lsp": {
"flake": false,
"locked": {
"lastModified": 1693610654,
"narHash": "sha256-BTyDytJJMJsDvqjX4wV3e0t2XXU5Wz0xiLwQepzFDKY=",
"owner": "kak-lsp",
"lastModified": 1694964666,
"narHash": "sha256-0P3LvqId56qYA6qgI/p2YjKotb/Zdaz8ELvWFH0glDY=",
"owner": "natsukagami",
"repo": "kak-lsp",
"rev": "ae3d052928a482620f62fe3ee866ad072808bac1",
"rev": "ceecb7656bca8b042f8a8c19d737eff3bfe10829",
"type": "github"
},
"original": {
"owner": "kak-lsp",
"owner": "natsukagami",
"ref": "metals-support",
"repo": "kak-lsp",
"type": "github"
}

View file

@ -48,7 +48,7 @@
# --- Sources
kakoune.url = github:mawww/kakoune;
kakoune.flake = false;
kak-lsp.url = github:kak-lsp/kak-lsp;
kak-lsp.url = github:natsukagami/kak-lsp/metals-support;
kak-lsp.flake = false;
nixos-m1.url = github:tpwrules/nixos-apple-silicon;
nixos-m1.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -80,11 +80,13 @@ in
programs.kak-lsp.languages.scala = {
command = "metals";
filetypes = [ "scala" ];
roots = [ "build.sbt" ];
roots = [ "build.sbt" "build.sc" ];
settings_section = "metals";
settings.metals = {
enableSemanticHighlighting = true;
showInferredType = true;
decorationProvider = true;
inlineDecorationProvider = true;
};
};
programs.kak-lsp.languages.latex = {

View file

@ -104,7 +104,7 @@ hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c
hook window BufWritePre .* %{ lsp-formatting-sync }
}
hook global WinSetOption filetype=(rust) %{
hook global WinSetOption filetype=(rust|scala) %{
# Enable inlay hints
lsp-inlay-hints-enable window
}