Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind autocomplete #2920

Merged
merged 28 commits into from
Aug 31, 2023
Merged

Tailwind autocomplete #2920

merged 28 commits into from
Aug 31, 2023

Conversation

ForLoveOfCats
Copy link
Contributor

@ForLoveOfCats ForLoveOfCats commented Aug 31, 2023

Release Notes:

  • Added basic Tailwind CSS autocomplete support (#746).
  • Added a CSS language server for autocomplete and linting.

ForLoveOfCats and others added 21 commits August 15, 2023 12:48
Tailwind needs user languages and language-to-language-id mappings to
start providing completions for those languages.
And also it has emmet completions disabled by default, enable them.
Tailwind likes to throw a lot of completion data at us, this gets it to
send less. Previously it would respond to a completion with 2.5 MB JSON
blob, now it is more like 0.8 MB.

Relies on a local copy of lsp-types with the `itemDefaults` field added.
I don't have write perms to push to our fork of the crate atm, sorry :)
This PR adds new config option to language config called
`word_boundaries` that controls which characters should be recognised as
word boundary for a given language. This will improve our UX for
languages such as PHP and Tailwind.

Release Notes:

- Improved completions for PHP
[#1820](https://github.com/zed-industries/community/issues/1820)

---------

Co-authored-by: Julia Risley <[email protected]>
Use word_characters to feed completion trigger characters as well and
also recognize kebab as a potential sub-word splitter. This is fine for
non-kebab-case languages because we'd only ever attempt to split a word
with a kebab in it in language scopes which are kebab-cased

Co-Authored-By: Max Brunsfeld <[email protected]>
Omit in buffers with one or zero running language servers with the
capability to provide completions

Co-Authored-By: Antonio Scandurra <[email protected]>
In some situations outside JSX elements Tailwind will never
respond to a completion request, holding up the tsserver completions.

Only submit the request to Tailwind when we wouldn't get tsserver
completions anyway and don't submit to Tailwind when we know we won't
get Tailwind completions

Co-Authored-By: Kirill Bulatov <[email protected]>
@ForLoveOfCats ForLoveOfCats force-pushed the multi-server-completions-tailwind branch from 7aa2f13 to 1f847ea Compare August 31, 2023 02:44
@ForLoveOfCats ForLoveOfCats force-pushed the multi-server-completions-tailwind branch from 1f847ea to ff3865a Compare August 31, 2023 02:58
@SomeoneToIgnore SomeoneToIgnore force-pushed the multi-server-completions-tailwind branch from 75ac532 to 9e12df4 Compare August 31, 2023 08:53
@SomeoneToIgnore SomeoneToIgnore force-pushed the multi-server-completions-tailwind branch from cde8c5d to 292af55 Compare August 31, 2023 11:29
@SomeoneToIgnore SomeoneToIgnore merged commit ddc6214 into main Aug 31, 2023
@SomeoneToIgnore SomeoneToIgnore deleted the multi-server-completions-tailwind branch August 31, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants