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
Adds the ability to handle highlights when the vscode is using relative line numbers.
Changed Files
extension.ts Added a function checkLineNumbers which checks to see if vscode is using relative line numbers, and if it is adjust the line numbers accordingly.
twitchLanguageServer.ts Edited the Regex pattern to accept the enhanced command. You can now use the following:
!line -5-5 Highlights 10 lines when in relative mode (5 lines above and 5 lines below the cursor)
!line -5..5 Highlights the same 10 lines as above
!line -5--10 highlights lines 5-10 above the cursor
!line -5..-10 highlights the same 5 lines as above
How to test
Clone the repo: git clone https://github.com/clarkio/vscode-twitch-highlighter.git.
Purpose
Adds the ability to handle highlights when the vscode is using relative line numbers.
Changed Files
extension.ts
Added a functioncheckLineNumbers
which checks to see if vscode is using relative line numbers, and if it is adjust the line numbers accordingly.twitchLanguageServer.ts
Edited the Regex pattern to accept the enhanced command. You can now use the following:How to test
git clone https://github.com/clarkio/vscode-twitch-highlighter.git
.cd vscode-twitch-highlighter && npm install
.Line Numbers
setting for vscode torelative
.!line
or!highlight
to highlight lines using the relative numbers (the cursor is always on line zero).!line !<number>
to unhighlight the lines.Line Numbers
setting for vscode.Addresses
80