Language Server Protocol (LSP)

The Language Server Protocol is a JSON-RPC-based protocol that allows development environments to communicate with a language servers in order to access programming language specific features.


Language Specific Configuration

The LSP configuration is done by changing the language server details found in the document type settings. This means different programming source files (i.e. C++, Python, TypeScript etc.) can be easily configured to use different language servers.
The Language Server Protocol page provides links to language servers to many different programmign languages.
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
shutdown
textDocument/completion
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:

lsp options

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.


Latest Version: Zeus 3.98q
Released: 31st August 2018