summaryrefslogtreecommitdiff
path: root/ale_linters/hack/hack.vim
diff options
context:
space:
mode:
authorFred Emmott <fe@fb.com>2018-08-02 12:59:04 -0700
committerFred Emmott <fe@fb.com>2018-08-02 12:59:04 -0700
commitde6cd961a83674ef1a73d4c4e9a1b9ccc73ec941 (patch)
tree8edc9936acda0112e85669418e630a50df122276 /ale_linters/hack/hack.vim
parente6bd4373f9e5e875ee075c4bc416adfccbe2e89e (diff)
downloadale-de6cd961a83674ef1a73d4c4e9a1b9ccc73ec941.zip
Suggested changes
Diffstat (limited to 'ale_linters/hack/hack.vim')
-rw-r--r--ale_linters/hack/hack.vim13
1 files changed, 3 insertions, 10 deletions
diff --git a/ale_linters/hack/hack.vim b/ale_linters/hack/hack.vim
index 03c384a7..aea428cc 100644
--- a/ale_linters/hack/hack.vim
+++ b/ale_linters/hack/hack.vim
@@ -1,7 +1,7 @@
" Author: Fred Emmott <fe@fb.com>
" Description: Hack support via `hack lsp`
-call ale#Set('hack_hhclient_executable', 'hh_client')
+call ale#Set('hack_hack_executable', 'hh_client')
function! ale_linters#hack#hack#GetProjectRoot(buffer) abort
let l:hhconfig = ale#path#FindNearestFile(a:buffer, '.hhconfig')
@@ -10,20 +10,13 @@ function! ale_linters#hack#hack#GetProjectRoot(buffer) abort
endfunction
function! ale_linters#hack#hack#GetExecutable(buffer) abort
- return ale#Var(a:buffer, 'hack_hhclient_executable')
-endfunction
-
-
-function! ale_linters#hack#hack#GetCommand(buffer) abort
- let l:executable = ale_linters#hack#hack#GetExecutable(a:buffer)
-
- return ale#Escape(l:executable).' lsp --from vim-ale'
+ return ale#Var(a:buffer, 'hack_hack_executable')
endfunction
call ale#linter#Define('hack', {
\ 'name': 'hack',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#hack#hack#GetExecutable',
-\ 'command_callback': 'ale_linters#hack#hack#GetCommand',
+\ 'command': '%e lsp --from vim-ale',
\ 'project_root_callback': 'ale_linters#hack#hack#GetProjectRoot',
\})