-
-
Notifications
You must be signed in to change notification settings - Fork 35
Minor hotfixes #53
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
Minor hotfixes #53
Conversation
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
=======================================
Coverage 13.21% 13.21%
=======================================
Files 9 9
Lines 348 348
Branches 49 49
=======================================
Hits 46 46
Misses 302 302 Continue to review full report at Codecov.
|
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.
@pedro-ricardo could you please take a look at my comments and update your PR.
@@ -3631,7 +3631,7 @@ | |||
"begin": "(?i)\\s*\\b([a-z]\\w*)\\b", | |||
"beginCaptures": { | |||
"1": { | |||
"name": "entity.name.module.fortran" |
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.
Why the change of name. What is being captured here is the name of the module, not of a class.
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 is because inside "use-statement":
rule, on line 4427 it is written "name": "entity.name.class.fortran"
this means that use
will highlight the following name as class. And as issue #51 requested, module
should highlight the following name that same way as use
does.
But It could be done the other way around. To just correct the "use-statement":
rule to highlight the following name as module instead of class.
I chose the previous because entity.name.module.fortran
has the same color as non-highlighted text.
@@ -3640,7 +3640,7 @@ | |||
"name": "keyword.other.endmodule.fortran" | |||
}, | |||
"2": { | |||
"name": "entity.name.module.fortran" | |||
"name": "entity.name.class.fortran" |
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.
Sames as previous comment
Well in that case there should be a way to change the color. The color is wrong, the naming is not.
Get Outlook for Android
On Tue, Apr 24, 2018 at 5:55 PM +0200, "Pedro Ricardo C Souza" <[email protected]> wrote:
@pedro-ricardo commented on this pull request.
In syntaxes/fortran_free-form.tmLanguage.json:
@@ -3631,7 +3631,7 @@
"begin": "(?i)\\s*\\b([a-z]\\w*)\\b",
"beginCaptures": {
"1": {
- "name": "entity.name.module.fortran"
It is because inside "use-statement": rule, on line 4427 it is written "name": "entity.name.class.fortran" this means that use will highlight the following name as class. And as issue #51 requested, module should highlight the following name that same way as use does.
But It could be done the other way around. To just correct the "use-statement": rule to highlight the following name as module instead of class. I chose the previous because entity.name.module.fortran has the same color as non-highlighted text.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Well, the |
I've been looking at this issue and the problem is that Example of Dark+ theme
I don't think that customizing the theme is a good option ... |
I am not suggesting you change the colour itself to a specific colour. If I understand correctly your objective is to make those keywords to have the same colour (no matter what that colour is specifically) so there should be a mechanism for that. But changing the name that identifies the syntactical meaning of the token to something else does not seems like the right thing to do. |
So what you can see from the images below the scope defined by the module name is not been highlighted because there is no such scope defined in the current theme, but the one in the use statement does get highlighted because in this case there is a scope defined in the theme. As we dot provide a theme of our own. We have to rely on the common scopes that for sure will be included in any decent theme. It would be nice if you can update your PR changing this and then we can merge 😀 |
I agree completely ... but although this entry
As you can see, there is no On default Dark+ theme, our extension(master branch) uses the following:
To follow your thought (which i completely agree) that:
I'm afraid those 4 above are our available common scopes |
Just found another one:
Seems like a generic scope name that makes more sense. Do you agree with this one for use and module names? |
@pedro-ricardo I personally don't like that one very much as it is too generic. If you find a better scope name that can be used and does not have another meaning in Fortran then go for it. If you can't find any then I won't complain any longer Regarding the |
If this helps,
|
In my opinion we should use the logic that's already implemented in the syntax file. And here is an example: Thinking that this scopes where not made for Fortran language, and that the C++ or Python Classes are the closest features from a Fortran module, I don't have any problem in using the scope In the case you are still worried about the confusion with Fortran classes ... OK so ... to END this once and for all, either choose one
or suggest a new one and I'll put it there. Let's move on 👍 😃 |
Fill free to use the one that makes more sense to you. And go for it.
…On Sat, Apr 28, 2018 at 10:45 PM Pedro Ricardo C Souza < ***@***.***> wrote:
In my opinion we should use the logic that's already implemented in the
syntax file. And here is an example:
Function names are: entity.name.function.fortran
Subroutine names are: entity.name.function.subroutine.fortran
In this example we use entity.name.function because it is the scope we
have and typify with subroutine.fortran that doesn't contribute to to the
highlight but make it less generic.
Thinking that this scopes where not made for Fortran language, and that
the C++ or Python Classes are the closest features from a Fortran module, I
don't have any problem in using the scope entity.name.class and typify
with module.fortran. Or use the previous entity.other.attribute-name and
add module.fortran.
In the case you are still worried about the confusion with Fortran classes
...
Fortran classes are just a special derived type, and are highlighted as
such, for example:
Derived Types declarations are: storage.type.type.fortran
Class declarations are: storage.type.class.fortran
The names of both types and classes are: entity.name.type.fortran
OK so ... to END this once and for all, either choose one
- entity.name.class.module.fortran
- entity.other.attribute-name.module.fortran
or suggest a new one and I'll put it there. Let's move on 👍 😃
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFoEefXxpIR1XZhlHyDEaRrAoaaXeLzuks5ttNTugaJpZM4TZ3lh>
.
|
This PR fixes #57 as well |
|
language-configuration.json
Outdated
@@ -49,7 +49,8 @@ | |||
] | |||
], | |||
"indentationRules": { |
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.
Pretty cool you are addressing this issue as well, but please do it in a separate pull request as this is not related to the current issue we are fixing.
So just remove this commit from the history.
If you need help doing that ping me and I will let you know how.
After that, we can merge this thing once and for all.
b08eede
to
6fc6737
Compare
Solves issue #51 by making module end use names with the same colors