Skip to content

Commit 3400acc

Browse files
authored
docs: rewritten "common problems" section (#2406)
1 parent 8f299b8 commit 3400acc

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

docs/src/troubleshooting.md

+9-19
Original file line numberDiff line numberDiff line change
@@ -62,31 +62,21 @@ Another solution could be (at least on Linux) to update the server `PATH` using
6262

6363
## Common problems
6464

65-
### 1. LSP doesn't start my language server
65+
### Error dialog saying `Failed to start...`
6666

67-
When language server is started, its name appears on the left side of the status bar. If you expect your server to start for a particular file but it doesn't then:
68-
69-
* Make sure that the root scope (eg. `source.php`) of the file matches the scope handled by the language server. You can check the root scope of the file by running `Show Scope Name` from the `Tools -> Developer` menu. Refer to the documentation of the language server or its own settings to know the expected scope.
70-
* Make sure that the language server is not disabled globally either in its own settings or in `Preferences: LSP Settings`, or in the project settings (`Project: Edit Project` from the Command Palette).
71-
72-
### 2. LSP cannot find my language server (`No such file or directory: 'xyz'`)
73-
74-
If you are getting an error that the server binary can't be found but it does start when running it from the terminal, then the 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.
67+
If you are getting an error that the server binary can't be found (`No such file or directory...`) but it does start when Sublime Text is started from the terminal, then the 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. See ["Updating the PATH used by LSP servers"](troubleshooting.md#updating-the-path-used-by-lsp-servers) on how to fix that.
7568

76-
See ["Updating the PATH used by LSP servers"](troubleshooting.md#updating-the-path-used-by-lsp-servers) on how to make Sublime Text aware of the location of your langugage server.
69+
Otherwise refer to the ["Self-help instructions"](troubleshooting.md#self-help-instructions) section to try to understand the issue better.
7770

78-
### 3. Popup error `Language server <your_server_language_name> has crashed`
71+
### LSP doesn't start my language server
7972

80-
The reason for this can be the same as in problem number 2. Additionally, the language servers may have dependencies that should also be in your `PATH` in addition to the server binary itself.
81-
82-
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`.
83-
84-
If that doesn't solve the issue, try running `LSP: Troubleshoot server` and providing its output when asking for help.
73+
When language server is started, its name appears on the left side of the status bar. If you expect your server to start for a particular file but it doesn't then:
8574

86-
## Known Issues
75+
* Make sure that the root scope (eg. `source.php`) of the file matches the scope handled by the language server. You can check the root scope of the file by running `Show Scope Name` from the `Tools -> Developer` menu. Refer to the documentation of the language server or its own settings to know the expected scope.
76+
* Make sure that the language server is not disabled globally either in its own settings, in `Preferences: LSP Settings` or in the project settings (`Project: Edit Project` from the *Command Palette*).
8777

8878
### Completions not shown after certain keywords
8979

9080
Sublime Text's built-in `Completion Rules.tmPreferences` for some languages suppresses completions after certain keywords.
91-
The solution is to put an edited version of the `Completion Rules.tmPreferences` in the `Packages` folder (you may need to clear the copy in the Cache folder afterwards).
92-
More details on [workaround and a final fix for Lua](https://forum.sublimetext.com/t/bug-lua-autocomplete-not-working-between-if-then/36635)
81+
The solution is to put an edited version of the `Completion Rules.tmPreferences` in the `Packages` folder.
82+
More details on [workaround and a final fix for Lua](https://forum.sublimetext.com/t/bug-lua-autocomplete-not-working-between-if-then/36635).

0 commit comments

Comments
 (0)