MoaidHathot / dotnet.nvim

.NET Neovim plugin for improving the .NET dev experience in Neovim, written completely in Lua
MIT License
83 stars 4 forks source link

The project template names when using `DotnetUI new_item` are cut off #10

Open kmoschcau opened 1 week ago

kmoschcau commented 1 week ago

image Not sure what is going on here. I'm using the plugin with its default configuration and I don't think I have anything in my telescope config that could explain this.

MoaidHathot commented 1 week ago

Thanks @kmoschcau for pointing this out. I will take a look, I'm able to reproduce it!

MoaidHathot commented 1 week ago

@kmoschcau, apparently, the truncating is done by the .NET CLI when returning the results for dotnet new list, and there isn't an option to change the result formatting of dotnet new list.

I will think about possible solutions, but they would probably be hacks. Maybe we can open an issue for the .NET team.

kmoschcau commented 1 week ago

@MoaidHathot I just did some testing myself and it seems like dotnet new list does this dynamically, depending on how wide the terminal is that it runs in. I was able to get it to show all current names fully with a width of 164 cells. Though likely this should be wider, since the list is dyamic. Also a maximized terminal window on a 1080p screen with a font size of 10 is 238 cells wide.

With pwsh on Windows I was able to query the width using this:

(Get-Host).UI.RawUI.WindowSize

On Linux systems you could check this via $COLUMNS or better stty size.

Maybe there is a way to set a virtual terminal size for the process that you run dotnet new list in.

MoaidHathot commented 1 week ago

@kmoschcau, thanks for investigating this! The workaround, as you have suggested, will probably be figuring out if we can set the virtual terminal size for the process that runs dotnet new list. In the meantime, I will open a Github issue for the .NET team to provide the output as a json, which is supported for other commands.

MoaidHathot commented 1 week ago

The issue I opened for the .NET SDK https://github.com/dotnet/sdk/issues/43679