plugins.lsp.servers.lua-ls.settings.type.castNumberToInteger

Whether casting a number to an integer is allowed.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.type.weakNilCheck

Whether it is permitted to assign a union type that contains nil to a variable that does not permit it. When false, the following will throw an error because number|nil cannot be assigned to number.

  ---@alias unionType number|nil

  ---@type number
  local num

  ---@cast num unionType

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.lsp.servers.lua-ls.settings.type.weakUnionCheck

Whether it is permitted to assign a union type which only has one matching type to a variable. When false, the following will throw an error because string|boolean cannot be assigned to string.

  ---@alias unionType string|boolean

  ---@type string
  local str = false

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by: