mirror of https://github.com/amix/vimrc.git
parent
96b46f56ae
commit
1d42b63013
@ -0,0 +1,29 @@ |
||||
" Author: Jerko Steiner <https://github.com/jeremija> |
||||
" Description: https://github.com/saibing/bingo |
||||
|
||||
call ale#Set('go_bingo_executable', 'bingo') |
||||
call ale#Set('go_bingo_options', '--mode stdio') |
||||
|
||||
function! ale_linters#go#bingo#GetCommand(buffer) abort |
||||
return '%e' . ale#Pad(ale#Var(a:buffer, 'go_bingo_options')) |
||||
endfunction |
||||
|
||||
function! ale_linters#go#bingo#FindProjectRoot(buffer) abort |
||||
let l:project_root = ale#path#FindNearestFile(a:buffer, 'go.mod') |
||||
let l:mods = ':h' |
||||
|
||||
if empty(l:project_root) |
||||
let l:project_root = ale#path#FindNearestDirectory(a:buffer, '.git') |
||||
let l:mods = ':h:h' |
||||
endif |
||||
|
||||
return !empty(l:project_root) ? fnamemodify(l:project_root, l:mods) : '' |
||||
endfunction |
||||
|
||||
call ale#linter#Define('go', { |
||||
\ 'name': 'bingo', |
||||
\ 'lsp': 'stdio', |
||||
\ 'executable_callback': ale#VarFunc('go_bingo_executable'), |
||||
\ 'command_callback': 'ale_linters#go#bingo#GetCommand', |
||||
\ 'project_root_callback': 'ale_linters#go#bingo#FindProjectRoot', |
||||
\}) |
@ -1,9 +1,15 @@ |
||||
" Author: Michiel Westerbeek <happylinks@gmail.com> |
||||
" Description: Linter for GraphQL Schemas |
||||
|
||||
function! ale_linters#graphql#gqlint#GetCommand(buffer) abort |
||||
return ale#path#BufferCdString(a:buffer) |
||||
\ . 'gqlint' |
||||
\ . ' --reporter=simple %t' |
||||
endfunction |
||||
|
||||
call ale#linter#Define('graphql', { |
||||
\ 'name': 'gqlint', |
||||
\ 'executable': 'gqlint', |
||||
\ 'command': 'gqlint --reporter=simple %t', |
||||
\ 'command_callback': 'ale_linters#graphql#gqlint#GetCommand', |
||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning', |
||||
\}) |
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@ |
||||
if exists("b:current_syntax") |
||||
finish |
||||
endif |
||||
|
||||
syn sync fromstart |
||||
syn spell notoplevel |
||||
|
||||
syn include @fugitiveDiff syntax/diff.vim |
||||
|
||||
syn match fugitiveHeader /^[A-Z][a-z][^:]*:/ nextgroup=fugitiveHash,fugitiveSymbolicRef skipwhite |
||||
|
||||
syn region fugitiveSection start=/^\%(.*(\d\+)$\)\@=/ contains=fugitiveHeading end=/^$\@=/ |
||||
syn match fugitiveHeading /^[A-Z][a-z][^:]*\ze (\d\+)$/ contains=fugitivePreposition contained nextgroup=fugitiveCount skipwhite |
||||
syn match fugitiveCount /(\d\+)/hs=s+1,he=e-1 contained |
||||
syn match fugitivePreposition /\<\%([io]nto\|from\|to\|Rebasing\%( detached\)\=\)\>/ transparent contained nextgroup=fugitiveHash,fugitiveSymbolicRef skipwhite |
||||
|
||||
syn match fugitiveInstruction /^\l\l\+\>/ contained containedin=fugitiveSection nextgroup=fugitiveHash skipwhite |
||||
syn match fugitiveDone /^done\>/ contained containedin=fugitiveSection nextgroup=fugitiveHash skipwhite |
||||
syn match fugitiveStop /^stop\>/ contained containedin=fugitiveSection nextgroup=fugitiveHash skipwhite |
||||
syn match fugitiveModifier /^[MADRCU?]\{1,2} / contained containedin=fugitiveSection |
||||
syn match FugitiveSymbolicRef /\.\@!\%(\.\.\@!\|[^[:space:][:cntrl:]\:.]\)\+\.\@<!/ contained |
||||
syn match fugitiveHash /^\x\{4,\}\>/ contained containedin=fugitiveSection |
||||
syn match fugitiveHash /\<\x\{4,\}\>/ contained |
||||
|
||||
syn region fugitiveHunk start=/^\%(@@ -\)\@=/ end=/^\%([A-Za-z?@]\|$\)\@=/ contains=@fugitiveDiff containedin=fugitiveSection fold |
||||
|
||||
hi def link fugitiveHeader Label |
||||
hi def link fugitiveHeading PreProc |
||||
hi def link fugitiveModifier Type |
||||
hi def link fugitiveInstruction Type |
||||
hi def link fugitiveStop Function |
||||
hi def link fugitiveHash Identifier |
||||
hi def link fugitiveSymbolicRef Function |
||||
hi def link fugitiveCount Number |
||||
|
||||
let b:current_syntax = "fugitive" |
@ -1,2 +1,5 @@ |
||||
.local/ |
||||
.cache/ |
||||
.dlv/ |
||||
.git/ |
||||
.viminfo |
||||
|