Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension Not Starting #783

Closed
albertreed opened this issue May 17, 2023 · 8 comments · Fixed by #789
Closed

Extension Not Starting #783

albertreed opened this issue May 17, 2023 · 8 comments · Fixed by #789
Assignees

Comments

@albertreed
Copy link

What version of Tailwind CSS IntelliSense are you using?

0.9.11

What version of Tailwind CSS are you using?

3.3.2

What package manager are you using?

yarn

What operating system are you using?

Mac

Tailwind config

/** @type {import('tailwindcss').Config} */
export default {
  content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [],
  // I have no idea why this changed everything to be like it was with tachyons...but here we are.
  corePlugins: ["lineHeight"],
};

VS Code settings

Workspace

{
  "folders": [
    {
      "path": "."
    }
  ],
  "settings": {
    "editor.formatOnSave": true,
    "eslint.workingDirectories": ["./client", "./server"],
    "jest.pathToJest": "${workspaceFolder}/server/node_modules/.bin/jest",
    "jest.pathToConfig": "${workspaceFolder}/server/jest.config.js",
    "jest.rootPath": "${workspaceFolder}/server/",
    "files.exclude": {
      "${workspaceFolder}/shared": true,
      "client/src/index.css": true,
      "moderation-dashboard/**": true,
      "node_modules/**": true,
      "steam-sdk/**": true
    },
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "search.exclude": {
      "**/__generated__": true,
      "**/*.lock": true,
      "**/dist": true,
      "**/generatedTypes": true
    },
    "terminal.integrated.tabs.enabled": false,
    "tailwindCSS.includeLanguages": {
      "plaintext": "javascript"
    },
    "tailwindCSS.codeActions": true,
    "tailwindCSS.hovers": true
  },
  "extensions": {
    "recommendations": [
      "dbaeumer.vscode-eslint",
      "esbenp.prettier-vscode",
      "redhat.vscode-yaml",
      "forbeslindesay.vscode-sql-template-literal"
    ]
  }
}

User

{
  "editor.minimap.enabled": false,
  "html.autoClosingTags": false,
  "typescript.autoClosingTags": false,
  "diffEditor.ignoreTrimWhitespace": true,
  "editor.autoClosingQuotes": "never",
  "editor.autoClosingBrackets": "never",
  "jestrunner.jestCommand": "docker-compose run server test",
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.wordBasedSuggestions": false,
  "workbench.editor.showTabs": false,
  "gitlens.currentLine.enabled": false,
  "gitlens.hovers.currentLine.over": "line",
  "gitlens.codeLens.enabled": false,
  "gitlens.hovers.enabled": false,
  "workbench.colorCustomizations": {
    "editor.lineHighlightBackground": "#333333",
    "editor.rangeHighlightBorder": "#888888",
    "editor.rangeHighlightBackground": "#333333"
  },
  "debug.javascript.autoAttachFilter": "disabled",
  "terminal.integrated.tabs.location": "left",
  "terminal.integrated.defaultProfile.osx": "/bin/zsh (migrated)",
  "terminal.integrated.profiles.osx": {
    "/bin/zsh (migrated)": {
      "path": "/bin/zsh",
      "args": ["-l"]
    }
  },
  "redhat.telemetry.enabled": false,
  "editor.guides.bracketPairs": true,
  "cSpell.enabled": false,
  "workbench.experimental.layoutControl.enabled": true,
  "workbench.activityBar.visible": false,
  "editor.inlineSuggest.enabled": true,
  "github.copilot.enable": {
    "*": false,
    "yaml": false,
    "plaintext": false,
    "markdown": false,
    "typescript": false,
    "typescriptreact": false,
    "javascript": false
  },
  "terminal.integrated.scrollback": 10000,
  "tabnine.experimentalAutoImports": true,
  "yaml.customTags": [
    "!And",
    "!And sequence",
    "!If",
    "!If sequence",
    "!Not",
    "!Not sequence",
    "!Equals",
    "!Equals sequence",
    "!Or",
    "!Or sequence",
    "!FindInMap",
    "!FindInMap sequence",
    "!Base64",
    "!Join",
    "!Join sequence",
    "!Cidr",
    "!Ref",
    "!Sub",
    "!Sub sequence",
    "!GetAtt",
    "!GetAZs",
    "!ImportValue",
    "!ImportValue sequence",
    "!Select",
    "!Select sequence",
    "!Split",
    "!Split sequence"
  ],
  "terminal.integrated.tabs.enabled": false,
  "[python]": {
    "editor.formatOnType": true
  },
  "[typescriptreact]": {}
}

Reproduction URL

Unfortunately, not something I can provide. Of course, free to close the issue if that makes this not useful.

Describe your issue

I think the extension is not starting at all, though I'm not sure how to debug that. cmd->shift->p->"tailwind" fails to show anything at all. In the output pane, I do not see tailwinds listed in the pulldown.

Within the extension pane, if I got to the "Runtime Status" pane, I see this

Activation Event:onStartupFinished
Activation Time:8ms

It's a large project in a monorep. The client and tailwinds.config.js lives within a subfolder of the workspace root.

@thecrypticace
Copy link
Contributor

Hey! What version of VS Code are you using? And what type of project? Next, Svelte, something else?

@thecrypticace
Copy link
Contributor

Also, one other thing that would be useful is a list of all installed extensions if you could provide that (code --list-extensions --show-versions should do it)

@thecrypticace thecrypticace self-assigned this May 22, 2023
@Mr-KayJayDee

This comment was marked as off-topic.

@bradlc
Copy link
Contributor

bradlc commented May 25, 2023

@albertreed, which folder is your Tailwind config file in? Is it in a folder that is covered by your files.exclude configuration?

@Mr-KayJayDee, your issue is unrelated but has been fixed via #787 👍

@albertreed
Copy link
Author

config is ./client/tailwind.config.js. That file/folder is not covered by the files.exclude option.

@bradlc
Copy link
Contributor

bradlc commented May 25, 2023

Thanks!

I managed to find the culprit. The ${workspaceFolder} placeholder in your files.exclude configuration was causing the issue. I have pushed a fix that should ensure that the extension can still activate when placeholders are used.

Having said that, I don't think that the workspaceFolder placeholder is actually available in the files.exclude setting. This placeholder is only available in certain settings (https://code.visualstudio.com/docs/editor/variables-reference#_is-variable-substitution-supported-in-user-and-workspace-settings), and in files.exclude it is redundant anyway because the paths are already resolved relative to the workspace folder:

The glob patterns in [the files.exclude and search.exclude] settings are always evaluated relative to the path of the workspace folder. (source)

So I would recommend updating your files.exclude setting, and this should fix your issue:

  "files.exclude": {
-   "${workspaceFolder}/shared": true,
+   "shared/**": true,
    "client/src/index.css": true,
    "moderation-dashboard/**": true,
    "node_modules/**": true,
    "steam-sdk/**": true
  }

Hope that helps!

@albertreed
Copy link
Author

albertreed commented May 25, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants