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

Support syntax toggling shortcuts #353

Closed
4 tasks done
remcohaszing opened this issue Nov 10, 2023 · 2 comments · Fixed by #384
Closed
4 tasks done

Support syntax toggling shortcuts #353

remcohaszing opened this issue Nov 10, 2023 · 2 comments · Fixed by #384
Labels
🗄 area/interface This affects the public interface 👍 phase/yes Post is accepted and can be worked on 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have

Comments

@remcohaszing
Copy link
Member

Initial checklist

Problem

It would be nice it it’s possible to toggle certain syntax with keyboard shortcuts.

  • Ctrl + B → Toggle strong
  • Ctrl + I → Toggle emphasis

More shortcuts may be added later, but support for strong and emphasis is a nice start.

Solution

First, investigate how to implement this.

  • Should this be implemented in the VS Code extension or in the language server?
  • Are custom commands even supported by LSP/Volar?
  • How to handle edge cases?
  • Should this be implemented in vscode-markdown-languageservice instead?

Alternatives

N/A

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 10, 2023
@remcohaszing remcohaszing added 🦋 type/enhancement This is great to have 🗄 area/interface This affects the public interface 🧒 semver/minor This is backwards-compatible change 👍 phase/yes Post is accepted and can be worked on labels Nov 10, 2023
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Nov 10, 2023
Copy link
Contributor

Hi! This was marked as ready to be worked on! Note that while this is ready to be worked on, nothing is said about priority: it may take a while for this to be solved.

Is this something you can and want to work on?

Team: please use the area/* (to describe the scope of the change), platform/* (if this is related to a specific one), and semver/* and type/* labels to annotate this. If this is first-timers friendly, add good first issue and if this could use help, add help wanted.

remcohaszing added a commit that referenced this issue Dec 29, 2023
The prose syntax is based on the current text selection and the AST.
If the selection is within range of the syntax that’s toggled, the
syntax is removed. Otherwise the selected text is expanded to include
full words and wrapped.

The supported syntaxes are:

- `delete`
- `emphasis`
- `inlineCode`
- `strong`

Closes #353
remcohaszing added a commit that referenced this issue Jan 18, 2024
The prose syntax is based on the current text selection and the AST.
If the selection is within range of the syntax that’s toggled, the
syntax is removed. Otherwise the selected text is expanded to include
full words and wrapped.

The supported syntaxes are:

- `delete`
- `emphasis`
- `inlineCode`
- `strong`

Closes #353
Copy link
Contributor

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 👍 phase/yes Post is accepted and can be worked on 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have
Development

Successfully merging a pull request may close this issue.

1 participant