vim

For discussion on all things (neo)vim.
martinklepsch 2020-06-12T07:53:18.163900Z

Anyone know how to get #_ comments to be shown in gray like regular ; line comments?

dominicm 2020-06-12T07:55:03.164Z

I opened a issue about this once

dominicm 2020-06-12T07:55:08.164100Z

there's a hack you can do

dominicm 2020-06-12T07:55:10.164200Z

lemme try dig it up

dominicm 2020-06-12T07:55:47.164300Z

https://github.com/guns/vim-clojure-static/issues/60

dominicm 2020-06-12T07:56:32.164500Z

I think that tree-sitter will be far better though. vim regex can't handle something like #_#_

2020-06-12T08:50:48.165600Z

i think that is something that tree sitter can handle: https://github.com/sogaiu/tree-sitter-clojure/blob/master/grammar.js#L169

2020-06-12T08:52:32.166600Z

i didn't manage to get some other things to work out well though (e.g. reliable recognition of function definitions)

dominicm 2020-06-12T08:54:06.167100Z

Pshht, I think that's fine in clojure

dominicm 2020-06-12T08:54:13.167400Z

There's no syntax for functions

2020-06-12T08:56:39.167700Z

i'm glad to hear it 🙂

2020-06-12T13:36:56.168100Z

something might be going over my head here - you don't mean the #() syntax do you?

2020-06-12T21:55:02.183400Z

not sure who the question is for, but fwiw that construct, #(), was manageable: https://github.com/sogaiu/tree-sitter-clojure/blob/master/grammar.js#L444 what i didn't get working well was recognizing things like (defn name [... - as forms that look similar can appear inside macro definitions, as part of case, and potentially other places.

2020-06-12T22:06:04.184Z

oh it wants a syntax, and aside from the shorthand, we don't have one

2020-06-12T22:06:06.184300Z

makes sense

2020-06-12T22:06:33.184800Z

unless you can call "defn" as the initial token a syntax