-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error reporting #40
Comments
Just commenting to highlight for passers by that we've previously talked a little about this on Discord and I totally agree. Will be looking into this soon I hope! (lots to do, picking and choosing my battles carefully!) |
🤔 I don't think I have enough information to go on here, I can't really make any guesses. First of all, are you on a stable release or You could also try removing |
First off, it was late when I posted that, so I want to reiterate that this is almost certainly an issue on my config or with the fact that I'm using windows. My question was more about how I might get some more useful debug information out of the system. Seems like neovim just eats the relevant information when getting errors from lua. I'm motivated to get my system working because I think the project is really promising :) Aniseed is great I have tried with both develop and master branches. And I have rebuilt the lua from scratch by deleting the lua folder and having nvim rebuild, with no luck... Is there a way to force aniseed to use the above aniseed.traceback on a temporary basis? |
For some extra context, I reverted my config changes to the previous stable state and I still have issues. So I'm thinking there is something sticking around. I tried removing my nvim-data folder so that it is built from scratch with no luck. Is it possible that there is some other scripts/files sticking around somewhere that aniseed loads other than what is stored in the .config (actually appdata/local/nvim on windows) folder or the nvim-data folder? |
Ok I've figured out some more details. The issue seems to be windows specific and is unrelated to this issue. Sorry to hijack. I will create a new issue |
Fennel provides fennel.traceback, which can provide more ergonomic, readable and pleasing error messages. This is already being used in aniseed.eval, where the errors will be printed nicely.
When using aniseed for the vim configuration however, errors don't run through traceback, thus showing rather ugly and unhelpful lua error messages.
Wrapping the configuration in an xpcall that defers errors to fennels traceback handler should be pretty simple to implement, and would already drastically improve the experience of configuring vim in fennel.
This would still not affect any deferred execution, and thus wouldn't affect anything that's called on keybinds, autocmds, or passed as callbacks to other functions. This could be improved in several ways:
debug.traceback
, but from what I can tell that's not what is being used here (although I can't be sure, haven't looked into it). At least from my primitive tests, just overriding that function changed nothing.The text was updated successfully, but these errors were encountered: