This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-14
Channels
- # aleph (2)
- # announcements (11)
- # aws (4)
- # babashka (42)
- # babashka-sci-dev (81)
- # beginners (90)
- # biff (2)
- # calva (40)
- # cider (16)
- # clj-kondo (26)
- # clj-on-windows (1)
- # cljdoc (4)
- # cljfx (1)
- # cljsrn (2)
- # clojure (92)
- # clojure-austin (2)
- # clojure-europe (23)
- # clojure-nl (5)
- # clojure-uk (3)
- # clojured (3)
- # clojurescript (19)
- # community-development (3)
- # conjure (1)
- # cursive (4)
- # datalevin (3)
- # datomic (5)
- # emacs (13)
- # events (1)
- # fulcro (26)
- # graphql (1)
- # hugsql (15)
- # introduce-yourself (5)
- # leiningen (1)
- # lsp (29)
- # minecraft (19)
- # music (1)
- # off-topic (36)
- # pathom (12)
- # podcasts (2)
- # portal (8)
- # re-frame (12)
- # reagent (11)
- # rewrite-clj (4)
- # shadow-cljs (56)
- # spacemacs (2)
- # vim (12)
- # windows (3)
- # xtdb (43)
Can I keep cider from hijacking my C-u
and C-p
keys? as I’m typing I want C-f
, C-u
, C-p
, and C-n
to always move the cursor forward, up, back and down. However, sometimes it annoyingly popups completion menus which hijack normal cursor operation. If I’m not looking at the screen, or if I’m typing very fast the navigation keys start moving around in the popup rather than in the text. This is bad.
You can check out the configuration for company
. You could for instance get rid of it auto popping and bind company-manual-begin
to a key
how can I configure company?
I see the following in company.el
(defvar company-active-map
(let ((keymap (make-sparse-keymap)))
(define-key keymap "\e\e\e" 'company-abort)
(define-key keymap "\C-g" 'company-abort)
(define-key keymap (kbd "M-n") 'company--select-next-and-warn)
(define-key keymap (kbd "M-p") 'company--select-previous-and-warn)
(define-key keymap (kbd "C-n") 'company-select-next-or-abort)
(define-key keymap (kbd "C-p") 'company-select-previous-or-abort)
(define-key keymap (kbd "<down>") 'company-select-next-or-abort)
(define-key keymap (kbd "<up>") 'company-select-previous-or-abort)
(define-key keymap [remap scroll-up-command] 'company-next-page)
(define-key keymap [remap scroll-down-command] 'company-previous-page)
(define-key keymap [down-mouse-1] 'ignore)
(define-key keymap [down-mouse-3] 'ignore)
(define-key keymap [mouse-1] 'company-complete-mouse)
(define-key keymap [mouse-3] 'company-select-mouse)
(define-key keymap [up-mouse-1] 'ignore)
(define-key keymap [up-mouse-3] 'ignore)
(define-key keymap [return] 'company-complete-selection)
(define-key keymap (kbd "RET") 'company-complete-selection)
(define-key keymap [tab] 'company-complete-common)
(define-key keymap (kbd "TAB") 'company-complete-common)
(define-key keymap (kbd "<f1>") 'company-show-doc-buffer)
(define-key keymap (kbd "C-h") 'company-show-doc-buffer)
(define-key keymap "\C-w" 'company-show-location)
(define-key keymap "\C-s" 'company-search-candidates)
(define-key keymap "\C-\M-s" 'company-filter-candidates)
(company-keymap--bind-quick-access keymap)
keymap)
"Keymap that is enabled during an active completion.")
it looks like C-n
and C-p
are explicitly hijacked.
I’m not really up on emacs scoping rules. Is there a way for me to remove something from this keymap after it has been loaded?
BTW what is cider trying to tell me with this popup anyway? it does not look like useful information. is it a cider bug?
I have to press ESC 3 times to make it go away.
Question about sayid
.
> If you use CIDER's jack-in commands, then Sayid automatically adds the Maven dependency when starting a REPL. This means you don't need to manually add the dependency to your project.clj
or deps.edn
file.
Above is true for project.clj
but not for deps.edn
[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0"} cider/cider-nrepl {:mvn/version "0.28.3"} com.clojure-goes-fast/clj-java-decompiler {:mvn/version "0.3.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.5.2"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,com.billpiel.sayid.nrepl-middleware/wrap-sayid,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Execution error (FileNotFoundException) at nrepl.cmdline/require-and-resolve (cmdline.clj:201).
Could not locate com/billpiel/sayid/nrepl_middleware__init.class, com/billpiel/sayid/nrepl_middleware.clj or com/billpiel/sayid/nrepl_middleware.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
good catch. seems like its not injecting the actual dep, just the middleware it expects to be present
Looks like there is an issue for that: https://github.com/clojure-emacs/sayid/issues/68