Description
Summary
Tailwind CSS Auto Completion Breaks after using a Hyphen/Dash while configured with a custom language. Completions will be shown for everything but not include the relevant options for the prefix before the dash/hyphen.
Actual Behavior:
For example, if I type "bt", the autocomplete for btn
, btn-lg
, btn-md
will show up. But if I type btn-
, it shows the autocompletions for everything. So it will show *
, **
, not-[]
, not-first
, etc instead of showing onlyt the options that match the prefix like btn-lg
, btn-md
.
Expected Behavior:
I would expect it to show completions that match the prefix before the dash
Configuration:
I am using dioxus with a custom "language". If unfamiliar, here is an example using an element with class
button {
class:"btn btn-lg"
}
Here is my configuration:
"lsp": {"tailwindcss-language-server": {
"settings": {
"includeLanguages": {
"Rust": "html",
"rust": "html",
"*.rs": "html"
},
"experimental": {
"classRegex": [
"class\\s*:\\s*\"([^\"}]*)",
"class=\"([^\"]*)",
"class={\"([^\"}]*)",
"class=format!({\"([^\"}]*)"
]
}
}
}},
"languages": {
"Rust": {
"language_servers": ["rust-analyzer", "tailwindcss-language-server"]
}
}
Zed Version and System Specs
Zed 0.174.5 in flatpak