plugins.lsp.servers.lua-ls.settings.runtime.builtin

Set whether each of the builtin Lua libraries is available in the current runtime environment.

Valid library options:

  • "basic"
  • "bit"
  • "bit32"
  • "builtin"
  • "coroutine"
  • "debug"
  • "ffi"
  • "io"
  • "jit"
  • "math"
  • "os"
  • "package"
  • "string"
  • "table"
  • "table.clear"
  • "table.new"
  • "utf8"

Valid status values:

  • "default" - The library will be enabled if it is a part of the current runtime.version.
  • "enable" - Always enable this library
  • "disable" - Always disable this library

Plugin default:

{
  basic = "default";
  bit = "default";
  bit32 = "default";
  builtin = "default";
  coroutine = "default";
  debug = "default";
  ffi = "default";
  io = "default";
  jit = "default";
  math = "default";
  os = "default";
  package = "default";
  string = "default";
  table = "default";
  "table.clear" = "default";
  "table.new" = "default";
  utf8 = "default";
}

Type: null or (attribute set of (one of “default”, “enable”, “disable” or raw lua code))

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.fileEncoding

  • "utf8"
  • "ansi" (only available on Windows)
  • "utf16le"
  • "utf16be"

Plugin default: "utf8"

Type: null or one of “utf8”, “ansi”, “utf16le”, “utf16be” or raw lua code

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.meta

Specify the template that should be used for naming the folders that contain the generated definitions for the various Lua versions, languages, and encodings.

Plugin default: "\${version} \${language} \${encoding}"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.nonstandardSymbol

Add support for non-standard symbols. Make sure to double check that your runtime environment actually supports the symbols you are permitting as standard Lua does not.

Plugin default: [ ]

Type: null or (list of (one of “//”, “/**/”, “`”, “+=”, “-=”, “*=”, “/=”, “%=”, “^=”, “//=”, “|=”, “&=”, “<<=”, “>>=”, “||”, “&&”, “!”, “!=”, “continue” or raw lua code))

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.path

Defines the paths to use when using require. For example, setting to ?/start.lua will search for <workspace>/myFile/start.lua from the loaded files when doing require"myFile". If runtime.pathStrict is false, <workspace>/**/myFile/start.lua will also be searched. To load files that are not in the current workspace, they will first need to be loaded using workspace.library.

Plugin default:

[
  "?.lua"
  "?/init.lua"
]

Type: null or (list of (string or raw lua code))

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.pathStrict

When enabled, runtime.path will only search the first level of directories. See the description of runtime.path for more info.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.plugin

The path to the plugin to use. Blank by default for security reasons.

Plugin default: ""

Type: null or string or raw lua code

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.pluginArgs

Additional arguments that will be passed to the active plugin.

Plugin default: [ ]

Type: null or (list of (string or raw lua code))

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.special

Special variables can be set to be treated as other variables. For example, specifying "include" : "require" will result in include being treated like require.

Plugin default: { }

Type: null or (attribute set of (string or raw lua code))

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.unicodeName

Whether unicode characters should be allowed in variable names or not.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.runtime.version

The Lua runtime version to use in this environment.

Plugin default: "Lua 5.4"

Type: null or string or raw lua code

Default: null

Declared by: