-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow users to use their own cursor style for insert from editor.cursorStyle #1399
Conversation
…orStyle config option (underline or line)
src/configuration/configuration.ts
Outdated
return vscode.TextEditorCursorStyle.Block; | ||
} else if (cursorStyle === 'underline') { | ||
return vscode.TextEditorCursorStyle.Underline; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we can upgrade to 1.10.0^ for the engine, I can add 2 more cases here for line-thin and underline-thin and it will work right away
@johnfn can you take a peek at this when you get a chance |
I was slightly intimidated by the sheer line count of changes, haha. It looks fine. Feel free to merge when you get to my one comment. |
@johnfn might need to click finish review then ;) I dont see a comment |
src/configuration/configuration.ts
Outdated
} | ||
|
||
private cursorStyleFromString(cursorStyle: string): vscode.TextEditorCursorStyle { | ||
if (cursorStyle === 'line') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just make an object here like { line: vscode.TextEditorCursorStyle.Line, ... }
etc?
I actually can't understand why that isn't already provided to us lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can, I actually copied this code from vscode since I was curious how they did it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah really? But they don't expose that anywhere? Meh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha we should fix it and then submit it as a PR back to them 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also refine their type string
to be a union type amongst all the different cursor types... Haha, but you dont have to do that, we don't get much of an advantage from it unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I think I changed it to what you meant...let me know
Grah, the number of times I've forgotten to click that button is too high. |
No description provided.