diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 09:40:44 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-11-30 10:20:00 +0100 |
| commit | 4c3bce82fad31b67d0d8fe00c17a0ea66c4ad9d1 (patch) | |
| tree | e102155d62905c2df6a7c6596f343b554a26f275 /README.md | |
| parent | 36c7ed2b678f352c9938da3188ad3f689cd1a7bb (diff) | |
| download | vis-lspc-4c3bce82fad31b67d0d8fe00c17a0ea66c4ad9d1.tar.gz vis-lspc-4c3bce82fad31b67d0d8fe00c17a0ea66c4ad9d1.zip | |
implement more sophisticated settings
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -169,6 +169,22 @@ ls_map.lua = { Language servers configured in `vis-lspc` can be found in `supported_servers.lua`. +#### Language Server Settings + +Language servers can be configured with different mechanisms, all merged together to form the *effective* settings for a language server instance. +There are three kinds of settings: + +1. *Global settings* specified by the user in its `vis` configuration in a language server configuration's `settings` member. +2. *Project local* settings stored in a `.vis-lspc-settings.json` file along your regular project files. +3. Settings stored by `vis-lspc` in the `settings.json` file. + The *client local* user settings are stored for each language server and each file path. + Settings for a more specific file path override settings defined for a parent directory. + +The *project* and *client local* settings are indexed by the name of the language server. + +All relevant settings are merged to form the *effective* settings passed to the language server. +More specific settings take precedence before more general ones. + ### Workspace Detection During server initialization an URI to the root of the workspace (a folder opened by the editor) can be passed to the server. @@ -210,6 +226,17 @@ lspc_open(win, path, line, col, cmd) - `col` - same as `line`, but for the column. - `cmd` - `vis` command to open the file. (`e` or `o`, see `vis` commands) +#### `lspc.get_running_ls` + +Get a running language server table. + +```lua +get_running_ls(win, explicit_syntax) +``` + + - `win` - a window in which the language server is running + - `explicit_syntax` - syntax of the language server if it differs from `win.syntax` + ## License All code except otherwise noted is licensed under the term of GPL-3. |
