-
-
Notifications
You must be signed in to change notification settings - Fork 223
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 user to override keybindings in comments and/or strings #1023
Comments
I'm willing to have a stab at a PR for this, but don't know much about the VSCode extension API or execution model, so I'll have to read up a bit & scan the calva codebase. In the meantime I could do with some guidance for starting points. As far as I can see from the docs and one example from Microsoft, it involves calling a vscode 'setContext' command to toggle the newly added contexts. The initial questions that arise for me are:
|
I think the relevant event is There is probably some things to consider so that it is the current active editor that the event is about. And also what should happen when the user activates a document. The way to examine the code structure of the editor cursor's location is to use a Calva We do something similar here: https://github.com/BetterThanTomorrow/calva/blob/dev/src/results-output/results-doc.ts A You can start by adding the event subscription in an anonymous function right in I hope I am making some little sense here? 😄 |
Another thing that might help is placing a breakpoint in the code after getting/creating the token cursor, and calling methods on it in the Debug Console to get a feel for how it works. |
Thanks guys that all makes sense & should be helpful. |
Many* users report that they prefer default text language mode keyboard shortcuts for use within comments and strings. They could configure this for themselves if calva made 'inString' and 'inComment' when-contexts available.
(* OK, one user)
The text was updated successfully, but these errors were encountered: