Fork me on GitHub
#spacemacs
<
2020-03-10
>
niveauverleih07:03:53

How can I get the source function in Spacemacs/Cider. The documentation says: "SPC m s u require Clojure utils into current namespace - i.e. functions doc source" But I get "SPC m s u is undefined".

spfeiffer10:03:38

Recently there were some keybinding updates. Perhaps guide is outdated? You are on develop branch?

niveauverleih11:03:13

I don't think so. I can fetch it. I wanted to try the linter anyway and it seems I need to have the dev branch for that.

David Schmidt14:03:27

I’m trying to get clojure to have “jump to definition” functionality, but cider-find-var doesn’t seem to work for me. I get this error:

Wrong type argument: hash-table-p, nil
I’m on the most recent version of the develop branch and all my packages should be fully up to date. I tried googling the error but didn’t find anything particularly helpful. Any idea what this means?

David Schmidt15:03:37

I think it might have something to do with using cider connect instead of jack-in?

practicalli-johnny15:03:33

@david.schmidt I always use one of the cider-jack-in commands and , g g for cider-find-var seems to work okay. So long as the repl is running it seems to work fine. I havent tried cider-connect for a long time. Are there any errors in the messages buffer, SPC b m ?

David Schmidt16:03:14

I unfortunately have to cider-connect for my development environment to work. Here’s the error from the messages buffer:

nrepl-dict-from-hash: Wrong type argument: hash-table-p, nil
When doing cider connect and getting this failure, cider-find-var also fails to default back to dumb jump. If I cider-jack-in to another project, definition jumping seems to work, but I’m not sure which handler it used.

practicalli-johnny17:03:52

Does evaluating the function definitions you want to find make any difference, or just evaluating the whole source code buffer? I appreciate it does defeat the purpose of find var a little if you have to evaluate the function before finding it. If cider-find-var still doesnt work with the functions evaluated, then is seems something is broken with cider-connect. Probably should raise an issue on https://github.com/clojure-emacs/cider

David Schmidt18:03:48

No, unfortunately it does not make a difference. Thanks for the help!

practicalli-johnny15:03:07

I've raised a new pull request to add two keybindings for browsing the clojure.spec specifications of a clojure project, , h s to browse a specific spec and , s S to browse all specs. The functions called have been present for a while but without keybindings. The new keybindings follow the same approach as browsing namespace keybindings. https://github.com/syl20bnr/spacemacs/pull/13362 (Note: no muscle memory was hurt in the making of this pull request)

practicalli-johnny16:03:58

, h s and , h S for browsing clojure.spec specifications are now part of the Spacemacs develop branch.

Adrian Smith15:03:42

does any one know why the parinfer layer might not be working? https://github.com/syl20bnr/spacemacs/issues/13350

practicalli-johnny16:03:32

Looks like nothing has changed with par-infer layer for a year and a half https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bmisc/parinfer/packages.el The parinfer layer defines the SPC t P keybinding, so when the layer is not included, then that keybinding does not exist. I cannot see any obvious commits or PR's to Spacemacs that would have broken the parinfer layer. I would have assumed it would be some updates to Vim or Evil related packages that have broken something, or perhaps the parinfer package relies on something that has been depreciated or removed. The parinfer layer seems to do very little, except pull in the parinfer package and set it to indent mode, adding a keybinding and enabling a toggle action.

practicalli-johnny16:03:37

An alternative to parinfer is to use agressive indenting and align form https://practicalli.github.io/spacemacs/improving-code/formatting/ which doesnt need any additional layers

pablore20:03:35

Is anyone here using the rust-parinfer plugin instead of the parinfer layer?

pablore20:03:18

I use it on vim and find that it works better than the version of emacs. But I havent been able to install it on my spacemacs configuration

pablore20:03:33

(It’s supposed to work on both emacs and vim)

didibus22:03:56

@pablore If you like parinfer, I recommend you try adjust-parens-mode + aggressive-indent-mode combo

didibus22:03:13

Its parinfer like, but I find it a superior experience

didibus22:03:01

Basically, it always formats everything automatically as you type, and you press TAB or C-TAB to indent/dedent which will also adjust parenthesis accordingly

didibus22:03:41

Here's a demo