Skip to content

Project discovery should honor .gitignore files #1290

@david-pw

Description

@david-pw

What version of VS Code are you using?

1.98.2

What version of Tailwind CSS IntelliSense are you using?

0.14.12 (pre-release)

What version of Tailwind CSS are you using?

^4.0.17

What package manager are you using?

npm

What operating system are you using?

Windows 11

Tailwind config

/* Offending Issue is this import - fonts doesn't exist in this folder */
@import "./fonts.css" layer(base);

@import "tailwindcss" prefix(tw);

@plugin 'tailwindcss-animate';

@theme {
   ...
}

VS Code settings

{
  "tailwindCSS.experimental.classRegex": [["tv\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]],
}

Reproduction URL

N/A

Describe your issue

Just raising to your attention that the latest release of the content detection scans folders that are git-ignored, which can result in intellisense breaking for the entire project.

The error I'm receiving is:

[design\dist\tailwind.css] Initializing...
[Global] Adding watch patterns: D:/my-project/design/dist/tailwind.css
  details: "resolve './fonts.css' in 'd:/my-project/design/dist'\n" +
    '  using description file: d:\\my-project\\package.json (relative path: ./design/dist)\n' +
    '    using description file: d:\\my-project\\package.json (relative path: ./design/dist/fonts.css)\n' +
    '      no extension\n' +
    "        d:\\my-project\\design\\dist\\fonts.css doesn't exist\n" +
    '      .css\n' +
    "        d:\\my-project\\design\\dist\\fonts.css.css doesn't exist\n" +
    '      as directory\n' +
    "        d:\\my-project\\design\\dist\\fonts.css doesn't exist"

My actual tailwind css file is located in D:/my-project/src/styles/tailwind.css, and will resolve the imports correctly.

I'm wondering if the error is handled, potentially the extension could try and find another tailwind file? that way you don't have to consider a gitignore? not sure.

Thanks for your hard work on this extension btw - love it.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions