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.77k stars 191 forks source link

get_running() not displaying any info #543

Closed mairs8 closed 4 months ago

mairs8 commented 4 months ago

i have added the below keybind. when i activate it, nothing happens.

vim.keymap.set("n", "<leader>x", function() require("lint").get_running() end, { desc = "get running linters for current buffer" })

I am pretty sure that my linters are running since ConformInfo returns:

Formatters for this buffer: LSP: kotlin_language_server ktlint ready (kotlin) /nix/store/0ladyg0hhsims66vrdqwfpia9whn98wb-ktlint-1.1.0/bin/ktlint

If there is something wrong in my setup and there are no linters connected, shouldn't the get_running() notify that there are 'no linters' or some other type of notifcation to the user signalling it is not working? At the moment it seems to display nothing in these cases which is not helpful to the user.

mfussenegger commented 4 months ago

get_running only shows the currently running linters. If they're fast you won't see any output unless you run it immediately after calling try_lint.

shouldn't the get_running() notify that there are 'no linters' or some other type of notifcation to the user signalling it is not working?

If that's what you want you can add a fallback if the result is empty.