mirror of
https://github.com/dense-analysis/ale.git
synced 2026-04-15 04:07:43 +08:00
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
33 lines
965 B
VimL
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
|