AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.16k stars 236 forks source link

feat(go): Add golangcilint as default linter #1213

Closed shivanthzen closed 1 week ago

shivanthzen commented 1 week ago

📑 Description

The PR adds golangcilint as the default linter for go.pack. Currently no linters as part for the pack.

ℹ Additional Information

github-actions[bot] commented 1 week ago

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

shivanthzen commented 1 week ago

Thanks for the revision LGTM.

zedeus commented 1 week ago

For me it doesn't get updated in real-time unlike gopls which already uses e.g. staticcheck for linting. It results in both lingering and duplicated warnings for me: After save: image After satisfying the check, before saving: image

I'd like either of the following options:

mehalter commented 1 week ago

@zedeus yeah it might be better for this not to be a default is gopls already has linting. Then users can opt into it. If you open a PR to revert this then I will merge it

zedeus commented 1 week ago

@mehalter here you go: https://github.com/AstroNvim/astrocommunity/pull/1215

shivanthzen commented 1 week ago

The revert makes sense. Is A way to easily disable golangci_lint (not sure how to go about it, do I have to remove that element from the array in my configuration?) this a possbility right now in Astronvim ? Can I override pack configurations ? I only know of override.lua which is sort of per plugin configuration. @mehalter

mehalter commented 1 week ago

yeah you can revert the decision in your user configuration. You would just modify the configuration of the plugins. So go into the opts for nvim-lint for example and remove golangci_lint from the go filetype list

mehalter commented 1 week ago

you can add it anywhere in your plugins/ folder. It doesn't have to go in override.lua