Skip to content

Improve application.properties textmate grammar#236

Merged
fbricon merged 1 commit intoredhat-developer:masterfrom
xorye:233grammar
Mar 27, 2020
Merged

Improve application.properties textmate grammar#236
fbricon merged 1 commit intoredhat-developer:masterfrom
xorye:233grammar

Conversation

@xorye
Copy link
Copy Markdown
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 dakwon@redhat.com

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

xorye commented Mar 26, 2020

Fixed
image

@fbricon
Copy link
Copy Markdown
Collaborator

fbricon commented Mar 26, 2020

weird, it doesn't work for me

Signed-off-by: David Kwon <dakwon@redhat.com>
@xorye
Copy link
Copy Markdown
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
Copy Markdown
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