• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 24th, 2023

help-circle
  • ash@lemmy.fmhy.mltoLinux@lemmy.mlChimera Linux
    link
    fedilink
    arrow-up
    14
    arrow-down
    2
    ·
    1 year ago

    Just use Alpine. Chimera uses Alpine’s package manager anyway. The only reason you havent heard about Alpine in this context is because they do not claim they are doing anything revolutionary, they just strive to make a great distro.




  • You can wrap the call in pcall, which is a lua builtin for catching errors, which would suppress the error and let you know if the command failed.

    You could for example do:

    local ok, res = pcall(vim.cmd.write)
    if not ok
    then
        vim.notify('write failed with: ' .. res)
    end
    

    There are both lua and vim functions for writing to files but I recommend to not use them in this scenario, they write to the file directly and dont trigger autocommands.

    I understand your frustration with no consitent error reporting and clear api, but I guess that’s the consequence of the entire history of vi and vim and trying to be backwards compatible.