elixir-lsp / vscode-elixir-ls

Elixir language support and debugger for VS Code, powered by ElixirLS.
https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls
MIT License
529 stars 104 forks source link

Wrong textmate scope for __MODULE__ with function call #415

Open GPrimola opened 4 months ago

GPrimola commented 4 months ago

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 1.16.1 (compiled with Erlang/OTP 26)

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 commented 4 months ago

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

GPrimola commented 4 months ago

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

Thanks for the follow up anyway!