plugins.lsp.servers.lua_ls.settings.completion.enable

Enable/disable completion. Completion works like any autocompletion you already know of. It helps you type less and get more done.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.autoRequire

When the input looks like a file name, automatically require the file.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.callSnippet

  • "Disable" - Only show function name
  • "Both" - Show function name and snippet
  • "Replace" - Only show the call snippet

Whether to show call snippets or not. When disabled, only the function name will be completed. When enabled, a “more complete” snippet will be offered.

Type: null or one of “Disable”, “Both”, “Replace” or raw lua code

Default: null

Plugin default: "Disable"

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.displayContext

When a snippet is being suggested, this setting will set the amount of lines around the snippet to preview to help you better understand its usage.

Setting to 0 will disable this feature.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 0

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.keywordSnippet

  • "Disable" - Only completes the keyword
  • "Both" - Offers a completion for the keyword and snippet
  • "Replace" - Only shows a snippet

Whether to show a snippet for key words like if, while, etc. When disabled, only the keyword will be completed. When enabled, a “more complete” snippet will be offered.

Type: null or one of “Disable”, “Both”, “Replace” or raw lua code

Default: null

Plugin default: "Replace"

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.postfix

The character to use for triggering a “postfix suggestion”. A postfix allows you to write some code and then trigger a snippet after (post) to “fix” the code you have written. This can save some time as instead of typing table.insert(myTable, ), you can just type myTable@.

Type: null or string or raw lua code

Default: null

Plugin default: "@"

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.requireSeparator

The separator to use when require-ing a file.

Type: null or string or raw lua code

Default: null

Plugin default: "."

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.showParams

Display a function’s parameters in the list of completions. When a function has multiple definitions, they will be displayed separately.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.showWord

  • "Enable" - Always show contextual words in completion suggestions
  • "Fallback" - Only show contextual words when smart suggestions based on semantics cannot be provided
  • "Disable" - Never show contextual words

Show “contextual words” that have to do with Lua but are not suggested based on their usefulness in the current semantic context.

Type: null or one of “Enable”, “Fallback”, “Disable” or raw lua code

Default: null

Plugin default: "Fallback"

Declared by:

plugins.lsp.servers.lua_ls.settings.completion.workspaceWord

Whether words from other files in the workspace should be suggested as “contextual words”. This can be useful for completing similar strings. completion.showWord must not be disabled for this to have an effect.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by: