This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
VSCode does not have a UI experience to change settings that are of type array; users are required to edit these setting using the text editor instead of the UI editor. Instead of using an array of type string for the channels setting we should use a comma separated string.
Changed Files
package.json Changed the setting from an array to a string and also changed the default value from an empty array [] to an empty string "".
extensionts Added a new function updateChannelsSetting which checks to see if the current setting is an array and if it is change it to a comma separated string value.
twitchLanguageServer.ts When getting the Twitch Chat Options, we split the comma separated string of channels into an array.
How to test
Clone the repo: git clone https://github.com/clarkio/vscode-twitch-highlighter.git.
Install the node dependencies: cd vscode-twitch-highlighter && npm install.
Check your settings and note that the current channels setting is an array, for example: ['clarkio'].
Press F5 or click debug button (green triangle/play button) in VSCode.
Check your settings again and it should now be a string, for example: 'clarkio'.
Connect to the chat server.
Use the highlight command !line or !highlight to highlight multiple lines and to add comments.
Use the unhighlight command !line !<number> to unhighlight the lines.
Purpose
VSCode does not have a UI experience to change settings that are of type array; users are required to edit these setting using the text editor instead of the UI editor. Instead of using an array of type string for the
channels
setting we should use a comma separated string.Changed Files
package.json
Changed the setting from anarray
to astring
and also changed the default value from an empty array[]
to an empty string""
.extensionts
Added a new functionupdateChannelsSetting
which checks to see if the current setting is an array and if it is change it to a comma separated string value.twitchLanguageServer.ts
When getting the Twitch Chat Options, we split the comma separated string of channels into an array.How to test
git clone https://github.com/clarkio/vscode-twitch-highlighter.git
.cd vscode-twitch-highlighter && npm install
.channels
setting is an array, for example: ['clarkio'].!line
or!highlight
to highlight multiple lines and to add comments.!line !<number>
to unhighlight the lines.Addresses
74