language-server-dot
language-server-dot copied to clipboard
needed some fixes to dependency version numbers
terrific project. finally able to get my head around a LSP. Had to patch the code to correct some version problems.
to get the client to compile, I ran "npm outdated" and then updated the version numbers in package.json. Also had to update the vscode engine version.
"engines": {
"vscode": "^1.38.0"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^5.2.6",
"@types/node": "^12.7.11",
"glob": "^7.1.4",
"mocha": "^6.1.4",
"typescript": "^3.3.1",
"vscode": "^1.1.34",
"tslint": "^5.12.1",
"vscode-test": "^1.2.0"
},
"dependencies": {
"vscode-languageclient": "^5.2.1"
}
to get csharp to run, change csharp.csproj from .net core framework 1.1 to 2.1:
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.1.1" />
<PackageReference Include="Antlr4.Runtime" Version="4.6.1-beta002" />
</ItemGroup>
in client extensions.ts, change from --debug to --inspect
let debugOptions = { execArgv: ["--nolazy", "--inspect=6009"] };
in package.json server, add vscode to engines section
"engines": {
"node": "*",
"vscode": "^1.38.0"
},
Thanks for your feedback and fixes. I will try to update the project when I find some time.
any idea how to get vscode debugger to break in LSP server code? Message says "breakpoint ignored because generated code not found ( source map problem?)". The /out folder contains server.js and server.js.map.
debugging the LSP server requires running the "client + server" config found in launch.json.
the client side extension has to use the --inspect option when setting debugOptions:
let debugOptions = { execArgv: ['--nolazy', '--inspect=6009'] };
and breakpoints do not work until the "debugger attached" message is displayed in the output tab of the editor being debugger.
also, the debugger times out and does not attach if the editor does not immediately open a file of your language type.