This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (39)
- # aws (1)
- # beginners (39)
- # boot (1)
- # calva (79)
- # cider (8)
- # cljdoc (13)
- # cljs-dev (45)
- # clojure (89)
- # clojure-berlin (2)
- # clojure-europe (1)
- # clojure-uk (1)
- # clojurescript (7)
- # datomic (1)
- # emacs (6)
- # figwheel-main (2)
- # fulcro (29)
- # hyperfiddle (21)
- # juxt (1)
- # leiningen (1)
- # lumo (3)
- # music (1)
- # off-topic (20)
- # pedestal (23)
- # portkey (3)
- # reagent (2)
- # rum (1)
- # shadow-cljs (27)
- # vim (5)
@mseddon: If you need some variation while looking at that as-you-type indentation, there is this: https://github.com/weavejester/cljfmt/pull/77 😃
This is why I have a patch of cljfmt. I have applied this PR. There are lots of issues with it, though. Apart from the ones James Reeves mentions in the comments the alignment sometimes goes quite nuts.
so I nearly have a mirrored copy of the document maintaining sync with what vscode has
in reality the text itself needn't be copied, since once I apply the insertions and deletions, i have the same contents as doc, but it means my indices will be right for e.g. lexical items
I am trying it out in e.g. a typescript file, running the command from the Ctrl+Shift+P menu
this means that I can re-parse the bits that changed, without re-doing the whole buffer
ClojureSourceLine will instead contain lexical tokens and inter-line state information
despite being called for every keystroke, there's really no performance issue, since it does so little work
I tried to implement a bit more as-you-type Parinfer using that event, but got tripped on figuring out the previous text, since the API is a bit lacking. But your method seems to allow it…
it's certainly not a full clojure lexer, but it grabs the important bits, so we should have a nice structure to query 'where does this expr start', 'where does it's parent start' etc
In the long run i won't actually be storing the text in a
ClojureSourceLine, since I don't need it, just the tokenization and lexer state / parenthesis stack
I am at where I am bug compatible with your https://github.com/mseddon/calva-fmt/tree/crlf-refactor-fix , it is interesting how tricky it is to get it right!
The tests pass. But they do not test new-index for CRLF files. Which is what is not working.
Also I realise, if this formatter experiment works, i should try and look at preventing the current parinfer compatibility issues
EnterAction has a
removeText property of type
number where you can specify how many characters to remove from the indentation. I am setting it to
But I grew up with the Win32 Platforn Sdk, so to me M$ have seriously improved their API's :)
A drawback with my blunt, but effective, tool is that it will mean the cursor always flickers on enter.
Yeah I hung out in the vscode extension gitter but it is dead. :/ need to find some knowledgeable vscode contributers.
I haven't tried stack overflow, but from what I can see there isn't a huge community wrt extension development there.
A lot of my issues could trivially be solved by the relevent Microsoft employee with very low effort on their part I feel.
No MS employees there, of course. But the
#vscode-extension-dev channel is quite helpful.
Even though it seems I constantly move around in uncharted terrain so many of my questions get zero answers.
The GitLense dev is the hero of that channel. I can’t count how many times he has saved my sanity.
It is weird my favorite editor doesn't have that community yet. Although I suppose I haven't been using vscode for that many years yet.
It will pick up I am sure. But there is a bit of a hole right now. Maybe one day we should start a vscode blog...
Btw are you messing with other vscode extensions? I am planning on writing a bunch mostly to exercise the API further, even if they just put nyan cat all over my buffer;)
I have way too little time to spend on Calva so haven’t played around with any other extension ideas. Mostly I have found myself spending time on trying to fix stuff that Calva depends on. Which has been very rewarding in terms of learning.
😃 well. I hope to at least spread some of that time. VSCode's popularity and the fact we get a html interface makes Calva rather well positioned to recreate some of the lisp machine experience.
I desperately want to get to that part but we urgently need to fixup the boring shit.