Skip to content
Felix Laurie von Massenbach edited this page Jan 28, 2017 · 33 revisions

Welcome to the OmniSharp Atom wiki!

The OmniSharp Atom package is part of a family many OmniSharp based editor plugins, so in that sense we ride on the coat-tails of many others.

v0.14.X has been released, which runs against OmniSharp Roslyn, which is the Roslyn based version of the server and supports ASP.NET v5. The entire package has been rebuilt using TypeScript.

v0.2.1, was the last version that ran against OmniSharp Server. Keep in mind that version is no longer supported and will show a lot of Atom API deprecation warnings.

Prerequisite packages

Riding on the coat-tails of others, the omnisharp-atom package depends on the following packages being installed

autocomplete-plus and linter packages are now automatically installed if they aren't already installed when you install omnisharp-atom.

Runtime prerequisites

Please ensure you've got Mono 4.0.1 or later installed if you're on OS X/Linux. Or .NET 4.5.1 on Windows.

If you want to work on a DNX application then you will also need to have dnvm installed. Please refer to the instructions detailed in the aspnet/home repository.

In addition, the following guides have been published on docs.asp.net

Help me! I've never used Atom before

The Atom getting started guide is a good starting point for you.

Just a tip, to navigate to any file in the folder you've opened, just use CMD+T on OS X or CTRL+T on Windows/Linux. And to jump to any symbol (method/property) within a C# file use CMD+R on OS X or CTRL+R on Windows/Linux.

Want to use the bleeding edge version of OmniSharp Atom and can't wait for a new release?

You're probably a developer, so of course you want the latest shiny ;)

  1. You'll need to git clone omnisharp-atom repository master (branch) to your ~/.atom/packages (or c:\Users\<username>\.atom\packages on Windows) folder.
  2. Once you've cloned it, navigate to the omnisharp-atom folder now within packages using your favourite terminal/command prompt.
  3. Run the following command: npm install. This will pull in all the dependent packages.
  4. If you're having any issues, ensure you've got the latest version of npm installed. See the Installing Node.js and updating npm guide.
  5. If you're still having issues, jump into the omnisharp chat room (mentioned below).

Supported operating systems

While our goal is for OmniSharp Atom to run smoothly across all platforms Atom supports (Mac OS X, Windows, Linux), there will always be cases where something breaks.

How do I use OmniSharp Atom?

  • Open the root folder of your solution within Atom
  • When the flame icon in the bottom left corner turns green, the server has started!
  • You can also make use of the Atom Command Palette by invoking the keyboard shortcut CMD+SHIFT+P on OS X or CTRL+SHIFT+P on Windows/Linux.

Atom Command Palette showing OmniSharp commands

See a missing feature, or a bug?

Feel free to send a pull request to fix something or add a new feature, and someone will review it when they have time. We're an OSS project, staffed by volunteers doing this in our free time. So have patience :)

Features

The ultimate goal is to have available all (applicable/relevant) features exposed by OmniSharp Roslyn from OmniSharp Atom, a list of which can be seen here.

Our list of actual implemented features is small (at this point in time), but will grow with active contributions. If you're comfortable, do have a poke at the code base and see if you can contribute. The current code in master is written mainly in TypeScript, so if you want to edit it, I'd strongly suggest installing the TypeScript package for Atom.

We use another Omnisharp abstraction project to communicate with the server https://github.com/OmniSharp/omnisharp-node-client. New features will need to be implemented first in that project, then in this project.

Diving into the code:

  • Features are kept in the lib/omnisharp-atom/features folder.
  • If you'd like to add an item to the OmniSharp Atom menu (or context menu), this can be done by modifying /menus/atom-sharper.cson.
  • If you'd like to add a new keyboard shortcut, this can be done by modifying keymaps/omnisharp-atom.cson

To load as a development package (in terminal/command prompt)

  1. apm develop
  2. atom
  3. atom -d (this loads Atom in dev mode)

To remove a dev package.

  1. apm delete --dev

Modifying the server

If you want to modify the server (C#) code, you'll need to do the following

  1. Clone omnisharp-roslyn somewhere.
  2. Set the OMNISHARP environment variable to /path/to/omnisharp-roslyn/scripts/Omnisharp (or Omnisharp.cmd if you are using Windows)
  3. Launch Atom (if you set the environment variable from the shell, then launch Atom from that same shell)

  1. If you need to debug the server, you'll need to use VS2015. Attach to the running DNX process.

Want to explore the Atom API?

They're available here: https://atom.io/docs/api/latest

Want to chat with like minded OmniSharp individuals?

Join us on slack - https://goo.gl/Ovnqr1