Closed ryuukk closed 1 year ago
it seems you are on stable, where folding regions weren't implemented yet. Try again with serve-d nightly/beta
i'm not on stable, i'm on master with both dcd/serve-d
hm then the folding provider seems to be completely broken in that code, since the folding region indicator should be on the line with struct Data
can you share code to reproduce? This is how a simple struct reproduces here with master serve-d:
I reinstalled the extension just to be sure, and still same problem:
you are right, it's broken in the pre-compiled releases, might be an issue with selections / dependencies. I'll investigate.
same org maintain these dependencies, it should be all synchronized to latest version, there is no reason this stuff to be this convoluted
at best it should be same repo
I talked with Geod24 about this, the problem here is that libdparse behaves like a 1.x.y library with breaking changes decisions, but isn't released like one. Making libdparse 1.0.0 is gonna improve things here and also give users a guarantee that breaking changes will have a migration process and only break in a new major.
@ryuukk I had it reproduced and have been trying around what could be broken here, but it turned out I just accidentally downloaded stable instead of nightly. On pre-built nightly it actually works fine for me.
Can you check in the trace: verbose code-d/serve-d output log if it contains foldingRangeProvider
anywhere? If that's in there, the folding should work.
It looks like the only way in code how folding could break is if the dcdext component wasn't loaded, but dcdext does not have any dependencies and should always succeed, unless it doesn't have any workspace / folder instance.
ah can reproduce it if I don't open any folder/workspace with vscode. Will fix
"foldingRangeProvider": {},
..
"defaultFoldingRangeProvider": null,
Here is what i get
I also tried the latest commits, still no luck
Here is the full log:
https://gist.github.com/ryuukk/0fd8a22a5b69e41c6f987cecd4fcc8e2
I reported it on vscode repo: https://github.com/microsoft/vscode/issues/177688
Since it should work without the language server anyways, sublime text doesn't have this problem
the problem has been solved on master
are you sure it is solved? i just tried again with master and still same issue
To replicate:
struct Data
{
int a;
private: // <-- this messes up fold region
int b;
}
Do you have any custom dfmt/dscanner config file that could interfere?
I'll try to investigate more, i need to check how this whole thing works first
Let's take this code:
If you try to fold
struct Data
Then it stops at
private:
Expected:
It should fold the struct like this:
On super long code
Note:
It works fine if
private:
is indented more than thestruct Data
It's probably a vscode issue, but i'm not sure