aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFlorian Fischer <gitlab@muhq.space>2026-01-11 10:53:05 +0000
committerFlorian Fischer <gitlab@muhq.space>2026-01-11 10:53:05 +0000
commit6293900d15239c22f589a29c8aecfc09b78822b5 (patch)
tree00e783d081974ee07721f504d7258ac214d4e3f5 /README.md
parent7f6868069df26ace8563b1c12556681666de6c09 (diff)
parent22dee48bad475064616dabf8122c2d7bc1444f72 (diff)
downloadvis-lspc-6293900d15239c22f589a29c8aecfc09b78822b5.tar.gz
vis-lspc-6293900d15239c22f589a29c8aecfc09b78822b5.zip
Merge branch 'settings' into 'main'
Add a sophisticated settings subsystem See merge request muhq/vis-lspc!54
Diffstat (limited to 'README.md')
-rw-r--r--README.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4fb14d2..806af12 100644
--- a/README.md
+++ b/README.md
@@ -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.