spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
Yehonathan Sharvit 2020-06-03T06:15:42.273200Z

Awesome! How do I use this package in spacemacs?

plexus 2020-06-03T06:17:25.273400Z

see the comments, you just call (clj-ns-name-install) in your config. You'll need to install walkclj as well. That one is on melpa, this package isn't

plexus 2020-06-03T06:18:25.273600Z

I load this as part of a custom layer but probably easier to just drop it in your config and require it like any other elisp file https://github.com/plexus/plexmacs/blob/master/layers/plexus-clojure-extras/packages.el#L14

dev.4openID 2020-06-03T10:10:15.275400Z

on ubuntu using spacemacs - how do I copy from/to spacemacs from another editor (usually C-c C-v) and vica versa?

practicalli-john 2020-06-03T10:27:51.282300Z

@dev.4openid in Spacemacs you yank or kill some text and it should go into the Ubuntu clipboard and be available from C-v in other editors and applications. To paste into a terminal shell, use the shift key, eg C-S-v. Anything you copy with C-c in Ubuntu can be pasted with p (Evil normal state). I have forgotten all the Emacs keybindings... To yank something using Evil normal state, y y for the current line, v to select a region and y to yank the highlighted region, SPC v to select a symbol (`v` to grow the scope, S-v to shrink the scope of selection) and y to yank. There are other approaches too...

craftybones 2020-06-03T12:15:10.282700Z

Ah here!

craftybones 2020-06-03T12:15:53.283600Z

I’ve hit a major roadblock with Calva and while I love Calva, I am forced to move to Spacemacs. I am just beginning, and it might be weird to ask, but I am guessing most people here are sufficiently happy with spacemacs

2020-06-04T17:48:33.342800Z

^^^ @srijayanth read all of https://practicalli.github.io/ then get started, imo.

2020-06-04T17:48:56.343Z

i made it hard on myself for not doing that.

2020-06-04T17:49:28.343200Z

spacemacs comes with more options then you need in some areas and it can be painful if you don't follow the advice there.

2020-06-04T17:50:11.343400Z

No need to master every section but have it as your go to reference for how to do something. Its likely mentioned in there.

craftybones 2020-06-04T17:50:52.343600Z

@drewverlee - thanks, I am well on my way. My familiarity with both vim and emacs helped me immensely

craftybones 2020-06-03T12:16:08.284Z

I’ve used vim almost all my adult life and emacs doesn’t bother me very much

craftybones 2020-06-03T12:17:56.284400Z

As long as I have decent nrepl integration with formatting, I am happy

spfeiffer 2020-06-03T12:24:10.285100Z

„forced to move“? I do not hear that very often…

craftybones 2020-06-03T12:26:57.285300Z

@spfeiffer - a flair for the dramatic

spfeiffer 2020-06-03T12:27:55.285500Z

As you might guess, the ones who hang out in this channel are satisfied with Spacemacs…

craftybones 2020-06-03T12:29:26.285700Z

@spfeiffer - Indeed. I am unsure where to start though. It seems like the defaults of evil mode should be the right way to go

craftybones 2020-06-03T12:29:38.285900Z

documentation time

spfeiffer 2020-06-03T12:34:15.286100Z

The @jr0cket Website is an excellent resource

craftybones 2020-06-03T12:36:00.286300Z

Thanks @spfeiffer

spfeiffer 2020-06-03T12:38:22.286500Z

https://practicalli.github.io/

1👍
dev.4openID 2020-06-03T12:54:02.287700Z

@jr0cket you are right with what you stated. However, I was asking to copy text between spacemacs and a text app - both ways:grin:

spfeiffer 2020-06-03T12:58:07.288500Z

I think emacs will just share the system clipboard, like a good OS citizen.

practicalli-john 2020-06-03T13:00:49.288600Z

I already answered that part too...

practicalli-john 2020-06-03T13:08:01.288900Z

@srijayanth as you come from Vim, also read https://develop.spacemacs.org/doc/VIMUSERS.html

practicalli-john 2020-06-03T13:09:02.289100Z

and use the Spacemacs develop branch rather than the default master branch

dev.4openID 2020-06-03T13:09:06.289300Z

Darndest thing, I had tried that and did it again. Did not work. Upgraded packages and rebooted spacemacs and now works?!!!!??? Grrrrr"

2020-06-03T15:07:36.291100Z

Sorry to ask here as well

practicalli-john 2020-06-03T15:32:05.291200Z

Hope the answer in #clj-kondo works for you. If you get stuck let us know. Thanks.

1
craftybones 2020-06-03T16:44:46.291700Z

Is there a way to eval a form in a scratch buffer?

craftybones 2020-06-03T16:58:34.292200Z

Is there a function to surround expression with () ?

craftybones 2020-06-03T17:01:12.292600Z

I’m using viw to select inner word and then an M-(

practicalli-john 2020-06-03T17:09:55.294500Z

@srijayanth SPC k w is the smartparens command to wrap an expression, or in Evil I would use SPC v to highlight the expression, or * if its a symbol, and then s ) to surround with () without spaces. There are lots of ways though 🙂

practicalli-john 2020-06-03T17:10:51.295300Z

, e f is the usual command to evaluate the current form (from the top level). Havent tried the scratch buffer though

craftybones 2020-06-03T17:12:26.296100Z

spc k w is cool. Spc v won’t work on hyphenated expressions

flefik 2020-06-04T09:51:13.342600Z

you can extend what spacemacs considers a word to include - in clojure-mode and then it works

craftybones 2020-06-05T07:47:43.343800Z

Thanks @cfeckardt

craftybones 2020-06-03T17:12:56.296800Z

two vs

craftybones 2020-06-03T17:12:57.297100Z

but yeah

practicalli-john 2020-06-03T17:12:58.297200Z

v will expand the SPC v selection and shift v contracts the selection

practicalli-john 2020-06-03T17:16:41.299400Z

I added a bunch of Evil key combinations on this page as I was learning Vim style editing https://practicalli.github.io/spacemacs/spacemacs-basics/vim-style/speaking-evil.html There are more examples on the following page and a lot more I havent thought of...

craftybones 2020-06-03T17:19:18.299600Z

Cool, thanks

craftybones 2020-06-03T17:25:39.300200Z

cider-doc requires fully qualified namespace?

craftybones 2020-06-03T17:34:25.301600Z

so how would I get the doc of say something under my cursor?

practicalli-john 2020-06-03T17:38:39.302Z

@srijayanth with the cursor over the name of a function, , h h or SPC SPC cider-doc will popup a buffer with the clojure docstring for that function. This only works if a Clojure REPL is running for the project. To start a REPL use , ' or SPC SPC cider-jack-in-clj . This works the same for a project or the clojure-scratch buffer, either way you require a running REPL. You will need Clojure CLI or Leinignen installed, eg. http://practicalli.github.io/clojure/getting-started/install-clojure.html

craftybones 2020-06-03T17:44:26.302400Z

Thanks @jr0cket

craftybones 2020-06-03T17:44:48.302800Z

my clj kondo isn’t working. Not sure why. Master branch

craftybones 2020-06-03T17:46:29.304500Z

it is on path, I’ve added flycheck-clj-kondo to dotspacemacs-additional-packages

practicalli-john 2020-06-03T17:48:36.306300Z

If you havent restarted Emacs since adding that config, that would be the first thing I would do. Just doing SPC f e R does not always resolve the loading order of Emacs packages when they are already running.

craftybones 2020-06-03T17:48:44.306500Z

no, restarted it

craftybones 2020-06-03T17:48:53.306800Z

I Spc-q-r

craftybones 2020-06-03T17:53:08.309500Z

dotspacemacs-additional-packages '(flycheck-clj-kondo)

craftybones 2020-06-03T17:53:13.309800Z

That line seem alright?

practicalli-john 2020-06-03T17:53:23.310Z

SPC e v will run flycheck-verify setup in a Clojure buffer, that may show if there is an error with any particular back end. Confirm you have the syntax-checking layer added to the .spacemacs file. Check the message buffer for errors, SPC b m In general, I do recommend switching Spacemacs develop branch as it has about 2 years worth of fixes and features over Spacemacs master. Here is a guide to switching if you decide you want to https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html clj-kondo is also easier to install :)

craftybones 2020-06-03T17:54:48.310600Z

Ah cool. clj-kondo is installed

craftybones 2020-06-03T17:54:50.310900Z

and working

craftybones 2020-06-03T17:55:03.311200Z

but flycheck mode is disabled

practicalli-john 2020-06-03T17:58:40.312300Z

When I run SPC e v with the current buffer being in Clojure mode, I get the following output

Syntax checkers for buffer 034_implement_range.clj in clojure-mode:

First checker to run:

  clj-kondo-clj
    - may enable: yes
    - may run:    t
    - executable: Found at /home/practicalli/bin/clj-kondo

Checkers that are compatible with this mode, but will not run until properly configured:

  clj-kondo-edn
    - may enable: yes
    - may run:    nil
    - executable: Found at /home/practicalli/bin/clj-kondo

Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.

--------------------

Flycheck version: 32snapshot (package: 20200513.444)
Emacs version:    26.3
System:           x86_64-pc-linux-gnu
Window system:    x

practicalli-john 2020-06-03T18:01:02.312500Z

Do you also have this in the dotspacemacs/user-config in the .spacemacs file?

(use-package clojure-mode
 :ensure t
 :config
 (require 'flycheck-clj-kondo))

practicalli-john 2020-06-03T18:04:21.312700Z

The first checker shows that it found clj-kondo-clj has been found, shows it runs and shows which binary its using

craftybones 2020-06-03T18:11:30.312900Z

Thanks. Its working well now

craftybones 2020-06-03T18:11:49.313400Z

@jr0cket - on your site where you say

SPU u before cider-jack-in displays the command line to be run, ...

craftybones 2020-06-03T18:12:05.313900Z

is that SPC u? If so, I am not sure how that works

craftybones 2020-06-03T18:18:05.314300Z

Spc u , '

craftybones 2020-06-03T18:18:24.314800Z

I got what you were saying. Prefixing a command with an argument can be done by spc u

1👍
craftybones 2020-06-03T18:22:05.315700Z

Pretty much got most things I want working, the only thing really missing is that I can’t get help to work for the word under cursor

practicalli-john 2020-06-03T18:33:58.315800Z

Do you have a repl running? Can you evaluate code, e.g using , e f when the cursor is on an expression? Do you get an error when using , h h ? Or a prompt in the mini buffer saying Doc: ?

craftybones 2020-06-03T18:45:27.316Z

I have a repl running, my , e f works

craftybones 2020-06-03T18:45:35.316200Z

I am upgrading to development branch, let us see

craftybones 2020-06-03T18:50:39.316400Z

Upgraded, but now, I can’t seem to get my autocomplete to work

Yehonathan Sharvit 2020-06-03T18:51:18.316600Z

Thanks a lot. Will try it!

craftybones 2020-06-03T18:53:26.316800Z

Interesting. Autocomplete works but not at a require level

practicalli-john 2020-06-03T19:37:07.317Z

auto-complete doesn't complete external libraries in require, but think it does ones for the project. For external libraries you can try enabling clojure-enable-clj-refactor variable on the Clojure layer https://practicalli.github.io/spacemacs/install-spacemacs/enhance-clojure-experience.html