From bfc2c002b1743c7dff13f6f2c4b6f40aecc63d26 Mon Sep 17 00:00:00 2001 From: xeovalyte Date: Mon, 13 Jan 2025 22:30:11 +0100 Subject: [PATCH] modified helix configuration --- modules/home/applications/helix.nix | 40 ++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/modules/home/applications/helix.nix b/modules/home/applications/helix.nix index e322652..1dfc84a 100644 --- a/modules/home/applications/helix.nix +++ b/modules/home/applications/helix.nix @@ -23,6 +23,13 @@ in { unstable.nixpkgs-fmt unstable.tectonic unstable.texlab + + # Nuxt development + unstable.typescript-language-server + unstable.vue-language-server + unstable.typescript + unstable.nodePackages.prettier + dprint ]; @@ -43,12 +50,30 @@ in { package = pkgs.unstable.helix; defaultEditor = true; settings = { - # theme = "base16"; editor.cursor-shape = { insert = "bar"; }; }; languages = { + # Nuxt + language-server.typescript-language-server.config.plugins = [ + { + name = "@vue/typescript-plugin"; + location = "vue-language-server"; + languages = [ "vue" ]; + } + ]; + + language-server.vue-language-server = { + command = "vue-language-server"; + args = [ "--stdio" ]; + config = { + typescript = { + tsdk = "tsc"; + }; + }; + }; + # Rust language-server.rust-analyzer.config = { cargo = { @@ -61,6 +86,7 @@ in { command = "svls"; }; + # Latex language-server.texlab = { config = { texlab.chktex = { @@ -96,6 +122,18 @@ in { }; language = [ + { + name = "vue"; + auto-format = true; + formatter = { + command = "prettier"; + args = [ "--parser" "vue" ]; + }; + scope = "text.html.vue"; + roots = ["package.json"]; + injection-regex = "vue"; + language-servers = [ "typescript-language-server" "vuels" ]; + } { name = "verilog"; language-servers = [ "svls" ];