2018-02-21 23:19:57 +08:00
|
|
|
---
|
|
|
|
title: "SpaceVim lang#csharp layer"
|
|
|
|
description: "This layer is for csharp development"
|
|
|
|
---
|
|
|
|
|
2018-06-23 14:37:41 +08:00
|
|
|
# [Available Layers](../../) >> lang#csharp
|
2018-02-21 23:19:57 +08:00
|
|
|
|
|
|
|
<!-- vim-markdown-toc GFM -->
|
|
|
|
|
|
|
|
- [Description](#description)
|
2018-06-23 14:37:41 +08:00
|
|
|
- [Install](#install)
|
2018-02-21 23:19:57 +08:00
|
|
|
- [Layer](#layer)
|
|
|
|
- [OmniSharp Server](#omnisharp-server)
|
|
|
|
- [Key bindings](#key-bindings)
|
|
|
|
|
|
|
|
<!-- vim-markdown-toc -->
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
This layer is for csharp development.
|
|
|
|
|
2018-06-23 14:37:41 +08:00
|
|
|
## Install
|
2018-02-21 23:19:57 +08:00
|
|
|
|
2018-06-23 14:37:41 +08:00
|
|
|
To use this configuration layer, update custom configuration file with:
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[[layers]]
|
|
|
|
name = "lang#csharp"
|
2019-08-23 07:59:05 +08:00
|
|
|
highlight_types = 0
|
2018-06-23 14:37:41 +08:00
|
|
|
```
|
2018-02-21 23:19:57 +08:00
|
|
|
|
2019-08-23 07:59:05 +08:00
|
|
|
When opening a cs file at first time, it will popup a window and ask whether install the OmniSharp
|
|
|
|
server or not, enter 'Y' to confirm.
|
2018-02-21 23:19:57 +08:00
|
|
|
|
2019-08-23 07:59:05 +08:00
|
|
|
If you choose "coc" as your auto completion engine, you must run ":CocInstall coc-omnisharp"
|
|
|
|
to install the extension.
|
2018-02-21 23:19:57 +08:00
|
|
|
|
|
|
|
## Key bindings
|
|
|
|
|
|
|
|
| Key Binding | Description |
|
|
|
|
| ----------- | ------------------------------------------------ |
|
|
|
|
| `SPC l b` | compile the project |
|
|
|
|
| `SPC l f` | format current file |
|
|
|
|
| `SPC l d` | show doc |
|
|
|
|
| `SPC l e` | rename symbol under cursor |
|
|
|
|
| `SPC l g g` | go to definition |
|
|
|
|
| `SPC l g i` | find implementations |
|
|
|
|
| `SPC l g t` | find type |
|
|
|
|
| `SPC l g s` | find symbols |
|
|
|
|
| `SPC l g u` | find usages of symbol under cursor |
|
|
|
|
| `SPC l g m` | find members in the current buffer |
|
2019-08-23 07:59:05 +08:00
|
|
|
| `SPC l c f` | fix using |
|
|
|
|
| `SPC l c a` | contextual code actions |
|
|
|
|
| `SPC l c c` | find all code errors/warnings for the current solution|
|
2018-02-21 23:19:57 +08:00
|
|
|
| `SPC l s r` | reload the solution |
|
|
|
|
| `SPC l s s` | start the OmniSharp server |
|
|
|
|
| `SPC l s S` | stop the OmniSharp server |
|
|
|
|
|