tomasr / viasfora

A Visual Studio Extension containing miscellaneous improvements to the editor.
Other
557 stars 91 forks source link

XML outlining broken in 4.2.188 #279

Closed cdonnellytx closed 5 years ago

cdonnellytx commented 5 years ago

So it looks like 4.2.188 may have broken XML outlining (similar to how C# outlining was broken in #143).

I went through my extensions (disabling them all and re-enabling them a few at a time), and narrowed it down to just Viasfora. I uninstalled/reinstalled it as well, but that also did not fix it.

I looked to see if there was a way to disable it for just XML, but the "Languages" page in Tools > Options is completely blank, and the exported config does not have anything indicating that is possible (I see Cpp_Enabled, CSS_Enabled, and more, but not one for XML.).

I've attached my settings in case it's just something I'm missing.

Thanks!

# Chris

20190821-viasfora.xml

tomasr commented 5 years ago

Could I ask what other extensions you're using here? And what's the VS version?

If the tools -> option page is not working for you, I would say you probably have a broken Viasfora installation (which sometimes can happen after upgrades). Could you try uninstalling it and reinstalling it again and see if that fixes it?

Also, the options for controlling XML editor enhancements are all in the Viasfora -> XML Editor side, not under languages.

cdonnellytx commented 5 years ago

I'm currently running the following, although I've seen it for a while now (at least a couple of months):

I was able to reproduce the problem by installing Viasfora into a clean experimental instance of VS2019; XML folding is disabled there as well.

I've also ruled out other possibilities like EditorConfig possibly being the culprit (I've tested it on a path that doesn't have one).

Also, it turns out I didn't realize the Viasfora > Languages page is blank because it's just a placeholder -- for some reason I didn't see that the languages are underneath it. So please disregard that part.

tomasr commented 5 years ago

Thanks for testing.

I'm not sure what to tell you, honestly. XML Folding seems to be working just fine for me:

image

Are you sure you don't have the Enter outlining mode when files open option under Tools -> Options -> Text Editor -> XML -> Miscellaneous option unchecked?

cdonnellytx commented 5 years ago

It's definitely checked in all instances, including the Experimental one.

I also verified disabling global extensions (like Live Share) does not solve the problem.

I did find that it appears none of my files are loading with an outline if I have Viasfora enabled -- including C# and JSON files. If I use an outlining shortcut (e.g., Ctrl+M, Ctrl+O for "Collapse to Definitions"), it enables outlining and collapses sections as one would expect. However, none of the outlining shortcuts seem to enable XML.

So there's two things going on when Viasfora is loaded:

  1. Automatic outlining isn't being turned on by default (but can be turned on per file)
  2. For XML, automatic outlining cannot be turned on (even if I add a hotkey to the action).

Can you think of any reason that outline loading might be deferred with Viasfora?

tomasr commented 5 years ago

Just checked your configuration file, and you have this:

<AutoExpandRegions>Disable</AutoExpandRegions>

That's actually disabling outlining on file open, so explains what you're seeing. This is controlled by the Expand regions on open setting in Viasfora:

image

Set this to either No or Expand and the problem should go away.

cdonnellytx commented 5 years ago

Changing that fixed it.

I don't recall changing it, though... is that an old default, or is it intentional for automatic outlining to be off by default?

tomasr commented 5 years ago

No, that option has always defaulted to No, so you must have changed it at some point in time.