Run

The language server can be run using the below command:

cmd
.\bin\lua-language-server.exe
bash
./bin/lua-language-server
bash
./bin/lua-language-server
Note

If you use the Visual Studio Code extension, the language server is run for you. Arguments and flags can be used by adding them to the misc.parameters setting.

Arguments

entry

optional

Type: string

The main Lua script file from the root of this repository. If omitted, the application will attempt to load bin/../main.lua.

Flags

There are many optional flags that can alter how the server operates.

--doc

Type: string

Generate documentation from a workspace. The files will be output in your log path.

Example: --doc=C:/Users/Me/Documents/myLuaProject/

--doc_out_path

Type: string

The path to output generated documentation at. See --doc for more info.

Example: --doc=C:/Users/Me/Documents/myLuaProjectDocumentation

--logpath

Type: string

Where the log should be written to. Defaults to ./log

Example: --logpath=D:/luaServer/logs

--loglevel

Type: string

The minimum level of logging that should appear in the logfile. Can be used to log more detailed info for debugging and error reporting.

Options:

  • error
  • warn
  • info
  • debug
  • trace

Example: --loglevel=trace

--metapath

Type: string

Where the standard Lua library definition files should be generated to. Defaults to ./meta

Example: --metapath=D:/sumnekoLua/metaDefintions

--locale

Type: string

The language to use. Defaults to en-us. Options can be found in locale/ .

Example: --locale=zh-cn

--configpath

Type: string

The location of the configuration file that will be loaded. Can be relative to the workspace. When provided, config files from elsewhere (such as from VS Code) will no longer be loaded.

Example: --configpath=sumnekoLuaConfig.lua

--version

Type: string

Get the version of the Lua language server. This will print it to the command line and immediately exit.

--check

Type: string

Perform a "diagnosis report" where the results of the diagnosis are written to the logpath.

Example: --check=C:\Users\Me\path\to\workspace

--checklevel

Type: string

Default: Warning

To be used with --check. The minimum level of diagnostic that should be logged. Items with lower priority than the one listed here will not be written to the file. Options include, in order of priority:

  • Error
  • Warning
  • Information
  • Hint

Example: --checklevel=Information

--force-accept-workspace

Type: boolean

Allows the use of root/home directory as the workspace.

--socket

Type: number

Will communicate to a client over the specified TCP port instead of through stdio.

Example: --socket=5050

--develop

Type: boolean

Enables development mode. This allows plugins to write to the logpath.

Last Modified: