From 4316f0e219f73000ca0aec02348838f74b5c25be Mon Sep 17 00:00:00 2001 From: jolheiser Date: Tue, 7 Nov 2023 17:04:03 -0600 Subject: [PATCH] feat: add helix LSP configs Signed-off-by: jolheiser --- .helix/languages.toml | 5 +++++ README.md | 3 +++ flake.lock | 12 ++++++------ flake.nix | 16 ++-------------- tailwind.config.js | 5 +---- 5 files changed, 17 insertions(+), 24 deletions(-) create mode 100644 .helix/languages.toml diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 0000000..adcc7b2 --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,5 @@ +[[language]] +name = "templ" +language-id = "html" +language-servers = ["templ", "vscode-html-language-server", "tailwindcss-ls"] + diff --git a/README.md b/README.md index ce91590..d932395 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ Links are sourced from [links.yaml](links.yaml). ## Dev +NOTE: Currently the tailwind LSP assumes this is a JS project with node_modules, so the standalone CLI setup used with the bundled Catppuccin theme breaks the LSP when it ingests the config. +To get tailwind's LSP to work, the plugin needs to be temporarily commented out. + ### Tools ``` diff --git a/flake.lock b/flake.lock index db90c12..1d293d1 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1692044854, - "narHash": "sha256-0FcjKrLH9YP/G+oEx7LQO4he/F3BxkAKsgU12q5jopw=", + "lastModified": 1699393291, + "narHash": "sha256-M+cAaIqvk1zh1tZ2lk2ZcjEPMs1Akuy7s2JZjwO43sc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fd91dcf3107361981d703f09e95fe02299b57ba3", + "rev": "e7704a1b645c94d51fdfdb2875638d3ffae0f15b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2e109ad..f5868ef 100644 --- a/flake.nix +++ b/flake.nix @@ -37,25 +37,13 @@ mv dist $out ''; }; - packages.default1 = pkgs.stdenv.mkDerivation { - pname = "jolheiser.com"; - version = "site"; - src = ./.; - nativeBuildInputs = with pkgs; [go nur.templ tailwind-ctp]; - buildPhase = '' - runHook preBuild - - go generate - mv dist $out - - runHook postBuild - ''; - }; devShells.default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ go nur.templ tailwind-ctp + tailwindcss-language-server + vscode-langservers-extracted ]; }; } diff --git a/tailwind.config.js b/tailwind.config.js index c99ee74..0b0b81e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,9 +1,6 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./dist/*.html"], - theme: { - extend: {}, - }, + content: ["./dist/*.html", "*.templ"], plugins: [require("@catppuccin/tailwindcss")], }