diff --git a/roles/home/helix.nix b/roles/home/helix.nix index 53d96ad..e286b41 100644 --- a/roles/home/helix.nix +++ b/roles/home/helix.nix @@ -1,21 +1,41 @@ { pkgs, ... }: let - pythonPkgs = with pkgs.python3Packages; [ + actualPkgs = pkgs.unstablePkgs; + + pythonPkgs = with actualPkgs.python3Packages; [ python-lsp-server python-lsp-ruff + pylsp-mypy ]; - nodePkgs = with pkgs.nodePackages; [ + nodePkgs = with actualPkgs.nodePackages; [ vscode-langservers-extracted typescript svelte-language-server yaml-language-server typescript-language-server bash-language-server + pyright ]; in { home = { + packages = with actualPkgs; [ + black + helix + clang-tools + rust-analyzer + nil + texlab + nixpkgs-fmt + ruff + ruff-lsp + mypy + shellcheck + shfmt + gopls + # ] ++ pythonPkgs ++ nodePkgs; + ] ++ nodePkgs; sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; @@ -53,25 +73,22 @@ in [[language]] name = "python" formatter = { command = "black", args = [ "-" ] } + language-servers = [ {name = "pyright"}, {name = "ruff-lsp"}, ] + + [language-server.pyright] + command = "pyright-langserver" + args = ["--stdio"] + config = {} + [language-server.ruff-lsp] + command = "ruff-lsp" + args = [] + config = {} + [[language]] name = "bash" indent = { tab-width = 2, unit = " " } formatter = { command = 'shfmt', args = ["-i", "2"] } ''; - - packages = with pkgs.unstablePkgs; [ - black - helix - clang-tools - rust-analyzer - nil - texlab - nixpkgs-fmt - ruff - shellcheck - shfmt - gopls - ] ++ pythonPkgs ++ nodePkgs; }; }