Fork me on GitHub
#emacs
<
2019-02-26
>
anish06:02:06

Hi Everyone, I am using cider with figwheel , to start cider i use cider-jack-in-clj&cljs and choose figwheel

anish06:02:50

Its starts clj cider and then cljs but I see pending-cljs message as it can't connect to cljs cider

anish06:02:22

my cider-version , 0.21

anish06:02:49

[cider/piggieback "0.3.10"] [figwheel-sidecar "0.5.16"]

anish06:02:32

Not sure if I miss any configuration?

kommen06:02:40

@anish.developer maybe better to ask this in #cider. but first you should try to update the piggyback dependency to 0.4.0, see https://github.com/nrepl/piggieback

Macroz11:02:59

I have a shortcut C-<tab> for indenting the toplevel sexp (i.e. defun) that I'm currently in. I noticed today that indent-sexp seems to want to indent single semicolon comments to the middle of the screen even if they follow some proper code and should not change in formatting. If I change my implementation to mark the region of the containing sexp, that indentation does the right things (i.e. does not move to center of screen)

vemv11:02:48

do you use single semicolons with an explicit purpose? else go for doubles, it's more standard and fewer tools will give you trouble

practicalli-johnny12:02:06

A single semi-colon is used to put a comment at the end of a line. Double semi-colon is for commenting a line. This is the style guide that Clojure (and I believe lisp) developers use. Clojure-mode formats single semi-colons automatically. If you add a second semi-colon then Clojure-mode should remove that auto-indent (although you may need aggressive-indent-mode for that)

Macroz12:02:35

I use single semicolons for end of line comments always. It's the Lisp way 🙂

vemv13:02:26

I interpret it differently https://github.com/bbatsov/clojure-style-guide#two-semicolons-for-code-fragment Perhaps what a 'margin' comment is can be debatable. Personally I interpret "margin" comments as multi-line comments that will be aligned. I just never do that: • other editors won't be smart in keeping the alignment • even Emacs will go crazy sometimes and move the comment erratically Not good to have comments moving around in diffs

vemv13:02:14

Conversely ;; will always be semantically, predictably aligned following the current level of indentation

Macroz14:02:51

the style guide itself is inconsistent about the indentation of the margin comments

Macroz14:02:57

I guess column 40 indent is pretty common everywhere

Macroz14:02:16

I just prefer to leave the indentation as defined by the programmer so preserve the indentation the programmer gave

Macroz14:02:38

column 40 is not much when people typically have 120-200 columns visible at times

vemv14:02:09

Honestly it's the first time I hear of "column 40" (been emacsing/clojuring since 2012). But I do respect the apparent tradition, e.g. https://stackoverflow.com/a/6365579 looks kind of beautiful. I very very rarely see comment hierarchies in Clojure code, just ; and ;; (maybe with more ; from Cursivers and more ;; from Emacsers) Anyway, I don't seek controversy 🙂

practicalli-johnny15:02:58

M-; is a common keybinding in Emacs that will put ;; if you are on an empty line and ; at the end of an existing line of text. This has probably shaped the implementation of the coding style for some. Personally I just use ;; and try make my code as readable for others as possible and write descriptive doc-strings. Sometimes I use comments, but mostly for separating out sections of a namespace and adding general context (header, sections, etc).

Macroz06:02:09

I pretty much try to avoid all comments and prefer to name and explain in code, so there are not many comments and there definitely is not need for the margin style because they are usually also short

Macroz06:02:33

I also have my comments in larger front than the rest of the code so they stand out

Macroz06:02:51

if a comment is worth writing for it's either TODO or important to know why so it's worth standing out

Macroz06:02:58

it also creates a nice incentive to write them out

Macroz06:02:26

most people seem to want to fade them away which nowadays I think is a disservice to them 🙂

mpenet12:02:03

I cannot decide if I like ivy or not

mpenet12:02:06

vs ido/smex

Michael Griffiths12:02:41

I switched recently after using ido for many years. Frustrating at first but I much prefer it now. I really like how editing the input is separate from choosing a candidate in ivy

practicalli-johnny12:02:12

I love using helm, so much more productive now than using ido

mpenet12:02:14

you can do the same with ido

Michael Griffiths12:02:14

With C-e right? Or is there another way?

mpenet12:02:09

if you mean just be able to edit the suggestion freely with ido on find-file for instance it is with c-x c-f if I recall

mpenet12:02:20

it basically falls back to just find-file

Michael Griffiths12:02:15

Yeah, that’s what I mean – avy doesn’t override any editing commands so you can always edit inline

Michael Griffiths12:02:06

You can also use M-j to yank text from where the point was before you started completion

mpenet12:02:34

I never tried helm

Robert A. Randolph16:02:40

Is there a sane solution for escaping strings in yanked text? An example use is taking some data structure and stringifying it.

richiardiandrea17:02:47

@audiolabs I use string-edit (I hope it is the correct name) from the magnificent Magnars

Robert A. Randolph17:02:58

@richiardiandrea this looks excellent, thank you

👍 5