├── .github ├── issue_template.md └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── lib └── main.js └── package.json /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | A few things to know before you create an issue 2 | 3 | * This package requires [Atom 1.21](https://atom.io) 4 | * We launch a "language server" process on your machine that understands the language you are editing 5 | * What that server can do - syntax compatibility, whether it supports formatting or outlines etc - is outside of our control 6 | * You can see what the language server supports by checking out our README and following the link after "powered by" 7 | * "disconnected", "JSONRPC" or "Content-Header" errors indicate that server process died. We're working on better recovery right now 8 | 9 | If you have understood all this, please remove this text and start writing your issue :) 10 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push] 4 | 5 | env: 6 | CI: true 7 | 8 | jobs: 9 | Test: 10 | strategy: 11 | matrix: 12 | os: [ubuntu-latest, macos-latest, windows-latest] 13 | channel: [stable, beta] 14 | runs-on: ${{ matrix.os }} 15 | steps: 16 | - uses: actions/checkout@v1 17 | - uses: UziTech/action-setup-atom@v2 18 | with: 19 | version: ${{ matrix.channel }} 20 | - name: Install dependencies 21 | run: apm install 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 GitHub Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ##### Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our [official announcement](https://github.blog/2022-06-08-sunsetting-atom/) 2 | # IDE-CSharp package 3 | [![CI](https://github.com/atom/ide-csharp/actions/workflows/ci.yml/badge.svg)](https://github.com/atom/ide-csharp/actions/workflows/ci.yml) 4 | C# language support for Atom-IDE, powered by the [Omnisharp Language Server](https://github.com/OmniSharp/omnisharp-node-client). 5 | 6 | ![Screen shot of IDE-CSharp](https://user-images.githubusercontent.com/118951/30307350-760ff6f8-9732-11e7-95e8-639845b51153.png) 7 | 8 | ## Early access 9 | This package is currently an early access release. You should also install the [atom-ide-ui](https://atom.io/packages/atom-ide-ui) package to expose the functionality within Atom. 10 | 11 | ## Features 12 | 13 | * Auto completion 14 | * Code format 15 | * Diagnostics (errors & warnings) 16 | * Document outline 17 | * Find references 18 | * Go to definition 19 | * Hover 20 | * Reference highlighting 21 | 22 | ## Contributing 23 | Always feel free to help out! Whether it's [filing bugs and feature requests](https://github.com/atom/languageserver-csharp/issues/new) or working on some of the [open issues](https://github.com/atom/languageserver-csharp/issues), Atom's [contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md) will help get you started while the [guide for contributing to packages](https://github.com/atom/atom/blob/master/docs/contributing-to-packages.md) has some extra information. 24 | 25 | ## License 26 | MIT License. See [the license](LICENSE.md) for more details. 27 | -------------------------------------------------------------------------------- /lib/main.js: -------------------------------------------------------------------------------- 1 | const {AutoLanguageClient} = require('atom-languageclient') 2 | 3 | class CSharpLanguageClient extends AutoLanguageClient { 4 | getGrammarScopes () { return [ 'source.cs' ] } 5 | getLanguageName () { return 'C#' } 6 | getServerName () { return 'OmniSharp' } 7 | 8 | startServerProcess () { 9 | return super.spawnChildNode([ require.resolve('omnisharp-client/languageserver/server') ]) 10 | } 11 | } 12 | 13 | module.exports = new CSharpLanguageClient() 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ide-csharp", 3 | "main": "./lib/main", 4 | "version": "0.6.2", 5 | "description": "C# language support for Atom-IDE.", 6 | "repository": "https://github.com/atom/ide-csharp", 7 | "license": "MIT", 8 | "engines": { 9 | "atom": ">=1.21.0" 10 | }, 11 | "dependencies": { 12 | "atom-languageclient": "^0.8.3", 13 | "omnisharp-client": "^7.2.2" 14 | }, 15 | "enhancedScopes": [ 16 | "source.cs" 17 | ], 18 | "consumedServices": { 19 | "linter-indie": { 20 | "versions": { 21 | "2.0.0": "consumeLinterV2" 22 | } 23 | }, 24 | "datatip": { 25 | "versions": { 26 | "0.1.0": "consumeDatatip" 27 | } 28 | } 29 | }, 30 | "providedServices": { 31 | "autocomplete.provider": { 32 | "versions": { 33 | "2.0.0": "provideAutocomplete" 34 | } 35 | }, 36 | "code-format.range": { 37 | "versions": { 38 | "0.1.0": "provideCodeFormat" 39 | } 40 | }, 41 | "code-highlight": { 42 | "versions": { 43 | "0.1.0": "provideCodeHighlight" 44 | } 45 | }, 46 | "definitions": { 47 | "versions": { 48 | "0.1.0": "provideDefinitions" 49 | } 50 | }, 51 | "find-references": { 52 | "versions": { 53 | "0.1.0": "provideFindReferences" 54 | } 55 | }, 56 | "outline-view": { 57 | "versions": { 58 | "0.1.0": "provideOutlines" 59 | } 60 | } 61 | } 62 | } 63 | --------------------------------------------------------------------------------