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

Wrong textmate scope for __MODULE__ with function call #415

Open
GPrimola opened this issue Mar 13, 2024 · 2 comments
Open

Wrong textmate scope for __MODULE__ with function call #415

GPrimola opened this issue Mar 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@GPrimola
Copy link

As you can see on the print attached, it seems to me the wrong rule it's being applied to __MODULE__ macro (but all the others too) when there's a function call.

Environment

  • Elixir & Erlang versions (elixir --version): Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.16.1 (compiled with Erlang/OTP 26)

  • VSCode ElixirLS version: 0.20.0
  • Operating System Version: darwin 23.3.0

Steps to reproduce:

Paste this on VSCode and check the Inspect Editor Tokens and Scopes where pointed

defmodule Foo do

  def bar, do: IO.puts("Call bar")
  def mod, do: __MODULE__       # open VSCode's Inspect Editor Tokens and Scopes here
  def zoo, do: __MODULE__.bar() # open VSCode's Inspect Editor Tokens and Scopes here

end
Screenshot 2024-03-13 at 14 30 20
@lukaszsamson
Copy link
Collaborator

Technically __MODULE__ is a variable but yes, in that case it should match as variable.language.elixir

@lukaszsamson lukaszsamson added the bug Something isn't working label Mar 13, 2024
@GPrimola
Copy link
Author

Ok, sorry my bad on saying __MODULE__ as a macro (though I really thought it was! 😅).

Thanks for the follow up anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants