Closed daUnknownCoder closed 1 year ago
haven't tried it but I'm quite sure this minimal repro won't work since neutrovim is sth I don't know
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 but the repro still won't work
well I expected it to be a config but the repro still won't work
? why um its just the markdown preview nvim plugin which is the problem guy, and i do x
and then I
and it works fine but the author pushes almost everyday so it aint feasible to do x and I everytime he pushes some update i have also uploaded my markdown preview config...
What's here? lua/NeutronVim/plugins/LSP/lsp.lua:182
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" },
})
got something new ig :
https://github.com/folke/lazy.nvim/assets/84800625/9c126727-4d8f-494c-9aa5-0022337cebd2
check this vid, idk what is happenin
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. Impossible to debug this way, since I can't reproduce it.
Can you disable diagflow? IT seems to be casuing issues with lazy. Then check again and see if and what error you get
still the same
I'm going to need a repro as is instructed in the issue template. Impossible to debug this way, since I can't reproduce it.
idk how to do that, i provided my lazy config coz its what i use, take this, its the current NeutronVim
file-tree
.
βββ init.lua
βββ lazy-lock.json
βββ lua
βΒ Β βββ NeutronVim
βΒ Β βββ core
βΒ Β βΒ Β βββ icons.lua
βΒ Β βΒ Β βββ init.lua
βΒ Β βΒ Β βββ opts.lua
βΒ Β βΒ Β βββ remaps.lua
βΒ Β βββ lazy.lua
βΒ Β βββ plugins
βΒ Β βββ Autocompletion
βΒ Β βΒ Β βββ cmp.lua
βΒ Β βββ Debugging
βΒ Β βΒ Β βββ nvim-dap.lua
βΒ Β βββ File-Management
βΒ Β βΒ Β βββ harpoon.lua
βΒ Β βΒ Β βββ nvim-tree.lua
βΒ Β βΒ Β βββ oil.lua
βΒ Β βΒ Β βββ telescope.lua
βΒ Β βββ Formatting
βΒ Β βΒ Β βββ formatting.lua
βΒ Β βββ Git-Integration
βΒ Β βΒ Β βββ git.lua
βΒ Β βββ Linting
βΒ Β βΒ Β βββ linting.lua
βΒ Β βββ LSP
βΒ Β βΒ Β βββ fidget.lua
βΒ Β βΒ Β βββ lsp.lua
βΒ Β βΒ Β βββ mason.lua
βΒ Β βββ Terminal
βΒ Β βΒ Β βββ toggleterm.lua
βΒ Β βββ UI
βΒ Β βΒ Β βββ alpha.lua
βΒ Β βΒ Β βββ barbecue.lua
βΒ Β βΒ Β βββ colorscheme.lua
βΒ Β βΒ Β βββ foldings.lua
βΒ Β βΒ Β βββ lualine.lua
βΒ Β βΒ Β βββ noice.lua
βΒ Β βΒ Β βββ notify.lua
βΒ Β βββ Utils
βΒ Β βββ flash.lua
βΒ Β βββ indents_delims.lua
βΒ Β βββ miscellaneous.lua
βΒ Β βββ treesitter.lua
βΒ Β βββ which-key.lua
βββ README.md
15 directories, 33 files
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? theres some cursorhold autocmd also, these are my autocmds :
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 and then you start removing plugins and if you know which plugins are causing the issues you can copy them into the template and if they have rly big setups you can try to make those smaller as well
* you're getting errors when opening lazy
I did some changes today that might be related, so I really need to know what's causing this
that too after BufReadPost
, after actually BufWritePost
What @max397574 described is the way to go. So start with disabling the imports and check which one is causing the issue. Then the rest
yeah ok that's gonna take a fckin lot of time
Maintaining opensource projects takes a lot of fcking time.
Maintaining opensource projects takes a lot of fcking time.
ππ» +1,
...share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/init.lua:95: bad argument #1 to 'ipairs' (table expected, got string)
btw whats this?
That's exactly what I want to find out. One of your plugin specs is causing that due to some changes I did this morning.
But I have no idea how that specific error can even happen.
That's exactly what I want to find out. One of your plugin specs is causing that due to some changes I did this morning.
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
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.
@folke here's a minimal config. Paste it in repro.lua
, run nvim -u repro.lua repro.lua
and then run :Lazy reload bufferline.nvim
.
-- 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 ;)
I'm still experiencing this error. @folke here's a minimal config. Paste it in
repro.lua
, runnvim -u repro.lua repro.lua
and then run:Lazy reload bufferline.nvim
.
thanks for the repro.lua, i wasnt able to get it actually
@MariaSolOs fixed!
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
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? Read the docs. You'll figure it out.
@MariaSolOs fixed!
and yeah its fixed now, so this issue is perfectly closed
sorry, but what do you expect me to do about that? Read the docs. You'll figure it out.
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