admin管理员组文章数量:1430685
Following this post, I'm planning to migrate from Visual Studio Professional 2019 to Neovim for C# .NET Framework development. One crucial Visual Studio feature I need to replicate is the automatic updating of .csproj
files when adding new source files.
In Visual Studio, when you add a new .cs
file, it automatically updates the project file by adding an entry like this in the appropriate ItemGroup
section:
<Project>
<ItemGroup>
<Compile Include="path\to\fileName.cs" />
</ItemGroup>
</Project>
Is there a way to implement similar functionality in Neovim? I'm looking for solutions that could involve:
- Existing plugins (preferably compatible with
lazy.nvim
) - Custom Lua/VimScript implementation
- File watchers or other automation approaches
The ideal solution would:
- Detect when a new
.cs
file is created - Automatically locate the corresponding
.csproj
file - Update the XML structure by adding the
Compile
element in the correctItemGroup
- Maintain proper relative paths
I think if no existing plugins provide this functionality then I have to write custom solutions in Lua or VimScript.
Does anyone have experience implementing this kind of .NET project file automation in vi
/vim
/nvim
?
本文标签: netHow to automatically update csproj files when adding new C files in NeovimStack Overflow
版权声明:本文标题:.net - How to automatically update .csproj files when adding new C# files in Neovim? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745562643a2663564.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论