diff --git a/langserver/handle_text_document_formatting.go b/langserver/handle_text_document_formatting.go index 32889bc..ad4449a 100644 --- a/langserver/handle_text_document_formatting.go +++ b/langserver/handle_text_document_formatting.go @@ -197,7 +197,11 @@ Configs: var buf bytes.Buffer cmd.Stderr = &buf b, err := cmd.Output() - if err != nil { + + // Most format tools exit with zero status code when formatting is successful. + // Some do not. + // To handle a formatter that exits with non-zero value, use format-ignore-exit-code. + if err != nil && !config.FormatIgnoreExitCode { h.logger.Println(command+":", buf.String()) continue } diff --git a/langserver/handler.go b/langserver/handler.go index 1c861b5..5851939 100644 --- a/langserver/handler.go +++ b/langserver/handler.go @@ -65,35 +65,36 @@ type Config1 struct { // Language is type Language struct { - Prefix string `yaml:"prefix" json:"prefix"` - LintFormats []string `yaml:"lint-formats" json:"lintFormats"` - LintStdin bool `yaml:"lint-stdin" json:"lintStdin"` - LintOffset int `yaml:"lint-offset" json:"lintOffset"` - LintOffsetColumns int `yaml:"lint-offset-columns" json:"lintOffsetColumns"` - LintCommand string `yaml:"lint-command" json:"lintCommand"` - LintIgnoreExitCode bool `yaml:"lint-ignore-exit-code" json:"lintIgnoreExitCode"` - LintCategoryMap map[string]string `yaml:"lint-category-map" json:"lintCategoryMap"` - LintSource string `yaml:"lint-source" json:"lintSource"` - LintSeverity int `yaml:"lint-severity" json:"lintSeverity"` - LintWorkspace bool `yaml:"lint-workspace" json:"lintWorkspace"` - LintAfterOpen bool `yaml:"lint-after-open" json:"lintAfterOpen"` - LintOnSave bool `yaml:"lint-on-save" json:"lintOnSave"` - FormatCommand string `yaml:"format-command" json:"formatCommand"` - FormatCanRange bool `yaml:"format-can-range" json:"formatCanRange"` - FormatStdin bool `yaml:"format-stdin" json:"formatStdin"` - SymbolCommand string `yaml:"symbol-command" json:"symbolCommand"` - SymbolStdin bool `yaml:"symbol-stdin" json:"symbolStdin"` - SymbolFormats []string `yaml:"symbol-formats" json:"symbolFormats"` - CompletionCommand string `yaml:"completion-command" json:"completionCommand"` - CompletionStdin bool `yaml:"completion-stdin" json:"completionStdin"` - HoverCommand string `yaml:"hover-command" json:"hoverCommand"` - HoverStdin bool `yaml:"hover-stdin" json:"hoverStdin"` - HoverType string `yaml:"hover-type" json:"hoverType"` - HoverChars string `yaml:"hover-chars" json:"hoverChars"` - Env []string `yaml:"env" json:"env"` - RootMarkers []string `yaml:"root-markers" json:"rootMarkers"` - RequireMarker bool `yaml:"require-marker" json:"requireMarker"` - Commands []Command `yaml:"commands" json:"commands"` + Prefix string `yaml:"prefix" json:"prefix"` + LintFormats []string `yaml:"lint-formats" json:"lintFormats"` + LintStdin bool `yaml:"lint-stdin" json:"lintStdin"` + LintOffset int `yaml:"lint-offset" json:"lintOffset"` + LintOffsetColumns int `yaml:"lint-offset-columns" json:"lintOffsetColumns"` + LintCommand string `yaml:"lint-command" json:"lintCommand"` + LintIgnoreExitCode bool `yaml:"lint-ignore-exit-code" json:"lintIgnoreExitCode"` + LintCategoryMap map[string]string `yaml:"lint-category-map" json:"lintCategoryMap"` + LintSource string `yaml:"lint-source" json:"lintSource"` + LintSeverity int `yaml:"lint-severity" json:"lintSeverity"` + LintWorkspace bool `yaml:"lint-workspace" json:"lintWorkspace"` + LintAfterOpen bool `yaml:"lint-after-open" json:"lintAfterOpen"` + LintOnSave bool `yaml:"lint-on-save" json:"lintOnSave"` + FormatCommand string `yaml:"format-command" json:"formatCommand"` + FormatCanRange bool `yaml:"format-can-range" json:"formatCanRange"` + FormatIgnoreExitCode bool `yaml:"format-ignore-exit-code" json:"formatIgnoreExitCode"` + FormatStdin bool `yaml:"format-stdin" json:"formatStdin"` + SymbolCommand string `yaml:"symbol-command" json:"symbolCommand"` + SymbolStdin bool `yaml:"symbol-stdin" json:"symbolStdin"` + SymbolFormats []string `yaml:"symbol-formats" json:"symbolFormats"` + CompletionCommand string `yaml:"completion-command" json:"completionCommand"` + CompletionStdin bool `yaml:"completion-stdin" json:"completionStdin"` + HoverCommand string `yaml:"hover-command" json:"hoverCommand"` + HoverStdin bool `yaml:"hover-stdin" json:"hoverStdin"` + HoverType string `yaml:"hover-type" json:"hoverType"` + HoverChars string `yaml:"hover-chars" json:"hoverChars"` + Env []string `yaml:"env" json:"env"` + RootMarkers []string `yaml:"root-markers" json:"rootMarkers"` + RequireMarker bool `yaml:"require-marker" json:"requireMarker"` + Commands []Command `yaml:"commands" json:"commands"` } // NewHandler create JSON-RPC handler for this language server. diff --git a/schema.json b/schema.json index d5c4aba..dcbfb48 100644 --- a/schema.json +++ b/schema.json @@ -48,6 +48,11 @@ "description": "Formatting command. Input filename can be injected using `${INPUT}`, and flags can be injected using `${--flag:key}` (adds `--flag ` if value exists for key), `${--flag=key}` (adds `--flag=` if value exists for key), or `${--flag:!key}` (adds `--flag` if value for key is falsy).\n\n`efm-langserver` may provide values for keys `charStart`, `charEnd`, `rowStart`, `rowEnd`, `colStart`, `colEnd`, or any key in [`interface FormattingOptions`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions).\n\nExample: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${--use-tabs:insertSpaces} ${--range-start=charStart} ${--range-start=charEnd}`", "type": "string" }, + "format-ignore-exit-code": { + "default": false, + "description": "ignore exit code of format", + "type": "boolean" + }, "format-stdin": { "description": "use stdin for the format", "type": "boolean" diff --git a/schema.md b/schema.md index 234fc80..33d9f32 100644 --- a/schema.md +++ b/schema.md @@ -13,35 +13,37 @@ - [2.1.1.1. Property `prefix`](#languages_pattern1_items_prefix) - [2.1.1.2. Property `format-can-range`](#languages_pattern1_items_format-can-range) - [2.1.1.3. Property `format-command`](#languages_pattern1_items_format-command) - - [2.1.1.4. Property `format-stdin`](#languages_pattern1_items_format-stdin) - - [2.1.1.5. Property `hover-command`](#languages_pattern1_items_hover-command) - - [2.1.1.6. Property `hover-stdin`](#languages_pattern1_items_hover-stdin) - - [2.1.1.7. Property `hover-type`](#languages_pattern1_items_hover-type) - - [2.1.1.8. Property `hover-chars`](#languages_pattern1_items_hover-chars) - - [2.1.1.9. Property `env`](#languages_pattern1_items_env) - - [2.1.1.9.1. env items](#autogenerated_heading_5) - - [2.1.1.10. Property `lint-command`](#languages_pattern1_items_lint-command) - - [2.1.1.11. Property `lint-offset-columns`](#languages_pattern1_items_lint-offset-columns) - - [2.1.1.12. Property `lint-category-map`](#languages_pattern1_items_lint-category-map) - - [2.1.1.13. Property `lint-formats`](#languages_pattern1_items_lint-formats) - - [2.1.1.13.1. lint-formats items](#autogenerated_heading_6) - - [2.1.1.14. Property `lint-ignore-exit-code`](#languages_pattern1_items_lint-ignore-exit-code) - - [2.1.1.15. Property `lint-offset`](#languages_pattern1_items_lint-offset) - - [2.1.1.16. Property `lint-on-save`](#languages_pattern1_items_lint-on-save) - - [2.1.1.17. Property `lint-severity`](#languages_pattern1_items_lint-severity) - - [2.1.1.18. Property `lint-source`](#languages_pattern1_items_lint-source) - - [2.1.1.19. Property `lint-stdin`](#languages_pattern1_items_lint-stdin) - - [2.1.1.20. Property `lint-workspace`](#languages_pattern1_items_lint-workspace) - - [2.1.1.21. Property `completion-command`](#languages_pattern1_items_completion-command) - - [2.1.1.22. Property `completion-stdin`](#languages_pattern1_items_completion-stdin) - - [2.1.1.23. Property `symbol-command`](#languages_pattern1_items_symbol-command) - - [2.1.1.24. Property `symbol-stdin`](#languages_pattern1_items_symbol-stdin) - - [2.1.1.25. Property `symbol-formats`](#languages_pattern1_items_symbol-formats) - - [2.1.1.25.1. symbol-formats items](#autogenerated_heading_7) - - [2.1.1.26. Property `root-markers`](#languages_pattern1_items_root-markers) - - [2.1.1.26.1. root-markers items](#autogenerated_heading_8) - - [2.1.1.27. Property `require-marker`](#languages_pattern1_items_require-marker) - - [2.1.1.28. Property `commands`](#languages_pattern1_items_commands) + - [2.1.1.4. Property `format-ignore-exit-code`](#languages_pattern1_items_format-ignore-exit-code) + - [2.1.1.5. Property `format-stdin`](#languages_pattern1_items_format-stdin) + - [2.1.1.6. Property `hover-command`](#languages_pattern1_items_hover-command) + - [2.1.1.7. Property `hover-stdin`](#languages_pattern1_items_hover-stdin) + - [2.1.1.8. Property `hover-type`](#languages_pattern1_items_hover-type) + - [2.1.1.9. Property `hover-chars`](#languages_pattern1_items_hover-chars) + - [2.1.1.10. Property `env`](#languages_pattern1_items_env) + - [2.1.1.10.1. env items](#autogenerated_heading_5) + - [2.1.1.11. Property `lint-command`](#languages_pattern1_items_lint-command) + - [2.1.1.12. Property `lint-offset-columns`](#languages_pattern1_items_lint-offset-columns) + - [2.1.1.13. Property `lint-category-map`](#languages_pattern1_items_lint-category-map) + - [2.1.1.14. Property `lint-formats`](#languages_pattern1_items_lint-formats) + - [2.1.1.14.1. lint-formats items](#autogenerated_heading_6) + - [2.1.1.15. Property `lint-ignore-exit-code`](#languages_pattern1_items_lint-ignore-exit-code) + - [2.1.1.16. Property `lint-offset`](#languages_pattern1_items_lint-offset) + - [2.1.1.17. Property `lint-after-open`](#languages_pattern1_items_lint-after-open) + - [2.1.1.18. Property `lint-on-save`](#languages_pattern1_items_lint-on-save) + - [2.1.1.19. Property `lint-severity`](#languages_pattern1_items_lint-severity) + - [2.1.1.20. Property `lint-source`](#languages_pattern1_items_lint-source) + - [2.1.1.21. Property `lint-stdin`](#languages_pattern1_items_lint-stdin) + - [2.1.1.22. Property `lint-workspace`](#languages_pattern1_items_lint-workspace) + - [2.1.1.23. Property `completion-command`](#languages_pattern1_items_completion-command) + - [2.1.1.24. Property `completion-stdin`](#languages_pattern1_items_completion-stdin) + - [2.1.1.25. Property `symbol-command`](#languages_pattern1_items_symbol-command) + - [2.1.1.26. Property `symbol-stdin`](#languages_pattern1_items_symbol-stdin) + - [2.1.1.27. Property `symbol-formats`](#languages_pattern1_items_symbol-formats) + - [2.1.1.27.1. symbol-formats items](#autogenerated_heading_7) + - [2.1.1.28. Property `root-markers`](#languages_pattern1_items_root-markers) + - [2.1.1.28.1. root-markers items](#autogenerated_heading_8) + - [2.1.1.29. Property `require-marker`](#languages_pattern1_items_require-marker) + - [2.1.1.30. Property `commands`](#languages_pattern1_items_commands) - [3. Property `tools`](#tools) - [3.1. Pattern Property `tool-definition`](#tools_pattern1) - [4. Property `version`](#version) @@ -218,36 +220,38 @@ must respect the following conditions **Description:** definition of the tool -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| --------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [prefix](#languages_pattern1_items_prefix ) | No | string | No | - | If `lint-source` doesn't work, you can set a prefix here instead, which will render the messages as "[prefix] message". | -| - [format-can-range](#languages_pattern1_items_format-can-range ) | No | boolean | No | - | Whether the formatting command handles range start and range end | -| - [format-command](#languages_pattern1_items_format-command ) | No | string | No | - | Formatting command. Input filename can be injected using `${INPUT}`, and flags can be injected using `${--flag:key}` (adds `--flag ` if value exists for key), `${--flag=key}` (adds `--flag=` if value exists for key), or `${--flag:!key}` (adds `--flag` if value for key is falsy).

`efm-langserver` may provide values for keys `charStart`, `charEnd`, `rowStart`, `rowEnd`, `colStart`, `colEnd`, or any key in [`interface FormattingOptions`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions).

Example: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${--use-tabs:insertSpaces} ${--range-start=charStart} ${--range-start=charEnd}` | -| - [format-stdin](#languages_pattern1_items_format-stdin ) | No | boolean | No | - | use stdin for the format | -| - [hover-command](#languages_pattern1_items_hover-command ) | No | string | No | - | hover command | -| - [hover-stdin](#languages_pattern1_items_hover-stdin ) | No | boolean | No | - | use stdin for the hover | -| - [hover-type](#languages_pattern1_items_hover-type ) | No | enum (of string) | No | - | hover result type | -| - [hover-chars](#languages_pattern1_items_hover-chars ) | No | string | No | - | - | -| - [env](#languages_pattern1_items_env ) | No | array of string | No | - | command environment variables and values | -| - [lint-command](#languages_pattern1_items_lint-command ) | No | string | No | - | Lint command. Input filename can be injected using `${INPUT}`. | -| - [lint-offset-columns](#languages_pattern1_items_lint-offset-columns ) | No | number | No | - | offset value to skip columns | -| - [lint-category-map](#languages_pattern1_items_lint-category-map ) | No | object | No | - | Map linter categories to LSP categories | -| - [lint-formats](#languages_pattern1_items_lint-formats ) | No | array of string | No | - | List of Vim errorformats to capture. See: https://vimhelp.org/quickfix.txt.html#errorformats. If this is not expressive enough, you can edit the `lint-command` to do some preprocessing, e.g. using `sed` or `jq`.

`efm-langserver` uses a Go implementation to parse the errors, which comes with a CLI for quick testing: https://github.com/reviewdog/errorformat | -| - [lint-ignore-exit-code](#languages_pattern1_items_lint-ignore-exit-code ) | No | boolean | No | - | ignore exit code of lint | -| - [lint-offset](#languages_pattern1_items_lint-offset ) | No | number | No | - | offset value to skip lines | -| - [lint-on-save](#languages_pattern1_items_lint-on-save ) | No | boolean | No | - | only lint on save, i.e. don't lint on text changed | -| - [lint-severity](#languages_pattern1_items_lint-severity ) | No | number | No | - | default severity to show if violation doesn't provide severity. 1 = error, 2 = warning, 3 = info, 4 = hint | -| - [lint-source](#languages_pattern1_items_lint-source ) | No | string | No | - | show where the lint came from, e.g. 'eslint' | -| - [lint-stdin](#languages_pattern1_items_lint-stdin ) | No | boolean | No | - | use stdin for the lint | -| - [lint-workspace](#languages_pattern1_items_lint-workspace ) | No | boolean | No | - | indicates that the command lints the whole workspace and thus doesn't need a filename argument nor stdin | -| - [completion-command](#languages_pattern1_items_completion-command ) | No | string | No | - | completion command | -| - [completion-stdin](#languages_pattern1_items_completion-stdin ) | No | boolean | No | - | use stdin for the completion | -| - [symbol-command](#languages_pattern1_items_symbol-command ) | No | string | No | - | - | -| - [symbol-stdin](#languages_pattern1_items_symbol-stdin ) | No | boolean | No | - | - | -| - [symbol-formats](#languages_pattern1_items_symbol-formats ) | No | array of string | No | - | - | -| - [root-markers](#languages_pattern1_items_root-markers ) | No | array of string | No | - | markers to find root directory | -| - [require-marker](#languages_pattern1_items_require-marker ) | No | boolean | No | - | require a marker to run linter | -| - [commands](#languages_pattern1_items_commands ) | No | array of object | No | Same as [commands](#commands ) | list of commands | +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ------------------------------------------------------------------------------- | ------- | ---------------- | ---------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| - [prefix](#languages_pattern1_items_prefix ) | No | string | No | - | If `lint-source` doesn't work, you can set a prefix here instead, which will render the messages as "[prefix] message". | +| - [format-can-range](#languages_pattern1_items_format-can-range ) | No | boolean | No | - | Whether the formatting command handles range start and range end | +| - [format-command](#languages_pattern1_items_format-command ) | No | string | No | - | Formatting command. Input filename can be injected using `${INPUT}`, and flags can be injected using `${--flag:key}` (adds `--flag ` if value exists for key), `${--flag=key}` (adds `--flag=` if value exists for key), or `${--flag:!key}` (adds `--flag` if value for key is falsy).

`efm-langserver` may provide values for keys `charStart`, `charEnd`, `rowStart`, `rowEnd`, `colStart`, `colEnd`, or any key in [`interface FormattingOptions`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#formattingOptions).

Example: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${--use-tabs:insertSpaces} ${--range-start=charStart} ${--range-start=charEnd}` | +| - [format-ignore-exit-code](#languages_pattern1_items_format-ignore-exit-code ) | No | boolean | No | - | ignore exit code of format | +| - [format-stdin](#languages_pattern1_items_format-stdin ) | No | boolean | No | - | use stdin for the format | +| - [hover-command](#languages_pattern1_items_hover-command ) | No | string | No | - | hover command | +| - [hover-stdin](#languages_pattern1_items_hover-stdin ) | No | boolean | No | - | use stdin for the hover | +| - [hover-type](#languages_pattern1_items_hover-type ) | No | enum (of string) | No | - | hover result type | +| - [hover-chars](#languages_pattern1_items_hover-chars ) | No | string | No | - | - | +| - [env](#languages_pattern1_items_env ) | No | array of string | No | - | command environment variables and values | +| - [lint-command](#languages_pattern1_items_lint-command ) | No | string | No | - | Lint command. Input filename can be injected using `${INPUT}`. | +| - [lint-offset-columns](#languages_pattern1_items_lint-offset-columns ) | No | number | No | - | offset value to skip columns | +| - [lint-category-map](#languages_pattern1_items_lint-category-map ) | No | object | No | - | Map linter categories to LSP categories | +| - [lint-formats](#languages_pattern1_items_lint-formats ) | No | array of string | No | - | List of Vim errorformats to capture. See: https://vimhelp.org/quickfix.txt.html#errorformats. If this is not expressive enough, you can edit the `lint-command` to do some preprocessing, e.g. using `sed` or `jq`.

`efm-langserver` uses a Go implementation to parse the errors, which comes with a CLI for quick testing: https://github.com/reviewdog/errorformat | +| - [lint-ignore-exit-code](#languages_pattern1_items_lint-ignore-exit-code ) | No | boolean | No | - | ignore exit code of lint | +| - [lint-offset](#languages_pattern1_items_lint-offset ) | No | number | No | - | offset value to skip lines | +| - [lint-after-open](#languages_pattern1_items_lint-after-open ) | No | boolean | No | - | lint after open | +| - [lint-on-save](#languages_pattern1_items_lint-on-save ) | No | boolean | No | - | only lint on save, i.e. don't lint on text changed | +| - [lint-severity](#languages_pattern1_items_lint-severity ) | No | number | No | - | default severity to show if violation doesn't provide severity. 1 = error, 2 = warning, 3 = info, 4 = hint | +| - [lint-source](#languages_pattern1_items_lint-source ) | No | string | No | - | show where the lint came from, e.g. 'eslint' | +| - [lint-stdin](#languages_pattern1_items_lint-stdin ) | No | boolean | No | - | use stdin for the lint | +| - [lint-workspace](#languages_pattern1_items_lint-workspace ) | No | boolean | No | - | indicates that the command lints the whole workspace and thus doesn't need a filename argument nor stdin | +| - [completion-command](#languages_pattern1_items_completion-command ) | No | string | No | - | completion command | +| - [completion-stdin](#languages_pattern1_items_completion-stdin ) | No | boolean | No | - | use stdin for the completion | +| - [symbol-command](#languages_pattern1_items_symbol-command ) | No | string | No | - | - | +| - [symbol-stdin](#languages_pattern1_items_symbol-stdin ) | No | boolean | No | - | - | +| - [symbol-formats](#languages_pattern1_items_symbol-formats ) | No | array of string | No | - | - | +| - [root-markers](#languages_pattern1_items_root-markers ) | No | array of string | No | - | markers to find root directory | +| - [require-marker](#languages_pattern1_items_require-marker ) | No | boolean | No | - | require a marker to run linter | +| - [commands](#languages_pattern1_items_commands ) | No | array of object | No | Same as [commands](#commands ) | list of commands | ##### 2.1.1.1. Property `prefix` @@ -280,7 +284,17 @@ must respect the following conditions Example: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${--use-tabs:insertSpaces} ${--range-start=charStart} ${--range-start=charEnd}` -##### 2.1.1.4. Property `format-stdin` +##### 2.1.1.4. Property `format-ignore-exit-code` + +| | | +| ------------ | --------- | +| **Type** | `boolean` | +| **Required** | No | +| **Default** | `false` | + +**Description:** ignore exit code of format + +##### 2.1.1.5. Property `format-stdin` | | | | ------------ | --------- | @@ -289,7 +303,7 @@ Example: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${- **Description:** use stdin for the format -##### 2.1.1.5. Property `hover-command` +##### 2.1.1.6. Property `hover-command` | | | | ------------ | -------- | @@ -298,7 +312,7 @@ Example: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${- **Description:** hover command -##### 2.1.1.6. Property `hover-stdin` +##### 2.1.1.7. Property `hover-stdin` | | | | ------------ | --------- | @@ -307,7 +321,7 @@ Example: `prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${- **Description:** use stdin for the hover -##### 2.1.1.7. Property `hover-type` +##### 2.1.1.8. Property `hover-type` | | | | ------------ | ------------------ | @@ -320,14 +334,14 @@ Must be one of: * "markdown" * "plaintext" -##### 2.1.1.8. Property `hover-chars` +##### 2.1.1.9. Property `hover-chars` | | | | ------------ | -------- | | **Type** | `string` | | **Required** | No | -##### 2.1.1.9. Property `env` +##### 2.1.1.10. Property `env` | | | | ------------ | ----------------- | @@ -348,7 +362,7 @@ Must be one of: | ------------------------------------------------ | ----------- | | [env items](#languages_pattern1_items_env_items) | - | -##### 2.1.1.9.1. env items +###### 2.1.1.10.1. env items | | | | ------------ | -------- | @@ -359,7 +373,7 @@ Must be one of: | --------------------------------- | ------------------------------------------------------------------- | | **Must match regular expression** | ```^.+=.+$``` [Test](https://regex101.com/?regex=%5E.%2B%3D.%2B%24) | -##### 2.1.1.10. Property `lint-command` +##### 2.1.1.11. Property `lint-command` | | | | ------------ | -------- | @@ -368,7 +382,7 @@ Must be one of: **Description:** Lint command. Input filename can be injected using `${INPUT}`. -##### 2.1.1.11. Property `lint-offset-columns` +##### 2.1.1.12. Property `lint-offset-columns` | | | | ------------ | -------- | @@ -377,7 +391,7 @@ Must be one of: **Description:** offset value to skip columns -##### 2.1.1.12. Property `lint-category-map` +##### 2.1.1.13. Property `lint-category-map` | | | | ------------------------- | ------------------------------------------------------------------------- | @@ -387,7 +401,7 @@ Must be one of: **Description:** Map linter categories to LSP categories -##### 2.1.1.13. Property `lint-formats` +##### 2.1.1.14. Property `lint-formats` | | | | ------------ | ----------------- | @@ -410,14 +424,14 @@ Must be one of: | ------------------------------------------------------------------ | ----------- | | [lint-formats items](#languages_pattern1_items_lint-formats_items) | - | -##### 2.1.1.13.1. lint-formats items +###### 2.1.1.14.1. lint-formats items | | | | ------------ | -------- | | **Type** | `string` | | **Required** | No | -##### 2.1.1.14. Property `lint-ignore-exit-code` +##### 2.1.1.15. Property `lint-ignore-exit-code` | | | | ------------ | --------- | @@ -427,7 +441,7 @@ Must be one of: **Description:** ignore exit code of lint -##### 2.1.1.15. Property `lint-offset` +##### 2.1.1.16. Property `lint-offset` | | | | ------------ | -------- | @@ -436,7 +450,17 @@ Must be one of: **Description:** offset value to skip lines -##### 2.1.1.16. Property `lint-on-save` +##### 2.1.1.17. Property `lint-after-open` + +| | | +| ------------ | --------- | +| **Type** | `boolean` | +| **Required** | No | +| **Default** | `true` | + +**Description:** lint after open + +##### 2.1.1.18. Property `lint-on-save` | | | | ------------ | --------- | @@ -445,7 +469,7 @@ Must be one of: **Description:** only lint on save, i.e. don't lint on text changed -##### 2.1.1.17. Property `lint-severity` +##### 2.1.1.19. Property `lint-severity` | | | | ------------ | -------- | @@ -454,7 +478,7 @@ Must be one of: **Description:** default severity to show if violation doesn't provide severity. 1 = error, 2 = warning, 3 = info, 4 = hint -##### 2.1.1.18. Property `lint-source` +##### 2.1.1.20. Property `lint-source` | | | | ------------ | -------- | @@ -463,7 +487,7 @@ Must be one of: **Description:** show where the lint came from, e.g. 'eslint' -##### 2.1.1.19. Property `lint-stdin` +##### 2.1.1.21. Property `lint-stdin` | | | | ------------ | --------- | @@ -473,7 +497,7 @@ Must be one of: **Description:** use stdin for the lint -##### 2.1.1.20. Property `lint-workspace` +##### 2.1.1.22. Property `lint-workspace` | | | | ------------ | --------- | @@ -482,7 +506,7 @@ Must be one of: **Description:** indicates that the command lints the whole workspace and thus doesn't need a filename argument nor stdin -##### 2.1.1.21. Property `completion-command` +##### 2.1.1.23. Property `completion-command` | | | | ------------ | -------- | @@ -491,7 +515,7 @@ Must be one of: **Description:** completion command -##### 2.1.1.22. Property `completion-stdin` +##### 2.1.1.24. Property `completion-stdin` | | | | ------------ | --------- | @@ -501,21 +525,21 @@ Must be one of: **Description:** use stdin for the completion -##### 2.1.1.23. Property `symbol-command` +##### 2.1.1.25. Property `symbol-command` | | | | ------------ | -------- | | **Type** | `string` | | **Required** | No | -##### 2.1.1.24. Property `symbol-stdin` +##### 2.1.1.26. Property `symbol-stdin` | | | | ------------ | --------- | | **Type** | `boolean` | | **Required** | No | -##### 2.1.1.25. Property `symbol-formats` +##### 2.1.1.27. Property `symbol-formats` | | | | ------------ | ----------------- | @@ -534,14 +558,14 @@ Must be one of: | ---------------------------------------------------------------------- | ----------- | | [symbol-formats items](#languages_pattern1_items_symbol-formats_items) | - | -##### 2.1.1.25.1. symbol-formats items +###### 2.1.1.27.1. symbol-formats items | | | | ------------ | -------- | | **Type** | `string` | | **Required** | No | -##### 2.1.1.26. Property `root-markers` +##### 2.1.1.28. Property `root-markers` | | | | ------------ | ----------------- | @@ -562,14 +586,14 @@ Must be one of: | ------------------------------------------------------------------ | ----------- | | [root-markers items](#languages_pattern1_items_root-markers_items) | - | -##### 2.1.1.26.1. root-markers items +###### 2.1.1.28.1. root-markers items | | | | ------------ | -------- | | **Type** | `string` | | **Required** | No | -##### 2.1.1.27. Property `require-marker` +##### 2.1.1.29. Property `require-marker` | | | | ------------ | --------- | @@ -578,7 +602,7 @@ Must be one of: **Description:** require a marker to run linter -##### 2.1.1.28. Property `commands` +##### 2.1.1.30. Property `commands` | | | | ---------------------- | --------------------- | @@ -731,4 +755,4 @@ must respect the following conditions | **Required** | No | ---------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2023-09-06 at 04:43:26 -0700 +Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2024-11-05 at 17:06:23 +0100