diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..0d1df49 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1699343069, + "narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..bffd634 --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "TailwindCSS LSP + Catppuccin"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; + + outputs = { + self, + nixpkgs, + }: let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + version = "0.0.14"; + in { + packages.x86_64-linux.default = with pkgs; + buildNpmPackage { + pname = "tailwindcss-language-server"; + inherit version; + + src = ./.; + + makeCacheWritable = true; + npmDepsHash = "sha256-SH0BaGDtmc+hUoe8CSmiZjTcETUaeSFiN5cl5JmJeaY="; + npmWorkspace = "packages/tailwindcss-language-server"; + + buildInputs = [libsecret] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [Security AppKit]); + + nativeBuildInputs = [python3 pkg-config]; + + meta = with lib; { + description = "Intelligent Tailwind CSS tooling for Visual Studio Code"; + homepage = "https://github.com/tailwindlabs/tailwindcss-intellisense"; + license = licenses.mit; + maintainers = with maintainers; [happysalada]; + mainProgram = "tailwindcss-language-server"; + platforms = platforms.all; + }; + }; + }; +} diff --git a/package-lock.json b/package-lock.json index e8d11ea..aea1820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -185,6 +185,15 @@ "node": ">=6.9.0" } }, + "node_modules/@catppuccin/tailwindcss": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@catppuccin/tailwindcss/-/tailwindcss-0.1.6.tgz", + "integrity": "sha512-V+Y0AwZ5SSyvOVAcDl7Ng30xy+m82OKnEJ+9+kcZZ7lRyXuZrAb2GScdq9XR3v+ggt8qiZ/G4TvaC9cJ88AAXA==", + "dev": true, + "peerDependencies": { + "tailwindcss": ">=3.0.0" + } + }, "node_modules/@csstools/css-parser-algorithms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.1.tgz", @@ -7576,6 +7585,7 @@ "tailwindcss-language-server": "bin/tailwindcss-language-server" }, "devDependencies": { + "@catppuccin/tailwindcss": "^0.1.6", "@parcel/watcher": "2.0.3", "@tailwindcss/aspect-ratio": "0.4.2", "@tailwindcss/container-queries": "0.1.0", diff --git a/packages/tailwindcss-language-server/package.json b/packages/tailwindcss-language-server/package.json index bee36c7..9118025 100644 --- a/packages/tailwindcss-language-server/package.json +++ b/packages/tailwindcss-language-server/package.json @@ -33,10 +33,12 @@ "access": "public" }, "devDependencies": { + "@catppuccin/tailwindcss": "^0.1.6", "@parcel/watcher": "2.0.3", "@tailwindcss/aspect-ratio": "0.4.2", "@tailwindcss/container-queries": "0.1.0", "@tailwindcss/forms": "0.5.3", + "@tailwindcss/language-service": "*", "@tailwindcss/line-clamp": "0.4.2", "@tailwindcss/typography": "0.5.7", "@types/debounce": "1.2.0", @@ -70,7 +72,6 @@ "rimraf": "3.0.2", "stack-trace": "0.0.10", "tailwindcss": "3.3.0", - "@tailwindcss/language-service": "*", "typescript": "4.6.4", "vitest": "0.34.2", "vscode-css-languageservice": "6.2.9", diff --git a/packages/tailwindcss-language-server/src/lib/plugins.ts b/packages/tailwindcss-language-server/src/lib/plugins.ts index aa5f0c5..b780de0 100644 --- a/packages/tailwindcss-language-server/src/lib/plugins.ts +++ b/packages/tailwindcss-language-server/src/lib/plugins.ts @@ -19,4 +19,8 @@ export default { module: require('@tailwindcss/typography'), version: require('@tailwindcss/typography/package.json').version, }, + '@catppuccin/tailwindcss': { + module: require('@catppuccin/tailwindcss'), + version: require('@catppuccin/tailwindcss/package.json').version, + }, }