Open dmfay opened 1 year ago
It took me a bit to replicate this because null-ls does indeed clean up the temp file when Neovim exits, but yes, we need to handle this case (and should make sure to also clean up on currently unhandled spawn errors).
For anyone who stumbles on this issue before I get around to fixing it: exiting Neovim will clean up any lingering temp file(s).
I meet the same error msg in selene
config, this is my config
null_ls.builtins.diagnostics.selene.with({
cwd = function(_)
-- https://github.com/Kampfkarren/selene/issues/339#issuecomment-1191992366
return vim.fs.dirname(
vim.fs.find({ "selene.toml" }, { upward = true, path = vim.api.nvim_buf_get_name(0) })[1]
) or vim.fn.expand("~/.config/selene/") -- fallback value
end,
}),
After I add a fallback selene config in ~/.config/selene/
or a specific selene config for project in project directory, the error disappear.
For any one encounter the same error in the future, you can check your source's config first.
FAQ
Issues
Neovim Version
NVIM v0.8.0-1210-gd367ed9b2
Dev Version?
Operating System
Ubuntu 22.04.1 LTS
Minimal Config
Installed null-ls and then sqlfluff through mason.nvim. I did check out the minimal config; I don't use packer and don't expect there's a config issue here, here's the setup.
Steps to Reproduce
Open a .sql file without sqlfluff on the PATH.
Reproducibility Check
minimal_init.lua
template and that my issue is reproducible by runningnvim --clean -u minimal_init.lua
and following the steps above.Expected Behavior
null-ls displays an error message that sqlfluff is not available and does nothing else.
Actual Behavior
null-ls displays an error message that sqlfluff is not available and also leaves a
.null-ls_814785_filename.sql
(numbers vary) copy of the file in the directory tree.Yes, this could be fixed by installing sqlfluff, but null-ls probably should clean up after itself :)
Debug Log
[WARN Thu Oct 20 18:02:09 2022] ...he/dein/.cache/init.vim/.dein/lua/null-ls/generators.lua:92: failed to run generator: ...u/.cache/dein/.cache/init.vim/.dein/lua/null-ls/loop.lua:165: command sqlfluff is not executable (make sure it's installed and on your $PATH)
Help
I'll dig into it more if I have time but can't promise anything.
Requirements