Closed Nathoufresh closed 4 years ago
Got the same with metals server:
object Main {
// aaa
// aaa
def main(args: Array[String]): Unit = {
// aaa
// aaa
}
}
[Trace - 06:41:45 PM] Received response 'textDocument/foldingRange - (1817)' in 1ms.
Result: [
{
"kind": "comment",
"endCharacter": 8,
"startCharacter": 2,
"endLine": 4,
"startLine": 3
},
{
"kind": "comment",
"endCharacter": 10,
"startCharacter": 4,
"endLine": 8,
"startLine": 7
},
{
"kind": "region",
"endCharacter": 1,
"startCharacter": 12,
"endLine": 10,
"startLine": 2
},
{
"kind": "region",
"endCharacter": 3,
"startCharacter": 40,
"endLine": 9,
"startLine": 5
}
]
lsp--get-nested-folding-ranges
gets:
(
#s(lsp--folding-range 58 189 "region" (
#s(lsp--folding-range 62 77 "comment" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("startLine" 3 "endLine" 4 "startCharacter" 2 "endCharacter" 8 "kind" "comment")))
#s(lsp--folding-range 118 187 "region" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("startLine" 5 "endLine" 9 "startCharacter" 40 "endCharacter" 3 "kind" "region")))
#s(lsp--folding-range 166 183 "comment" nil #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("startLine" 7 "endLine" 8 "startCharacter" 4 "endCharacter" 10 "kind" "comment")))
)
#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("startLine" 2 "endLine" 10 "startCharacter" 12 "endCharacter" 1 "kind" "region")))
)
I recently installed origami.el and noticed it does not fold functions in python.So I installed lsp-origami. When I'm in a python buffer with pyls connected I type M-x origami-mode then M-x lsp-origami-mode. If I try something like origami-toggle-node it shows
So not working, but if I disable lsp-origami then origami works well with functions. Strange behavior