-
Notifications
You must be signed in to change notification settings - Fork 328
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
bug: i am getting this error, after updating to the latest version of lazy.nvim
#1124
Comments
haven't tried it but I'm quite sure this minimal repro won't work since neutrovim is sth I don't know |
|
well I expected it to be a config |
? why um its just the markdown preview nvim plugin which is the problem guy, and i do |
What's here? lua/NeutronVim/plugins/LSP/lsp.lua:182 |
diagflow.setup({
enable = function()
return vim.bo.filetype ~= "lazy"
end,
format = function(diagnostics)
return "[Diagnostics] "
.. diagnostics.message
.. " By: "
.. diagnostics.source
.. " Type: "
.. diagnostics.code
.. "." [182]
end,
scope = "line",
show_sign = true,
padding_right = 0,
update_event = { "DiagnosticChanged", "BufReadPost", "InsertEnter" },
})
|
Can you disable diagflow? IT seems to be casuing issues with lazy. Then check again and see if and what error you get |
I'm going to need a repro as is instructed in the issue template. |
still the same |
idk how to do that, i provided my lazy config coz its what i use, take this, its the current
|
I'm not going to debug your whole config for you. You first need to find the spec that's causing the issue. When you found it, add it in the repro: -- 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", "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
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here |
There's two different things here:
For now I want to know what's causing the second problem. I did some changes today that might be related, so I really need to know what's causing this |
where can i start debugging from? local function augroup(name)
return vim.api.nvim_create_augroup("NeutronVim" .. name, { clear = true })
end
local autocmd = vim.api.nvim_create_autocmd
autocmd("BufEnter", {
callback = function()
vim.opt.formatoptions:remove({ "c", "r", "o" })
end,
group = augroup("newline-comment"),
})
-- Jump to last known position
autocmd("BufRead", {
callback = function(opts)
autocmd("BufWinEnter", {
once = true,
buffer = opts.buf,
callback = function()
local ft = vim.bo[opts.buf].filetype
local last_known_line = vim.api.nvim_buf_get_mark(opts.buf, '"')[1]
if
not (ft:match("commit") and ft:match("rebase"))
and last_known_line > 1
and last_known_line <= vim.api.nvim_buf_line_count(opts.buf)
then
vim.api.nvim_feedkeys([[g`"]], "nx", false)
end
end,
})
end,
})
-- Check if we need to reload the file when it changed
autocmd({ "FocusGained", "TermClose", "TermLeave" }, {
group = augroup("checktime"),
command = "checktime",
})
-- resize splits if window got resized
autocmd({ "VimResized" }, {
group = augroup("resize_splits"),
callback = function()
vim.cmd("tabdo wincmd =")
end,
})
-- go to last loc when opening a buffer
autocmd("BufReadPost", {
group = augroup("last_loc"),
callback = function()
local mark = vim.api.nvim_buf_get_mark(0, '"')
local lcount = vim.api.nvim_buf_line_count(0)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, 0, mark)
end
end,
})
local disabled_built_ins = {
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"gzip",
"zip",
"zipPlugin",
"tar",
"tarPlugin",
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
"matchit",
}
for _, plugin in pairs(disabled_built_ins) do
vim.g["loaded_" .. plugin] = 1
end
-- close some filetypes with <q>
autocmd("FileType", {
group = augroup("close_with_q"),
pattern = {
"PlenaryTestPopup",
"help",
"Jaq",
"lir",
"DressingSelect",
"lspinfo",
"man",
"notify",
"qf",
"spectre_panel",
"startuptime",
"tsplayground",
},
callback = function(event)
vim.bo[event.buf].buflisted = false
vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = event.buf, silent = true })
end,
})
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = "*",
})
-- wrap and check for spell in text filetypes
autocmd("FileType", {
group = augroup("wrap_spell"),
pattern = { "gitcommit", "markdown" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})
-- Auto create dir when saving a file, in case some intermediate directory does not exist
autocmd({ "BufWritePre" }, {
group = augroup("auto_create_dir"),
callback = function(event)
local file = vim.loop.fs_realpath(event.match) or event.match
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
|
you start by removing by some of the "plugin sections" (e.g editor etc) until you can get it down to a single one |
that too after |
What @max397574 described is the way to go. |
yeah ok that's gonna take a fckin lot of time |
Maintaining opensource projects takes a lot of fcking time. |
👍🏻 +1, |
That's exactly what I want to find out. But I have no idea how that specific error can even happen. |
did ya check the vid, did u get something from it? |
I can reproduce it in the meantime and know what's causing this. Will work on a fix |
what was this actually? |
I'm still experiencing this error. -- 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", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{
"akinsho/bufferline.nvim",
event = "VeryLazy",
keys = {
-- Buffer navigation.
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Previous buffer" },
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
},
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here |
@MariaSolOs fixed! |
@folke wonderful. As usual, it takes me longer to fill out the repro template than you fixing it ;) |
thanks for the repro.lua, i wasnt able to get it actually |
a general doubt, how do u setup ur github actions for adding a release every time u push, i ain't able to pull it off...? |
It's in my github workflow ci.yml script |
yeah but didnt understand how to edit it name: CI
on:
push:
pull_request:
jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Neovim
shell: bash
run: |
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Run Tests
run: |
nvim --version
[ ! -d tests ] && exit 0
nvim --headless -u tests/init.lua -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/init.lua', sequential = true}"
docs:
runs-on: ubuntu-latest
needs: tests
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: NeutronVim
version: "Neovim >= 0.8.0"
demojify: true
treesitter: true
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore(build): auto-generate vimdoc"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
release:
name: release
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
- tests
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: simple
package-name: NeutronVim
extra-files: |
lua/NeutronVim/lua/lazy.lua
- uses: actions/checkout@v3
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "Last Stable Release"
git push origin stable |
sorry, but what do you expect me to do about that? |
and yeah its fixed now, so this issue is perfectly closed |
hah yes ofc sorry |
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1693350652
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Operating system/version
Arch-Linux
Describe the bug
snip 1:
snip 2:
snip 3:
idk how i m getting them,
there's this plugin called
markdown-preview.nvim
which has this can't update error #612 so if that is the problematic guy over here idk...Steps To Reproduce
idk, i just updated to lazy, though i noticed that:
BufReadPost
, i.e., entering a new file or buffer, i openLazy float
, and do theU
key for updating all the plugins, i get the status failed for thatmarkdown-preview.nvim
plugin, and i do<q>
, i get thesnip 1
, then as i press any key, i getsnip 2
andsnip 3
simultaneouslyExpected Behavior
there should not be any error...
i uninstalled the plugin and it runs fine but, any new update and it gives me that again idk why
plugin config:
Repro
The text was updated successfully, but these errors were encountered: