-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server never initializes if no workspaceFolders are given #66
Comments
@jwortmann thanks for reporting! I think you may have hit the problem that #68 addresses (which is about initialization). Please try https://github.com/artempyanykh/marksman/releases/tag/2022-09-02 and let me know if the initialization issue is gone. When it comes to 'single file mode', some functionality like document symbols and reference links can work in a single file mode but the rest (workspace symbols, renames, cross-links, etc) really needs a "folder". However, the important bit here is that the 'single file mode' is not a part of the LSP spec. I'm not sure how things are configured in sublime, but I'd recommend setting a folder for you markdown -- this'll give the best experience. If you do care about the 'single file mode' feel free to open a separate issue specifically about this. I'm generally OK with the idea of having some custom bits to emulate 'single file mode', but since it's not part of the spec it's not very high on my priority list. |
Hi @artempyanykh, with 2022-09-02 and single file mode, the server does start but I don't see it provide anything but just return |
I believe by “single file mode” is meant that workspaceFolders is null in the initialize request, which by the spec is valid. |
I can confirm what @jfcherng wrote.
Right, this kind of expression is not explicitly mentioned in the LSP specs, but neither is 'project mode' or 'workspace mode' or whatever. But if you look at the description for the Workspace folders request, there it is written that it
So at least they describe the possibility that only a single file is open in the editor. And there are servers like Microsoft's vscode-css-languageserver or vscode-html-languageserver which seem to operate exclusively in 'single file mode', i.e. they apparently don't care whether workspaceFolders (or rootUri) are provided in the initialize request or not. Probably because CSS and HTML are languages which usually don't have any strict project structure or configuration files associated with the source code. And I would expect the same for Markdown. For example it is clear that relative links to other documents should be interpreted relative to the current document. And I think it should be possible to provide most of the features, e.g. "Document Symbols" even without workspaceFolders. Anyway, since the latest server version correctly responds to the initialize request, we can close this now. Thanks for the fix! |
The server never responds to the initialize request from the client, if it contains
workspaceFolders: null
.From the LSP specs:
The text was updated successfully, but these errors were encountered: