Lua#
Server#
For more information about the LSP server, check lua-language-server.
Installation#
For more instructions on how to install manually, check here.
Debugger: Not available#
Available configurations#
lsp-clients-lua-language-server-args
#
Type: (repeat string)
Default: (-E)
Arguments to run the Lua Language server.
lsp-clients-lua-language-server-bin
#
Type: file
Default: ~/.emacs.d/.cache/lsp/lua-language-server/bin/lua-language-server
Location of Lua Language Server.
lsp-clients-lua-language-server-command
#
Type: (repeat string)
Default: nil
Command to start Lua Language server.
lsp-clients-lua-language-server-install-dir
#
Type: directory
Default: ~/.emacs.d/.cache/lsp/lua-language-server/
Installation directory for Lua Language Server.
lsp-clients-lua-language-server-main-location
#
Type: file
Default: ~/.emacs.d/.cache/lsp/lua-language-server/main.lua
Location of Lua Language Server main.lua.
lsp-lua-color-mode
#
Type: (choice (:tag Grammar Semantic))
Default: Semantic
Color mode.
lsp-lua-completion-call-snippet
#
Type: (choice (:tag Disable Both Replace))
Default: Disable
Shows function call snippets.
lsp-lua-completion-display-context
#
Type: number
Default: 6
Previewing the relevant code snippet of the suggestion may help you understand the usage of the suggestion.
The number set indicates the number of intercepted lines in the code
fragment. If it is set to 0
, this feature can be disabled.
lsp-lua-completion-enable
#
Type: boolean
Default: t
Enable completion.
lsp-lua-completion-keyword-snippet
#
Type: (choice (:tag Disable Both Replace))
Default: Replace
Shows keyword syntax snippets.
lsp-lua-completion-workspace-word
#
Type: boolean
Default: t
Show words within the workspace.
lsp-lua-develop-debugger-port
#
Type: number
Default: 11412
Listen port of debugger.
lsp-lua-develop-debugger-wait
#
Type: boolean
Default: nil
Suspend before debugger connects.
lsp-lua-develop-enable
#
Type: boolean
Default: nil
Developer mode. Do not enable, performance will be affected.
lsp-lua-diagnostics-disable
#
Type: lsp-string-vector
Default: nil
Disabled diagnostic (Use code in hover brackets).
"Lua.diagnostics.disable" : [
"unused-local",
"lowercase-global"
]
lsp-lua-diagnostics-enable
#
Type: boolean
Default: t
Enable diagnostics.
lsp-lua-diagnostics-globals
#
Type: lsp-string-vector
Default: nil
Defined global variables.
"Lua.diagnostics.globals" : [
"GLOBAL1",
"GLOBAL2"
]
lsp-lua-diagnostics-needed-file-status
#
Type: alist
Default: nil
If you want to check only opened files, choice Opened; else choice Any.
"Lua.diagnostics.neededFileStatus" : {
"ambiguity-1" : "Any",
"circle-doc-class" : "Opened"
}
lsp-lua-diagnostics-severity
#
Type: alist
Default: nil
Modified diagnostic severity.
"Lua.diagnostics.severity" : {
"redefined-local" : "Warning",
"emmy-lua" : "Hint"
}
lsp-lua-diagnostics-workspace-delay
#
Type: number
Default: 0
Latency (milliseconds) for workspace diagnostics. When you start the workspace, or edit any file, the entire workspace will be re-diagnosed in the background. Set to negative to disable workspace diagnostics.
lsp-lua-diagnostics-workspace-rate
#
Type: number
Default: 100
Workspace diagnostics run rate (%). Decreasing this value reduces CPU usage, but also reduces the speed of workspace diagnostics. The diagnosis of the file you are currently editing is always done at full speed and is not affected by this setting.
lsp-lua-files-associations
#
Type: alist
Default: nil
Files.associations.
lsp-lua-files-exclude
#
Type: alist
Default: nil
Files.exclude.
lsp-lua-hint-enable
#
Type: boolean
Default: nil
Enable hint.
lsp-lua-hint-param-name
#
Type: boolean
Default: t
Hint parameter name when the parameter called is literal.
lsp-lua-hint-param-type
#
Type: boolean
Default: t
Show type hints at the parameter of the function.
lsp-lua-hint-set-type
#
Type: boolean
Default: nil
Hint type at assignment operation.
lsp-lua-hover-enable
#
Type: boolean
Default: t
Enable hover.
lsp-lua-hover-field-infer
#
Type: number
Default: 3000
When hovering to view a table, type infer will be performed for each field. When the accumulated time of type infer reaches the set value (MS), the type infer of subsequent fields will be skipped.
lsp-lua-hover-preview-fields
#
Type: number
Default: 100
When hovering to view a table, limits the maximum number of previews for fields.
lsp-lua-hover-view-number
#
Type: boolean
Default: t
Hover to view numeric content (only if literal is not decimal).
lsp-lua-hover-view-string
#
Type: boolean
Default: t
Hover to view the contents of a string (only if the literal contains an escape character).
lsp-lua-hover-view-string-max
#
Type: number
Default: 1000
The maximum length of a hover to view the contents of a string.
lsp-lua-intelli-sense-search-depth
#
Type: number
Default: 0
Set the search depth for IntelliSense. Increasing this value increases accuracy, but decreases performance. Different workspace have different tolerance for this setting. Please adjust it to the appropriate value.
lsp-lua-prefer-musl
#
Type: boolean
Default: nil
Whether or not to download the musl-compiled server.
lsp-lua-runtime-file-encoding
#
Type: (choice (:tag utf8 ansi))
Default: utf8
File encoding. The ansi
option is only available under the Windows
platform.
lsp-lua-runtime-nonstandard-symbol
#
Type: lsp-string-vector
Default: nil
Supports non-standard symbols. Make sure that your runtime environment supports these symbols.
lsp-lua-runtime-path
#
Type: lsp-string-vector
Default: [?.lua ?/init.lua ?/?.lua]
package.path
.
lsp-lua-runtime-plugin
#
Type: file
Default: nil
(Proposed) Plugin path. Default is .vscode/lua/plugin.lua
lsp-lua-runtime-special
#
Type: alist
Default: nil
The custom global variables are regarded as some special built-in variables, and the language server will provide special support.
"Lua.runtime.special" : {
"include" : "require"
}
lsp-lua-runtime-unicode-name
#
Type: boolean
Default: nil
Allows Unicode characters in name.
lsp-lua-runtime-version
#
Type: (choice (:tag Lua 5.1 Lua 5.2 Lua 5.3 Lua 5.4 LuaJIT))
Default: Lua 5.4
Lua runtime version.
lsp-lua-signature-help-enable
#
Type: boolean
Default: t
Enable signature help.
lsp-lua-telemetry-enable
#
Type: boolean
Default: nil
Enable telemetry to send your editor information and error logs over the network.
lsp-lua-window-progress-bar
#
Type: boolean
Default: t
Show progress bar in status bar.
lsp-lua-window-status-bar
#
Type: boolean
Default: t
Show extension status in status bar.
lsp-lua-workspace-ignore-dir
#
Type: lsp-string-vector
Default: [.vscode]
Ignored directories (Use .gitignore
grammar).
"Lua.workspace.ignoreDir" : [
"temp/*.*",
"!temp/*.lua"
]
lsp-lua-workspace-ignore-submodules
#
Type: boolean
Default: t
Ignore submodules.
lsp-lua-workspace-library
#
Type: alist
Default: nil
Load external library.
This feature can load external Lua files, which can be used for definition,
automatic completion and other functions. Note that the language server does
not monitor changes in external files and needs to restart if the external
files are modified. The following example shows loaded files in C:/lua
and ../lib
,exclude ../lib/temp
.
"Lua.workspace.library": {
"C:/lua": true,
"../lib": [
"temp/*"
]
}
lsp-lua-workspace-max-preload
#
Type: number
Default: 1000
Max preloaded files.
lsp-lua-workspace-preload-file-size
#
Type: number
Default: 100
Skip files larger than this value (KB) when preloading.
lsp-lua-workspace-use-git-ignore
#
Type: boolean
Default: t
Ignore files list in .gitignore
.