fresh icon indicating copy to clipboard operation
fresh copied to clipboard

No autocomplete/intellisense for Twind

Open nikableh opened this issue 4 years ago • 3 comments

I am using VSCode for my Fresh project. Unfortunately, there is no any autocomplete or intellisense for Twind classes when doing it like that:

export default function SideBar() {
  return (
    <div className={tw`fixed top-0 left-0 h-screen w-16 m-0
                    flex flex-col bg-gray-900 text-white shadow-lg`}>
      <i>A</i>
      <i>B</i>
      <i>C</i>
      <i>D</i>
      <i>E</i>
    </div>
  );
}

What am I doing wrong?

nikableh avatar Jul 05 '22 10:07 nikableh

Someone having the exact same problem: https://github.com/denoland/fresh/discussions/317#discussioncomment-3061694

nikableh avatar Jul 05 '22 11:07 nikableh

See https://github.com/tw-in-js/vscode-twind-intellisense/issues/9

lucacasonato avatar Jul 05 '22 11:07 lucacasonato

See tw-in-js/vscode-twind-intellisense#9

This solved it, thanks!

I think ./config/twind.config.ts should be present by default, since it is required for autocompletion of Twind to work. Do you think it is worth adding this file into the default project structure that uses Twind and VSCode?

nikableh avatar Jul 05 '22 12:07 nikableh