Giter VIP home page Giter VIP logo

Comments (21)

bhaskar-nair2 avatar bhaskar-nair2 commented on August 28, 2024 65

If it helps anyone

 "tailwindCSS.includeLanguages": {
    "vue": "html",
    "vue-html": "html",
  },

adding this in my settings worked for me..

from tailwindcss-intellisense.

P4sca1 avatar P4sca1 commented on August 28, 2024 59

I also had to enable quick suggestions in strings to support multi-line strings. Otherwise it would only work in single-line strings.
My .vscode/settings.json now contains the following:

{
	"css.validate": false,
	"tailwindCSS.includeLanguages": {
		"vue": "html",
		"vue-html": "html"
	},
	"editor.quickSuggestions": {
		"strings": true
	}
}

from tailwindcss-intellisense.

bradlc avatar bradlc commented on August 28, 2024 7

Hey @sandro-git. The extension will only activate if your project has a Tailwind CSS config file.

from tailwindcss-intellisense.

afflexux avatar afflexux commented on August 28, 2024 6

Same problem here. Can this be reopened ?

I have a config file. The autocomplete works, but not the syntax highlighting. Am I missing something?

Screenshot 2019-06-10 at 17 00 25

Use Vetur for syntax highlighting in Vue files and use postcss as your style language.

<style lang='postcss' scoped> ... </style>

from tailwindcss-intellisense.

sandro-git avatar sandro-git commented on August 28, 2024 5

If it helps anyone

 "tailwindCSS.includeLanguages": {
    "vue": "html",
    "vue-html": "html",
  },

adding this in my settings worked for me.

can you show us the way you add it on your project ? it still doesn't work for me. I create my project with Vue CLI . how do you set up yours ?

from tailwindcss-intellisense.

Alex-t-rorich avatar Alex-t-rorich commented on August 28, 2024 3

This worked for me. Using nuxt2.

https://javascript.plainenglish.io/how-to-fix-tailwind-css-intellisense-in-visual-studio-code-3dede794df21

from tailwindcss-intellisense.

rishabhraj291196 avatar rishabhraj291196 commented on August 28, 2024 2

I also had to enable quick suggestions in strings to support multi-line strings. Otherwise it would only work in single-line strings. My .vscode/settings.json now contains the following:

{
	"css.validate": false,
	"tailwindCSS.includeLanguages": {
		"vue": "html",
		"vue-html": "html"
	},
	"editor.quickSuggestions": {
		"strings": true
	}
}

it works when appy this setting in setting.json

from tailwindcss-intellisense.

phillipmohr avatar phillipmohr commented on August 28, 2024 2

My config file is called tailwind.config.ts so I had to change "tailwindCSS.experimental.configFile": "./tailwind.config.js" to "tailwindCSS.experimental.configFile": "./tailwind.config.ts" in User/settings.json

from tailwindcss-intellisense.

rlfrahm avatar rlfrahm commented on August 28, 2024 1

I had this same problem and it didn't start working until I installed Vetur and ran through the setup.

from tailwindcss-intellisense.

Elvincth avatar Elvincth commented on August 28, 2024 1

If it helps anyone

 "tailwindCSS.includeLanguages": {
    "vue": "html",
    "vue-html": "html",
  },

adding this in my settings worked for me..

You're the best!

from tailwindcss-intellisense.

mnik01 avatar mnik01 commented on August 28, 2024 1

For me fix was to change name of tailwind.config.ts to tailwind.config.js

from tailwindcss-intellisense.

sandro-git avatar sandro-git commented on August 28, 2024

Hello @bradlc. i forgot that sorry but after creating it with and without --full tag and reload vscode it still doesn't work. should i declare it in postcss config file to ?

from tailwindcss-intellisense.

michapietsch avatar michapietsch commented on August 28, 2024

Hi, came here with the same problem. Config exists and in .html it works great. But not in .vue files, and also not in .blade.php files. Do you maybe have an idea what could be the cause?

from tailwindcss-intellisense.

MrSunshyne avatar MrSunshyne commented on August 28, 2024

Same problem here. Can this be reopened ?

I have a config file. The autocomplete works, but not the syntax highlighting. Am I missing something?

Screenshot 2019-06-10 at 17 00 25

from tailwindcss-intellisense.

natedunn avatar natedunn commented on August 28, 2024

Same issue here. I am not sure if this feature currently exists, sadly.

from tailwindcss-intellisense.

bhaskar-nair2 avatar bhaskar-nair2 commented on August 28, 2024

can you show us the way you add it on your project ? it still doesn't work for me. I create my project with Vue CLI . how do you set up yours ?

Oh no, not to your project, but to the settings in vscode.

from tailwindcss-intellisense.

Elvincth avatar Elvincth commented on August 28, 2024

If it helps anyone

 "tailwindCSS.includeLanguages": {
    "vue": "html",
    "vue-html": "html",
  },

adding this in my settings worked for me..

@bradlc I think this should add into the default settings.

from tailwindcss-intellisense.

marlongerson avatar marlongerson commented on August 28, 2024

If it helps anyone

 "tailwindCSS.includeLanguages": {
    "vue": "html",
    "vue-html": "html",
  },

adding this in my settings worked for me..

works like a charm! thank you

from tailwindcss-intellisense.

DelphiWorlds avatar DelphiWorlds commented on August 28, 2024

Even after adding the includeLanguages, and using npx tailwindcss init, it still doesn't work for me

from tailwindcss-intellisense.

bigujun avatar bigujun commented on August 28, 2024

In my case the tailwind.config.js was in a subfolder, so i added a tailwind.config.js to the root with

// tailwind.config.js on root dir
module.exports = require('./frontend/tailwind.config');

from tailwindcss-intellisense.

avxkim avatar avxkim commented on August 28, 2024

Settings.json that works for me:

{
  "files.associations": {
    "*.css": "tailwindcss"
  },
  "editor.quickSuggestions": {
    "strings": true
  },
  "tailwindCSS.experimental.configFile": "./tailwind.config.ts"
}

Thanks to @phillipmohr for figuring out when using ts config.

from tailwindcss-intellisense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.