Skip to content

Add more language server scopes#107

Merged
AlternateRT merged 1 commit intomainfrom
language-server-scopes
Mar 27, 2026
Merged

Add more language server scopes#107
AlternateRT merged 1 commit intomainfrom
language-server-scopes

Conversation

@AlternateRT
Copy link
Copy Markdown
Collaborator

These allow us to restrict code completions into specific contexts:

  • For Elixir files, Tailwind and Emmet will now give completions inside HEEx templates only, save for one caveat
    • Tailwind is still scoped into strings so that completions don't break if Elixir interpolation is used inside the class attribute of an HTML tag
  • For EEx/HEEx files, ElixirLS, Expert, Next LS, and Lexical will now give completions inside Elixir expressions only - should fix Language servers misinterpret HTML tags in HEEx templates as Elixir functions #91

Additionally, this reworks the function override that was being used by HEEx into an identifier override that should cover slot names as well - with this change @ will now be treated as a word character, just like Elixir

These allow us to restrict code completions into specific contexts:
- For Elixir files, Tailwind and Emmet will now give completions inside
  HEEx templates only, save for one caveat
  - Tailwind is still scoped into strings so that completions don't
    break if Elixir interpolation is used inside the class attribute of
    an HTML tag
- For EEx/HEEx files, ElixirLS, Expert, Next LS, and Lexical will now
  give completions inside Elixir expressions only - should fix #91

Additionally, this reworks the function override that was being used by
HEEx into an identifier override that should cover slot names as well -
with this change `@` will now be treated as a word character, just like
Elixir
@cla-bot cla-bot bot added the cla-signed label Mar 26, 2026
@AlternateRT AlternateRT merged commit 708fff8 into main Mar 27, 2026
10 checks passed
@AlternateRT AlternateRT deleted the language-server-scopes branch March 27, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language servers misinterpret HTML tags in HEEx templates as Elixir functions

1 participant