Language Server Protocol (LSP)
The Language Server Protocol is a JSON-RPC-based
protocol designed to allow client-side development environments to communicate with language servers, to provide programming language-specific
features within the client.
Language Specific Configuration
The client-side LSP configurations are done by changing the language server details found in the Zeus document type. This makes it easy
for different programming languages (i.e. C++, Go, Python, TypeScript etc.) to be easily configured to use different language servers.
Find below examples on how to configure language servers for several common programming languages:
Language Server Protocol Features
Currently the following LSP features are supported:
exit
initialize
initialized
exit
shutdown
textDocument/completion
textDocument/declaration
textDocument/definition
textDocument/didChange
textDocument/didClose
textDocument/didOpen
textDocument/didSave
textDocument/documentSymbol
textDocument/hover
textDocument/implementation
textDocument/references
textDocument/rename
textDocument/signatureHelp
textDocument/typeDefinition
workspace/symbol
Language Server Configuration Dialog
The Zeus IDE provides support for LSP through the Language Server panel found in the document type configuration dialog shown below:
The options found on this configuration panel are as follows:
Program Type
This option defines if the language server being run is an executable or a batch file.
Program
This option defines language server executable. If the executable is not fully qualified then it's location must be in the PATH
environment variable.
Directory
This option defines the directory in which the executable will be started. This is configuration is optional.
Arguments
These options allow you to pass command line argument details to the language server.
Root Path
This option defines the Language Server root path. If no value is provided this option defaults to the
directory of the current workspace and when no workspace is open, the directory of the current document.
The recommended approach is to use a Zeus workspace.
Options
This option is used to pass initialisation details to the language server. This optional value must be a valid JSON object string
and the details of that object will be specific to the language server.
Trace Levels
This option changes the level of trace output produced which can be useful for debugging.
Timeout
This option changes the timeout period. This is the time period Zeus will wait for a response from the Language Server.
Use Language Server for trigger events
Zeus already provides the option to add scripts for various autocomplete triggers. When this option is enable
the language server will also be called in response to these triggers.
Use details field for autocomplete display
This option uses the details field as apposed to the label field for the auto-completion display.
Disable the Language Server
This option can be used to disable the language server entirely.
Released: 29th October 2024