Compare commits

...

2 commits

Author SHA1 Message Date
Natsu Kagami 32e723996b
kak-lsp: update to 18.1.2 2025-02-15 13:46:23 +01:00
Natsu Kagami 8aa7c77fd0
Enable templ lsp 2025-02-04 04:24:29 +01:00
3 changed files with 20 additions and 8 deletions

View file

@ -737,16 +737,16 @@
"kak-lsp": { "kak-lsp": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1734533380, "lastModified": 1737458684,
"narHash": "sha256-7ULohcCpIKOb7CtsF2dIkiRt94uBIrGD5pQ2AEfrNrY=", "narHash": "sha256-wIKAChmD6gVfrRguywiAnpT3kbCbRk2k2u4ckd1CNOw=",
"owner": "kakoune-lsp", "owner": "kakoune-lsp",
"repo": "kakoune-lsp", "repo": "kakoune-lsp",
"rev": "dc348f04038f7286d606e99719509d6dbd2469da", "rev": "d5db3de3b88a8a158e1bfa43f13d8766a6c6d522",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "kakoune-lsp", "owner": "kakoune-lsp",
"ref": "v18.1.1", "ref": "v18.1.2",
"repo": "kakoune-lsp", "repo": "kakoune-lsp",
"type": "github" "type": "github"
} }

View file

@ -55,7 +55,7 @@
# --- Sources # --- Sources
kakoune.url = "github:mawww/kakoune"; kakoune.url = "github:mawww/kakoune";
kakoune.flake = false; kakoune.flake = false;
kak-lsp.url = "github:kakoune-lsp/kakoune-lsp/v18.1.1"; kak-lsp.url = "github:kakoune-lsp/kakoune-lsp/v18.1.2";
kak-lsp.flake = false; kak-lsp.flake = false;
nixos-m1.url = "github:tpwrules/nixos-apple-silicon"; nixos-m1.url = "github:tpwrules/nixos-apple-silicon";
nixos-m1.inputs.nixpkgs.follows = "nixpkgs"; nixos-m1.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -16,6 +16,7 @@
, texlab , texlab
, tinymist , tinymist
, marksman , marksman
, templ
, rust-analyzer , rust-analyzer
, ... , ...
}: }:
@ -33,12 +34,12 @@ let
languageServers = languageServers =
let let
vscodeServerOf = name: { vscodeServerWith = { name, extraFileTypes ? [ ] }: {
name = "vscode-${name}-language-server"; name = "vscode-${name}-language-server";
value = { value = {
args = [ "--stdio" ]; args = [ "--stdio" ];
command = "vscode-${name}-language-server"; command = "vscode-${name}-language-server";
filetypes = [ name "templ" ]; filetypes = [ name ] ++ extraFileTypes;
roots = [ "package.json" ".git" ]; roots = [ "package.json" ".git" ];
package = nodePackages.vscode-langservers-extracted; package = nodePackages.vscode-langservers-extracted;
}; };
@ -187,6 +188,13 @@ let
roots = [ ".marksman.toml" ".git" ]; roots = [ ".marksman.toml" ".git" ];
package = marksman; package = marksman;
}; };
templ = {
command = "templ";
args = [ "lsp" ];
filetypes = [ "templ" ];
roots = [ "go.mod" ".git" ];
package = templ;
};
rust-analyzer = { rust-analyzer = {
args = [ ]; args = [ ];
command = "rust-analyzer"; command = "rust-analyzer";
@ -195,7 +203,11 @@ let
package = rust-analyzer; package = rust-analyzer;
}; };
} // (builtins.listToAttrs (builtins.map vscodeServerOf [ "html" "css" "json" ])); } // (builtins.listToAttrs (builtins.map
(ft: vscodeServerWith {
name = ft;
extraFileTypes = if ft == "json" then [ ] else [ "templ" ];
}) [ "html" "css" "json" ]));
faces = [ faces = [
## Items ## Items