jay-babu / mason-null-ls.nvim

GNU Affero General Public License v3.0
549 stars 22 forks source link

unsuccessful `ensure_installed` installation fails **silently** #103

Closed zahimeen closed 4 months ago

zahimeen commented 4 months ago
require("mason-null-ls").setup({
    ensure_installed = { "stylua" },
})

in this example, stylua needs unzip as an available command to install. unzip isnt in system path currently.

when you open nvim, [mason-null-ls] installing stylua is in cmdline. the installation failed in the background, but no response. (ig this is what you call "silent")

issue?

i have no idea if it installed, or didnt + i dont know why it failed

idk its not really an issue (more of an enhancement), but giving feedback to an error saves you from going into mason manually and having to find the error there.

plus, you could be really confused at why something that is supposed to be installed doesnt exist.

anyways, thx for this plugin, good stuff :)

jay-babu commented 4 months ago

The install failed with mason.nvim. You probably want to whatever message to come from there as it will apply across all plugins that utilize mason

zahimeen commented 4 months ago

let me clarify, what im looking for is at least a message that would say "installation failed" or something of the sorts. for a seamless setup (as i assume this plugin was made for), it is best to provide some sort of feedback for any errors.

having to always look at mason.nvim for why an error occured is simply a hassle.

maybe take the error that you would get in mason.nvim, and display it in the cmdline.

ill try and see if i can implement this myself and make a pull request in the near future.

jay-babu commented 4 months ago

https://github.com/jay-babu/mason-null-ls.nvim/blob/main/lua/mason-null-ls/ensure_installed.lua#L36-L38

can you see if you add an else here and logged something, is it working correctly for you?

jay-babu commented 4 months ago

https://github.com/williamboman/mason.nvim/tree/main

you can see in mason.nvim, they have a log_level. i am curious if you set that to info, the error message would get logged out correctly. https://github.com/williamboman/mason.nvim/tree/main

jay-babu commented 4 months ago

thank you for the PR!