Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Key binding changes should be for agda files only #78

Open
freeman42x opened this issue Jan 17, 2019 · 6 comments
Open

Key binding changes should be for agda files only #78

freeman42x opened this issue Jan 17, 2019 · 6 comments

Comments

@freeman42x
Copy link

The keybindings specific to agda-mode are also affecting haskell files for example which makes it impossible to copy using Ctrl+C.

The agda-mode key bindings should only be enabled for .agda and .lagda files.

@banacorn
Copy link
Owner

'atom-text-editor':
'ctrl-c ctrl-l': 'agda-mode:load'

Ctrl+c Ctrl+l should be the only keybinding that is affecting Haskell files, as it is the sole command for activating agda-mode.

It's impossible to restrict the scope of Ctrl+c Ctrl+l to .agda or .lagda files.

There is a workaround, but it will require the users to have the language-agda package installed beforehand, so that the .agda files could be marked [data-grammar~="agda"]:

# for people who have language-agda installed (regardless of 'agda-mode:load')
'atom-text-editor[data-grammar~="agda"]':

And that's actually what it used to be, until recently, because it would stop the users from activating agda-mode if they forgot to install the language-agda package first, which would confuse the hell outta them.

@freeman42x
Copy link
Author

I know for sure that multiple key bindings for Haskell files are affected by agda-mode and not just Ctrl+c, Ctrl+l.

When agda-mode is enabled Ctrl+C no longer works, and there are other keyboard changes.

What I currently do to get past this issue is to disable agda-mode plugin before working on Haskell files.

@banacorn
Copy link
Owner

Can I take a look at what the key binding resolver shows when you press Ctrl+C on Haskell files?
(To open the key binding resolver, press Ctrl+. or Cmd+. on OS X)

@freeman42x
Copy link
Author

With agda-mode disabled:

With agda-mode enabled:

@banacorn
Copy link
Owner

The temporary workaround: go to Settings > Keybindings and the text on the top should guide you to the place where you can modify and override the keybindings to your preferences.

The long term solution is that I should find a way to make sure that Atom package dependency can be handled automatically so that people won't have to install language-agda manually so that I can restrict the scope of keybinding of agda-mode.

@freeman42x
Copy link
Author

Thank you. The workaround seems to have worked. I hope that was the only keybinding affected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants