You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have vim.o.mousemoveevent = true and eagle.nvim works, so I know it's not a setup issue of NeoVim itself.
My second issue is that even though I call setup(), it is not until I go into NeoTree -> Buffers that the plugin starts working; I have set lazy = false to no avail.
Now, I know the hover events are being called because I can generate a stacktrace if I change get_hex to anything non-callable, like get_hex2 after I go to NeoTree -> Buffers, then I hover over the tabs, I get a stacktrace showing the hover event is firing, so I don't know why I don't get LSP info on hover, can't drag tabs, or get the X close button to fill in when I move over it.
Any ideas?
return {
"willothy/nvim-cokeline",
lazy = false,
dependencies = {
"nvim-lua/plenary.nvim", -- Required for v0.4.0+
"nvim-tree/nvim-web-devicons", -- If you want devicons
"stevearc/resession.nvim", -- Optional, for persistent history
},
config = true,
init = function()
local is_picking_focus = require("cokeline.mappings").is_picking_focus
local is_picking_close = require("cokeline.mappings").is_picking_close
local get_hex = require("cokeline.hlgroups").get_hl_attr
local red = vim.g.terminal_color_1
local yellow = vim.g.terminal_color_3
require("cokeline").setup({
show_if_buffers_are_at_least = 1,
buffers = {
filter_valid = false,
filter_visible = false,
focus_on_delete = "prev",
new_buffers_position = "last",
delete_on_right_click = true,
},
mappings = {
cycle_prev_next = true,
disable_mouse = false,
},
history = {
enabled = true,
size = 2,
},
rendering = {
max_buffer_width = 999,
},
pick = {
use_filename = true,
letters = "asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERTYQP",
},
default_hl = {
fg = function(buffer)
return buffer.is_focused and get_hex("Normal", "fg") or get_hex("Comment", "fg")
end,
bg = function()
return get_hex("ColorColumn", "bg")
end,
},
components = {
{
text = function(buffer)
return (buffer.index ~= 1) and "▏" or ""
end,
},
{
text = " ",
},
{
text = function(buffer)
return (is_picking_focus() or is_picking_close()) and buffer.pick_letter .. " " or buffer.devicon.icon
end,
fg = function(buffer)
return (is_picking_focus() and yellow) or (is_picking_close() and red) or buffer.devicon.color
end,
italic = function()
return (is_picking_focus() or is_picking_close())
end,
bold = function()
return (is_picking_focus() or is_picking_close())
end,
},
{
text = " ",
},
{
text = function(buffer)
return buffer.filename .. " "
end,
bold = function(buffer)
return buffer.is_focused
end,
},
{
text = "",
on_click = function(_, _, _, _, buffer)
buffer:delete()
end,
},
{
text = " ",
},
},
fill_hl = "TabLineFill",
rhs = {},
tabs = {
placement = "left",
components = {},
},
sidebar = {
filetype = { "NvimTree", "neo-tree" },
components = {
{
text = function(buf)
return buf.filetype
end,
fg = yellow,
bg = function()
return get_hex("NvimTreeNormal", "bg")
end,
bold = true,
},
},
},
})
end,
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Thanks for the plugin!
I have
vim.o.mousemoveevent = true
and eagle.nvim works, so I know it's not a setup issue of NeoVim itself.My second issue is that even though I call
setup()
, it is not until I go into NeoTree -> Buffers that the plugin starts working; I have setlazy = false
to no avail.Now, I know the hover events are being called because I can generate a stacktrace if I change
get_hex
to anything non-callable, likeget_hex2
after I go to NeoTree -> Buffers, then I hover over the tabs, I get a stacktrace showing the hover event is firing, so I don't know why I don't get LSP info on hover, can't drag tabs, or get theX
close button to fill in when I move over it.Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions