tw-in-js / vscode-twind-intellisense

Intelligent Twind tooling for VS Code
MIT License
60 stars 10 forks source link

Extended / Overridden classes work but marked as error in Deno (Fresh) #11

Open JasperSurmont opened 2 years ago

JasperSurmont commented 2 years ago

In the automatically generated twind config file I add the following extend:

export const config: Configuration = {
  darkMode: "class",
  mode: "silent",
  theme: {
    extend: {
        fontFamily: {
            'hairline': "Bungee Hairline"
        }
    }
  }
};

In a component I do:

<div className={ tw`font-hairline` } >
   ...
</div>

The result is that the compiler correctly compiles the tailwind, but the vscode extension marks font-hairline as an error saying: Unknown utility "font-hairline"ts(-2020) Unknown theme value "fontWeight[hairline]"ts(-2022)

Is this a bug or did I do something wrong?

hanayashiki commented 2 years ago

putting a twind.config.ts and export default works for me

the default location is not sensed by the plugin, i guess

/** @type {import('twind').Configuration} */
export default {
  darkMode: "class",
  mode: "silent",
  theme: {
    colors: {
      primary: '#6392E7',
    },
  },
};