summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHoracio Sanson <horacio@allm.inc>2020-05-15 09:15:57 +0900
committerHoracio Sanson <horacio@allm.inc>2021-01-22 23:17:38 +0900
commit4aa11cbc055ccbc18d2d48a944566b08d6815583 (patch)
treeb2729c68ed319051d3e98e95c00225a50aabf142 /doc
parent014b00d4d778bbfe027e927183b44ce3424679b4 (diff)
downloadale-4aa11cbc055ccbc18d2d48a944566b08d6815583.zip
Improve documentation
Diffstat (limited to 'doc')
-rw-r--r--doc/ale-openapi.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/doc/ale-openapi.txt b/doc/ale-openapi.txt
index 27261de6..a1137ed8 100644
--- a/doc/ale-openapi.txt
+++ b/doc/ale-openapi.txt
@@ -15,7 +15,27 @@ Install ibm-openapi-validator either globally or locally: >
npm install ibm-openapi-validator -g # global
npm install ibm-openapi-validator # local
<
-Recommended plugin for openapi filetype detection:
+Configuration
+-------------------------------------------------------------------------------
+
+OpenAPI files can be written in YAML or JSON so in order for ALE plugins to
+work with these files we must set the buffer |filetype| to either |openapi.yaml|
+or |openapi.json| respectively. This causes ALE to lint the file with linters
+configured for openapi and yaml files or openapi and json files respectively.
+
+For example setting filetype to |openapi.yaml| on a buffer and the following
+|g:ale_linters| configuration will enable linting of openapi files using both
+|ibm-validator| and |yamlint|:
+
+>
+ let g:ale_linters = {
+ \ 'yaml': ['yamllint'],
+ \ 'openapi': ['ibm-validator']
+ \}
+<
+
+The following plugin will detect openapi files automatically and set the
+filetype to |openapi.yaml| or |openapi.json|:
https://github.com/hsanson/vim-openapi