Conversation
| return vim.fs.find(function(name) | ||
| return name:match("%.csproj$") ~= nil | ||
| end, { upward = true, path = vim.api.nvim_buf_get_name(bufnr) })[1] | ||
| end, { upward = true, path = vim.api.nvim_buf_get_name(bufnr), limit = math.huge }) |
There was a problem hiding this comment.
This will cause it to search a bit more, but I don't believe this is something that will be noticed in the performance since it is searching upward
|
Yes! This is definately the right direction. I did the exactly same fix on my fork, but it's only one of the issues I met with. |
|
Hello, seblyng: This weekend I finally had enough uninterrupted time to fully fix and refine the sln/csproj logic. The scope of the changes turned out to be fairly large. For quite a while, I had been struggling with how to improve the logic without making overly significant changes, so that it would be easier both for me to submit as a PR and for you to review. In the end, however, I realized that there seems to be a fairly large gap between our understandings of what the plugin should and should not do. Because of that, I probably will not be submitting PRs to you anymore in the future, and this also means I now feel free to make larger adjustments to the plugin’s current logic. Since I genuinely believe there are many issues in the current plugin’s handling of sln/csproj files—especially for Unity projects—I’d like to summarize here what I have observed and what I have changed. Of course, I just hope my still immature suggestions will not come across as laughable :) Regarding the sln/csproj logic, the current plugin has the following issues:
The general idea and flow of my first round of refactoring are as follows (though there may still be details that need improvement):
|
@ownself
Do you have some reproducible steps to this:
and can test if this fixes it?
I believe it should handle dirty csproj files a bit better