• Stars
    star
    110
  • Rank 314,861 (Top 7 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lua language server extension using lua-lsp for coc.nvim.

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

Key Description
lua.version Print extension version
lua.update Update language server

Settings

Key Description Default
lua.enable set to false to disable lua language server. true

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

LuaLS/lua-language-server

Key Description Default
Lua.addonManager.enable Set the on/off state for the addon manager. true
Lua.codeLens.enable Enable code lens.
Lua.completion.autoRequire When the input looks like a file name, automatically require this file. true
Lua.completion.callSnippet Shows function call snippets. "Disable"
Lua.completion.displayContext 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.
Lua.completion.enable Enable completion. true
Lua.completion.keywordSnippet Shows keyword syntax snippets. "Replace"
Lua.completion.postfix The symbol used to trigger the postfix suggestion. "@"
Lua.completion.requireSeparator The separator used when require. "."
Lua.completion.showParams Display parameters in completion list. When the function has multiple definitions, they will be displayed separately. true
Lua.completion.showWord Show contextual words in suggestions. "Fallback"
Lua.completion.workspaceWord Whether the displayed context word contains the content of other files in the workspace. true
Lua.diagnostics.disable Disabled diagnostic (Use code in hover brackets). []
Lua.diagnostics.disableScheme Do not diagnose Lua files that use the following scheme. ["git"]
Lua.diagnostics.enable Enable diagnostics. true
Lua.diagnostics.globals Defined global variables. []
Lua.diagnostics.ignoredFiles How to diagnose ignored files. "Opened"
Lua.diagnostics.libraryFiles How to diagnose files loaded via Lua.workspace.library. "Opened"
Lua.diagnostics.unusedLocalExclude Do not diagnose unused-local when the variable name matches the following pattern. []
Lua.diagnostics.workspaceDelay Latency (milliseconds) for workspace diagnostics. 3000
Lua.diagnostics.workspaceEvent Set the time to trigger workspace diagnostics. "OnSave"
Lua.diagnostics.workspaceRate 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. 100
Lua.doc.packageName Treat 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.privateName Treat 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.protectedName Treat 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.defaultConfig The default format configuration. Has a lower priority than .editorconfig file in the workspace.
Read formatter docs to learn usage.
{}
Lua.format.enable Enable code formatter. true
Lua.hint.arrayIndex Show hints of array index when constructing a table. "Auto"
Lua.hint.await If the called function is marked ---@async, prompt await at the call. true
Lua.hint.enable Enable inlay hint.
Lua.hint.paramName Show hints of parameter name at the function call. "All"
Lua.hint.paramType Show type hints at the parameter of the function. true
Lua.hint.semicolon If there is no semicolon at the end of the statement, display a virtual semicolon. "SameLine"
Lua.hint.setType Show hints of type at assignment operation.
Lua.hover.enable Enable hover. true
Lua.hover.enumsLimit When the value corresponds to multiple types, limit the number of types displaying. 5
Lua.hover.expandAlias Whether to expand the alias. For example, expands `---@alias myType boolean numberappears asboolean
Lua.hover.previewFields When hovering to view a table, limits the maximum number of previews for fields. 50
Lua.hover.viewNumber Hover to view numeric content (only if literal is not decimal). true
Lua.hover.viewString Hover to view the contents of a string (only if the literal contains an escape character). true
Lua.hover.viewStringMax The maximum length of a hover to view the contents of a string. 1000
Lua.misc.executablePath Specify the executable path in VSCode.
Lua.misc.parameters Command line parameters when starting the language server in VSCode. []
Lua.runtime.fileEncoding File encoding. The ansi option is only available under the Windows platform. "utf8"
Lua.runtime.meta Format of the directory name of the meta files. "${version} ${language} ${encoding}"
Lua.runtime.nonstandardSymbol Supports non-standard symbols. Make sure that your runtime environment supports these symbols. []
Lua.runtime.path When 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.pathStrict When enabled, runtime.path will only search the first level of directories, see the description of runtime.path.
Lua.runtime.plugin Plugin path. Please read wiki to learn more.
Lua.runtime.pluginArgs Additional arguments for the plugin. []
Lua.runtime.special The custom global variables are regarded as some special built-in variables, and the language server will provide special support
The following example shows that 'include' is treated as' require '.
json<br>"Lua.runtime.special" : {<br> "include" : "require"<br>}<br>
{}
Lua.runtime.unicodeName Allows Unicode characters in name.
Lua.runtime.version Lua runtime version. "Lua 5.4"
Lua.semantic.annotation Semantic coloring of type annotations. true
Lua.semantic.enable Enable semantic color. You may need to set editor.semanticHighlighting.enabled to true to take effect. true
Lua.semantic.keyword Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.
Lua.semantic.variable Semantic coloring of variables/fields/parameters. true
Lua.signatureHelp.enable Enable signature help. true
Lua.spell.dict Custom words for spell checking. []
Lua.type.castNumberToInteger Allowed to assign the number type to the integer type. true
Lua.type.weakNilCheck When checking the type of union type, ignore the nil in it.

When this setting is false, the `number
niltype cannot be assigned to thenumbertype. It can be withtrue`.
Lua.type.weakUnionCheck Once one subtype of a union type meets the condition, the union type also meets the condition.

When this setting is false, the `number
booleantype cannot be assigned to thenumbertype. It can be withtrue`.
Lua.window.progressBar Show progress bar in status bar. true
Lua.window.statusBar Show extension status in status bar. true
Lua.workspace.checkThirdParty Automatic detection and adaptation of third-party libraries, currently supported libraries are:

* OpenResty
* Cocos4.0
* LΓ–VE
* LΓ–VR
* skynet
* Jass
true
Lua.workspace.ignoreDir Ignored files and directories (Use .gitignore grammar). [".vscode"]
Lua.workspace.ignoreSubmodules Ignore submodules. true
Lua.workspace.library In 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.maxPreload Max preloaded files. 5000
Lua.workspace.preloadFileSize Skip files larger than this value (KB) when preloading. 500
Lua.workspace.useGitIgnore Ignore files list in .gitignore . true
Lua.workspace.userThirdParty Add 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

More Repositories

1

coc-go

Go language server extension using gopls for coc.nvim.
TypeScript
523
star
2

coc-sh

SH language server extension using bash-language-server for coc.nvim.
Shell
170
star
3

coc-docker

Docker language server extension using dockerfile-language-server-nodejs for coc.nvim.
Shell
62
star
4

vim-lightline-coc

Vim Script
52
star
5

atom-svg-preview

Live SVG preview for Atom editor
JavaScript
51
star
6

atom-blame

Show git blame as a gutter in Atom editor
JavaScript
22
star
7

atom-pandoc-convert

JavaScript
19
star
8

nvim-lightline-lsp

Vim Script
17
star
9

vim-clippy

Vim Script
14
star
10

atom-linter-less

Linter plug in for Less in the Atom text editor
JavaScript
11
star
11

atom-caniuse

JavaScript
11
star
12

vscode-ember-related-files

TypeScript
11
star
13

vscode-markdown-table-formatter

TypeScript
10
star
14

nvim-lsp-codelenses

Lua
7
star
15

nvim-actions

Lua
7
star
16

atom-ide-ember

JavaScript
7
star
17

atom-linter-handlebars

AtomLinter interface to handlebars
JavaScript
6
star
18

jenkins-theme-clean

jenkins-theme-clean
CSS
6
star
19

coc-lua-binaries

5
star
20

nvim-telescope-minimal-layout

Lua
5
star
21

atom-linter-node-markdownlint

JavaScript
4
star
22

atom-smyck

Smyck color scheme for atom
CSS
4
star
23

atom-ide-docker

JavaScript
4
star
24

ember-find-related-files

JavaScript
3
star
25

nvim-telescope-workspaces

Lua
3
star
26

nvim-file-tree

Lua
2
star
27

atom-linter-json-lint

JavaScript
2
star
28

nvim-gx

Lua
2
star
29

atom-http-status-codes

JavaScript
2
star
30

go-prompt

Go
2
star
31

nvim-telescope-select

Lua
2
star
32

nvim-quickfix

Lua
1
star
33

nvim-neighbors

Lua
1
star
34

jsonschema-bitbucket-pipelines

1
star
35

nvim-lsp-autoformat

Lua
1
star
36

hastdueier-twitter-bot

JavaScript
1
star
37

git-bus-factor

Go
1
star
38

vscode-xcode-project

TypeScript
1
star
39

vim-go-syntax

Vim Script
1
star
40

go-gitutils

Go
1
star
41

nvim-filetree

Go
1
star
42

go-devicons

Go
1
star
43

vim-monkey-c

Vim Script
1
star
44

atom-readme

JavaScript
1
star
45

lua-vim-textobj-user

Lua
1
star
46

homebrew-moneymoney-extensions

Ruby
1
star
47

coc-dev-tools

JavaScript
1
star
48

alfred-slack-status

JavaScript
1
star
49

nodeschool

JavaScript
1
star
50

alfred-google-maps

Go
1
star
51

zsh-upgrade-all

Shell
1
star
52

go-spinner

Go
1
star
53

go-zip

Go
1
star
54

vim-lightline-sensible

Vim Script
1
star
55

alfred-text-transformation

JavaScript
1
star
56

git-repo

Go
1
star
57

ZyFileheader

Help add fileheader when file is created.
Python
1
star
58

atom-linter-package-json-validator

JavaScript
1
star
59

atom-package-settings

JavaScript
1
star
60

atom-ember-module-import-snippets

JavaScript
1
star
61

go-applescript

Go
1
star