ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Omni​Sharp

by OmniSharp ST3

C# IDE Plugin for Sublime Text 3

Details

Installs

  • Total 63K
  • Win 41K
  • Mac 15K
  • Linux 7K
Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14
Windows 2 7 4 2 4 5 4 4 4 3 1 5 6 2 2 3 2 5 3 2 5 10 2 3 5 5 6 9 8 8 4 5 7 3 4 4 2 2 4 3 3 4 5 1 0 2
Mac 0 2 1 0 1 2 0 0 0 1 1 0 0 0 1 1 1 0 1 0 2 0 0 1 0 2 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 4 0 0 1
Linux 1 2 1 2 2 2 2 0 0 1 3 0 1 1 1 0 2 1 1 0 1 0 0 2 1 0 1 3 0 0 0 1 1 2 0 1 1 0 1 0 3 0 2 1 0 1

Readme

Source
raw.​githubusercontent.​com

OmniSharpSublime for ST3

OmnisharpSublime is a plugin for ST3 to provide a C# development environment. It communicates with omnisharp-roslyn by nosami for IDE functions.

It works on: 1. Mac OSX 2. Linux 3. Windows

Features

  1. Auto OmniSharpServer running
  2. Asynchronous communication with OmniSharpServer (Never freeze!)
  3. Auto Completion
  4. Goto definition
  5. Rename
  6. Goto implementation
  7. Syntax/Semantic error highlighting
  8. Displays possible override methods
  9. Find Usages
  10. Format Document
  11. Displays code issues such as assigment is redundant
  12. Fix code issues - put cursor on highlighted issue and select Fix Code Issue
  13. Remove Unused, Add Missing and Sort Using Statements
  14. Code Actions eg. Convert LINQ query to Fluent Syntax
  15. Add File To Project
  16. Remove File from Project (via sidebar and context menu)
  17. Add New C# Class & Interface (via sidebar and context menu) via File Templates which also adds to csproj
  18. Type Lookup with Documentation
  19. Hide/Show Info Panel
  20. Reload Solution

Linux Requirements

  • mono
  • msbuild-stable

Windows Requirements

  • Microsoft Build Tools 2015 (must be added to PATH)

Build Requirements

  • dotnet core sdk

Installation

Building From Source

  1. Move to ST3 plugin directory in console.

    cd {path to ST3 plugin directory}/Packages
    
  2. Clone repository.

    git clone https://github.com/OmniSharp/omnisharp-sublime.git OmniSharp
    
  3. Move to plugin directory, update submodule and build.

* Windows

   cd OmniSharp
   git submodule update --init --recursive
   build.cmd

  * Linux Or Mac OSX

   cd OmniSharp
   git submodule update --init --recursive
   ./build.sh

Project Setting

The server will automatically find the the solution file from the folder you have opened in Sublime. If you have multiple solutions you have to specify the solution file you wish to use in a sublime-project.

  1. Go to File -> Open and select the folder with your solution in it.

  2. Go to Project -> Save Project As and save a YOURPROJECTNAME.sublime-project in the same location as your *.sln

  3. Open your YOURPROJECTNAME.sublime-project file that should now appear in the sidebar on the left

  4. Enter the location to the *.sln file like below

Example of a sublime-project

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "."
        }
    ],
    "solution_file": "./testconsoleprj.sln"
}

Once the YOURPROJECT.sublime-project is set up and saved, follow the below:

  1. Close Sublime (YMMV but this seems to be the best way to open the YOURPROJECTNAME.sublime-project)
  2. Open Sublime
  3. Click Project -> Open Project, and select your YOURPROJECT.sublime-project file

C# language-specific settings

Create C# settings file as shown in this picture

Paste the below in. This will launch intellisense on . and < symbols

{
    "auto_complete": true,
    "auto_complete_selector": "source - comment",
    "auto_complete_triggers": [ {"selector": "source.cs", "characters": ".<"} ],
 }