IDE Setup Guide¶
This guide shows how to configure different editors for YAML schema validation with .readability.yml files.
VS Code¶
Installation¶
-
Install the YAML extension by Red Hat:
Or install from the Extensions marketplace (Ctrl+Shift+X / Cmd+Shift+X).
-
Open your
.readability.ymlfile -
Ensure the first line contains the schema reference:
-
Start typing - autocomplete will appear automatically
Verification¶
- Type
thresholds: - Press space, then Ctrl+Space (or Cmd+Space on macOS)
- You should see autocomplete suggestions:
max_grade,max_ari, etc. - Hover over a field to see its description
Troubleshooting¶
Autocomplete not working?
- Restart VS Code after installing the extension
- Check that the file is named
.readability.yml(not.yaml) - Verify the schema URL is correct in the first line
- Check VS Code output: View → Output → Select "YAML Support" from dropdown
Schema not loading?
- Ensure you have internet connectivity (schema is fetched from URL)
- Check the schema URL is accessible: visit it in your browser
- Try a workspace reload: Ctrl+Shift+P → "Developer: Reload Window"
JetBrains IDEs¶
JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, GoLand, etc.) have built-in YAML schema support.
Setup¶
-
Open your
.readability.ymlfile -
Add the schema reference to the first line:
-
The IDE automatically detects and loads the schema
Verification¶
- Type
thresholds: - Press Ctrl+Space (Windows/Linux) or Cmd+Space (macOS)
- Autocomplete suggestions appear
- Hover over fields to see documentation
Troubleshooting¶
Schema not detected?
- File → Invalidate Caches → Invalidate and Restart
- Settings → Languages & Frameworks → Schemas and DTOs → JSON Schema Mappings
- Ensure "YAML" plugin is enabled: Settings → Plugins → search for "YAML"
Neovim¶
Prerequisites¶
- Neovim 0.8+ (for native LSP support)
- A package manager (lazy.nvim, packer, vim-plug, etc.)
Installation with Mason¶
Mason is the recommended way to install LSP servers:
-- In your Neovim config (init.lua)
require('mason').setup()
require('mason-lspconfig').setup({
ensure_installed = { 'yamlls' }
})
-- Configure yaml-language-server
require('lspconfig').yamlls.setup({
settings = {
yaml = {
schemaStore = {
enable = true,
url = "https://www.schemastore.org/api/json/catalog.json",
},
schemas = {},
validate = true,
}
}
})
Manual Installation¶
-
Install yaml-language-server:
-
Configure in your Neovim config:
-
Add the schema reference to your
.readability.yml:
Verification¶
- Open
.readability.ymlin Neovim - Use
:LspInfoto verify yaml-language-server is attached - Type
thresholds:and trigger completion (usually Ctrl+X Ctrl+O) - Hover over fields with
Kto see documentation
Troubleshooting¶
LSP not attaching?
- Check
:LspInfoshows yaml-language-server - Verify server is installed:
which yaml-language-server - Check Neovim logs:
:messages - Ensure filetype is set:
:set filetype?should showyaml
Autocomplete not working?
- Verify completion plugin is installed (nvim-cmp, coq_nvim, etc.)
- Try manual completion: Ctrl+X Ctrl+O in insert mode
- Check LSP capabilities:
:lua =vim.lsp.get_active_clients()[1].server_capabilities
Vim¶
Vim requires a plugin to use LSP servers.
Option 1: coc.nvim with coc-yaml¶
-
Install coc.nvim:
-
Install coc-yaml:
-
Add schema reference to
.readability.yml: -
Restart Vim
Option 2: ALE with yaml-language-server¶
-
Install ALE:
-
Install yaml-language-server globally:
-
Configure ALE in
.vimrc: -
Add schema reference to
.readability.yml
Verification¶
- Open
.readability.yml - Trigger completion (usually Ctrl+X Ctrl+O or Tab with coc.nvim)
- Check ALE status:
:ALEInfo
Emacs¶
Installation with lsp-mode¶
-
Install lsp-mode and yaml-language-server:
-
Install yaml-language-server globally:
-
Add schema reference to
.readability.yml: -
Restart Emacs
With eglot¶
Alternatively, use eglot (built-in to Emacs 29+):
Verification¶
- Open
.readability.yml - Check LSP status:
M-x lsp-describe-session - Trigger completion:
M-x completion-at-pointor configured keybinding
Schema Reference Location¶
All editors load the schema from:
The /latest/ path always points to the most recent schema version. For version-specific schemas, use:
Offline Usage¶
For offline development:
-
Download the schema file:
-
Reference the local file:
Absolute Paths
Local schema references must use absolute paths. Relative paths are not supported by most YAML language servers.
Testing Your Setup¶
Create a test .readability.yml file:
# yaml-language-server: $schema=https://readability.adaptive-enforcement-lab.com/latest/schemas/config.json
---
thresholds:
max_grade: # Press Ctrl+Space here - should show type hint "number"
Try these tests:
- Autocomplete: Type
max_and trigger completion - should suggestmax_grade,max_ari,max_fog, etc. - Validation: Type
max_grade: "twelve"- should show error (expects number, got string) - Documentation: Hover over
max_grade- should show description - Range check: Type
max_grade: 200- should warn (exceeds maximum of 100)
All tests passing? Your setup is working correctly!
Next Steps¶
- Schema Reference - Complete schema documentation
- Validation Guide - Common error examples and fixes
- Validation Workflow - Step-by-step validation process
- Configuration File - Learn all config options