sabieber / vscode-hocon Goto Github PK
View Code? Open in Web Editor NEWHOCON Config Syntax Highlighting For Visual Studio Code
License: MIT License
HOCON Config Syntax Highlighting For Visual Studio Code
License: MIT License
Ex.
${"pet/{id}"}
causes rest of the formatting to break
The rendering of values, comments, and commas depends on whether or not there are whitespace characters following the value.
In the above image, we see that the colouring of the integer, colon, and comma depend on whether there is a space character on the same line after it.
I would have expected all of the elements to have consistent colouring across the above cases.
In the next image, we see that in-line comments are also impacted by the existence of whitespace.
Again, I would have expected all of the elements to have consistent colouring across the above cases.
The first line is also inconsistent with stand-alone comment lines, even when the stand-alone comment line doesn't have any whitespace.
The last image illustrates my hypothesis that the line stops rendering at the last element that doesn't have any whitespace after it.
I would have expected all of the elements to have consistent colouring across the above cases.
There's a lot of JSON files in the world, it seems unreasonable for this extension to take over all of them, especially since it doesn't provide the basic JSON syntax highlighting that VSCode's built-in JSON support does
Extension | Author | Version |
---|---|---|
gitignore | codezombiech | 0.5.0 |
python | donjayamanne | 0.6.5 |
gitlens | eamodio | 4.1.1 |
py-paste-indent | hyesun | 0.0.2 |
cpptools | ms-vscode | 0.11.4 |
csharp | ms-vscode | 1.10.0 |
vscode-docker | PeterJausovec | 0.0.16 |
vscode-icons | robertohuertasm | 7.9.0 |
HOCON | sabieber | 0.0.1 |
code-settings-sync | Shan | 2.8.1 |
Steps to Reproduce:
Ctrl + /
(ie. "toggle comment")VSCode throws an exception and doesn't toggle comment:
TypeError: t.charCodeAt is not a function
Full trace:
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:29 t.charCodeAt is not a function: TypeError: t.charCodeAt is not a function
at Function.e._haystackHasNeedleAtOffset (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:601817)
at Function.e._analyzeLines (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:604929)
at Function.e._gatherPreflightData (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:605403)
at e.getEditOperations (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:607845)
at Function.e._getEditOperationsFromCommand (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:860394)
at Function.e._getEditOperations (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:859442)
at Function.e._innerExecuteCommands (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:857843)
at Function.e.executeCommands (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:857585)
at t._executeEditOperation (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:853863)
at t._externalExecuteCommands (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:857271)
e.onUnexpectedError @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:29
(anonymous) @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:29
e.onUnexpectedError @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
o @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
e._getEditOperationsFromCommand @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
e._getEditOperations @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
e._innerExecuteCommands @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
e.executeCommands @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t._executeEditOperation @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t._externalExecuteCommands @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.trigger @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.executeCommands @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.run @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.runEditorCommand @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
(anonymous) @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.invokeFunction @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.invokeWithinContext @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.runCommand @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
handler @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.invokeFunction @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t._tryExecuteCommand @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
(anonymous) @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
then @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
t.executeCommand @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28
(anonymous) @ /C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:29
emitTwo @ events.js:106
emit @ events.js:191
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28 Unexpected exception while executing command.
Perhaps the API for extensions has changed? IDK, I didn't find any information to help narrow it down.
It only happens for HOCON, and not any of my other language extensions.
Given a sample HOCON value:
{hello: { goodbye:true}}
gives the following highlighting:
Notice that the adjoined :
and }
characters are also highlighted. I would have expected only the characters true
to be highlighted.
This does not happen for other values:
and if you add spaces between these characters, only true
is highlighted (as expected):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.