-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Cursor position outside buffer, in function 'nvim_win_set_cursor' #1182
Comments
Hi :) I tried to reproduce this, but couldn't :/ |
type Here is a minimal config: -- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- add any other plugins here
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-telescope/telescope-bibtex.nvim" },
config = function()
local telescope = require("telescope")
telescope.setup({ extensions = { bibtex = { format = "plain", context = true } } })
telescope.load_extension("bibtex")
end,
},
{
"L3MON4D3/LuaSnip",
config = function()
local ls = require("luasnip")
ls.setup({
exit_roots = false,
update_events = "TextChanged,TextChangedI",
delete_check_events = "TextChanged",
})
local s = ls.snippet
local i = ls.insert_node
local fmta = require("luasnip.extras.fmt").fmta
local events = require("luasnip.util.events")
ls.add_snippets("tex", {
s({ trig = "cf" }, fmta([[\cite[<>]{<>}<>]], { i(1), i(2), i(0) }), {
callbacks = {
[2] = {
[events.enter] = function()
require("telescope").extensions.bibtex.bibtex()
end,
},
},
}),
}, { key = "tex" })
vim.keymap.set("i", "<C-k>", function()
if ls.expandable() then
ls.expand()
end
end, { desc = "LuaSnip Expand" })
vim.keymap.set({ "i", "s" }, "<C-l>", function()
if ls.locally_jumpable(1) then
ls.jump(1)
end
end, { desc = "LuaSnip Forward Jump" })
end,
},
{ "nvim-lua/plenary.nvim" },
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here And you may test with the following files, saving as \documentclass{article}
\usepackage{biblatex}
\addbibresource{minimal.bib}
\begin{document}
\end{document} @article{birkar2010existencea,
title = {Existence of Minimal Models for Varieties of Log General Type},
author = {Birkar, Caucher and Cascini, Paolo and Hacon, Christopher D. and McKernan, James},
date = {2010-04},
journaltitle = {Journal of the American Mathematical Society},
shortjournal = {J. Amer. Math. Soc.},
volume = {23},
number = {2},
pages = {405--468}
} |
@L3MON4D3 could you reproduce this error? |
Hey, I couldn't look into this until now, sorry to keep you waiting. I think we should fix this, and it would actually be desirable, since a fix to this would include some other things I've wanted to tackle for some time, but I don't think I'll have time to do it soon :( Until then, you can simply PS: Thank you for the minimal config, that was a pleasure to work with :D |
thanks for the prompt response and the workaround. |
will occasionally get this error when used with nvim-cmp. |
I got the error msg as below when using a snippet with callbacks
By testing, it is caused by commit
0a4e55701720a111569cadc211b3642b96d7991d
.snippet is given as
The text was updated successfully, but these errors were encountered: