tintoy / msbuild-project-tools-vscode

VS Code extension for MSBuild intellisense (including PackageReference completion).
MIT License
82 stars 16 forks source link

Using `ItemGroup`, `PropertyGroup` (etc) suggestions from the extension results in incorrect indentation #93

Open alexrp opened 2 years ago

alexrp commented 2 years ago

Let's say I have a file like this:

<Project>
</Project>

If I start to type an item group like

<Project>
    <Item
</Project>

and accept the <ItemGroup> suggestion from the extension, I end up with:

<Project>
 <ItemGroup>

 </ItemGroup>

This is with indent_size = 2 in .editorconfig. With indent_size = 4, it instead ends up as:

<Project>
   <ItemGroup>

   </ItemGroup>
tintoy commented 2 years ago

Hi, sorry for the late reply - I didn't see the notification email for this until this morning :)

Just checking if I understand correctly: are you saying that it appears to be using the indent size specified in settings (in this case, from .editorconfig), rather than the indent level (i.e. column) where you started typing?

alexrp commented 2 years ago

It seems to respect both the current indent level and indent_size from .editorconfig, but it's always off by one space.

tintoy commented 2 years ago

Sorry, I can see that'd be annoying. I'll look into it and let you know what I find 🙂