coc-extensions / coc-omnisharp

OmniSharp integration for coc.nvim
MIT License
118 stars 11 forks source link

Register command to run code #37

Open thatnerdjosh opened 3 years ago

thatnerdjosh commented 3 years ago

Would it make sense for this extension to register a command to run code like the python extension (and some others) do?

Example: https://github.com/neoclide/coc-python/blob/2d54b0074652e833f8f928d2265aa39dc4efe173/src/terminals/codeExecution/codeExecutionManager.ts#L33

If so, I can work on this and make a PR. I know it would be helpful for me although one could just :w !dotnet run —project <project> or something similar, I think it would be nice to have the integration built in

yatli commented 3 years ago

hi @thatnerdjosh ! check this out: https://github.com/coc-extensions/coc-fsharp/blob/master/client/repl.ts

thatnerdjosh commented 3 years ago

This is nice, how about C#? Thanks

yatli commented 3 years ago

If you could make a PR ;)

coc-utils has REPLProvider so all you need to do is to figure out how to configure the C# REPL

yatli commented 3 years ago

I searched around and it looks like there are a few options -- csi, scriptcs, dotnet-script, etc.

dotnet-script seems good: dotnet tool install -g dotnet-script

thatnerdjosh commented 3 years ago

Ok sounds good :) just wanted to check if it was desired functionality

Charly6596 commented 3 years ago

@yatli I think what they meant is to execute the project (dotnet run, dotnet watch run) using a command I've been playing around with that taking some inspiration from coc-flutter and ended up with a working draft (still need to polish a few things) image

thatnerdjosh commented 3 years ago

@Charly6596 off topic but... what font is that :)

Charly6596 commented 3 years ago

@Charly6596 off topic but... what font is that :)

SauceCodePro Nerd Font Mono