Skip to content
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

consistent error handling for "frontend" functions #2216

Open
Conni2461 opened this issue Oct 31, 2022 · 1 comment · May be fixed by #2225
Open

consistent error handling for "frontend" functions #2216

Conni2461 opened this issue Oct 31, 2022 · 1 comment · May be fixed by #2225
Assignees
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@Conni2461
Copy link
Member

Like we should do error everywhere in every single frontend function and then have a no_error option, which defaults to false.

If this option is set, we will pcall the frontend function and if not ok, call vim.notify with the message.

Option should behave like all conf, opts options and should be overridable on a local level.

Option name is still open for debate.

@Conni2461 Conni2461 added the enhancement Enhancement to performance, inner workings or existent features label Oct 31, 2022
@Conni2461 Conni2461 self-assigned this Oct 31, 2022
@Conni2461 Conni2461 linked a pull request Nov 6, 2022 that will close this issue
1 task
@Conni2461
Copy link
Member Author

#2225 does implement config value / option error_mode with the following values "modes":

  • "lua" (default, because current behavior)
  • "notify"
  • "silent"

Telescope git_files error_mode=notify or :lua require("telescope.builtin").git_files { error_mode = "notify" } or configure it in the default table in telescope.setup

feedback is appreciated.

Edit: Its not done yet, because i have to go over all builtins and make error handling consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant