aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFlorian Fischer <gitlab@muhq.space>2023-06-29 14:33:07 +0000
committerFlorian Fischer <gitlab@muhq.space>2023-06-29 14:33:07 +0000
commit6637e395bc8518aa54cc007abd5efe16edfa8d5c (patch)
tree1fb4ae7b34bbc1c31306488f87103b72d40bb8e8 /README.md
parent0ff2950297854ca8f7617e0d83606d41aeb06ce6 (diff)
parent336cf3083232e824c8990834b56c6a1068b5a631 (diff)
downloadvis-lspc-6637e395bc8518aa54cc007abd5efe16edfa8d5c.tar.gz
vis-lspc-6637e395bc8518aa54cc007abd5efe16edfa8d5c.zip
Merge branch 'main' into 'main'
Add textDocument/formatting implementation See merge request muhq/vis-lspc!40
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 7b523ad..ffd98d6 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@ vis-lspc currently supports:
* `textDocument/implementation`
* `textDocument/hover`
* `textDocument/rename`
+* `textDocument/formatting`
* `[Diagnostics]`
## Whats not working
@@ -109,6 +110,7 @@ vis-lspc is in a early state, but if you are brave there are some default key bi
# workspace edits
lspc-rename <new name> - rename the identifier under the cursor to <new name>
+ lspc-format - format the file in the current window
# development support
lspc-hover - hover over the current line
@@ -147,10 +149,11 @@ start the language server.
Your language server probably supports stdio but maybe requires a [special
command line flag](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#implementationConsiderations).
-Additional field are:
+Additional fields are:
* `settings` - a table of arbitrary possibly nested data. It is sent in a `workspace/didChangeConfiguration` to the language server after initialization. It is also used to lookup configuration for the `workspace/configuratio` method call.
* `init_options` - table of arbitrary possibly nested data. It is send to the server as `initializationOptions` in the parameters of the `initialize` method call.
+* `formatting_options` - table of configuration data as found in [the LSP specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_formatting). `tabSize` and `insertSpaces` are required.
**Example:** The language server configuration entry in the `ls_map` for lua-language-server
@@ -161,6 +164,7 @@ ls_map.lua = {
settings = {
Lua = {diagnostics = {globals = {'vis'}}, telemetry = {enable = false}},
},
+ formatting_options = {tabSize = 2, insertSpaces = true},
},
```