Files
ale/ale_linters/markdown/harper.vim
Armand Halbert 3d3b75cdc5
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Added support for harper in markdown files (#5104)
2026-03-28 20:22:26 +09:00

33 lines
965 B
VimL

" Author: Armand Halbert <armand.halbert@gmail.com>
" Description: Harper for Markdown files
call ale#Set('markdown_harper_config', {
\ 'harper-ls': {
\ 'diagnosticSeverity': 'hint',
\ 'dialect': 'American',
\ 'linters': {
\ 'SpellCheck': v:true,
\ 'SentenceCapitalization': v:true,
\ 'RepeatedWords': v:true,
\ 'LongSentences': v:true,
\ 'AnA': v:true,
\ 'Spaces': v:true,
\ 'SpelledNumbers': v:false,
\ 'WrongQuotes': v:false,
\ },
\ },
\})
call ale#linter#Define('markdown', {
\ 'name': 'harper',
\ 'lsp': 'stdio',
\ 'executable': 'harper-ls',
\ 'command': '%e --stdio',
\ 'project_root': function('ale_linters#markdown#harper#GetProjectRoot'),
\ 'lsp_config': {b -> ale#Var(b, 'markdown_harper_config')},
\})
function! ale_linters#markdown#harper#GetProjectRoot(buffer) abort
return fnamemodify(bufname(a:buffer), ':p:h')
endfunction