-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider modifying ALE integration to use FindExecutable #14
Comments
I tried locally replacing this file: "https://github.com/w0rp/ale/blob/883978ece93bd19250d6d7e8b9659b48f23522e2/ale_linters/graphql/gqlint.vim" " Author: Michiel Westerbeek <[email protected]>
" Description: Linter for GraphQL Schemas
call ale#Set('graphql_gqlint_executable', 'gqlint')
call ale#Set('graphql_gqlint_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale_linters#graphql#gqlint#GetCommand(buffer) abort
return ale#path#BufferCdString(a:buffer)
\ . '%e'
\ . ' --reporter=simple %t'
endfunction
call ale#linter#Define('graphql', {
\ 'name': 'gqlint',
\ 'executable': {b -> ale#node#FindExecutable(b, 'graphql_gqlint', [
\ 'node_modules/.bin/gqlint',
\ ])},
\ 'command': function('ale_linters#graphql#gqlint#GetCommand'),
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\}) That worked for my use case |
Hey, thanks for investigating! Also, curious what rules you are using with gqlint! Is it working nicely for your project? |
@oatkiller @happylinks I realize this is an old issue but I'm facing the same one. I'd be ready to make a pull request, but I'm not so sure exactly how/where : to this repo or to ale directly ? How are linters imported into ale repo ? |
Probably both repo's, the file in this repo is mostly just to keep track of the latest code in the ale repo. |
ok, just for the record, in the end I won't actually make any PR as I moved from ALE to CoC and so far I'm happy with it. |
Thanks for making this tool
I'm using gqlint with a local installation (in my current JS project)
ALE is not able to find the executable, as the ALE integration expects
gqlint
to be available on the path.Would you consider allowing a change to the ALE integration to use
ale#node#FindExecutable
Other linters that are installed using
npm
frequently do this.Here are a few links showing configurations using
ale#node#FindExecutable
And here is the relevant source code:
https://github.com/w0rp/ale/blob/master/autoload/ale/node.vim#L10
In the mean time, I'm going to try modifying the plugin locally w/ that code to see if it works as I expect. Thanks
The text was updated successfully, but these errors were encountered: