mfussenegger/nvim-lint

Bug: plugin doesn't find buf tool

Closed this issue · 3 comments

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...

@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' },
}

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