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

Fix ... syntax highlight incorrectly #130

Merged
merged 2 commits into from
Aug 24, 2020
Merged

Conversation

wingyplus
Copy link
Contributor

@wingyplus wingyplus commented Aug 10, 2020

Test with the code below:

defmodule DotDotDot do
  @type a :: [...]
  @type b :: {...}

  @spec non_empty_list((... -> number())) # incorrect
  def non_empty_list(fun) do
    1..10
  end
end

The ... in [...], {...} and (... -> number()) should highlight
correctly. And .. in range syntax should work fine also.

Fixes #121

Test with the code below:

	defmodule DotDotDot do
	  @type a :: [...]
	  @type b :: {...}

	  @SPEC non_empty_list((... -> number())) # incorrect
	  def non_empty_list(fun) do
	    1..10
	  end
	end

The ... in [...], {...} and (... -> number()) should highlight
correctly. And .. in range syntax should work fine also.
@wingyplus wingyplus changed the title Fix ... operator highlight incorrectly Fix ... syntax highlight incorrectly Aug 10, 2020
@wingyplus
Copy link
Contributor Author

@axelson Could you please help review when you have a time? Thanks.

syntaxes/elixir.json Outdated Show resolved Hide resolved
Add ... to the comment line as well
@axelson axelson merged commit 6f440fe into elixir-lsp:master Aug 24, 2020
@wingyplus
Copy link
Contributor Author

Thanks

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.

Non-empty list typespecs highlight error
2 participants