You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where users will be writing python code within a YAML document. There will be a tag (!Python) after which all text will be treated as python code. I've gotten python autocompletion to work based on a list of keywords and some regex with a CompletionItemProvider, but not seeing a path forward for syntax highlighting.
I have an editor instance which has setModelLanguage which I can use to switch between python and yaml syntax highlighting for the entire editor (which I'm doing currently as a work around) but ideally there is a simple way to apply text highlighting for certain line numbers in the editor. Maybe there's a way to do this through tokenizers?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a use case where users will be writing python code within a YAML document. There will be a tag (!Python) after which all text will be treated as python code. I've gotten python autocompletion to work based on a list of keywords and some regex with a CompletionItemProvider, but not seeing a path forward for syntax highlighting.
I have an editor instance which has setModelLanguage which I can use to switch between python and yaml syntax highlighting for the entire editor (which I'm doing currently as a work around) but ideally there is a simple way to apply text highlighting for certain line numbers in the editor. Maybe there's a way to do this through tokenizers?
Beta Was this translation helpful? Give feedback.
All reactions