Skip to content
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

No maker should be enabled by default. #2515

Open
ByLiZhao opened this issue Nov 27, 2020 · 9 comments
Open

No maker should be enabled by default. #2515

ByLiZhao opened this issue Nov 27, 2020 · 9 comments

Comments

@ByLiZhao
Copy link

Some makers are enabled by default in Noemake. This means they will be running even if the user does not expect it. Some of these linters are buggy, polluting the user's location lists with false positive of warnings, even error messages from the linters themselves. The user is often left no option but modifying his vimrc file to explicitly disable them. Forcing the user to disable something he may have not heard of doesn't seem right.

@blueyed
Copy link
Member

blueyed commented Nov 30, 2020

Good point.
However, changing this is not trivial, given that often users are required to enable makers then when it worked out of the box before.
The general idea is that installed makers should be used if it seems sensible by default.

But I can see that especially with C files this is not the case, and often you get warnings from clang when headers are not configured / picked up properly etc.
Do you have specific filetypes/makers where this is problematic for you?

@ByLiZhao
Copy link
Author

ByLiZhao commented Dec 1, 2020

Do you have specific filetypes/makers where this is problematic for you?

Yes. The other day when I opened a latex file with vim, the maker called lacheck spit dozens of warnings into the location list. None of these warnings is helpful. I didn't know that I installed lacheck at the time, because it is installed as part of TexLive installation. I have been using TexLive and Neomake for a long time, it was the first time that I noticed the existence of lacheck.

@blueyed
Copy link
Member

blueyed commented Dec 1, 2020

Do you have some example output for what is not considered useful?

lacheck was added in 2ee1962. In 4b38e73 only either chktex or lacheck would be used, but it was changed in 0e4d2c0 already then (likely due to a misunderstanding in #50 (comment), #50).
/cc @natemara what do you think?

@lilymara-onesignal
Copy link

I have not used this tool in years.

@blueyed
Copy link
Member

blueyed commented Dec 1, 2020

@nate-onesignal I see, sorry for the noise then - maybe you can still say something about using lacheck by default or not, and how useful it is in general?

@ChasingZenith
Copy link

As for latex, I agree that no makers should be enabled by default.

Many issues have been raised before for latex filetype like #243 #3470 in SpaceVim

I think lacheck and chtex output too many irritating errors and nobody might need it unless some very good filters were used. Since lacheck and chtex are just some checkers for latex files, they do not compile the latex source file. They are just software that analyzes it, so they make many mistakes. Even if it output an error, the compilation by latexmk can succeed (in 99% cases).

rubber is not installed by default if we only install TexLive, so in fact, it does not work out-of-box.

proselint is a natural language analysis tool that also needs to be installed manually, which is not necessary for LaTeX compilations.

I think everyone who writes latex in vim will use some other plugins like vimtex which also provides a compilation function and a quickfix windows by parsing the LaTeX compiler output which gives necessary.

My workaround now is to use

let b:neomake_tex_enabled_makers = []

@blueyed
Copy link
Member

blueyed commented Dec 20, 2020

Thanks for the feedback!
I've created #2520 to not use "chktex" and "lacheck" by default.
Not sure about rubber/rubberinfo (what does it do?), but e.g. proselint should get used as with "mail" files, but also not sure about it really.

let b:neomake_tex_enabled_makers = []

That's good, and something I also use with "c" files IIRC by default.
Therefore maybe using it by default here really makes more sense?

@blueyed
Copy link
Member

blueyed commented May 17, 2021

Maybe there could/should be a global setting to enable/disable suggested default makers (which could/should still get revisited/improved in general), but would allow to easily have an opt-in-only situation, which is what the issue is about initially.

@kflu
Copy link

kflu commented Aug 25, 2021

I also need to selectively enable certain makers (based on filetype in my case). Here's the only approach I can make it work:

function s:ConfigureNeomakeOnBufEnter()
    NeomakeDisableBuffer
    if &filetype == "sh"
        NeomakeEnableBuffer
    endif
endfunction
autocmd BufEnter * call s:ConfigureNeomakeOnBufEnter()
call neomake#configure#automake('nrwi', 500)

Basically, on buffer enter, disable neomake by default. Then based on certain condition, enable it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants