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

Some keyboard shortcuts missing the languageID check #823

Closed
kstehn opened this issue Oct 20, 2020 · 5 comments
Closed

Some keyboard shortcuts missing the languageID check #823

kstehn opened this issue Oct 20, 2020 · 5 comments
Labels
good first issue Good for newcomers

Comments

@kstehn
Copy link
Contributor

kstehn commented Oct 20, 2020

For Some keyboard shortcuts is the languagID check missing if the shortcut should be active.
I found this Calva: Evaluate Top Level Form (defun) which is bind to Alt + Enter.
The problem was i couldnt use the Alt + Enter Shortcut in a diffrent file Type Context because the Calva Shortcut was then used.
Adding && editorLangId == 'clojure' to the when expression fixed this.

I am not sure if there are anymore and if this is needed every time.

@bpringe
Copy link
Member

bpringe commented Oct 20, 2020

Just at a quick glance, this probably should be added to all Calva keybindings that don't have it.

@bpringe bpringe added the bug Something isn't working label Oct 20, 2020
@PEZ
Copy link
Collaborator

PEZ commented Oct 20, 2020

But then you would lose the ability to evaluate a piece of Clojure code in a markdown file, or similar.

@bpringe
Copy link
Member

bpringe commented Oct 20, 2020

Interesting... is this something that is used often? I didn't even know this was supported 😄. The collisions with extensions for other file types is concerning, though.

@PEZ
Copy link
Collaborator

PEZ commented Oct 20, 2020

Not sure how often it is used, but it is intentional:

https://github.com/BetterThanTomorrow/calva/blob/master/CHANGELOG.md#119---2018-03-18

Which doesn't mean we must keep it like this, but on the other hand, it has worked to have it like this for quite a while.

@bpringe bpringe removed the bug Something isn't working label Oct 21, 2020
@PEZ
Copy link
Collaborator

PEZ commented Oct 22, 2020

Having given this some pondering, I think that it makes sense to free up the shortcuts in non-closure files, and let people use the command palette.

@bpringe bpringe added the good first issue Good for newcomers label Dec 28, 2020
@PEZ PEZ removed the enhancement label Feb 10, 2021
bpringe added a commit that referenced this issue Oct 30, 2021
Fixes #823, keyboard shortcuts check language id
@bpringe bpringe closed this as completed in 1c2e75e Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants