-
Notifications
You must be signed in to change notification settings - Fork 7
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
TelescopePreviewerLoaded Error executing vim.schedule lua callback #12
Comments
I am having the same issue. The pull request supplied didn't quite fix the issue either. So far what seems to be working for me is vim.api.nvim_create_autocmd("User", {
pattern = "TelescopePreviewerLoaded",
callback = function(args)
---@type string
+ if args.data == nil then
+ return
+ end
local extension = args.data.bufname:match("%.(%w+)$")
if extension == "md" or extension == "tex" then
vim.wo.number = Config.rule_ui.previewer_line_number
vim.wo.wrap = Config.rule_ui.previewer_wrap
end
end,
}) |
In that case, we probably should do: if args.data == nil or args.data.bufname == nil then
return
end |
This PR also adds a check for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
actions-preview.nvim
is installed and the user callsrequire("actions-preview").code_actions()
, it triggersTelescopePreviewerLoaded
autocmd, but with a nilargs.data.bufname
. This causes an error whenargs.data.bufname
is parsed.Error message:
Fixed in PR #3.
The text was updated successfully, but these errors were encountered: