diff --git a/copier.yaml b/copier.yaml index 3b01694..d80e074 100644 --- a/copier.yaml +++ b/copier.yaml @@ -56,7 +56,7 @@ _subdirectory: template/{{ language }} # Execute these commands on destination after copy _tasks: - - devenv shell nixfmt . + - devenv shell nixfmt devenv.nix - git init - git add . - git commit -am 'This is the Inception 🎉' diff --git a/includes/base.nix.jinja b/includes/base.nix.jinja index 4b5b317..aa40792 100644 --- a/includes/base.nix.jinja +++ b/includes/base.nix.jinja @@ -105,7 +105,7 @@ pre-commit.hooks = { nixfmt-rfc-style = { enable = true; - excludes = [ ".devenv.flake.nix" ]; + excludes = [ ".devenv.flake.nix" "node_modules/**" ]; }; yamllint = { enable = true; diff --git a/template/Node.js/devenv.nix.jinja b/template/Node.js/devenv.nix.jinja index b459978..9c640d7 100644 --- a/template/Node.js/devenv.nix.jinja +++ b/template/Node.js/devenv.nix.jinja @@ -1,22 +1,23 @@ {% extends pathjoin("includes", "base.nix.jinja") %} -{% block languages %} -rust = { - enable = true; - - # https://devenv.sh/reference/options/#languagesrustchannel - channel = "nightly"; +{% block packages %} + pkgs.nodePackages.vscode-langservers-extracted + pkgs.nodePackages.typescript-language-server +{% endblock %} - components = [ - "rustc" - "cargo" - "clippy" - "rustfmt" - "rust-analyzer" - ]; -}; +{% block languages %} + javascript.enable = true; + javascript.npm = { + enable = true; + install.enable = true; + }; + typescript.enable = true; {% endblock %} {% block hooks %} - editorconfig-checker.enable = true; + prettier.enable = true; + editorconfig-checker.enable = true; + eslint = { + enable = true; + }; {% endblock %} diff --git a/template/Node.js/devenv.yaml.jinja b/template/Node.js/devenv.yaml.jinja index 0818bfb..88a05a3 100644 --- a/template/Node.js/devenv.yaml.jinja +++ b/template/Node.js/devenv.yaml.jinja @@ -1 +1 @@ -{% include pathjoin("includes", "devenv.rust.yaml") %} +{% include pathjoin("includes", "devenv.yaml") %}