With a filetype like vader.vim or javascript.jsx the makers that are returned by neomake#GetEnabledMakers are only those that are present in all filetypes..
This causes issues like #272 and #492.
(I've just seen that there is a undocumented SupersetOf hook in makers, where e.g. jsx says "javascript" (https://github.com/neomake/neomake/blob/914609831b904f84f296826c2ad8f99d4bc7ce23/autoload/neomake/makers/ft/jsx.vim#L3-L5).
It seems to only be used for sorting the filetypes though (https://github.com/neomake/neomake/blob/914609831b904f84f296826c2ad8f99d4bc7ce23/autoload/neomake/utils.vim#L163-L175), and I think that is over-engineered: the order should be defined by the user (given the order in the &ft) - another issue.)
I could imagine the following fixes:
vader.vim that would just use the ones from vim. For javascript.jsx it would still use the union - but e.g. in the case of eslint that _should_ have worked before already. Maybe we can make use of the SupersetOf here?btw: there is no way to configure enabled makers for foo.bar explicitly currently, since you cannot specify g:neomake_foo.bar_enabled_makers (because of the dot in there).
From the brief look I've had at this, removing the filter() call on the list of enabled makers seems to give me the result I need, but I agree that there may be cases where we don't want all of the makers to run - not that I can think of any right now.
I believe that's how Syntactic does it.
I work on .js.es6.erb files that I have set up to have the filetype eruby.javascript.es6 (in this particular order) for (neo)snippet reasons.
I want to ESLint those files, but as @blueyed explained, I cannot do this unless eruby, javascript and es6 filetypes have the eslint maker. It does not make any sense to have an eslint maker for eruby though...
So here is the big hack I did for now:
function! Lint()
if &filetype =~ 'javascript'
Neomake eslint
else
Neomake
end
endfunction
augroup lint_events
autocmd!
autocmd BufWritePost * call Lint()
augroup end
Hopefully I remove this hack when/if this gets fixed.
Hi, any update on this ?
Thanks
I noticed it also makes invalid suggestions for setting up markers when running NeomakeInfo
NOTE: you can define g:neomake_javascript.jsx_enabled_makers to configure it (or b:neomake_javascript.jsx_enabled_makers).
I came across this with https://github.com/neomake/neomake/pull/980 - you might want to try it.
Filters have been removed for both GetEnabledMakers and GetMakers by now (and some tests have been added).
I consider this to be fixed / addressed - closing.
Please create a new issue (referring this one), if you still have problems in this regard.
Most helpful comment
Hi, any update on this ?
Thanks