mirror of
https://github.com/dense-analysis/ale
synced 2024-12-28 00:52:20 +00:00
14350dbb0d
Make a series of sweeping changes to make :ALEInfo more useful. 1. Deprecate :ALEInfoToClipboard and support :ALEInfo -clipboard 2. Permit :ALEInfo -clip as a shorthand for :ALEInfo -clipboard 3. Support :ALEInfo -preview to render in the preview window 4. Support :ALEInfo -echo for the classic :ALEInfo mode 5. Change the default mode to 'preview', and make it configurable 6. Add syntax highlighting for ALEInfo in preview mode 7. Add a convenience to look up documentatation that explains itself 8. Don't show an empty 'Linter Variables' section
31 lines
1.2 KiB
VimL
31 lines
1.2 KiB
VimL
if exists('b:current_syntax')
|
|
finish
|
|
endif
|
|
|
|
" Exhaustively list different ALE Info directives to match here.
|
|
" This should hopefully avoid matching too eagerly.
|
|
syn match aleInfoDirective /^ *Current Filetype:/
|
|
syn match aleInfoDirective /^ *Available Linters:/
|
|
syn match aleInfoDirective /^ *Enabled Linters:/
|
|
syn match aleInfoDirective /^ *Ignored Linters:/
|
|
syn match aleInfoDirective /^ *Suggested Fixers:/
|
|
syn match aleInfoDirective /^ *Command History:/
|
|
|
|
syn match aleCommandNoOutput /^<<<NO OUTPUT RETURNED>>>$/
|
|
|
|
hi def link aleInfoDirective Title
|
|
hi def link aleInfoDirective Title
|
|
hi def link aleCommandNoOutput Comment
|
|
|
|
" Use Vim syntax highlighting for Vim options.
|
|
unlet! b:current_syntax
|
|
syntax include @srcVim syntax/vim.vim
|
|
syntax region aleInfoVimRegionLinter matchgroup=aleInfoDirective start="^ *Linter Variables:$" end="^ $" contains=@srcVim
|
|
syntax region aleInfoVimRegionGlobal matchgroup=aleInfoDirective start="^ *Global Variables:$" end="^ $" contains=@srcVim
|
|
|
|
unlet! b:current_syntax
|
|
syntax include @srcAleFixSuggest syntax/ale-fix-suggest.vim
|
|
syntax region aleInfoFixSuggestRegion matchgroup=aleInfoDirective start="^ *Suggested Fixers:$" end="^ $" contains=@srcAleFixSuggest
|
|
|
|
let b:current_syntax = 'ale-info'
|