mfussenegger / nvim-lint

An asynchronous linter plugin for Neovim complementary to the built-in Language Server Protocol support.
GNU General Public License v3.0
1.94k stars 204 forks source link

Bug: plugin doesn't find buf tool #561

Closed emersonfbarros closed 6 months ago

emersonfbarros commented 6 months ago

I have the following keymap to trigger the linter

local lint = require 'lint'

vim.keymap.set('n', '<leader>cl', function()
    lint.try_lint()
    end, { desc = '[C]ode [L]int' })

lint.linters_by_ft = {
  proto = { 'buf' },
}

but in proto files when try lint with buf the following error occurs

image

for some reason nvim-lint can't find buf...

mfussenegger commented 6 months ago

buf is not listed in https://github.com/mfussenegger/nvim-lint?tab=readme-ov-file#available-linters - it doesn't exist.

martinbjeldbak commented 4 months ago

@emersonfbarros in case you haven't solve this yet, you most likely want to use buf_lint, which executes the buf binary

See source: https://github.com/mfussenegger/nvim-lint/blob/master/lua/lint/linters/buf_lint.lua

local lint = require 'lint'

vim.keymap.set('n', '<leader>cl', function()
    lint.try_lint()
    end, { desc = '[C]ode [L]int' })

lint.linters_by_ft = {
  proto = { 'buf_lint' },
}
emersonfbarros commented 4 months ago

@martinbjeldbak after search on the repo base i have find exactly the same. thanks for the help!