dlang / visuald

Visual D - Visual Studio extension for the D programming language
http://rainers.github.io/visuald/visuald/StartPage.html
Boost Software License 1.0
288 stars 69 forks source link

Syntax highlighting, autocomplete, code navigation not working #268

Open TurkeyMan opened 10 months ago

TurkeyMan commented 10 months ago

Still running into heaps of issues. Visual-D seems to be totally broken rn against the latest VS at least.

I'm working on a tiny greenfields project; not much code to freak it out, but syntax highlighting was working, and then at some point it stopped working. Weirdly, all the previously highlighted text remains highlighted, but any new text I write is just white.

image

See here, the highlighted enum was written earlier... the lower struct was written later and it never got coloured. Also check the includes at the top; std.format is highlighted, but then only std is formatted for the ones I added later.

Then this: image

You can see the white lines, they're fields I added more recently. This is just super weird! Strange that it remembers some highlighting like that, but it's just given up.

Another thing is that completion suggestions and autocomplete don't work at all anymore.

Go-to definition/symbol, etc doesn't work at all... so there's no code navigation. I think VisualD is basically not doing anything, except for a fragment of residual symbol markup database which is still lingering and having effect.

TurkeyMan commented 10 months ago

I fiddled with killing and restarting the service, and VS completely. Initially I didn't think it was having any effect, but on one restart, I noticed some more code had become highlighted, but not all of it... so maybe when I started up, it was busy highlighting new code, but then gave up again at some point. I did several restart cycles, and it eventually highlighted all the code, and after it got through it, then go-to definition started working again.

Auto-complete showing the popup, but not showing valid completion suggestions; it just shows items from the local scope, and not members of the scope that the completion should be showing items from.

A couple restarts later, it's gone backwards, only some code highlighted, navigation only working on some symbols... Weird stuff!

TurkeyMan commented 9 months ago

I've been trying to write some software for the last couple of weeks, and VisualD is just really broken and basically not even a thing right now. @rainers Have you tried to use VisualD productively recently? Basically everything related to intellisense, and even syntax highlighting is really not working well. Debugging can't show stuff properly, all the handy things like hovering over enum's in the debugger no longer work, etc.

Are you still working on VisualD? This needs a serious once-over otherwise VisualD is basically dead from here on :(

TurkeyMan commented 9 months ago

Another weird one; VisualStudio apparently internalised .editorconfig support, and it works when working on c/cpp files, but my .d files aren't being formatted at all. Even when doing "Edit/Advanced/Format Document", which used to rewrite the document with formatting from .editorconfig, it doesn't seem to do anything at all now on my .d files... It's pretty weird how so much stuff has gone so far sideways in a couple of years that I haven't been paying attention... am I the only user that ever really reported bugs and ran quality control? :/

rainers commented 9 months ago

Sorry to hear that Visual D doesn't work well for you @TurkeyMan . I use it from time to time to write some small tools and don't see the issues you are describing. Browsing the visuald/dmd source when updating the semantic engine (that uses the dmd frontend) works pretty well, too. Agreed, completion could provide more useful results faster.

I suspect that some issues (especially regarding the debugger) are related to Win11, so I setup a Hyper-V environment that seems to run Win11 much better than my previous attempts with VirtualBox. I hope I can spent some time on that next week. Some easily reproducible failures would be nice to have....

Regarding .editorconfig: A couple of releases ago, "Format Document" was implemented using dfmt, maybe that interferes with the default implementation provided by VS? You might get back the old behavior with selecting the whole text and use "Format selection".

rainers commented 9 months ago

I suspect that analyzing your code while being edited makes the dmdserver process crash (it contains a slightly modified version of the dmd frontend). Do you find crash dumps for it in %LOCALAPPDATA%\CrashDumps? If yes, please upload them here.

TurkeyMan commented 9 months ago

I updated to your RC, and these problems all seem to be gone. Highlighting and navigation is working properly now.

TurkeyMan commented 4 months ago

This issue, or another issue to the same effect seem to have returned... I can't find a pattern, but it's an ongoing nuisance :(