Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments and Multi-line Highlight Support #68

Merged
merged 5 commits into from
Feb 27, 2019

Conversation

parithon
Copy link
Collaborator

Purpose

Allow users to highlight multiple lines.

Changed Files

  • extension.ts Added the necessary functionality to handle a start and end line and to add the highlights and remove the highlights accordingly. Additionally, the user can now add comments to the highlight!
  • highlighter.ts Added support for a start and end line
  • twitchChatClient.ts Added support to pass the correct params to extension.ts
  • twitchHighlighterTreeView.ts Changed the naming of the parameters to identify their purpose
  • twitchLanguageServer.ts Added the functionally needed to handle the command. Take special notice of the Regex used for this purpose.

How to test

  1. Clone the repo: git clone https://github.com/clarkio/vscode-twitch-highlighter.git.
  2. Install the node dependencies: cd vscode-twitch-highlighter && npm install.
  3. Press F5 or click debug button (green triangle/play button) in VSCode.
  4. Connect to the chat server.
  5. Use the highlight command !line or !highlight to highlight multiple lines and to add comments.
  6. Use the unhighlight command !line !<number> to unhighlight the lines.

Addresses

#52 | #12 | #13

@parithon parithon added the reviews wanted Generally a Pull Request with code changes that would be helpful to have validated by others label Feb 17, 2019
* !line !5
* !line 5-10
* !line !5-15
* !line settings.json 5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't had a chance to run the code yet to test it but does this also support !line 5 settings.json? I only ask because it feels like that may be the natural/organic way to type/think about the usage. Do you agree? Might just be me who thinks that way though.

In general, how would we think/speak what we want to share? Something like "There's an issue on line 5 in your settings.json file"? Or "There's an issue in your settings.json file on line 5"? Should we support both or just one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now it would not support !line 5 settings.json but I can adjust the regex pattern to support that flow. See https://regexr.com/48gf0 to test the pattern.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pushed a new commit which supports @clarkio's suggestion

@clarkio clarkio added this to the 0.1.5 milestone Feb 22, 2019
Copy link
Owner

@clarkio clarkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks!

@clarkio clarkio merged commit f0203fd into clarkio:vnext Feb 27, 2019
@parithon parithon deleted the feature-52 branch March 1, 2019 02:24
CodemanCodes pushed a commit to CodemanCodes/vscode-twitch-highlighter that referenced this pull request Aug 27, 2019
Azure Pipelines YAML refactoring + publish test results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviews wanted Generally a Pull Request with code changes that would be helpful to have validated by others
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants