Skip to content
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

Documentation issue1529 issue1530 #1531

Conversation

JeremyBois
Copy link
Contributor

Add documentation to Troubleshooting section to explain how to solve #1529 and #1530.

@moodmosaic @rwols

…multiple troubleshooting sections have the same solution (updating the `PATH`) I create a specific section that can be links to.
docs/src/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/troubleshooting.md Outdated Show resolved Hide resolved
docs/src/troubleshooting.md Outdated Show resolved Hide resolved
Copy link
Member

@rwols rwols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looks good to me. @rchl or @predragnikolic any thoughts?

@predragnikolic
Copy link
Member

Looking at this :)

@predragnikolic
Copy link
Member

predragnikolic commented Dec 24, 2020

I'll be a critique on this one, but bare with me :)

I don't thing that the 4 point - Popup error Language server <your_server_language_name> has crashed is necessary, because it was described in the 2 point. Just moving it to a 4 point doesn't make a big difference. :)

Lets compare point 3 - Error in build streamingProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
with point 2 - LSP cannot find my language server (No such file or directory: 'xyz').
They both try to solve the same issue: does not exist (No such file or directory).

Point 3 is not a generic solution, it is tailored for the Haskell ecosystem,
while the point 2 has is more generic.

I am curious to see why the second step didn't help you to solve your problem in the first place? (Was it not clear, was it missing an example, what could we do to make the second step more)

Summary:
I think the current troubleshooting guide is simpler, than the one in this PR.

If you could just pin-point the problems you had and say that a particular paragraph/s wasn't clear in step 2.
The goal is to make the current troubleshooting guide more simpler :)

@JeremyBois
Copy link
Contributor Author

I don't thing that the 4 point - Popup error Language server <your_server_language_name> has crashed is necessary, because it was described in the 2 point. Just moving it to a 4 point doesn't make a big difference. :)

Actually I did not get the message No such file or directory: "xyz" but only a message indicating the crash of the plugin. So I think a proper section can help a future user.

Also an alternative solution is added in the document. It consists of updating env variable directly in the LSP settings for a specific server. This approach allows to only expose a folder for a specific language server.

Lets compare point 3 - Error in build streamingProcess: runInteractiveProcess: exec: does not exist (No such file or directory) with point 2 - LSP cannot find my language server (No such file or directory: 'xyz'). They both try to solve the same issue: does not exist (No such file or directory).

Again yes, the same solution for another issue. In this case the problem is a missing dependency with a working language server. For instance when the binary for the language server and one of its dependency is not in the same folder.

Point 3 is not a generic solution, it is tailored for the Haskell ecosystem, while the point 2 has is more generic.

Yes I agree with this one. The error message is linked to Haskell in this case but the missing dependency is always specific to the server. Maybe I could remove this part and add a note on missing dependencies issue ?

If you could just pin-point the problems you had and say that a particular paragraph/s wasn't clear in step 2. The goal is to make the current troubleshooting guide more simpler :)

As said above, I never get No such file or directory: "xyz", so the current troubleshooting was not directly useful.

Summary:

  • Point 4 is different from point 2 even if the solution is the same
  • Point 3 is too specific and could be removed
  • A note about a missing language server dependencies is needed
  • Added alternative solution avoid polluting the global user space only for a specific server

@predragnikolic
Copy link
Member

I would just suggest removing the 3rd point from the troubleshooting guide.
The rest what you said in your summary is ok.

@rwols rwols requested a review from predragnikolic December 30, 2020 18:23
Comment on lines +77 to +84
### 3. Popup error `Language server <your_server_language_name> has crashed`
Assuming that the server is actually installed, and that you can start it from your shell, this issue is likely due to Sublime Text's internal environment not picking up the same `PATH` environment variable as you've configured in your shell.

> **Note** : Language servers may have dependencies that should also be in your `PATH` in addition to the server binary itself.

For instance if you have installed the `haskell-language-server` using [ghcup-hs](https://gitlab.haskell.org/haskell/ghcup-hs) you should expose its specific installation folder `~/.ghcup/bin`. If the build process uses `stack` then it should also be in your `PATH`.

The complete procedure of updating the `PATH` used by Sublime Text depends on your platform and is explained [here](troubleshooting.md#updating-the-path-used-by-lsp-servers).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be here. The reasons for server crashing can be plenty and I don't think a wrong PATH is a frequent reason for those. I'd probably add it in the Haskell section in https://github.com/sublimelsp/LSP/blob/st4000-exploration/docs/src/language_servers.md instead.

### 2. LSP cannot find my language server (`No such file or directory: 'xyz'`)
Assuming that the server is actually installed, and that you can start it from your shell, this issue is likely due to Sublime Text's internal environment not picking up the same `PATH` environment variable as you've configured in your shell.

The exact changes to make can differ depending on what program you want to expose to Sublime Text. The simplest way is to extend the path like so (replacing `/usr/local/bin` with the path of your choice):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The The exact changes to make paragraph (including the code block) should be in the Updating the PATH used by LSP servers section. Just maybe add info that this is a Linux specific method.

@rwols
Copy link
Member

rwols commented Jan 7, 2021

We can only ask so much from contributors. Maybe we can merge this and then you can make the adjustments, @rchl?

@rchl
Copy link
Member

rchl commented Jan 14, 2021

We can only ask so much from contributors. Maybe we can merge this and then you can make the adjustments, @rchl?

I can do that when I find time and courage.

@rwols rwols merged commit fbcf11b into sublimelsp:st4000-exploration Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants