Editor Integration
Enable FSH Lint in your favorite editor for real-time linting feedback.
VS Code
Section titled “VS Code”FSH Language Extension
Section titled “FSH Language Extension”Install the FSH extension:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for “FSH Language Support”
- Install the extension
Configure FSH Lint
Section titled “Configure FSH Lint”Add to .vscode/settings.json:
{ "fsh.lint.enabled": true, "fsh.lint.run": "onType", "fsh.lint.path": "maki", "fsh.lint.autoFixOnSave": true}Create .vscode/tasks.json:
{ "version": "2.0.0", "tasks": [ { "label": "FSH Lint", "type": "shell", "command": "maki", "args": ["lint", "${workspaceFolder}/**/*.fsh"], "problemMatcher": [] } ]}JetBrains IDEs
Section titled “JetBrains IDEs”File Watcher
Section titled “File Watcher”- Go to Settings → Tools → File Watchers
- Click ”+” to add new watcher
- Configure:
- Name: FSH Lint
- File type: FSH (or Custom)
- Scope: Project Files
- Program:
maki - Arguments:
lint --fix $FilePath$ - Working directory:
$ProjectFileDir$
Vim/Neovim
Section titled “Vim/Neovim”ALE Integration
Section titled “ALE Integration”Add to .vimrc or init.vim:
let g:ale_linters = {\ 'fsh': ['maki'],\}
let g:ale_fixers = {\ 'fsh': ['maki'],\}
let g:ale_fix_on_save = 1Configure LSP
Section titled “Configure LSP”Coming soon - LSP server for FSH Lint.
Flycheck
Section titled “Flycheck”Add to your Emacs config:
(require 'flycheck)
(flycheck-define-checker maki "FSH linter using maki." :command ("maki" "lint" source) :error-patterns ((error line-start (file-name) ":" line ":" column ": error: " (message)) (warning line-start (file-name) ":" line ":" column ": warning: " (message))) :modes (fsh-mode))
(add-to-list 'flycheck-checkers 'maki)Sublime Text
Section titled “Sublime Text”SublimeLinter Integration
Section titled “SublimeLinter Integration”- Install SublimeLinter package
- Create plugin at
Packages/User/linter_fsh.py:
from SublimeLinter.lint import Linter
class Maki(Linter): cmd = 'maki lint ${file}' regex = r'^.+:(?P<line>\d+):(?P<col>\d+):\s+(?:(?P<error>error)|(?P<warning>warning)):\s+(?P<message>.+)$' tempfile_suffix = 'fsh'Generic Editor Setup
Section titled “Generic Editor Setup”For editors without specific plugins:
Lint on Save
Section titled “Lint on Save”Configure your editor to run on save:
maki lint --fix /path/to/file.fshExternal Tool
Section titled “External Tool”Set up FSH Lint as an external tool with:
- Command:
maki - Arguments:
lint --fix $FILE - Working directory:
$PROJECT_DIR
Features by Editor
Section titled “Features by Editor”| Feature | VS Code | JetBrains | Vim | Emacs | Sublime |
|---|---|---|---|---|---|
| Syntax Highlighting | ✓ | ✓ | ✓ | ✓ | ✓ |
| Real-time Linting | ✓ | ✓ | ✓ | ✓ | ✓ |
| Auto-fix on Save | ✓ | ✓ | ✓ | ✓ | - |
| Quick Fixes | ✓ | - | - | - | - |
| Rule Documentation | ✓ | - | - | - | - |
Troubleshooting
Section titled “Troubleshooting”Editor Can’t Find FSH Lint
Section titled “Editor Can’t Find FSH Lint”Add to your editor’s PATH or specify full path:
{ "fsh.lint.path": "/usr/local/bin/maki"}Linting Too Slow
Section titled “Linting Too Slow”Adjust lint frequency:
{ "fsh.lint.run": "onSave" // Instead of "onType"}