emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
fricze 2020-08-05T08:09:33.080600Z

hi! quick question, is there a way to make go-to-definition work in emacs for clojure specs?

fricze 2020-08-05T08:10:59.081300Z

I have it working for defns and defs but can’t handle specs

jumar 2020-08-05T09:05:04.081400Z

[I use spacemacs] it used to work for me with cider-find-keyword for things like ::specs/non-empty-string but it doesn't work anymore. I can still do press g d (go-to-definition) and get a quick list of occurences of given symbol and usually quickly identity the place where it's defined

πŸ‘ 1
practicalli-john 2020-08-05T09:28:27.086500Z

@andrzej.fricze using fully qualified spec names, e.g. :practicalli.banking/account-id rather than ::account-id and with the REPL running, then cider-browse-spec works well as well as the clj-find-var function in Spacemacs Clojure layer (a wrapper function around cider-find-var). With the cursor on an auto-qualified spec form, ::account-id these functions do not seem to work. If the repl is not running, the clj-find-var function used dump-jump-go which doesn't seem to work for specs https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/clojure/funcs.el#L187-L195

fricze 2020-08-05T09:30:52.087100Z

thanks for help guys! πŸ™‚

ericdallo 2020-08-05T12:44:48.087300Z

Take a look at clojure-lsp with lsp-mode for Emacs, more info on #lsp

2020-08-05T12:46:10.087900Z

Is there something obvious I'm missing why this isn't properly setting the keybinding:

(define-key inf-clojure-mode-map (kbd "C-c C-r") #'inf-clojure-restart)

2020-08-05T12:49:49.088Z

Ah, think I figured it out. I was doing

(require 'clj-refactor)
later in the .el file which I think was overriding the keybinding