mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -3,16 +3,6 @@
|
||||
|
||||
call ale#Set('puppet_languageserver_executable', 'puppet-languageserver')
|
||||
|
||||
function! ale_linters#puppet#languageserver#GetExecutable(buffer) abort
|
||||
return ale#Var(a:buffer, 'puppet_languageserver_executable')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#puppet#languageserver#GetCommand(buffer) abort
|
||||
let l:exe = ale#Escape(ale_linters#puppet#languageserver#GetExecutable(a:buffer))
|
||||
|
||||
return l:exe . ' --stdio'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#puppet#languageserver#GetProjectRoot(buffer) abort
|
||||
" Note: The metadata.json file is recommended for Puppet 4+ modules, but
|
||||
" there's no requirement to have it, so fall back to the other possible
|
||||
@ -38,8 +28,8 @@ endfunction
|
||||
call ale#linter#Define('puppet', {
|
||||
\ 'name': 'languageserver',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable_callback': 'ale_linters#puppet#languageserver#GetExecutable',
|
||||
\ 'command_callback': 'ale_linters#puppet#languageserver#GetCommand',
|
||||
\ 'executable_callback': ale#VarFunc('puppet_languageserver_executable'),
|
||||
\ 'command': '%e --stdio',
|
||||
\ 'language': 'puppet',
|
||||
\ 'project_root_callback': 'ale_linters#puppet#languageserver#GetProjectRoot',
|
||||
\})
|
||||
|
@ -1,26 +1,18 @@
|
||||
" Author: Alexander Olofsson <alexander.olofsson@liu.se>, Robert Flechtner <flechtner@chemmedia.de>
|
||||
" Description: puppet-lint for puppet files
|
||||
|
||||
let g:ale_puppet_puppetlint_executable =
|
||||
\ get(g:, 'ale_puppet_puppetlint_executable', 'puppet-lint')
|
||||
|
||||
let g:ale_puppet_puppetlint_options =
|
||||
\ get(g:, 'ale_puppet_puppetlint_options', '--no-autoloader_layout-check')
|
||||
|
||||
function! ale_linters#puppet#puppetlint#GetExecutable(buffer) abort
|
||||
return ale#Var(a:buffer, 'puppet_puppetlint_executable')
|
||||
endfunction
|
||||
call ale#Set('puppet_puppetlint_executable', 'puppet-lint')
|
||||
call ale#Set('puppet_puppetlint_options', '--no-autoloader_layout-check')
|
||||
|
||||
function! ale_linters#puppet#puppetlint#GetCommand(buffer) abort
|
||||
return ale_linters#puppet#puppetlint#GetExecutable(a:buffer)
|
||||
\ . ' ' . ale#Var(a:buffer, 'puppet_puppetlint_options')
|
||||
return '%e' . ale#Pad(ale#Var(a:buffer, 'puppet_puppetlint_options'))
|
||||
\ . ' --log-format "-:%{line}:%{column}: %{kind}: [%{check}] %{message}"'
|
||||
\ . ' %t'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('puppet', {
|
||||
\ 'name': 'puppetlint',
|
||||
\ 'executable_callback': 'ale_linters#puppet#puppetlint#GetExecutable',
|
||||
\ 'executable_callback': ale#VarFunc('puppet_puppetlint_executable'),
|
||||
\ 'command_callback': 'ale_linters#puppet#puppetlint#GetCommand',
|
||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||
\})
|
||||
|
Reference in New Issue
Block a user