Fork me on GitHub
#cider
<
2018-07-07
>
jumblemuddle01:07:34

@arrdem Ha, I'll add it to my list. 😉

jumblemuddle01:07:53

The benefit of alter-meta! is that if others are using the spec, it will work for them too. Does anything like cljfmt use this spec?

arrdem02:07:29

Not at present. There's a years old ticket to make cljfmt support CIDER's indent specs or otherwise get some commonality.

jumblemuddle02:07:37

Oh nice, it appears there's been some progress recently: https://github.com/weavejester/cljfmt/issues/49

jumblemuddle02:07:25

Depending on how that ends up getting the metadata, it may be best not to have a custom set variable in Emacs.

arrdem06:07:17

I'm extremely not holding my breath for that. Static analysis of Clojure is more effort than it's worth. Especially for something like symbol metadata.

dominicm07:07:49

@arrdem this metadata tends to be placed inline, which means that this might actually work.

bozhidar12:07:29

I still think this is one of the most reasonable approaches to be specifying indentation. And I’m still optimistic that more editor are going to support this.

bozhidar12:07:42

@dominicm Does vim support this?

dominicm12:07:04

Support what exactly?

bozhidar12:07:22

Indenting code based on indentation metadata.

bozhidar12:07:03

I guess it’s just a matter of generating indentation rules on the fly as we do in Emacs. Based on your reaction I guess the answer currently is “no”. 🙂

dominicm13:07:44

I'm waiting for the format code op in cider to support it. It's not currently supported though, no. I'd need to make some breaking changes to vim things, and I'm not sure I can. Haven't looked hard though.

dpsutton13:07:19

Honestly if we asked Colin if he would be open to support this we would have 85% of clojure editors it seems. At that point it doesn't matter what anyone on the clojure side says

bozhidar05:07:39

Yeah, that’s probably true. @U0567Q30W What do you think about this?

bozhidar05:07:57

@dominicm So, I guess you need https://github.com/weavejester/cljfmt/issues/49 then. Isn’t it possible to extend the indentation rules for vim on the fly as we do for Emacs?

dominicm05:07:50

I think I can do that, I'm just lazy.

cfleming10:07:38

Cursive doesn’t support this right now, but it’s something I’ve been meaning to look at. I suspect it should be possible (and hopefully relatively easy) but there are always tricky edges around things like comments and metadata.

bozhidar12:07:52

I’m assuming most people would just put those directly in the definitions, so probably you’d be able to get them easily with whatever parser you’re using for the static analysis in Cursive. What are problems you refer to with the comments?

cfleming08:07:34

That they can appear anywhere, and have to be treated specially. Metadata is similar, it can appear anywhere, and has its own alignment rules as well as affecting alignment of the form it’s attached to.