spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
niveauverleih 2020-03-10T07:33:53.128200Z

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".

spfeiffer 2020-03-10T10:37:38.128700Z

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

niveauverleih 2020-03-10T11:11:13.128900Z

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 Schmidt 2020-03-10T14:55:27.132100Z

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 Schmidt 2020-03-10T15:01:37.132500Z

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

practicalli-john 2020-03-10T15:27:33.135300Z

@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 ?

practicalli-john 2020-03-10T15:44:07.138200Z

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)

Adrian Smith 2020-03-10T15:49:42.138800Z

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

practicalli-john 2020-03-10T16:15:32.142500Z

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-john 2020-03-10T16:18:37.143800Z

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

David Schmidt 2020-03-10T16:48:14.144Z

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-john 2020-03-10T17:23:52.144200Z

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 Schmidt 2020-03-10T18:08:48.144700Z

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

pablore 2020-03-10T20:32:35.145600Z

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

pablore 2020-03-10T20:33:18.146300Z

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

pablore 2020-03-10T20:33:33.146700Z

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

2020-03-10T22:03:56.147400Z

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

2020-03-10T22:04:13.147700Z

Its parinfer like, but I find it a superior experience

2020-03-10T22:05:01.148400Z

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

2020-03-10T22:12:41.148700Z

Here's a demo