2.0.6 • Published 5 months ago

coc-lua v2.0.6

Weekly downloads
350
License
MIT
Repository
github
Last release
5 months ago

coc-lua

test


Lua language server extension using LuaLS/lua-language-server for coc.nvim.

Install

In your vim/neovim, run command:

:CocInstall coc-lua

Features

See

Commands

KeyDescription
lua.versionPrint extension version
lua.updateUpdate language server

Settings

KeyDescriptionDefault
lua.enableset to false to disable lua language server.true

Trigger completion in coc-settings.json to get complete list.

LuaLS/lua-language-server

KeyDescriptionDefault
Lua.addonManager.enableSet the on/off state for the addon manager.true
Lua.codeLens.enableEnable code lens.
Lua.completion.autoRequireWhen the input looks like a file name, automatically require this file.true
Lua.completion.callSnippetShows function call snippets."Disable"
Lua.completion.displayContextPreviewing 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.
Lua.completion.enableEnable completion.true
Lua.completion.keywordSnippetShows keyword syntax snippets."Replace"
Lua.completion.postfixThe symbol used to trigger the postfix suggestion."@"
Lua.completion.requireSeparatorThe separator used when require."."
Lua.completion.showParamsDisplay parameters in completion list. When the function has multiple definitions, they will be displayed separately.true
Lua.completion.showWordShow contextual words in suggestions."Fallback"
Lua.completion.workspaceWordWhether the displayed context word contains the content of other files in the workspace.true
Lua.diagnostics.disableDisabled diagnostic (Use code in hover brackets).[]
Lua.diagnostics.disableSchemeDo not diagnose Lua files that use the following scheme."git"
Lua.diagnostics.enableEnable diagnostics.true
Lua.diagnostics.globalsDefined global variables.[]
Lua.diagnostics.ignoredFilesHow to diagnose ignored files."Opened"
Lua.diagnostics.libraryFilesHow to diagnose files loaded via Lua.workspace.library."Opened"
Lua.diagnostics.unusedLocalExcludeDo not diagnose unused-local when the variable name matches the following pattern.[]
Lua.diagnostics.workspaceDelayLatency (milliseconds) for workspace diagnostics.3000
Lua.diagnostics.workspaceEventSet the time to trigger workspace diagnostics."OnSave"
Lua.diagnostics.workspaceRateWorkspace 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.100
Lua.doc.packageNameTreat specific field names as package, e.g. m_* means XXX.m_id and XXX.m_type are package, witch can only be accessed in the file where the definition is located.[]
Lua.doc.privateNameTreat specific field names as private, e.g. m_* means XXX.m_id and XXX.m_type are private, witch can only be accessed in the class where the definition is located.[]
Lua.doc.protectedNameTreat specific field names as protected, e.g. m_* means XXX.m_id and XXX.m_type are protected, witch can only be accessed in the class where the definition is located and its subclasses.[]
Lua.format.defaultConfigThe default format configuration. Has a lower priority than .editorconfig file in the workspace.Read formatter docs to learn usage.{}
Lua.format.enableEnable code formatter.true
Lua.hint.arrayIndexShow hints of array index when constructing a table."Auto"
Lua.hint.awaitIf the called function is marked ---@async, prompt await at the call.true
Lua.hint.enableEnable inlay hint.
Lua.hint.paramNameShow hints of parameter name at the function call."All"
Lua.hint.paramTypeShow type hints at the parameter of the function.true
Lua.hint.semicolonIf there is no semicolon at the end of the statement, display a virtual semicolon."SameLine"
Lua.hint.setTypeShow hints of type at assignment operation.
Lua.hover.enableEnable hover.true
Lua.hover.enumsLimitWhen the value corresponds to multiple types, limit the number of types displaying.5
Lua.hover.expandAliasWhether to expand the alias. For example, expands ---@alias myType boolean|number appears as boolean|number, otherwise it appears as `myType'. | true
Lua.hover.previewFieldsWhen hovering to view a table, limits the maximum number of previews for fields.50
Lua.hover.viewNumberHover to view numeric content (only if literal is not decimal).true
Lua.hover.viewStringHover to view the contents of a string (only if the literal contains an escape character).true
Lua.hover.viewStringMaxThe maximum length of a hover to view the contents of a string.1000
Lua.misc.executablePathSpecify the executable path in VSCode.
Lua.misc.parametersCommand line parameters when starting the language server in VSCode.[]
Lua.runtime.fileEncodingFile encoding. The ansi option is only available under the Windows platform."utf8"
Lua.runtime.metaFormat of the directory name of the meta files."${version} ${language} ${encoding}"
Lua.runtime.nonstandardSymbolSupports non-standard symbols. Make sure that your runtime environment supports these symbols.[]
Lua.runtime.pathWhen using require, how to find the file based on the input name.Setting this config to ?/init.lua means that when you enter require 'myfile', ${workspace}/myfile/init.lua will be searched from the loaded files.if runtime.pathStrict is false, ${workspace}/**/myfile/init.lua will also be searched.If you want to load files outside the workspace, you need to set Lua.workspace.library first."?.lua","?/init.lua"
Lua.runtime.pathStrictWhen enabled, runtime.path will only search the first level of directories, see the description of runtime.path.
Lua.runtime.pluginPlugin path. Please read wiki to learn more.
Lua.runtime.pluginArgsAdditional arguments for the plugin.[]
Lua.runtime.specialThe custom global variables are regarded as some special built-in variables, and the language server will provide special supportThe following example shows that 'include' is treated as' require '.json<br>"Lua.runtime.special" : {<br> "include" : "require"<br>}<br>{}
Lua.runtime.unicodeNameAllows Unicode characters in name.
Lua.runtime.versionLua runtime version."Lua 5.4"
Lua.semantic.annotationSemantic coloring of type annotations.true
Lua.semantic.enableEnable semantic color. You may need to set editor.semanticHighlighting.enabled to true to take effect.true
Lua.semantic.keywordSemantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.
Lua.semantic.variableSemantic coloring of variables/fields/parameters.true
Lua.signatureHelp.enableEnable signature help.true
Lua.spell.dictCustom words for spell checking.[]
Lua.type.castNumberToIntegerAllowed to assign the number type to the integer type.true
Lua.type.weakNilCheckWhen checking the type of union type, ignore the nil in it.When this setting is false, the number|nil type cannot be assigned to the number type. It can be with true.
Lua.type.weakUnionCheckOnce one subtype of a union type meets the condition, the union type also meets the condition.When this setting is false, the number|boolean type cannot be assigned to the number type. It can be with true.
Lua.window.progressBarShow progress bar in status bar.true
Lua.window.statusBarShow extension status in status bar.true
Lua.workspace.checkThirdPartyAutomatic detection and adaptation of third-party libraries, currently supported libraries are: OpenResty Cocos4.0 LÖVE LÖVR skynet Jasstrue
Lua.workspace.ignoreDirIgnored files and directories (Use .gitignore grammar).".vscode"
Lua.workspace.ignoreSubmodulesIgnore submodules.true
Lua.workspace.libraryIn addition to the current workspace, which directories will load files from. The files in these directories will be treated as externally provided code libraries, and some features (such as renaming fields) will not modify these files.[]
Lua.workspace.maxPreloadMax preloaded files.5000
Lua.workspace.preloadFileSizeSkip files larger than this value (KB) when preloading.500
Lua.workspace.useGitIgnoreIgnore files list in .gitignore .true
Lua.workspace.userThirdPartyAdd private third-party library configuration file paths here, please refer to the built-in configuration file path[]

Development

  1. Run npm run build or npm run build:watch
  2. Link extension: npm run link / npm run unlink

Credit

License

MIT © Josa Gesell

2.0.6

5 months ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

3 years ago

1.0.0

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.1

4 years ago

0.1.1

4 years ago

0.2.0

5 years ago

0.1.0

5 years ago