This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-03
Channels
- # babashka (17)
- # beginners (166)
- # calva (97)
- # cider (4)
- # clara (2)
- # clj-kondo (46)
- # cljsrn (5)
- # clojure (334)
- # clojure-canada (1)
- # clojure-dev (144)
- # clojure-europe (14)
- # clojure-germany (5)
- # clojure-nl (10)
- # clojure-spec (1)
- # clojure-uk (46)
- # clojurescript (50)
- # conjure (1)
- # core-async (52)
- # core-typed (5)
- # cursive (3)
- # datomic (3)
- # emacs (11)
- # figwheel (16)
- # figwheel-main (9)
- # fulcro (29)
- # graalvm (19)
- # graphql (14)
- # helix (46)
- # hoplon (4)
- # hugsql (2)
- # jobs (2)
- # jobs-discuss (1)
- # juxt (15)
- # kaocha (6)
- # off-topic (9)
- # pedestal (7)
- # portkey (7)
- # re-frame (10)
- # reagent (29)
- # shadow-cljs (13)
- # spacemacs (70)
- # sql (13)
- # tools-deps (26)
- # xtdb (23)
on ubuntu using spacemacs - how do I copy from/to spacemacs from another editor (usually C-c C-v) and vica versa?
@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...
Ah here!
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
@U067P1FT2 - a flair for the dramatic
As you might guess, the ones who hang out in this channel are satisfied with Spacemacs…
@U067P1FT2 - Indeed. I am unsure where to start though. It seems like the defaults of evil mode should be the right way to go
documentation time
@srijayanth as you come from Vim, also read https://develop.spacemacs.org/doc/VIMUSERS.html
and use the Spacemacs develop
branch rather than the default master branch
^^^ @srijayanth read all of https://practicalli.github.io/ then get started, imo.
i made it hard on myself for not doing that.
spacemacs comes with more options then you need in some areas and it can be painful if you don't follow the advice there.
No need to master every section but have it as your go to reference for how to do something. Its likely mentioned in there.
@U0DJ4T5U1 - thanks, I am well on my way. My familiarity with both vim and emacs helped me immensely
I’ve used vim almost all my adult life and emacs doesn’t bother me very much
As long as I have decent nrepl integration with formatting, I am happy
@jr0cket you are right with what you stated. However, I was asking to copy text between spacemacs and a text app - both ways:grin:
I already answered that part too...
Darndest thing, I had tried that and did it again. Did not work. Upgraded packages and rebooted spacemacs and now works?!!!!??? Grrrrr"
Hope the answer in #clj-kondo works for you. If you get stuck let us know. Thanks.
Is there a way to eval a form in a scratch buffer?
Is there a function to surround expression with () ?
I’m using viw to select inner word and then an M-(
@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 🙂
, e f
is the usual command to evaluate the current form (from the top level). Havent tried the scratch buffer though
spc k w
is cool. Spc v
won’t work on hyphenated expressions
you can extend what spacemacs considers a word to include -
in clojure-mode and then it works
two vs
but yeah
v
will expand the SPC v
selection and shift v
contracts the selection
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...
Cool, thanks
cider-doc requires fully qualified namespace?
so how would I get the doc of say something under my cursor?
@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
Thanks @jr0cket
my clj kondo isn’t working. Not sure why. Master branch
it is on path, I’ve added flycheck-clj-kondo to dotspacemacs-additional-packages
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.
no, restarted it
I Spc-q-r
dotspacemacs-additional-packages '(flycheck-clj-kondo)
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))
That line seem alright?
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 :)
Ah cool. clj-kondo is installed
and working
but flycheck mode is disabled
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
The first checker shows that it found clj-kondo-clj has been found, shows it runs and shows which binary its using
Thanks. Its working well now
@jr0cket - on your site where you say
SPU u before cider-jack-in displays the command line to be run, ...
is that SPC u? If so, I am not sure how that works
Spc u , '
I got what you were saying. Prefixing a command with an argument can be done by spc u
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
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:
?
I have a repl running, my , e f
works
I am upgrading to development branch, let us see
Upgraded, but now, I can’t seem to get my autocomplete to work
Interesting. Autocomplete works but not at a require level
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