Giter VIP home page Giter VIP logo

vscode-hocon's Introduction

image

Things I code with

Java sirius Kotlin JavaScript TypeScript Bootstrap HTML5 CSS3 Sass Jenkins Docker MongoDB ElasticSearch Redis IntelliJ IDEA Visual Studio Code

Things I experiment / play with

Python C# Unity Flutter Raspberry Pi

vscode-hocon's People

Contributors

jgroom33 avatar sabieber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

swamikevala hadre

vscode-hocon's Issues

No space after colon in key-value pair highlights last character of key

Given a sample HOCON value:

foo :
[
    "bar"
]

gives the following highlighting:

no_space

Notice that the adjoined last o character of foo is also highlighted. I would have expected only the : to be highlighted.

This does not happen is you add a space character after the : character, before the newline:

space

Values require whitespace after them on the same line in order to render correctly

The rendering of values, comments, and commas depends on whether or not there are whitespace characters following the value.

case1
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.

case2

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.

case3

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.

Unreasonable for this extension to claim all json files

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

Toggle Comment throws exception

  • VSCode Version: Code 1.13.0 (376c52b955428d205459bea6619fc161fc8faacf, 2017-06-08T16:43:13.058Z)
  • OS Version: Windows_NT ia32 10.0.10586
  • Extensions:
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:

  1. Open a HOCON .conf file
  2. Select a line in the editor and hit 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.

Anything attached to a boolean value also gets highlighted

Given a sample HOCON value:

{hello: { goodbye:true}}

gives the following highlighting:

bool

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:

int

and if you add spaces between these characters, only true is highlighted (as expected):

bool_with_spaces

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.