Skip to content

Commit 75f3184

Browse files
author
Brian Canzanella
committed
adds readmes, cleans up language client path
1 parent 7ed748b commit 75f3184

File tree

7 files changed

+55
-20
lines changed

7 files changed

+55
-20
lines changed

Diff for: vs/CodeStream.VisualStudio.code-workspace

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {}
8+
}

Diff for: vs/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CodeStream Extension for Visual Studio
2+
3+
see src/README.dev.md

Diff for: vs/src/CodeStream.VisualStudio/FooLanguageClient.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ private async Task<Connection> ActivateByStdIOAsync(CancellationToken token)
107107
{
108108
await System.Threading.Tasks.Task.Yield();
109109

110+
//TODO package up node?
110111
var info = new ProcessStartInfo
111112
{
112113
FileName = @"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe"
113114
};
114-
var agent = @"C:\Users\brian\code\CodeStream\codestream-lsp-agent\dist\agent-cli.js";
115+
//TODO package this up?
116+
var agent = @"..\..\..\..\..\..\codestream-lsp-agent\dist\agent-cli.js";
115117
info.Arguments = $@"{agent} --stdio --inspect=6009 --nolazy";
116118
info.RedirectStandardInput = true;
117119
info.RedirectStandardOutput = true;
@@ -128,7 +130,7 @@ private async Task<Connection> ActivateByStdIOAsync(CancellationToken token)
128130
return new Connection(process.StandardOutput.BaseStream, process.StandardInput.BaseStream);
129131
}
130132

131-
throw new Exception("WTF");
133+
throw new Exception("Process start exception");
132134
}
133135

134136
public async Task<Connection> ActivateAsync(CancellationToken token)

Diff for: vs/src/CodeStream.VisualStudio/LogManager.cs

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public static class LogManager
1818

1919
static Logger CreateLogger()
2020
{
21+
//TODO use rolling file sink
22+
2123
//var logPath = Path.Combine(
2224
// Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
2325
// Constants.ApplicationName,

Diff for: vs/src/README.dev.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# CodeStream Extension for Visual Studio
2+
3+
### Getting the code
4+
5+
```
6+
git clone https://github.com/TeamCodeStream/vs-codestream.git
7+
```
8+
9+
### Prerequisites
10+
11+
- Windows 10
12+
- [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/)
13+
- License for [https://www.teamdev.com/dotnetbrowser](DotNetBrowser)
14+
15+
- checkout codestream-lsp-agent/feature/visual-studio and ensure it is and `npm run watch` this will build and watch `agent-cli.ts`
16+
17+
### Build / Run
18+
19+
Press `F5` to build and run the solution. A new "experimental" version of Visual Studio will open.
20+
21+
#### Not working?
22+
23+
- Ensure `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe` exists
24+
- Ensure vs-codestream and codestream-lsp-agent are sibling repos
25+
- Ensure the agent watch is running
26+
- Ensure your DotNetBrowser license works
27+
28+
### Notes
29+
30+
CodeStream.VisualStudio uses an LSP client library from Microsoft. There are some caveats to using it -- as it is only allowed to be instantiated after a certain file (content) type is opened in the editor.
31+
32+
This sample creates a mock language server using the [common language server protocol](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md) and a mock language client extension in Visual Studio. For more information on how to create language server extensions in Visual Studio, please see [here](https://docs.microsoft.com/en-us/visualstudio/extensibility/adding-an-lsp-extension).
33+
34+
**Related topics**
35+
36+
- [Language Server Protocol](https://docs.microsoft.com/en-us/visualstudio/extensibility/language-server-protocol)
37+
- [Creating a language server extension in Visual Studio](https://docs.microsoft.com/en-us/visualstudio/extensibility/adding-an-lsp-extension)
38+
- [ Visual Studio SDK Documentation ](https://docs.microsoft.com/en-us/visualstudio/extensibility/visual-studio-sdk)

Diff for: vs/src/Resources/screenshot1.png

-28.8 KB
Binary file not shown.

Diff for: vs/src/readme.md

-18
This file was deleted.

0 commit comments

Comments
 (0)