Skip to content

Descriptions for configuration options #1747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 156 additions & 3 deletions doc/en-us/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,36 @@ Array<string>
* ``"exp-in-action"``
* ``"global-in-nil-env"``
* ``"index-in-func-name"``
* ``"invisible"``
* ``"jump-local-scope"``
* ``"keyword"``
* ``"local-limit"``
* ``"lowercase-global"``
* ``"lua-doc-miss-sign"``
* ``"luadoc-error-diag-mode"``
* ``"luadoc-miss-alias-extends"``
* ``"luadoc-miss-alias-name"``
* ``"luadoc-miss-arg-name"``
* ``"luadoc-miss-cate-name"``
* ``"luadoc-miss-class-extends-name"``
* ``"luadoc-miss-class-name"``
* ``"luadoc-miss-diag-mode"``
* ``"luadoc-miss-diag-name"``
* ``"luadoc-miss-field-extends"``
* ``"luadoc-miss-field-name"``
* ``"luadoc-miss-fun-after-overload"``
* ``"luadoc-miss-generic-name"``
* ``"luadoc-miss-local-name"``
* ``"luadoc-miss-module-name"``
* ``"luadoc-miss-operator-name"``
* ``"luadoc-miss-param-extends"``
* ``"luadoc-miss-param-name"``
* ``"luadoc-miss-see-name"``
* ``"luadoc-miss-sign-name"``
* ``"luadoc-miss-symbol"``
* ``"luadoc-miss-type-name"``
* ``"luadoc-miss-vararg-type"``
* ``"luadoc-miss-version"``
* ``"malformed-number"``
* ``"miss-end"``
* ``"miss-esc-x"``
Expand All @@ -245,6 +271,7 @@ Array<string>
* ``"missing-return"``
* ``"missing-return-value"``
* ``"need-check-nil"``
* ``"need-paren"``
* ``"newfield-call"``
* ``"newline-call"``
* ``"no-unknown"``
Expand Down Expand Up @@ -420,6 +447,7 @@ object<string, string>
* close-non-object
* deprecated
* discard-returns
* invisible
*/
"strict": "Fallback",
/*
Expand Down Expand Up @@ -538,6 +566,7 @@ object<string, string>
* close-non-object
* deprecated
* discard-returns
* invisible
*/
"strict": "Fallback",
/*
Expand Down Expand Up @@ -723,7 +752,7 @@ object<string, string>
/*
Enable diagnostics for setting the same field in a class more than once.
*/
"duplicate-set-field": "Any",
"duplicate-set-field": "Opened",
/*
Enable empty code block diagnostics.
*/
Expand All @@ -733,6 +762,10 @@ object<string, string>
*/
"global-in-nil-env": "Any",
/*
Enable diagnostics for accesses to fields which are invisible.
*/
"invisible": "Any",
/*
Enable lowercase global variable definition diagnostics.
*/
"lowercase-global": "Any",
Expand Down Expand Up @@ -977,6 +1010,10 @@ object<string, string>
*/
"global-in-nil-env": "Warning",
/*
Enable diagnostics for accesses to fields which are invisible.
*/
"invisible": "Warning",
/*
Enable lowercase global variable definition diagnostics.
*/
"lowercase-global": "Information",
Expand Down Expand Up @@ -1129,7 +1166,7 @@ Array<string>

# diagnostics.workspaceDelay

Latency (milliseconds) for workspace diagnostics. When you start the workspace, or edit any file, the entire workspace will be re-diagnosed in the background. Set to negative to disable workspace diagnostics.
Latency (milliseconds) for workspace diagnostics.

## type

Expand All @@ -1143,6 +1180,28 @@ integer
3000
```

# diagnostics.workspaceEvent

Set the time to trigger workspace diagnostics.

## type

```ts
string
```

## enum

* ``"OnChange"``: Trigger workspace diagnostics when the file is changed.
* ``"OnSave"``: Trigger workspace diagnostics when the file is saved.
* ``"None"``: Disable workspace diagnostics.

## default

```jsonc
"OnSave"
```

# 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.
Expand All @@ -1159,6 +1218,54 @@ integer
100
```

# 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.

## type

```ts
Array<string>
```

## default

```jsonc
[]
```

# 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.

## type

```ts
Array<string>
```

## default

```jsonc
[]
```

# 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.

## type

```ts
Array<string>
```

## default

```jsonc
[]
```

# format.defaultConfig

The default format configuration. Has a lower priority than `.editorconfig` file in the workspace.
Expand Down Expand Up @@ -1436,9 +1543,25 @@ integer
1000
```

# misc.executablePath

Specify the executable path in VSCode.

## type

```ts
string
```

## default

```jsonc
""
```

# misc.parameters

[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.
[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.

## type

Expand Down Expand Up @@ -1490,6 +1613,7 @@ object<string, string>
"os": "default",
"package": "default",
"string": "default",
"string.buffer": "default",
"table": "default",
"table.clear": "default",
"table.new": "default",
Expand Down Expand Up @@ -1872,6 +1996,35 @@ boolean
false
```

# typeFormat.config

Configures the formatting behavior while typing Lua code.

## type

```ts
object<string, string>
```

## default

```jsonc
{
/*
Controls if `end` is automatically completed at suitable positions.
*/
"auto_complete_end": "true",
/*
Controls if a separator is automatically appended at the end of a table declaration.
*/
"auto_complete_table_sep": "true",
/*
Controls if a line is formatted at all.
*/
"format_line": "true"
}
```

# window.progressBar

Show progress bar in status bar.
Expand Down
Loading