-
Notifications
You must be signed in to change notification settings - Fork 93
Highlight module references equally #179
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
Highlight module references equally #179
Conversation
077c5bb
to
458d12a
Compare
@mattdeboard @tonini @whatyouhide I've fixed the things I've left pending before, I think this is ok to be properly reviewed now. |
5f47d67
to
75d4fb3
Compare
ping, Any thoughts on this PR ? Thanks! |
Hi @rranelli Sorry about the unresponsiveness, I know it's frustrating. Can you sort out merge conflicts here please? |
@mattdeboard No problem at all =). I will sort the merge conflicts right now. |
75d4fb3
to
8d1944f
Compare
Done |
@@ -330,6 +305,33 @@ for the Elixir programming language." | |||
(,(elixir-rx (group sigils)) | |||
1 font-lock-builtin-face) | |||
|
|||
;; Sigil patterns. Elixir has support for eight different sigil delimiters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you modified this correctly but you left these lines in tact. Please remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasnt sure if sigils and regexes should be highlighted differently.
Should they look the same then ?
Also I just saw that |
To answer my own question, yes it is. Super minor issue though, not going to worry about it. |
8d1944f
to
60047aa
Compare
Fixes #166 |
Modify syntax highlighting so there is no differentiating between built-in and user-defined modules.
…-editors#179) * DocumentSymbols provider should handle modules without a name The DocumentSymbols provider should be able to handle a variety of compilation errors so that it can be useful while debugging the compilation errors. The main problem was that the `extract_symbol/2` clause that handled `defmodule` and `defprotocol` was overly restrictive in the pattern match that it did. So I've changed it to match all the possible AST variations (although some may still raise an exception within the clause, but this prevents bad data from propagating). `MISSING_MODULE_NAME` was returned since a non-empty name is required * Update test to use == on an assert that is not making use of pattern matching * Update changelog
This PR sets
module
fontlock to be consistent across references. This PR also removes the notion of highlighting built-in modules differently than user/custom modules.Concerning the risk of wrongly highlighting capitalized words that do not correspond to module references, the picture below sumarizes the changes in highlighting:
To the left, the current behavior and to the right the proposed ones.
UPDATE:
I fontified the contents of sigils with
string-font-lock-face
just like the regexp does.The new result is as follows:
Fixes #166