Skip to content

How to install on debian

Mika Vilpas edited this page May 4, 2016 · 4 revisions

Steps to Install Emacs Omnisharp plugin on Debian

1. Omnisharp Server

This is a server app that is started automatically by the omnisharp plugin. Run as root:

git clone https://github.com/OmniSharp/omnisharp-server.git
cd omnisharp-server
git submodule update --init --recursive
xbuild

Is there a command to test that the server works??

2. curl

Curl is needed by the Omnisharp plugin. Run as root or use su:

apt-get install curl

Install MELPA plugin repository for emacs

By default emacs only uses the gnu repositories which don't contain omnisharp plugin. The repository needs to be added to the emacs init file. There is one emacs init file for each user, so run this in a user account.

The available packages are only installed for the connected user; not for a users on the system.

Put into ~/.emacs file:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)

Install omnisharp plugin

Check if the plugin is available: Press CTRL and 'x' and then type package-list. Then you see all available packages; either scroll down or search for it via ALT and 's' and then 'omni'. In Emacs terms:

M-x package-list
C-s omni

Then install the plugin via

M-x package-install omnisharp

Once the server is started, you can test connectivity with M-x omnisharp-check-alive-status.