omnisharp-vim
omnisharp-vim copied to clipboard
dotnet cli and all tooling 1.0.0 support
With the announcement recently that the dotnet tooling has went 1.0.0 are there plans to added in support for this. Currently, I'm unable to build a project without a makefile present.
all:
dotnet build
It could be that I am doing something wrong, but I have never been able to get this to work without the makefile. Any insight into this
For now, I've just been setting makeprg in my vimrc to the appropriate build command, along with a suitable errorformat, which I think is already defined.
On Sun, 12 Mar 2017, 13:49 John Hidey, [email protected] wrote:
With the announcement recently that the dotnet tooling has went 1.0.0 are there plans to added in support for this. Currently, I'm unable to build a project without a makefile present.
all: dotnet build
It could be that I am doing something wrong, but I have never been able to get this to work without the makefile. Any insight into this
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OmniSharp/omnisharp-vim/issues/294, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2g9cHonL1JLUYQ12-LiJGU5pAgEBYLks5rk_ftgaJpZM4Mai2B .
Thanks @markwoodhall, I'll give that a try. I'm fairly new to vim and have been loving it. Left visual studio behind about 3 months ago and haven't looked back yet. Keep up the great work on this project.
To give a bit more info, I do something like this:
autocmd BufNewFile,BufRead *.cs setlocal errorformat=\ %#%f(%l\\\,%c):\ %m
autocmd BufNewFile,BufRead *.cs setlocal makeprg=dotnet\ build\ /property:GenerateFullPaths=true
Thanks @markwoodhall
Here is what I am using and seems to be doing the trick, but I do like the way you have done it a little better using the BufNewFile and BufRead. I'll make that change.
autocmd FileType cs let &makeprg="dotnet build"
I do have a few questions if you wouldn't mind helping out a newbie.
My setup is as follows.
- ctrlp.vim
- syntastic
- vim-dispatch
- youcompleteme
Intellisense is working great, but not all the other commands. Some of the other commands like Code Actions
Error detected while processing function <SNR>92_AcceptSelection[27]..ctrlp#OmniSharp#findcodeactions#accept:
line 3:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/johnhidey/.vim/bundle/omnisharp-vim/python/OmniSharp.py", line 94, in runCodeAction
text = json.loads(js)['Text']
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
E858: Eval did not return a valid python object
I would be grateful for any help you might be able to provide.
I might just add that OmniSharp will work fine without this, all you need is to use the dotnet new sln --name <NAME>
command, since OmniSharpServer needs that .sln file.
I thought I'd mention this in case there's any plans to support the dotnet cli, since this is my favourite feature of it so far. Sorry if this is slightly off topic but I wanted to make a mention of this.
Info about this handy trick is here - https://andrewlock.net/creating-and-editing-solution-files-with-the-net-cli/