mirror of
https://github.com/amix/vimrc
synced 2025-07-09 10:45:00 +08:00
gitignore sources_non_forked_cache
This commit is contained in:
15
sources_non_forked/ale/ale_linters/objc/ccls.vim
Normal file
15
sources_non_forked/ale/ale_linters/objc/ccls.vim
Normal file
@ -0,0 +1,15 @@
|
||||
" Author: Ye Jingchen <ye.jingchen@gmail.com>, Ben Falconer <ben@falconers.me.uk>, jtalowell <jtalowell@protonmail.com>
|
||||
" Description: A language server for Objective-C
|
||||
|
||||
call ale#Set('objc_ccls_executable', 'ccls')
|
||||
call ale#Set('objc_ccls_init_options', {})
|
||||
call ale#Set('c_build_dir', '')
|
||||
|
||||
call ale#linter#Define('objc', {
|
||||
\ 'name': 'ccls',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#Var(b, 'objc_ccls_executable')},
|
||||
\ 'command': '%e',
|
||||
\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'),
|
||||
\ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'objc_ccls_init_options')},
|
||||
\})
|
23
sources_non_forked/ale/ale_linters/objc/clang.vim
Normal file
23
sources_non_forked/ale/ale_linters/objc/clang.vim
Normal file
@ -0,0 +1,23 @@
|
||||
" Author: Bang Lee <https://github.com/Qusic>
|
||||
" Description: clang linter for objc files
|
||||
|
||||
" Set this option to change the Clang options for warnings for ObjC.
|
||||
if !exists('g:ale_objc_clang_options')
|
||||
let g:ale_objc_clang_options = '-std=c11 -Wall'
|
||||
endif
|
||||
|
||||
function! ale_linters#objc#clang#GetCommand(buffer) abort
|
||||
" -iquote with the directory the file is in makes #include work for
|
||||
" headers in the same directory.
|
||||
return 'clang -S -x objective-c -fsyntax-only '
|
||||
\ . '-iquote %s:h'
|
||||
\ . ' ' . ale#Var(a:buffer, 'objc_clang_options') . ' -'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('objc', {
|
||||
\ 'name': 'clang',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable': 'clang',
|
||||
\ 'command': function('ale_linters#objc#clang#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
|
||||
\})
|
17
sources_non_forked/ale/ale_linters/objc/clangd.vim
Normal file
17
sources_non_forked/ale/ale_linters/objc/clangd.vim
Normal file
@ -0,0 +1,17 @@
|
||||
" Author: Andrey Melentyev <andrey.melentyev@protonmail.com>
|
||||
" Description: Clangd language server
|
||||
|
||||
call ale#Set('objc_clangd_executable', 'clangd')
|
||||
call ale#Set('objc_clangd_options', '')
|
||||
|
||||
function! ale_linters#objc#clangd#GetCommand(buffer) abort
|
||||
return '%e' . ale#Pad(ale#Var(a:buffer, 'objc_clangd_options'))
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('objc', {
|
||||
\ 'name': 'clangd',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#Var(b, 'objc_clangd_executable')},
|
||||
\ 'command': function('ale_linters#objc#clangd#GetCommand'),
|
||||
\ 'project_root': function('ale#c#FindProjectRoot'),
|
||||
\})
|
Reference in New Issue
Block a user