hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.47k stars 370 forks source link

Tailwind CSS autocompletion isn't working #1827

Open demeralde opened 4 months ago

demeralde commented 4 months ago

FAQ

Announcement

Minimal reproducible full config

https://github.com/demeralde/nvim-config

My entire config is here. I'm using NvChad as the base for my config.

Description

Screenshot 2024-02-17 at 6 03 05 pm

I'm trying to set up autocompletion for Tailwind CSS. However, it's only auto completing classes which are already in the file (instead of all the other available Tailwind classes).

I'm not sure why it's not working.

Steps to reproduce

  1. Clone my config
  2. Create a test.tsx file with the following code:
const IndexPage = () => {
  return (
    <main className="">
    </main>
  );
};

export default IndexPage;
  1. Test the className prop autocompletes

Expected behavior

It should show a list of all available Tailwind classes, matching against the currently typed class.

e.g text-red- should match any class with "text-red-" inside it

Actual behavior

It's only showing a list of classes for classes which already exist in the file.

Additional context

No response