Giter Club home page Giter Club logo

omnisharp-server's Introduction

#Notice This project is being replaced with OmniSharp Roslyn. I'll still accept PRs for this project, but please note that all development has stopped here.

OmniSharpServer

Mono Build Status Windows Build Status

HTTP wrapper around [NRefactory] (https://github.com/icsharpcode/NRefactory) allowing C# editor plugins to be written for any editor in any language.

This is the server component for the Vim OmniSharp plugin, YouCompleteMe, Sublime Text 2, Sublime Text 3, Emacs OmniSharp plugin and Atom plugin

#Build

####OSX / Linux Requires a minimum of Mono 3.0.12 - If you absolutely must use mono 2.10 then checkout the mono-2.10.8 tag. Updating mono on ubuntu. If you are using OSX, please use the official version of Mono as the homebrew version has known issues.

    git clone https://github.com/nosami/OmniSharpServer.git
    cd OmniSharpServer
    git submodule update --init --recursive
    xbuild

####Windows

    git clone https://github.com/nosami/OmniSharpServer.git
    cd OmniSharpServer
    git submodule update --init --recursive

    # (if using Cygwin, overwrite the default config file config.json with config-cygwin.json)
    copy OmniSharp\config-cygwin.json OmniSharp\config.json
    msbuild

To start the Omnisharp server manually (The Vim OmniSharp client and YouCompleteMe may start this for you automatically):

  • Use the current working directory
    • If one solution file is found, use it. Otherwise start in folder mode.
[mono] OmniSharp.exe
  • To specify a solution file / project files
[mono] OmniSharp.exe -s (path\to\sln)
  • Without a solution file (OmniSharp will parse all C# files it finds and add references to every dll it finds)
[mono] OmniSharp.exe -s path

###Problems (or just want to see what's going on)?

Try adding an extra -v Verbose to the end of the command line. You should see something like the following.


************ Request ************
POST - /autocomplete
************ Headers ************
Accept-Encoding - identity
Content-Length - 378
Host - localhost:2000
Content-Type - application/x-www-form-urlencoded
Connection - close
User-Agent - Python-urllib/2.7
************  Body ************
column=22&filename=/Users/jason/.vim/bundle/Omnisharp/server/OmniSharp/Logger.cs&buffer=using System;

namespace OmniSharp
{
    class Test
    {
        public Test()
        {
            Console.B
        }
    }
}&WantDocumentationForEveryCompletionResult=False&line=9&wordToComplete=B
Looking for project containing file /Users/jason/.vim/bundle/Omnisharp/server/OmniSharp/Logger.cs
/Users/jason/.vim/bundle/Omnisharp/server/OmniSharp/Logger.cs belongs to /Users/jason/.vim/bundle/Omnisharp/server/OmniSharp/OmniSharp.csproj
Looking for project containing file /Users/jason/.vim/bundle/Omnisharp/server/OmniSharp/Logger.cs
/Users/jason/.vim/bundle/Omnisharp/server/OmniSharp/Logger.cs belongs to /Users/jason/.vim/bundle/Omnisharp/server/OmniSharp/OmniSharp.csproj
Getting Completion Data
Got Completion Data
************  Response ************
[{"CompletionText":"BackgroundColor","Description":"ConsoleColor BackgroundColor { get; set; }","DisplayText":"ConsoleColor BackgroundColor"},{"CompletionText":"Beep(","Description":"void Beep(int frequency, int duration);","DisplayText":"void Beep(int frequency, int duration)"},{"CompletionText":"Beep()","Description":"void Beep();","DisplayText":"void Beep()"},{"CompletionText":"BufferHeight","Description":"int BufferHeight { get; set; }","DisplayText":"int BufferHeight"},{"CompletionText":"BufferWidth","Description":"int BufferWidth { get; set; }","DisplayText":"int BufferWidth"},{"CompletionText":"CursorVisible","Description":"bool CursorVisible { get; set; }","DisplayText":"bool CursorVisible"},{"CompletionText":"KeyAvailable","Description":"bool KeyAvailable { get; }","DisplayText":"bool KeyAvailable"},{"CompletionText":"MoveBufferArea(","Description":"void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop);","DisplayText":"void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop)"},{"CompletionText":"MoveBufferArea(","Description":"void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor);","DisplayText":"void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor)"},{"CompletionText":"NumberLock","Description":"bool NumberLock { get; }","DisplayText":"bool NumberLock"},{"CompletionText":"SetBufferSize(","Description":"void SetBufferSize(int width, int height);","DisplayText":"void SetBufferSize(int width, int height)"}]
/autocomplete 7ms

omnisharp-server's People

Contributors

nosami avatar mikavilpas avatar jchannon avatar mispencer avatar astrophizz avatar chtenb avatar bbbscarter avatar davidpodhola avatar scottbilas avatar miszr avatar rbtnn avatar retran avatar bitdeli-chef avatar bmsullivan avatar dannydulai avatar derekslager avatar ecsousa avatar eberan avatar jkells avatar jarlax avatar jrieken avatar abhishekmittal09 avatar filipw avatar jeaye avatar jtbm37 avatar mattn avatar metatheos avatar svermeulen avatar thinca avatar

Watchers

James Cloos avatar  avatar

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.