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

Gray out ignored variables #296

Merged
merged 1 commit into from
Nov 26, 2015

Conversation

rranelli
Copy link
Contributor

This commit grays out variables whose name start with _. These
variables are meant to be ignored in the program. The fontification of
the single underscore matcher (_) and pseudo-variables like
__MODULE__ & company where not modified.

See #292.

Before this commit:

screenshot from 2015-11-24 20 19 23

After this commit:

screenshot from 2015-11-24 20 18 29

Fixes #292

@@ -426,6 +426,33 @@ end
"
(should (eq (elixir-test-face-at 33) 'font-lock-string-face))))

(ert-deftest elixir-mode-syntax-table/gray-out-ignored-var ()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have little experience writing these kind of tests.

Is this acceptable ?

@syohex
Copy link
Contributor

syohex commented Nov 25, 2015

I suppose you should use own face instead of font-lock-comment-face. Because everyone does not set its face to gray color. For example it is red in emacs -Q, and it is orange emacs -r -Q.

@tonini
Copy link
Contributor

tonini commented Nov 25, 2015

I suppose you should use own face instead of font-lock-comment-face. Because everyone does not set its face to gray color.

That's a good point by @syohex

@rranelli Do you think you could create a custom face for this case, that would be great! 👍

@whatyouhide
Copy link

Great job @rranelli, I've been wishing for this for a while now 🎉 😃

@rranelli
Copy link
Contributor Author

@syohex I think you're right, "gray out" is not the best way to describe it. I used the comment-face because comments are "ignored" and, as I understand, variables starting with _ are meant to be ignored in elixir. Also, I think that with this the face would always be consistent with the user's theme.

I see no problem creating a new face though.

@rranelli rranelli force-pushed the gray-out-ignored-vars branch from 88b391d to e127a0e Compare November 25, 2015 18:57
@rranelli
Copy link
Contributor Author

@syohex @tonini

Alright, custom face done here

@rranelli rranelli force-pushed the gray-out-ignored-vars branch from e127a0e to 5ec730d Compare November 25, 2015 19:00
This commit grays out variables whose name start with `_`. These
variables are meant to be ignored in the program. The fontification of
the single underscore matcher (`_`) and pseudo-variables like
`__MODULE__` & company where not modified.

See elixir-editors#292.

Fixes elixir-editors#292
@syohex
Copy link
Contributor

syohex commented Nov 25, 2015

Looks good 👍

tonini added a commit that referenced this pull request Nov 26, 2015
@tonini tonini merged commit 109c130 into elixir-editors:master Nov 26, 2015
@tonini
Copy link
Contributor

tonini commented Nov 26, 2015

@rranelli Great! Thank you :-D

J3RN pushed a commit to J3RN/emacs-elixir that referenced this pull request Apr 24, 2021
* Do not advertise workspaceFolder support

In elixir-lsp/elixir-ls#295 the user received a
warning:

> Received unmatched notification: %{"jsonrpc" => "2.0", "method" =>
  "workspace/didChangeWorkspaceFolders"

This occurs because the server advertises that it supports workspace folders:
https://microsoft.github.io/language-server-protocol/specification#workspace_workspaceFolders

This was introduced in elixir-lsp/elixir-ls#35 which was
actually about didChangeWatchedFiles and not workspace folders.

Fixes elixir-editors#296

* Update changelog
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.

5 participants