Code Monkey home page Code Monkey logo

omnisharp-vim's Introduction

OmniSharp

OmniSharp Organization repo for project coordination, global communication and other organizational topics.

Please do not use this repo to open bugs/support issues - use the project repository relevant to the product you are using (e.g. C# Extension for VS Code, VIM plugin, Emacs plugin, OmniSharp server and so on) instead.

License

Copyright © .NET Foundation, and contributors.

OmniSharp is provided as-is under the MIT license. For more information see LICENSE.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

Contribution License Agreement

By signing the CLA, the community is free to use your contribution to .NET Foundation projects.

.NET Foundation

This project is supported by the .NET Foundation.

omnisharp-vim's People

Contributors

aignas avatar amosonn avatar aprilwade avatar atomsand1101its avatar austincrft avatar axvr avatar cedarbaum avatar chtenb avatar dear avatar dianeofthemoon avatar get-me-power avatar idbrii avatar jpfeiffer16 avatar juliuszint avatar laptop765 avatar lrdickson avatar markwoodhall avatar matteobaglini avatar mattn avatar melandel avatar nickspoons avatar nosami avatar osyo-manga avatar paulcampbell avatar simulshift avatar sriramgd avatar stevearc avatar svermeulen avatar thinca avatar tlo-johnson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omnisharp-vim's Issues

[IDEA] c# debugging

I pretty much like the way one can debug in Visual Studio...

Is it possible with mono under linux/Max OSX or the c# stuff under windows to get some of these awesome debugging features into vim?

OmniSharp/SuperTab/horizontal split - extra window on completion

Windows/gVim

I'm observing weird issue when completing in one of horizontal split windows (same file) - new window (like 3 lines height) created after completion is accepted.

I've tried it with keys (C-X, C-O), then C-N and Enter, so it's likely not caused by interacting with SuperTab, but not sure about anything.

Thanks

Server is running but unreachable [OSX]

Hello, I'm really looking forward to use this plugin!

I'm on OSX with Mono and the Xamarin toolset installed. When I :echo !OmniSharp#ServerIsRunning() I get a 1. However if I try code completion with Ctrl-X/Ctrl-O I get:

`Could not connect to localhost:2000/autocomplete: <urlopen error [Errno 61]``

Firewall is disabled. Any idea on what I could be doing wrong?

Possible Issue with Singletons

I am seeing this error quite a bit when I try to run auto-completion on my singletons:

public class SingletonClass 
{
    protected SingletonClass()
    {
    }

    public static SingletonClass Instance
    {
        get {
            if (_instance == null) {
                _instance = new SingletonClass();
            }
            return _instance;
        }
    }

    public void Foo()
    {
        //do something or something
    }

    public string Bar( int num )
    {
             return "ha this is just a string";
    }
}

Then I type Singleton. and get the error below

hope this helps! :)

System.InvalidOperationException: Operation is not valid due to the current state of the object
at System.Linq.Enumerable.First[IProject](IEnumerable1 source, System.Func2 predicate, Fallback fallback) [0x00000] in :0
at System.Linq.Enumerable.First[IProject](IEnumerable1 source, System.Func2 predicate) [0x00000] in :0
at OmniSharp.Solution.CSharpSolution.ProjectContainingFile (System.String filename) [0x00000] in :0
at OmniSharp.Parser.BufferParser.ParsedContent (System.String editorText, System.String filename) [0x00000] in :0
at OmniSharp.AutoComplete.AutoCompleteHandler.CreateProvider (OmniSharp.AutoComplete.AutoCompleteRequest request) [0x00000] in :0
at OmniSharp.AutoComplete.AutoCompleteModule+c__AnonStorey21.<>m__41 (System.Object x) [0x00000] in :0
at Nancy.Routing.Route.Invoke (Nancy.DynamicDictionary parameters) [0x00000] in :0
at Nancy.Routing.DefaultRouteInvoker.Invoke (Nancy.Routing.Route route, Nancy.DynamicDictionary parameters, Nancy.NancyContext context) [0x00000] in :0
at Nancy.Routing.DefaultRequestDispatcher.Dispatch (Nancy.NancyContext context) [0x00000] in :0

Compiling problems (on linux)

I tried to compile OmniSharp in order to run the server, without success.
Running xbuild (mono equivalent of msbuild) in the plugin directory gives the following errors.

XBuild Engine Version 2.10.8.1
Mono, Version 2.10.8.1
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
        Configuration: Debug Platform: AnyCPU
    Could not load type 'NuGet.Commands.ProjectFactory' from assembly 'NuGet, Version=2.2.31210.9045, Culture=neutral, PublicKeyToken=null'.
/home/chiel/.vim/bundle/Omnisharp/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 /home/chiel/.vim/bundle/Omnisharp/.nuget/NuGet.exe install "packages.config" -source ""   -o "/home/chiel/.vim/bundle/Omnisharp/packages"' exited with code: 1.
Configuration: Debug Platform: AnyCPU
Configuration: Debug Platform: AnyCPU
Could not load type 'NuGet.Commands.ProjectFactory' from assembly 'NuGet, Version=2.2.31210.9045, Culture=neutral, PublicKeyToken=null'.
/home/chiel/.vim/bundle/Omnisharp/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 /home/chiel/.vim/bundle/Omnisharp/.nuget/NuGet.exe install "packages.config" -source ""   -o "/home/chiel/.vim/bundle/Omnisharp/packages"' exited with code: 1.

What is going wrong?

Not work with Unity3D's SLN file

This is my sln file (generated by Unity3D), is any error with it?

I try to modify this file, make it looks like the sln file of Omnisharp's, but still not work...

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2008

Project("{8BF4E6AD-DD72-A9C4-C471-4708D2941528}") = "monster", "Assembly-CSharp.csproj", "{FF63949A-EF6F-A9AE-D912-46CA2B18F2E6}"
EndProject
Project("{8BF4E6AD-DD72-A9C4-C471-4708D2941528}") = "monster", "Assembly-CSharp-Editor.csproj", "{7C09CA77-FDAD-0BFB-C2B8-AFF493D9FFDD}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {FF63949A-EF6F-A9AE-D912-46CA2B18F2E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {FF63949A-EF6F-A9AE-D912-46CA2B18F2E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {FF63949A-EF6F-A9AE-D912-46CA2B18F2E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {FF63949A-EF6F-A9AE-D912-46CA2B18F2E6}.Release|Any CPU.Build.0 = Release|Any CPU
        {7C09CA77-FDAD-0BFB-C2B8-AFF493D9FFDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {7C09CA77-FDAD-0BFB-C2B8-AFF493D9FFDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {7C09CA77-FDAD-0BFB-C2B8-AFF493D9FFDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {7C09CA77-FDAD-0BFB-C2B8-AFF493D9FFDD}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
        GlobalSection(MonoDevelopProperties) = preSolution
        StartupItem = Assembly-CSharp.csproj
        Policies = $0
        $0.TextStylePolicy = $1
        $1.inheritsSet = null
        $1.scope = text/x-csharp
        $0.CSharpFormattingPolicy = $2
        $2.inheritsSet = Mono
        $2.inheritsScope = text/x-csharp
        $2.scope = text/x-csharp
        $0.TextStylePolicy = $3
        $3.FileWidth = 120
        $3.TabWidth = 4
        $3.EolMarker = Unix
        $3.inheritsSet = Mono
        $3.inheritsScope = text/plain
        $3.scope = text/plain
    EndGlobalSection

EndGlobal

Omnisharp without ports

Omnisharp looks fantastic, by the way. I am trying to set it up on a heavily-locked down machine and when I start the CLI app, I get the following error:

Unhandled Exception: System.Net.HttpListenerException: Access is denied
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at Nancy.Hosting.Self.NancyHost.Start()
   at OmniSharp.Program.Main(String[] args) in Omnisharp\OmniSharp\Program.cs:line 57

This happens with any port, not just port 2000, and appears to be due to firewalling. I had the same issue when developing a WCF service--outside of some whitelisted applications, nothing on this box can open a port.

What I was thinking about doing was looking for a way to set up Omnisharp to communicate without using a port, using some form of IPC. When I was working on the aforementioned WCF service, I had the service communicate over a named pipe endpoint on my local machine. I am not all that familiar with Nancy. Is there some way to set up Nancy to communicate over named pipes or some other IPC mechanism that does not require the use of ports?

Scratch with comments should auto-close

Is there a config option to have the scratch auto close or disable the scratch completely? I usually use split windows so having to o or kc every time is frustrating :(

Omnisharp server takes 100% CPU

I don't know if Omnisharp can be blamed for this, but everytime I start the server, the cli process (which is mono runtime) takes up 100% CPU usage.
This is certainly an unwanted thing.
I'm on Linux.

OmniSharp Fails to Build Solutions with a space in the path

I have a solution at the following location:
C:\Projects\TFS\NCN - Other\MRASystem\Main\xxx.sln

OmniSharp fails to build the solution with an error stating that the arguments to MSBuild are not correct. I changed BuildHandler.cs:41 to the following and rebuild and that fixed the problem:
Arguments = IsUnix ? "" : "/m " + "/nologo /property:GenerateFullPaths=true "" + _solution.FileName + """,

Code Formatting

Is there plans to add a hook to trigger NRefactory code formatting? I saw no mention of it in the TODO list so I thought I'd mention it.

Fugitive Fails to Load Diff

When running the Omnisharp Server I now get this error when using Fugitives :Gdiff

Error detected while processing function OmniSharp#StartServerIfNotRunning..OmniSharp#StartServer:
line 38:
Did not find a solution file

OmniSharpAddReference yields internal server error

Not sure if this is an OmniSharpServer or OmniSharp issue.

:OmniSharpAddReference /usr/lib/monogame/MonoGame.Framework.dll
MonoGame.Framework.dll      MonoGame.Framework.dll.mdb
OmniSharp : Could not connect to http://localhost:2000/addreference: HTTP Error 500: Internal Server Error

The server is up and running. Going to the address above just gives a blank page.
Sending a POST gives 500 errors.

Omnisharp crashes if .csproj file references a file that does not exist

If a .csproj file references a where "xxxxx.cs" does not exist, Omnisharp crashes.
I changed BuilderHandler.cs:77 to the following:
if (matches.Count > 0 && !Regex.IsMatch(matches[0].Groups[1].Value, @"\d+>"))

This fix causes Omnisharp not to crash and to output the error to the output window. It would be better if Omnisharp would parse the exact error and add it to the Quickfix window but at least this fix prevents the crash. The exact error to parse would be:
(CoreCompile target) ->
CSC : error CS2001: Source file 'IClaimPricingMethodRecord.cs' could not be found [C:\Projects\TFS\NCN - Other\MRASystem\Main\MRA.Pricing.Client\MRA.Pricing.Client.csproj]

Compile error

I can't seem to compile the newest Omnisharp. Here is the error printed:

Could not load type 'NuGet.Commands.ProjectFactory' from assembly 'NuGet, Version=2.2.31210.9045, Culture=neutral, PublicKeyToken=null'.
/home/chiel/.vim/bundle/Omnisharp/server/.nuget/NuGet.targets: 
error : Command 'mono --runtime=v4.0.30319 /home/chiel/.vim/bundle/Omnisharp/server/.nuget/NuGet.exe install "packages.config" -source ""   -o "/home/chiel/.vim/bundle/Omnisharp/server/packages"' exited with code: 1.

Getting all kinds of errors

Hi! First of all, thank you for such a great plugin.

I'm posting to let you know that the last bunch of commits broke my build. I'm working with Unity3D, and neither the unity api nor my own api is showing up in completion. It is indeed showing completions for C# files though.

I reverted to 512f766 on the server submodule and that fixed it for me, however, I didn't test all the Dec 28th commits.

Also, there are several other errors I'm getting. I crash on FindSymbol and FindType. I have ctrlP installed. It's a segmentation fault (Im running MacVim though). If you would like me to get you some logs, please provide instructions on how to do so and I will gladly get you whatever information you need. I am running MacVim. Here's my MacVim info;

https://gist.github.com/JosephFerano/8198311

Also, I installed the Python 2.7.6 binary and that's the version MacVim outputs.

There was also another issue that I found, but since FindSymbol and FindType are crashing, I can't test it again...

Apparently, on line 72 of Omnisharp/autoload/OmniSharp.vim

function! OmniSharp#JumpToLocation(filename, line, column)
    if a:filename != bufname('%')
        exec 'e ' . a:filename
    endif
    "row is 1 based, column is 0 based
    call cursor(a:line, a:column)
endfunction

When FindSymbol and FindType were working for me, directories with a space in them would not work when doing " exec 'e ' . a:filename

I tried several workarounds but it would keep crashing the application. This time around though I'm trying to access files in all kinds of places and I still crash.

Finally, I think I have a pretty good pattern matching thing for .cs files, I'm using neocomplete

let g:neocomplete#sources#omni#input_patterns.cs = '[^-)\=;.[:digit:] _\t]%(._|)'

That seems to be doing a better job at giving me completion. It even allows me to enter types when I press < for generics, so good job there. I'm using neocomplete, not neocomplcache, by the way.

https://gist.github.com/JosephFerano/8190641

That's my vimrc, if you wish to check it out.

I appreciate your help. Thank you so much!

Python x64 Support on Windows

The docs specifically state that only Python X32 is supported. This issue is to track support of Python X64 support on Windows.

OmniSharp.py - os.path.relpath() Causing Issues

If you have an open file that is located at d:\test\test.cs whilst the current director in vim is c:\ for example and you call OmniSharp#FindUsages or FindImplementations it will error due to the os.path.relpath() call.

Not sure if we need to use the relative path (it doesn't matter on windows) but I'm not sure about linux or osx.

Rename clobbers changes

I'm finding that "OmniSharp#RenameTo" causes all files in which the rename occurs to be reverted back to the last state that they were in when the server reloaded the solution.

My current solution is to call OmniSharp#ReloadSolution before RenameTo() which fixes the problem.

This could potentially be very frustrating for anyone that uses this feature.

MonoDoc documentation not displaying

On a screenshot in #13 I saw that the Description is essentially different from DisplayText. However, for me they are exactly the same. Is this a known issue for Linux?

Work with projects without SLN file.

I'm working with some "flat" ASP.NET web site projects that only have .aspx, .vb, .cs, and .config files. Would it be difficult to add support for these kinds of projects?

Add to project fails when solution is specified with forward slashes instead of backslashes

Produces the following error, which is fixed by simply changing forward slashes to backslashes

System.ArgumentException: String cannot be of zero length.
Parameter name: oldValue
at System.String.ReplaceInternal(String oldValue, String newValue)
at OmniSharp.ProjectManipulation.AddToProject.AddToProjectHandler.AddToProjec
t(AddToProjectRequest request) in c:\Users\Steve.vim\bundle\Omnisharp\server\Om
niSharp\ProjectManipulation\AddToProject\AddToProjectHandler.cs:line 40
at OmniSharp.ProjectManipulation.AddToProject.AddToProjectModule.<>c__Display
Class2.<.ctor>b__0(Object x) in c:\Users\Steve.vim\bundle\Omnisharp\server\Omni
Sharp\ProjectManipulation\AddToProject\AddToProjectModule.cs:line 13
at Nancy.Routing.DefaultRouteInvoker.Invoke(Route route, DynamicDictionary pa
rameters, NancyContext context)
at Nancy.Routing.DefaultRequestDispatcher.Dispatch(NancyContext context)
at Nancy.NancyEngine.InvokeRequestLifeCycle(NancyContext context, IPipelines
pipelines)

Issue when using mono?

Starting Server:
mono ./OmniSharp/bin/Debug/OmniSharp.exe -s /Users/vito-c/workrepos/myproject/project.sln

I am pretty sure the server is running on port 2000 (I can open localhost:2000/autocomplete in a browser and when I tried to echo "ack" to a port it gave me a bad response error back)

In Vim:
I start to type a method then type and it gives me: Could not connect to http://localhost:2000/autocomplete

Error Dump From Server:
System.InvalidOperationException: Operation is not valid due to the current state of the object
at System.Linq.Enumerable.First[IProject](IEnumerable1 source, System.Func2 predicate, Fallback fallback) [0x00000] in :0
at System.Linq.Enumerable.First[IProject](IEnumerable1 source, System.Func2 predicate) [0x00000] in :0
at OmniSharp.Solution.CSharpSolution.ProjectContainingFile (System.String filename) [0x00000] in :0
at OmniSharp.Parser.BufferParser.ParsedContent (System.String editorText, System.String filename) [0x00000] in :0
at OmniSharp.AutoComplete.AutoCompleteHandler.CreateProvider (OmniSharp.AutoComplete.AutoCompleteRequest request) [0x00000] in :0
at OmniSharp.AutoComplete.AutoCompleteModule+c__AnonStorey15.<>m__31 (System.Object x) [0x00000] in :0
at Nancy.Routing.Route.Invoke (Nancy.DynamicDictionary parameters) [0x00000] in :0
at Nancy.Routing.DefaultRouteInvoker.Invoke (Nancy.Routing.Route route, Nancy.DynamicDictionary parameters, Nancy.NancyContext context) [0x00000] in :0
at Nancy.Routing.DefaultRequestDispatcher.Dispatch (Nancy.NancyContext context) [0x00000] in :0

Start server from within Vim

Okay... I've just added a new feature to start the server from within Vim. It requires the vim-dispatch plugin (https://github.com/tpope/vim-dispatch) in order to launch the server asynchronously.

The function to call is OmniSharp#StartServer() when you have a C# file open. It will attempt to locate both the server and the solution file by traversing upwards. If more than one solution file is found then it will prompt you to choose which sln you want to use.

I've tested this on a windows machine which launches a new cmd window to host the OmniSharp server and also on a linux box (with tmux).

It's not friction free and I'm sure that there are problems with this approach, but I thought I would raise this as an issue to start getting your feedback.

Loading dummy_file?

My completion isn't working anymore and the server is only showing "Loading dummy_file" :(

Async build status indicator

In my fork I'm using a custom status line to display the status of the last asynchronous build. (green for successful, orange for in-progress, red for errors). I've also changed it to not pop up the quickfix list until told to do so, since I found it annoying to interrupt whatever else I had started doing, and you can do it yourself quite easily once you see it is red. Do you think any of that might be worth trying to merge into the main branch?

Completions missing

I noticed recently that in some cases simply no completions are offered.
For example, when typing Console., no completion are offered. Same with Math.. However, the completer is not completely broken, since int. does complete correctly.
Formerly this has not been the case. I haven't been able to figure out when exactly this behaviour was introduced.

Does anyone have the same experience?

Starting Fugitive Gdiff causes a "Did not find a solution file" error

Example:

File open from project, Omnisharp running in background. Wish to diff file, call :Gdiff.

Omnisharp attempts to start a new server (despite one already running), and throws the following error:

Error detected while processing function OmniSharp#StartServerIfNotRunning..OmniSharp#StartServer:
line 50:
Did not find solution file

The diff then fails to open, nor loads in to a buffer.

Can't init server submodule

When trying to update/init the server submodule, I get the following error:

fatal: reference is not a tree: 3a91202a33dc15fd71de4ae315ea62e53eb9263c
Unable to checkout '3a91202a33dc15fd71de4ae315ea62e53eb9263c' in submodule path 'server'

Not sure if I'm doing something wrong, but the link to the submodule within github also fails. I think the SHA reference that Omnisharp uses for OmniSharpServer hasn't actually been committed to OmniSharpServer yet?

splitting the vim part from the server part

Is it an idea to split up the server from the vim files?
If they are in a separate repository, omnisharp is better pluggable into other software. For example, if one wants to use omnisharp for YCM, or within a different editor, one doesn't want to clone the vim files.

More specifically, I would create a repo for the server, and a repo for the vim plugin, which has the server as a submodule. The latter means that cloning the vim plugin would automatically clone the server as well.

complete other references

Can Omnisharp complete other third reference? I found that it can complete OmniSharp.xxxx and Nancy.xxx in OmnisharpServer project. I want to complete other third references in my project, like ADOX(Microsoft ADO Ext. 6.0 for DDL and Security) COM's reference and Oracle.DataAccess.dll. or other dll build by myself. how can I configure it?

Omnisharp crash on auto-complete when file does not exist

If a .csproj file references a Compile file that does not exist, and auto-complete is attempted, then Omnisharp crashes I modified CSharpSolution.cs:114 as below and that resolved the crash:
if (project != null && File.Exists(filename))

can't complete HashSet<....>

Hello, It's a very usefull tool for me. But OmniSharp can't complete HashSet<...> code, when I type "HashSet hash = new HashSet (); hash." it can't show the HashSet's member, Is it a bug, or something I should configure ?

Add option for autocompleting parens?

Right now the default behavior is to insert opening brace if method has params, and to insert both () if there are none.

Could you add option for turning it off completely?

Thanks

Intermittent CSharpFile Parsing Errors

First off, OmniSharp is my new favorite thing. Thanks for making this.

Yesterday afternoon getting completion data stopped working. Other features of OmniSharp, like error checking on write, kept working. This is the type of message I kept getting:

OmniSharp Parsing Error

This was happening on files that will compile. The location it is referencing is the cursor position. I started the server on a different project to see if it had to do with the project I was working in, but I would get the same message regardless. I spent a lot of time trying to troubleshoot this, and I did find a way to get it to start working again, but I'm not sure at all why. This morning i started a new session, it was working, and at some point stopped working again, and I was able to reproduce the fix, but I don't know what I'm doing that is causing this to happen.

I made completion start working again by rolling back cs_omnisharp.vim to its state prior to when you reorganized the vimfiles (went from current back to a78af16 for that file only). After that it starts working again. I then replaced cs_omnisharp.vim with the current one, restart vim and the server, and it keeps working. Any ideas on what this is about would be greatly appreciated.

Getting System.Net.HttpListenerException exception on Windows 8.1

Just got a new Windows 8.1 machine and OmniSharp refuses to start, throwing System.Net.HttpListenerException. The firewall is down on the box. What could be the issue? Here's the complete error (in French, because of stupid work language rules):

Loading dummy_file

Exception non gérée : System.Net.HttpListenerException: Accès refusé
   à System.Net.HttpListener.AddAllPrefixes()
   à System.Net.HttpListener.Start()
   à Nancy.Hosting.Self.NancyHost.Start()
   à OmniSharp.Program.StartServer(String solutionPath, Int32 port, Boolean verbose) dans c:\Users\pprovost\Omnisharp\server\OmniSharp\Program.cs:ligne 82
   à OmniSharp.Program.Main(String[] args) dans c:<my Home>Omnisharp\server\OmniSharp\Program.cs:ligne 59

Small issue/Question

When ever I open a c# file in vim it asks me twice which sln I want to use...
example:
1 - /Users/vito-c/repo/MyProject/MyProject-csharp.sln
2 - /Users/vito-c/repo/MyProject/MyProject.sln

Then
Choose a solution file
Which solutionfile should be loaded?
[0] MyProject-csharp.sln, (1) MyProject.sln:

I think the second option should default if you already selected it... I could make this change if you want :)

Weird behaviour while using OmniSharp + Neocomplete

I've noticed that in some cases, OmniSharp + Neocomplete causes strange errors when using the repeat operator .

To reproduce, I've created a blank solution with just this file:

using System;

namespace BlankTestProject
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Out.WriteLine("1");
        }
    }
}

And then replace WriteLine with 'foo':

using System;

namespace BlankTestProject
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Out.foo("1");
        }
    }
}

If you then undo that change, then go to the start of 'foo' and hit '.', you see the following. ([x] marks cursor position)

using System;

namespace BlankTestProject
{
    class Program
    {
        static void Main(string[] args)
        {[x]
            Console.Out.foo("0");
        }
    }
}

That is, the 1 gets decremented to 0 and the cursor moves up one line for some reason.

I am using vanilla vim with NeoBundle and the following .vimrc:

set nocompatible

set runtimepath+=~/.vim2/bundle/neobundle.vim/

let g:neobundle#types#git#default_protocol = 'https'

call neobundle#rc(expand('~/.vim2/bundle/'))

NeoBundleFetch 'Shougo/neobundle.vim'

NeoBundle 'Shougo/vimproc', {
        \ 'build' : {
        \     'windows' : 'mingw32-make -f make_mingw64.mak',
        \    },
        \ }

NeoBundle 'Shougo/neocomplete.vim'

NeoBundle 'nosami/Omnisharp'

filetype plugin indent on " Required by NeoBundle

NeoBundleCheck

set ignorecase

let g:neocomplete#lock_buffer_name_pattern = '\V[Command Line]'
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#use_vimproc = 1
let g:neocomplete#enable_camel_case = 1
let g:neocomplete#enable_ignore_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3

if !exists('g:neocomplete#sources#omni#input_patterns')
    let g:neocomplete#force_omni_input_patterns = {}
endif
let g:neocomplete#force_omni_input_patterns.cs = '.*'

set completeopt-=preview

autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags

Which I just took from the suggested configuration on the Neocomplete page, and added the force_omni_input_pattern from the Omnisharp suggested page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.