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

How to support highlights for comments #5608

Closed
qi-min opened this issue Jul 12, 2017 · 4 comments
Closed

How to support highlights for comments #5608

qi-min opened this issue Jul 12, 2017 · 4 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@qi-min
Copy link

qi-min commented Jul 12, 2017

Hi, I try to enable highlights for single line comments. In orion, following code can be used to highlight comment in editor.
screen shot 2017-07-12 at 1 14 59 pm

id: "SQL",
            contentTypes: ["text/sql", "text/sqlSegment"],
            patterns: [
                {include: "#comment_singleLine"}, 

and following code can be used to define the prefix of comment

repository: {
                comment_singleLine: {
                    match: {match: "--.*", literal: "--"}, 
                    name: "comment.line.double-dash", 
                    patterns: [
                        {
                            include: "orion.lib#todo_comment_singleLine" //$NON-NLS-0$
                        }
                    ]
                }
            } 

Document from Orion:
Implementations of orion.edit.highlighter define the following attributes:
id
String A name that uniquely identifies this grammar.
contentTypes
String[] An array of Content Type IDs that this grammar will be used for.
patterns
Object[] An array of pattern objects to be used to assign style classes. Pattern objects are described below.
repository
Object Optional. A set of named pattern objects that can be referenced by this grammar and others.

In Che, I can enable highlight for some keywords by OrionHighlightingConfigurationOverlay. But#comment_singleLine does not work, comments is not highlighted.
And OrionHighlightingConfigurationOverlay does not support set repository, so I can not set the comments prefix.
Does any one know how to enable comments highlight in Che?

@ghost ghost added the kind/question Questions that haven't been identified as being feature requests or bugs. label Jul 12, 2017
@ghost
Copy link

ghost commented Jul 12, 2017

@azatsarynnyy @evidolob can you help here?

@qi-min
Copy link
Author

qi-min commented Jul 18, 2017

@azatsarynnyy @evidolob Any comments?

@ghost
Copy link

ghost commented Jan 4, 2018

@m7luffy btw, there's such an issue #5330 Once it's done, Monaco provides far more comprehensive docs.

@ghost
Copy link

ghost commented Sep 10, 2018

Closed due to inactivity

@ghost ghost closed this as completed Sep 10, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

1 participant