Skip to content

Commit 0cf126d

Browse files
Started adding test atom extension, requires linux or mac to build (flow) at the moment
1 parent a50cd52 commit 0cf126d

File tree

3 files changed

+63
-4
lines changed

3 files changed

+63
-4
lines changed

atom-testextension/lib/main.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const cp = require('child_process')
2+
const {join} = require('path');
3+
const {AutoLanguageClient} = require('atom-languageclient')
4+
5+
class OmnisharpLanguageServer extends AutoLanguageClient {
6+
getGrammarScopes () { return [ 'source.xml' ] }
7+
getLanguageName () { return 'XML' }
8+
getServerName () { return 'OmniSharp' }
9+
10+
startServerProcess () {
11+
return cp.spawn('node', [ join(__dirname, "../../sample/SampleServer/bin/Debug/netcoreapp1.1/win7-x64/SampleServer.exe") ])
12+
}
13+
}
14+
15+
module.exports = new OmnisharpLanguageServer()

atom-testextension/package.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "atom-testextension",
3+
"main": "./lib/main",
4+
"version": "0.1.0",
5+
"description": "Provide C# language support via the Omnisharp Language Server",
6+
"repository": "https://github.com/atom/languageserver-csharp",
7+
"license": "MIT",
8+
"engines": {
9+
"atom": ">=1.13.0"
10+
},
11+
"activationHooks": [
12+
"language-xml:grammar-used"
13+
],
14+
"dependencies": {
15+
"atom-languageclient": "git://github.com/atom/atom-languageclient.git"
16+
},
17+
"providedServices": {
18+
"autocomplete.provider": {
19+
"versions": {
20+
"2.0.0": "provideAutocomplete"
21+
}
22+
},
23+
"linter": {
24+
"versions": {
25+
"1.0.0": "provideLinter"
26+
}
27+
},
28+
"nuclide-outline-view": {
29+
"versions": {
30+
"0.0.0": "provideOutlines"
31+
}
32+
},
33+
"nuclide-definition-provider": {
34+
"versions": {
35+
"0.0.0": "provideDefinitions"
36+
}
37+
},
38+
"hyperclick.provider": {
39+
"versions": {
40+
"0.0.0": "provideHyperclick"
41+
}
42+
}
43+
}
44+
}

sample/SampleServer/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ static void Main(string[] args)
1919

2020
static async Task MainAsync(string[] args)
2121
{
22-
while (!System.Diagnostics.Debugger.IsAttached)
23-
{
24-
await Task.Delay(100);
25-
}
22+
//while (!System.Diagnostics.Debugger.IsAttached)
23+
//{
24+
// await Task.Delay(100);
25+
//}
2626

2727
var server = new LanguageServer(Console.In, Console.Out);
2828

0 commit comments

Comments
 (0)