Closed Serega124 closed 4 years ago
It seems like textDocument/didOpen
is missing in the failing, initial case.
More likely an issue in LSP itself.
@rwols
I cannot reproduce this on Ubuntu, with the master branch.
I've also tried this with latest LSP branch and language server doesn't even initialize in this case. Sublime console shows:
LSP: no window for view /Users/me/project/package.json
(Which I think is expected)
I can reproduce this on Ubuntu with a cleanly installed sublime & lsp & lsp-json packages.
screen
And, as @rchl mentioned, after cloning lsp master into the Sublime packages folder, the server doesn't even initialize for files not from the workspace folder (in my case, without any suspicious messages in console).
screen
@Serega124 did you run Package Control: Satisfy Dependencies from the command palette?
@Serega124 did you run Package Control: Satisfy Dependencies from the command palette?
Yes, but it did not help
Maybe post the logs from the console starting with LSP-json
since opening Sublime text. I wonder if it's maybe always installing from scratch... Although I don't see how that could be possible based on the code.
after cloning lsp master into the Sublime packages folder, the server doesn't even initialize for files not from the workspace folder (in my case, without any suspicious messages in console).
That was a conscious decision for now: https://github.com/sublimelsp/LSP/pull/894#discussion_r392618499
That was a conscious decision for now: sublimelsp/LSP#894 (comment)
Thanks for the clarification. Apparently the issue can be considered resolved.
That was a conscious decision for now: sublimelsp/LSP#894 (comment)
Thanks for the clarification. Apparently the issue can be considered resolved.
I'm not sure if your original issue is that case though because in your gif it looks like the client has been initialized. With the above-mentioned change, it shouldn't even initialize when opening file outside of workspace.
But then are you using latest version of LSP from github or latest released? Latest released doesn't yet include that mentioned change.
@rchl My original issue is about the current stable version of LSP (0.9.7) that I use. In this version LSP seems to be broken for files opened outside the workspace folder. But in master tree that feature was deleted at all, so there is nothing more to fix.
Issue
lsp-json initialized
, there is no LSP functionality and nolsp-json
shown at the bottom-left corner. After hover server returnsNone
:lsp-json
appears in the statusbar, and the server finally working. Hover works fine:For files in the workspace the server works from the first opening and server log looks like this:
Expected behavior
The server should just work from the first opening any json file
Env
sublime: 3211 LSP: 0.9.7 LSP-json: 1.0.0
Capture
gif
![13](https://user-images.githubusercontent.com/5006548/77323296-b0729580-6d1d-11ea-8b11-c050da7e563f.gif)