最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - How to show TailwindCSS classes before functions on VSCode autocomplete suggestions - Stack Overflow

programmeradmin3浏览0评论

When I start typing p inside a React component, it suggests some functions, but I want Tailwind CSS classes to appear first in the autocomplete suggestions instead. Is there a way to configure my editor or settings so that Tailwind classes take priority?

Please refer the image if my explanation is not clear enough.

When I start typing p inside a React component, it suggests some functions, but I want Tailwind CSS classes to appear first in the autocomplete suggestions instead. Is there a way to configure my editor or settings so that Tailwind classes take priority?

Please refer the image if my explanation is not clear enough.

Share Improve this question edited 7 hours ago rozsazoltan 8,1905 gold badges17 silver badges38 bronze badges asked 7 hours ago aanish27aanish27 11 bronze badge 3
  • I don't know what you mean by "functions", but in the photo, we can see variants related to Tailwind CSS, such as print: variant. – rozsazoltan Commented 7 hours ago
  • Although I understand your frustration with the order, I never thought it would make much of a difference to see the classes starting with p at the front. After all, I wouldn't choose p-{number} for the hint, or pt-{number}, etc., the hint would be very weak here. – rozsazoltan Commented 7 hours ago
  • You can mention it in the Intellisense repository as a development suggestion, that the order should be customizable and that the priority between the variant and the class could be listed in an array. – rozsazoltan Commented 7 hours ago
Add a comment  | 

1 Answer 1

Reset to default 0

No. There's no way to do that. However, if we look deeper into the issue, the hint itself doesn't offer much help, as it lists many similar classes, e.g., p for example: p-1, p-2, p-3... p-72. Typing them out is easier than selecting them from the hint. The hint, in my opinion, is primarily meant to reinforce that you're using a valid class name or variant while typing.

发布评论

评论列表(0)

  1. 暂无评论