Closed gennaro-tedesco closed 1 month ago
i was trying to write a function to show active linters in lualine, and i have the same problem. I have shellcheck running on sh files, but the method get_running() returns an empty table.
I also tried passing the current buffer, but it still returns an empty table
Update: it's definitely a bug, as the function does actually returns the correct linters for few seconds after i edit a new file, but then it stop, and return nothing. I have no idea what could cause it
here's a recording about this (in the statusline uses the get_running()
function to get the linters. notice how it shows shellcheck
for a second and then it disappear
Screencast_20240520_161559.webm
Sounds like expected behavior
Sounds like expected behavior
seeing that this already got report as a bug at least twice, it's at the very least a strange behaviour. I can understand why it is like this, but it would be nice to be able to always know what linters are corrently active on the current buffer. That in my opinion would be generally more useful
Then use require("lint").linters_by_ft[vim.bo.filetype] or {}
I am trying to output the linters that are active upon each buffer and I seemingly cannot get
require("lint").get_running()
to return any result (although the linters are active and all works fine): see example belowhttps://github.com/mfussenegger/nvim-lint/assets/15387611/23b60368-0b13-4644-a45d-8b7357b1e30f
you can see that
ruff
is active as a linter, producing the expected output, however the methodget_running()
does not return anything: the same holds true for any other filetype and/or linter.Do I misunderstand how it is supposed to work or has any of the recent commits perhaps introduced a bug in said function (it should work, but it doesn't)?