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

feat: nvim-lint support #3

Open
chemio9 opened this issue Dec 14, 2024 · 2 comments
Open

feat: nvim-lint support #3

chemio9 opened this issue Dec 14, 2024 · 2 comments

Comments

@chemio9
Copy link
Owner

chemio9 commented Dec 14, 2024

Maybe we need another way to specify project-specific linters and formatters config?

reference: Github action lint: noahlias/nvim/lua/config/plugins/linting.lua

Thanks @noahlias from telegram nvim_zh group!

@chemio9
Copy link
Owner Author

chemio9 commented Dec 14, 2024

Mason.nvim could be integrated with mason-nvim-lint.

@chemio9
Copy link
Owner Author

chemio9 commented Dec 20, 2024

For golang, cc: #5 there are quite a few tools to setup, as recommended in the official Go extension for VSCode.

Here is some code copied from the extension's source code.

const allToolsInformation = {
  // ...

  // TODO(github.com/golang/vscode-go/issues/189): consider disabling lint when gopls is turned on.
  "golint": {
    name: "golint",
    importPath: "golang.org/x/lint/golint",
    modulePath: "golang.org/x/lint",
    replacedByGopls: false,
    isImportant: false,
    description: "Linter",
    minimumGoVersion: semver2.coerce("1.9")
  },
  "staticcheck": {
    name: "staticcheck",
    importPath: "honnef.co/go/tools/cmd/staticcheck",
    modulePath: "honnef.co/go/tools",
    replacedByGopls: false,
    isImportant: true,
    description: "Linter"
  },
  "golangci-lint": {
    name: "golangci-lint",
    importPath: "github.com/golangci/golangci-lint/cmd/golangci-lint",
    modulePath: "github.com/golangci/golangci-lint",
    replacedByGopls: false,
    isImportant: true,
    description: "Linter",
    minimumGoVersion: semver2.coerce("1.20")
  },
  "revive": {
    name: "revive",
    importPath: "github.com/mgechev/revive",
    modulePath: "github.com/mgechev/revive",
    isImportant: true,
    description: "Linter",
    defaultVersion: "v1.3.9"
  }

  // ...
}

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

No branches or pull requests

1 participant