This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-02
Channels
- # announcements (5)
- # beginners (36)
- # biff (2)
- # calva (51)
- # clojure (12)
- # clojure-austin (7)
- # clojure-europe (11)
- # clojure-nl (1)
- # clojure-norway (63)
- # clojure-uk (2)
- # community-development (5)
- # core-typed (10)
- # datomic (9)
- # graalvm (6)
- # honeysql (1)
- # jobs (4)
- # leiningen (14)
- # london-clojurians (1)
- # lsp (23)
- # malli (88)
- # missionary (10)
- # off-topic (41)
- # practicalli (7)
- # re-frame (1)
- # reitit (5)
- # releases (2)
- # remote-jobs (1)
- # ring (11)
- # squint (2)
- # xtdb (5)
Anyone else notice folding stops working in VSCode after clojure-lsp start-up? When I stop the clojure-lsp server via the bottom toolbar folding works again, when I start it, it stops working.
Calva version used: v2.0.433
clojure-lsp version used: 2024.03.31-19.10.13
clj-kondo version used: 2024.03.13
This must be related to: Support textDocument/foldingRange
LSP feature. https://github.com/clojure-lsp/clojure-lsp/issues/1602
How can I disable this?
I tried adding :folding-range-provider false
to my .lsp/config.edn
but that didn't help
I think it could be that Calva is not registered as a folding provider. (Even if I do not quite understand why that would suddenly matter.) You can set the folding strategy to indentation to enable the old/non-clojure-lsp kind of foldings.
Thanks, will try that! Funny thing is that it doesnt completely stop working. Already open files with folded sections keep the fold and I can fold/ unfold but already unfolded sections and newly opened files are unfoldable 🤪
I see this in the log, which looks fine, I guess.
[Trace - 10:35:10 AM] Sending request 'textDocument/foldingRange - (12)'.
Params: {
"textDocument": {
"uri": "..."
}
}
[Trace - 10:35:10 AM] Received response 'textDocument/foldingRange - (12)' in 2ms.
Result: [
{
"startLine": 1,
"startCharacter": 5,
"endLine": 1,
"endCharacter": 37,
"kind": "region"
},
{
"startLine": 8,
"startCharacter": 8,
"endLine": 8,
"endCharacter": 13,
"kind": "region"
}
]
I’m pretty sure something needs to be added to Calva, but I have no clue what.I created an issue on Calva for it: https://github.com/BetterThanTomorrow/calva/issues/2486
this feature protocol is pretty simple, I don't think the client needs to do anything fancy
Haha, I wasn’t thinking fancy. 😃 Anyway. I think I have confirmed that your fix works now. At least I have foldings with strategy set to auto. And it behaves differently than the indentation option.
I think I'd be this person if that exists for emacs, (I think it's the only feature I know that emacs lsp doesn't have yet)