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

Reorganize troubleshooting section #516

Merged
merged 3 commits into from
Dec 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ The environment _only will be visible for the lsp server_, not for other extensi

This extension will download `haskell-language-server` binaries to a specific location depending on your system.

It will download the newer version of the server which has support for the required ghc.
It will download the newest version of haskell-language-server which has support for the required ghc.
That means it could use an older version than the latest one, without the last features and bug fixes.
For example, if a project needs ghc-8.10.4 the extension will download and use haskell-language-server-1.4.0, the lastest version which supported ghc-8.10.4. Even if the lastest global haskell language-server version is 1.5.1.

If you find yourself running out of disk space, you can try deleting old versions of language servers in this directory. The extension will redownload them, no strings attached.

Expand Down Expand Up @@ -123,15 +124,27 @@ Please include the output when filing any issues on the [haskell-language-server

### Troubleshooting

- In Linux/MacOS systems, opening vscode in the windows system could not use the `$PATH` set in the shell
so it will not see required tools as ghc, cabal or stack. This usually happens if you have installed them
via ghcup. It could be fixed changing the `$PATH` variable in the init config file used by the windows system (f.e. `~/.profile`, but i can vary depending on your system setup).
See [this stackoverflow question](https://stackoverflow.com/questions/43983718/set-global-path-environment-variable-in-vs-code) for more tricks.
- Sometimes the language server might get stuck in a rut and stop responding to your latest changes.
Should this occur you can try restarting the language server with <kbd>Ctrl</kbd> <kbd>shift</kbd> <kbd>P</kbd>/<kbd>⌘</kbd> <kbd>shift</kbd> <kbd>P</kbd> > Restart Haskell LSP Server.
#### Check issues and tips in the haskell-language-server project

- Usually the error or unexpected behaviour is already reported in the [haskell language server issue tracker](https://github.com/haskell/haskell-language-server/issues). Finding the issue could be useful to help resolve it and sometimes includes a workaround for the issue.
- You can also check the [troubleshooting section](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html) in the server documentation.

#### Restarting the language server

- Sometimes the language server might get stuck in a rut and stop responding to your latest changes.
Should this occur you can try restarting the language server with <kbd>Ctrl</kbd> <kbd>shift</kbd> <kbd>P</kbd>/<kbd>⌘</kbd> <kbd>shift</kbd> <kbd>P</kbd> > Restart Haskell LSP Server.

#### `Cradle requires ghc/cabal/stack but it isn't installed`

- In Linux/MacOS systems, opening vscode in the windows system could not use the `$PATH` set in the shell
so it will not see required tools as ghc, cabal or stack. This usually happens if you have installed them
via ghcup.
- It could be fixed changing the `$PATH` variable in the init config file used by the windows system
(f.e. `~/.profile`, but i can vary depending on your system setup).
- See [this stackoverflow question](https://stackoverflow.com/questions/43983718/set-global-path-environment-variable-in-vs-code) for more tricks.



## Contributing

If you want to help, get started by reading [Contributing](https://github.com/haskell/vscode-haskell/blob/master/Contributing.md) for more details.
Expand Down