-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Major mode leader key doesn't work in Clojure files #3000
Comments
I'm looking at this now. I suspect moving all the mode-specific evil-leader bindings to The major mode leader key is not robust in my experience, but this is the first time I've seen the problem reliably reproducible. |
Hmm, it doesn't work in project.clj, but works in any other clj/cljs file. |
yes, it doesn't work for all files in project's root directory |
Congratulations on the 3000th issue or PR, by the way. :-) |
Thank you 😂 My pleasure! |
@malchmih when you have this problem I assume you're in normal mode and using vim keybindings? What's the value of |
In my experience , doesn't work in the first clojure buffer, in the 2nd and following it works. Intuitively I'd guess that the error message about nREPL prevents a complete mode startup, which is why the leader doesn't work. Further, the nREPL checking code throws that error only once per session, which is why the leader works in subsequently opened buffers. |
That actually makes perfect sense because , is bound in an "after" major mode hook. The failure is probably preventing that hook from firing. |
Right now it doesn't work only in project.clj. With messages I mentioned above. Doesn't depend on the order of buffers. |
Ok, still makes sense though: project.clj is special, and the nREPL thing is apparently checked only for project.clj. |
In the past we had this problem of |
No, I don't |
We could make setting the major mode leader keys independent of the mode hooks running successfully but the proper thing to do would be to track down this error and fix it. Has anyone produced a backtrace for the error? Edit typo |
#3002 should fix the inconsistency between |
Use same hook as evil-leader for major-mode-leader. This fixes an inconsistency that could arise between the leader key being bound but the major-mode leader key not being bound (See for example #3000). By using the same hook as evil-leader-mode, we ensure that either both keys or bound or neither. A minor problem that was fixed was `mode-map` and `major-mode-map` were not let bound and had global scope.
Thank you, |
@malchmih I don't know why that error message comes at this point in time, but you can use , s i to start up a REPL. I don't know exactly what the supposed workflow is with CIDER. It works for me if I just start up a REPL after opening a clojure file. The original bug has been resolved, so this issue can be closed. |
Sure, will try to investigate myself |
I can't comment on the proper way to set up this layer, but I was able to narrow down the problem to this line. When cider-mode loads it ends up checking for an active repl, which throws an error if it can't find one. Here's the backtrace (note the call to You could probably remove that hook and find another way to start cider-mode to stop the error
|
Thank you, will take a look at this 👍 |
Use same hook as evil-leader for major-mode-leader. This fixes an inconsistency that could arise between the leader key being bound but the major-mode leader key not being bound (See for example syl20bnr#3000). By using the same hook as evil-leader-mode, we ensure that either both keys or bound or neither. A minor problem that was fixed was `mode-map` and `major-mode-map` were not let bound and had global scope.
On
,
I get No previous search.SPC m
works.The text was updated successfully, but these errors were encountered: