Navigation: TextEd > Introduction > Tutorials and misc functions >

Language server (LSP)

 

 

 

 

The LSP client was written to enable communication with different language servers. A language server can add several new features to the editor like code completion, hover information, document formatting, parameter hints, hierarchical structure display (Document symbols), search features...

 

To use a language server you first need to install one. The RJ TextEd forum contain information on how to install several language servers. You should find information on the server home page as well.

 

You can use language servers with projects (Project Panel) and sites (Site Panel).

 

 

Language Server


You can add language servers in e.g. project settings, and you can add as many as you want. Maybe one for CSS, another one for JavaScript etc.

 

          

 

In this window you can also set what diagnostic information you want from the language server, e.g. errors, warnings, information and hints. Start or stop a language server and set a log file to examine the content sent between the server and client.

 

 

Server settings


There are several presets available in the top dropdown box. Select the correct one and all the settings are automatically filled in. But if you can't find a preset for your language server - you need to add the information manually. Check the language server home page, or the RJ TextEd forum for more information.

 

           

 

oServer name. Any name will do.

oCommand. This usually points to the actual server. It can be a .cmd or .exe file, or maybe a .ts file...

oCommand arguments. Here you can enter arguments like --stdio or --port=1234 (if you connect using sockets).

oInitial folder. Can e.g. be the server path.

oExtensions and language id. A language server may handle several source types, e.g. PHP, HTML, CSS... Connect a file extension with a language id. E.g. .css=css.

oCommunication channel. State the connection type used to connect to the server.

oSource folders. Some servers only need one folder to your source files. Others may require sub folders as well.

oInitialize options. Some server may require additional options. Add them here in JSON form. This information is usually found in the RJ TextEd forum, or on the language server home page.

 

          

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2024 Rickard Johansson