From 183ce877e3aef746a5116dff8d525ccaf97435df Mon Sep 17 00:00:00 2001 From: notohh Date: Sun, 26 May 2024 16:49:29 -0400 Subject: [PATCH] helix: update lsps --- home/programs/editors/helix/default.nix | 1 + home/programs/editors/helix/languages.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/home/programs/editors/helix/default.nix b/home/programs/editors/helix/default.nix index dd42231..458e94c 100644 --- a/home/programs/editors/helix/default.nix +++ b/home/programs/editors/helix/default.nix @@ -5,6 +5,7 @@ ]; programs.helix = { enable = true; + defaultEditor = true; settings = { theme = "tokyonight"; editor = { diff --git a/home/programs/editors/helix/languages.nix b/home/programs/editors/helix/languages.nix index e4fdd3c..d9d5219 100644 --- a/home/programs/editors/helix/languages.nix +++ b/home/programs/editors/helix/languages.nix @@ -16,8 +16,12 @@ { name = "rust"; auto-format = true; + language-servers = [ + "rust-analyzer" + ]; formatter = { command = lib.getExe rustfmt; + args = ["--edition" "2021"]; }; } { @@ -36,6 +40,18 @@ command = "${nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver"; args = ["--stdio"]; }; + typescript-language-server = with pkgs.nodePackages; { + command = "${typescript-language-server}/bin/typescript-language-server"; + args = ["--stdio"]; + }; + rust-analyzer.config = { + checkOnSave.command = "clippy"; + inlayHints = { + closingBraceHints.enable = false; + parameterHints.enable = false; + typeHints.enable = true; + }; + }; }; }; }