spacemacs/contrib/!lang/csharp
Christoph Paulik ff8cd06046 Fix various issues with org markup
- lists were not correctly indented sometimes
- **note** and such things do not exist in org
- Note and Important
- Change Feature list to heading
- Change TODOS to actual org TODOS
- Add TOC to python layer
- list indentation
- some typos I could not leave unchanged
- TODO formatting
- List indentation
- typos
- wrong markup

fix conversion issues
2015-06-11 21:31:42 -04:00
..
img Prefix categories with ! 2015-05-25 00:50:38 -04:00
config.el Prefix categories with ! 2015-05-25 00:50:38 -04:00
extensions.el Prefix categories with ! 2015-05-25 00:50:38 -04:00
packages.el Prefix categories with ! 2015-05-25 00:50:38 -04:00
README.org Fix various issues with org markup 2015-06-11 21:31:42 -04:00

C# contribution layer for Spacemacs

/TakeV/spacemacs/media/commit/ff8cd060466a2d6b19fb4677473b3db4f38d75dc/contrib/!lang/csharp/img/csharp.png /TakeV/spacemacs/media/commit/ff8cd060466a2d6b19fb4677473b3db4f38d75dc/contrib/!lang/csharp/img/dotnet.png

Description

This layer adds experimental support for C# language using OmniSharp.

Packages Included

Install

To use this contribution add it to your ~/.spacemacs

(setq-default dotspacemacs-configuration-layers '(csharp))

Prerequisites

ASP.NET 5

Follow the instructions for your platform here.

curl

You'll need curl to be able to use the Omnisharp package. Use your favorite package manager to install it (on Windows you can use chocolatey).

Be sure to make the curl binary available to your PATH environment variable, or set the variable omnisharp--curl-executable-path in your dotfile function dotspacemacs-config:

  (setq-default omnisharp--curl-executable-path "/PATH/TO/CURL/curl")

Omnisharp server

You have to compile the OmniSharp server following the instructions which can be found here.

Don't forget to add the server binary directory to your system PATH environment variable. The full path the binary can also be directly referenced in the variable omnisharp-server-executable-path (put this in your dotspacemacs-config function):

  (setq-default omnisharp-server-executable-path "/PATH/TO/OMNISHARP/OmniSharpServer")

OmniSharp should now automatically load and start a server when you open a .cs file.

Caveats

  • It's currently not possible to create a C# solution outside of an IDE such as MonoDevelop, it's therefore recommended that you install it to create your solutions.
  • Debugging is possible using SDB.

Key Bindings

Compilation

Key Binding Description
mcc Build the solution

File/Solution/Project manipulation

Key Binding Description
mfa Add the current file to solution
mfA Add files selected in dired to solution
mfr Remove the current file from solution
mfR Removed files selected in dired from solution
mpl Add reference to solution

Navigation

Key Binding Description
mgf Go to solution file
mgF Go to solution file then member
mgg Go to definition
mgG Go to definition in other window
mgi Find implementations
mgm Go to solution member
mgM Go to solution member in other window
mgr Go to region
mgs Find symbols using Helm
mgu Find usages of symbol under cursor using Helm

Helpers (documentation, info)

Key Binding Description
mht Get type information for symbol under cursor
mhT Get type information for symbol under cursor and put it into kill-ring

Refactoring

Key Binding Description
mrm Rename symbol under cursor
mrr Refactor symbol under cursor

OmniSharp server interaction

Key Binding Description
msr Reload the solution
mss Start the OmniSharp server
msS Stop the OmniSharp server

Tests

Key Binding Description
mta Run all tests in project
mtb Run all tests in current file/fixture
mtt Run test under cursor

Code manipulation

Key Binding Description
mo Auto complete overrides
mi Fix usings/imports
m= Format the current buffer