mirror of
https://github.com/amix/vimrc
synced 2025-07-10 03:25:00 +08:00
Use sources_non_forked folder for pathogen path, with sources_non_forked_fallback folder as fallback.
This commit is contained in:
@ -1,4 +0,0 @@
|
||||
" Author: Johannes Wienke <languitar@semipol.de>
|
||||
" Description: alex for TeX files
|
||||
|
||||
call ale#handlers#alex#DefineLinter('tex', '--text')
|
@ -1,54 +0,0 @@
|
||||
" Author: Andrew Balmos - <andrew@balmos.org>
|
||||
" Description: chktex for LaTeX files
|
||||
|
||||
let g:ale_tex_chktex_executable =
|
||||
\ get(g:, 'ale_tex_chktex_executable', 'chktex')
|
||||
|
||||
let g:ale_tex_chktex_options =
|
||||
\ get(g:, 'ale_tex_chktex_options', '-I')
|
||||
|
||||
function! ale_linters#tex#chktex#GetCommand(buffer) abort
|
||||
" Check for optional .chktexrc
|
||||
let l:chktex_config = ale#path#FindNearestFile(
|
||||
\ a:buffer,
|
||||
\ '.chktexrc')
|
||||
|
||||
let l:command = ale#Var(a:buffer, 'tex_chktex_executable')
|
||||
" Avoid bug when used without -p (last warning has gibberish for a filename)
|
||||
let l:command .= ' -v0 -p stdin -q'
|
||||
|
||||
if !empty(l:chktex_config)
|
||||
let l:command .= ' -l ' . ale#Escape(l:chktex_config)
|
||||
endif
|
||||
|
||||
let l:command .= ' ' . ale#Var(a:buffer, 'tex_chktex_options')
|
||||
|
||||
return l:command
|
||||
endfunction
|
||||
|
||||
function! ale_linters#tex#chktex#Handle(buffer, lines) abort
|
||||
" Mattes lines like:
|
||||
"
|
||||
" stdin:499:2:24:Delete this space to maintain correct pagereferences.
|
||||
" stdin:507:81:3:You should enclose the previous parenthesis with `{}'.
|
||||
let l:pattern = '^stdin:\(\d\+\):\(\d\+\):\(\d\+\):\(.\+\)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:match[1] + 0,
|
||||
\ 'col': l:match[2] + 0,
|
||||
\ 'text': l:match[4] . ' (' . (l:match[3]+0) . ')',
|
||||
\ 'type': 'W',
|
||||
\})
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'chktex',
|
||||
\ 'executable': 'chktex',
|
||||
\ 'command': function('ale_linters#tex#chktex#GetCommand'),
|
||||
\ 'callback': 'ale_linters#tex#chktex#Handle'
|
||||
\})
|
@ -1,5 +0,0 @@
|
||||
scriptencoding utf-8
|
||||
" Author: David Houston <houstdav000>
|
||||
" Description: cspell support for TeX files.
|
||||
|
||||
call ale#handlers#cspell#DefineLinter('tex')
|
@ -1,43 +0,0 @@
|
||||
" Author: Andrew Balmos - <andrew@balmos.org>
|
||||
" Description: lacheck for LaTeX files
|
||||
|
||||
call ale#Set('tex_lacheck_executable', 'lacheck')
|
||||
|
||||
function! ale_linters#tex#lacheck#Handle(buffer, lines) abort
|
||||
" Mattes lines like:
|
||||
"
|
||||
" "book.tex", line 37: possible unwanted space at "{"
|
||||
" "book.tex", line 38: missing `\ ' after "etc."
|
||||
let l:pattern = '^"\(.\+\)", line \(\d\+\): \(.\+\)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
" lacheck follows `\input{}` commands. If the cwd is not the same as the
|
||||
" file in the buffer then it will fail to find the inputted items. We do not
|
||||
" want warnings from those items anyway
|
||||
if !empty(matchstr(l:match[3], '^Could not open ".\+"$'))
|
||||
continue
|
||||
endif
|
||||
|
||||
" lacheck follows `\input{}` commands. We are only interested in
|
||||
" reporting errors for the current buffer only.
|
||||
if empty(matchstr(fnamemodify(l:match[1], ':t'), fnamemodify(bufname(a:buffer), ':t')))
|
||||
continue
|
||||
endif
|
||||
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:match[2] + 0,
|
||||
\ 'text': l:match[3],
|
||||
\ 'type': 'W',
|
||||
\})
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'lacheck',
|
||||
\ 'executable': {b -> ale#Var(b, 'tex_lacheck_executable')},
|
||||
\ 'command': '%e %t',
|
||||
\ 'callback': 'ale_linters#tex#lacheck#Handle'
|
||||
\})
|
@ -1,9 +0,0 @@
|
||||
" Author: poohzrn https://github.com/poohzrn
|
||||
" Description: proselint for TeX files
|
||||
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'proselint',
|
||||
\ 'executable': 'proselint',
|
||||
\ 'command': 'proselint %t',
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||
\})
|
@ -1,9 +0,0 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': 'redpen -f latex -r json %t',
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
@ -1,26 +0,0 @@
|
||||
" Author: Ricardo Liang <ricardoliang@gmail.com>
|
||||
" Author: ourigen <https://github.com/ourigen>
|
||||
" Description: Texlab language server (Rust rewrite)
|
||||
|
||||
call ale#Set('tex_texlab_executable', 'texlab')
|
||||
call ale#Set('tex_texlab_options', '')
|
||||
call ale#Set('tex_texlab_config', {})
|
||||
|
||||
function! ale_linters#tex#texlab#GetProjectRoot(buffer) abort
|
||||
let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git')
|
||||
|
||||
return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : ''
|
||||
endfunction
|
||||
|
||||
function! ale_linters#tex#texlab#GetCommand(buffer) abort
|
||||
return '%e' . ale#Pad(ale#Var(a:buffer, 'tex_texlab_options'))
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'texlab',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#Var(b, 'tex_texlab_executable')},
|
||||
\ 'command': function('ale_linters#tex#texlab#GetCommand'),
|
||||
\ 'project_root': function('ale_linters#tex#texlab#GetProjectRoot'),
|
||||
\ 'lsp_config': {b -> ale#Var(b, 'tex_texlab_config')},
|
||||
\})
|
@ -1,9 +0,0 @@
|
||||
" Author: TANIGUCHI Masaya <ta2gch@gmail.com>
|
||||
" Description: textlint for LaTeX files
|
||||
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'textlint',
|
||||
\ 'executable': function('ale#handlers#textlint#GetExecutable'),
|
||||
\ 'command': function('ale#handlers#textlint#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput',
|
||||
\})
|
@ -1,9 +0,0 @@
|
||||
" Author: chew-z https://github.com/chew-z
|
||||
" Description: vale for LaTeX files
|
||||
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'vale',
|
||||
\ 'executable': 'vale',
|
||||
\ 'command': 'vale --output=JSON %t',
|
||||
\ 'callback': 'ale#handlers#vale#Handle',
|
||||
\})
|
@ -1,4 +0,0 @@
|
||||
" Author: Sumner Evans <sumner.evans98@gmail.com>
|
||||
" Description: write-good for TeX files
|
||||
|
||||
call ale#handlers#writegood#DefineLinter('tex')
|
Reference in New Issue
Block a user