Allow Language Server to be used as standalone process independent of VS Code Extension #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was trying to setup the Markdoc Language Server for use with Helix (terminal based editor like nvim) but ran into issues. Installing the package with
npm install -g @markdoc/language-server
lead to no language server binary or script being accessible via the npmbin
directory.After investigating the source code I found it was because there was no build target for a standalone process running the language server. However, even after adding such a build target and installing the target to my npm global bin the server was not working. After digging around through the code I made 2 core discoveries:
server/server.ts:32
changes)options.config
asoptions
was undefined due to a bug in theconnect
functionI don't think my PR follows best practices for building/bundling an npm package intended to be installed globally for it's binaries but I think it generally gets the idea across and can be used as a jumping off point.