Errors after removing harpoon shortcut files
levinotik opened this issue · 1 comments
levinotik commented
I had 4 or 5 files added to my harpoon list. After opening the quick menu, I selected a few files and removed them from harpoon. After doing that, I received the following error with harpoon-lualine:
Error executing vim.schedule lua callback: ...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:211: lualine: Failed to refresh statusline:
...me/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:429: Error executing lua: ...e/nvim/lazy/harpoon-lualine/lua/harpoon-lualine/init.lua:27: attempt to concatenate a nil value
stack traceback:
...e/nvim/lazy/harpoon-lualine/lua/harpoon-lualine/init.lua:27: in function 'update_status'
...l/share/nvim/lazy/lualine.nvim/lua/lualine/component.lua:273: in function 'draw'
...are/nvim/lazy/lualine.nvim/lua/lualine/utils/section.lua:26: in function 'draw_section'
...me/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:170: in function 'statusline'
...me/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:298: in function <...me/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:279>
[C]: in function 'nvim_win_call'
...me/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:429: in function 'refresh'
...me/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:524: in function <...me/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:523>
[C]: in function 'pcall'
...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:214: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
stack traceback:
[C]: in function 'error'
...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:211: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Not sure whether this is an issue with harpoon-lualine per se or some other issue with my config. Here's my harpoon.lua
:
local harpoon = require("harpoon")
harpoon:setup()
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
and here's my lualine.lua
:
require('lualine').setup {
options = {
theme = 'horizon',
icons_enabled = true,
},
sections = {
lualine_c = { { 'harpoon2',
icon = '♥',
indicators = { "1", "2", "3", "4" },
active_indicators = { "[1]", "[2]", "[3]", "[4]" },
}
},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
Anyhow, thanks for this great plugin. I appreciate any help you're able to provide!
letieu commented
Can you try update new version :Lazy update harpoon-lualine
and tell me if still see the error @levinotik