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

Improve application.properties textmate grammar #236

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Improve application.properties textmate grammar #236

merged 1 commit into from
Mar 27, 2020

Conversation

xorye
Copy link
Contributor

@xorye xorye commented Mar 25, 2020

Fixes #233

The PR textmate/ini.tmbundle#1 that fixes this apostrophe problem:
image

uses the \K regex pattern, which VS Code does not seem to support: microsoft/vscode#93426

Therefore in VS Code, the regexes with \K in that PR does not match with anything, therefore does not highlight anything in orange, therefore appearing to solve the issue in VS Code.

The PR I am making right now, contains TextMate grammar from https://github.com/microsoft/vscode/blob/master/extensions/ini/syntaxes/ini.tmLanguage.json, removes source ini specific grammar (like using ; for commenting), removes matching the single or double quotes (which removes the orange string highlighting alltogether), and adds support for multi-line property keys and number highlighting.

Examples:

quarkus\
.application\
.name=name

quarkus.application.version=123

image

quarkus.application.name=long\
application\
name

quarkus.http.port = 1234

image

quarkus.application.name=David's application
quarkus.http.port=8080

image

org.acme.restclient.CountriesService/mp-rest/url=https://restcountries.eu/rest
configKey/mp-rest/url = 

image

# comment
quarkus.\
http.\
port = { \
  "name": "EpochMillis" \
}

# comment
quarkus.application.name=my app name

image

Signed-off-by: David Kwon [email protected]

Copy link
Collaborator

@fbricon fbricon left a comment

Choose a reason for hiding this comment

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

It doesn't like profiles, eg. %dev.quarkus.http.port=8080:

Screen Shot 2020-03-26 at 5 07 36 PM

@xorye
Copy link
Contributor Author

xorye commented Mar 26, 2020

Fixed
image

@fbricon
Copy link
Collaborator

fbricon commented Mar 26, 2020

weird, it doesn't work for me

@xorye
Copy link
Contributor Author

xorye commented Mar 26, 2020

It should work now

@fbricon fbricon merged commit 9609653 into redhat-developer:master Mar 27, 2020
@fbricon
Copy link
Collaborator

fbricon commented Mar 27, 2020

Nice work @xorye !

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.

Improve application.properties TextMate grammar
3 participants