Skip to content

Latest commit

 

History

History
734 lines (551 loc) · 58.2 KB

schema.md

File metadata and controls

734 lines (551 loc) · 58.2 KB

efm-langserver

Title: efm-langserver

Type object
Required No
Additional properties [Not allowed]

Description: If configuring via DidChangeConfiguration (e.g. an editor API such as nvim-lspconfig), all properties should be in camelCase instead of kebab-case.

Property Pattern Type Deprecated Definition Title/Description
- commands No array of object No In #/definitions/command-definition list of commands
- languages No object No - list of language
- tools No object No - definition of tools
- version No number No - version of this yaml format
- root-markers No array of string No - markers to find root directory
- log-file No string No - (YAML only) path to log file
- log-level No number No - log level
- format-debounce No string No - duration to debounce calls to the formatter executable. e.g: 1s
- lint-debounce No string No - duration to debounce calls to the linter executable. e.g.: 1s
- provide-definition No boolean No - (YAML only) Whether this language server should be used for go-to-definition requests
- trigger-chars No array of string No - trigger characters for completion

1. Property commands

Type array of object
Required No
Defined in #/definitions/command-definition

Description: list of commands

Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
commands items -

1.1. commands items

Type object
Required No
Additional properties [Not allowed]
Property Pattern Type Deprecated Definition Title/Description
- arguments No array of string No - arguments for the command
- command No string No - command to execute
- os No string No - command executable OS environment
- title No string No - title for clients

1.1.1. Property arguments

Type array of string
Required No

Description: arguments for the command

Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
arguments items -
1.1.1.1. arguments items
Type string
Required No

1.1.2. Property command

Type string
Required No

Description: command to execute

1.1.3. Property os

Type string
Required No

Description: command executable OS environment

1.1.4. Property title

Type string
Required No

Description: title for clients

2. Property languages

Type object
Required No
Additional properties [Any type: allowed]

Description: list of language

Property Pattern Type Deprecated Definition Title/Description
- ^([a-z0-9_-]+)+$ Yes array No - -

2.1. Pattern Property ^([a-z0-9_-]+)+$

All properties whose name matches the regular expression ^([a-z0-9_-]+)+$ (Test) must respect the following conditions

Type array
Required No
Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
tool-definition definition of the tool

2.1.1. tool-definition

Type object
Required No
Additional properties [Not allowed]
Defined in #/definitions/tool-definition

Description: definition of the tool

Property Pattern Type Deprecated Definition Title/Description
- 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 No boolean No - Whether the formatting command handles range start and range end
- format-command No string No - Formatting command. Input filename can be injected using ${INPUT}, and flags can be injected using ${--flag:key} (adds --flag <value> if value exists for key), ${--flag=key} (adds --flag=<value> 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.

Example: prettier --stdin --stdin-filepath ${INPUT} ${--tab-width:tabWidth} ${--use-tabs:insertSpaces} ${--range-start=charStart} ${--range-start=charEnd}
- format-stdin No boolean No - use stdin for the format
- hover-command No string No - hover command
- hover-stdin No boolean No - use stdin for the hover
- hover-type No enum (of string) No - hover result type
- hover-chars No string No - -
- env No array of string No - command environment variables and values
- lint-command No string No - Lint command. Input filename can be injected using ${INPUT}.
- lint-offset-columns No number No - offset value to skip columns
- lint-category-map No object No - Map linter categories to LSP categories
- 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 No boolean No - ignore exit code of lint
- lint-offset No number No - offset value to skip lines
- lint-on-save No boolean No - only lint on save, i.e. don't lint on text changed
- 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 No string No - show where the lint came from, e.g. 'eslint'
- lint-stdin No boolean No - use stdin for the lint
- 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 No string No - completion command
- completion-stdin No boolean No - use stdin for the completion
- symbol-command No string No - -
- symbol-stdin No boolean No - -
- symbol-formats No array of string No - -
- root-markers No array of string No - markers to find root directory
- require-marker No boolean No - require a marker to run linter
- commands No array of object No Same as commands list of commands
2.1.1.1. Property prefix
Type string
Required No

Description: If lint-source doesn't work, you can set a prefix here instead, which will render the messages as "[prefix] message".

2.1.1.2. Property format-can-range
Type boolean
Required No

Description: Whether the formatting command handles range start and range end

2.1.1.3. Property format-command
Type string
Required No

Description: Formatting command. Input filename can be injected using ${INPUT}, and flags can be injected using ${--flag:key} (adds --flag <value> if value exists for key), ${--flag=key} (adds --flag=<value> 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.

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
Type boolean
Required No

Description: use stdin for the format

2.1.1.5. Property hover-command
Type string
Required No

Description: hover command

2.1.1.6. Property hover-stdin
Type boolean
Required No

Description: use stdin for the hover

2.1.1.7. Property hover-type
Type enum (of string)
Required No

Description: hover result type

Must be one of:

  • "markdown"
  • "plaintext"
2.1.1.8. Property hover-chars
Type string
Required No
2.1.1.9. Property env
Type array of string
Required No

Description: command environment variables and values

Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
env items -
2.1.1.9.1. env items
Type string
Required No
Restrictions
Must match regular expression ^.+=.+$ Test
2.1.1.10. Property lint-command
Type string
Required No

Description: Lint command. Input filename can be injected using ${INPUT}.

2.1.1.11. Property lint-offset-columns
Type number
Required No

Description: offset value to skip columns

2.1.1.12. Property lint-category-map
Type object
Required No
Additional properties [Any type: allowed]

Description: Map linter categories to LSP categories

2.1.1.13. Property lint-formats
Type array of string
Required No

Description: 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

Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
lint-formats items -
2.1.1.13.1. lint-formats items
Type string
Required No
2.1.1.14. Property lint-ignore-exit-code
Type boolean
Required No
Default true

Description: ignore exit code of lint

2.1.1.15. Property lint-offset
Type number
Required No

Description: offset value to skip lines

2.1.1.16. Property lint-on-save
Type boolean
Required No

Description: only lint on save, i.e. don't lint on text changed

2.1.1.17. Property lint-severity
Type number
Required No

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
Type string
Required No

Description: show where the lint came from, e.g. 'eslint'

2.1.1.19. Property lint-stdin
Type boolean
Required No
Default true

Description: use stdin for the lint

2.1.1.20. Property lint-workspace
Type boolean
Required No

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
Type string
Required No

Description: completion command

2.1.1.22. Property completion-stdin
Type boolean
Required No
Default true

Description: use stdin for the completion

2.1.1.23. Property symbol-command
Type string
Required No
2.1.1.24. Property symbol-stdin
Type boolean
Required No
2.1.1.25. Property symbol-formats
Type array of string
Required No
Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
symbol-formats items -
2.1.1.25.1. symbol-formats items
Type string
Required No
2.1.1.26. Property root-markers
Type array of string
Required No

Description: markers to find root directory

Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
root-markers items -
2.1.1.26.1. root-markers items
Type string
Required No
2.1.1.27. Property require-marker
Type boolean
Required No

Description: require a marker to run linter

2.1.1.28. Property commands
Type array of object
Required No
Same definition as commands

Description: list of commands

3. Property tools

Type object
Required No
Additional properties [Any type: allowed]

Description: definition of tools

Property Pattern Type Deprecated Definition Title/Description
- ^([a-z0-9_-]+)+$ Yes object No Same as languages_pattern1_items definition of the tool

3.1. Pattern Property tool-definition

All properties whose name matches the regular expression ^([a-z0-9_-]+)+$ (Test) must respect the following conditions

Type object
Required No
Additional properties [Not allowed]
Same definition as languages_pattern1_items

Description: definition of the tool

4. Property version

Type number
Required No

Description: version of this yaml format

5. Property root-markers

Type array of string
Required No

Description: markers to find root directory

Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
root-markers items -

5.1. root-markers items

Type string
Required No

6. Property log-file

Type string
Required No

Description: (YAML only) path to log file

7. Property log-level

Type number
Required No

Description: log level

Restrictions
Minimum ≥ 1

8. Property format-debounce

Type string
Required No

Description: duration to debounce calls to the formatter executable. e.g: 1s

9. Property lint-debounce

Type string
Required No

Description: duration to debounce calls to the linter executable. e.g.: 1s

10. Property provide-definition

Type boolean
Required No

Description: (YAML only) Whether this language server should be used for go-to-definition requests

11. Property trigger-chars

Type array of string
Required No

Description: trigger characters for completion

Array restrictions
Min items N/A
Max items N/A
Items unicity False
Additional items False
Tuple validation See below
Each item of this array must be Description
trigger-chars items -

11.1. trigger-chars items

Type string
Required No

Generated using json-schema-for-humans on 2023-09-06 at 04:43:26 -0700