Skip to content

Commit

Permalink
fix(nvim): use bufferline only for tabs, also remove scope
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamHsieh committed Jan 3, 2025
1 parent a325224 commit db54636
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
1 change: 0 additions & 1 deletion config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"render-markdown.nvim": { "branch": "main", "commit": "ba6253d9673daf0cf394b87b2c2ecb7630944c7d" },
"scope.nvim": { "branch": "main", "commit": "932102696ead2b7ab9ff65017767b57e2722fdde" },
"smart-splits.nvim": { "branch": "master", "commit": "63d16fc6a8fa6864d00de99207943556b10676cb" },
"snacks.nvim": { "branch": "main", "commit": "98df370703b3c47a297988f3e55ce99628639590" },
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
Expand Down
27 changes: 3 additions & 24 deletions config/nvim/lua/plugins/bufferline.lua
Original file line number Diff line number Diff line change
@@ -1,45 +1,24 @@
local M = {
"akinsho/bufferline.nvim",
event = "LazyFile",
dependencies = {
{ "tiagovla/scope.nvim", config = true },
}
}

function M.config()
require("bufferline").setup {
options = {
mode = "tabs",
numbers = "none",
close_command = "Bdelete %d",
right_mouse_command = "Bdelete %d",
diagnostics = false,
diagnostics_update_in_insert = false,
offsets = { {
filetype = "NvimTree",
text = function ()
return "" .. vim.fn.strftime("%T")
end, padding = 0
} },
show_buffer_icons = true,
show_buffer_close_icons = true,
show_close_icon = false,
show_tab_indicators = true,
separator_style = "slant",
always_show_bufferline = true,
sort_by = "insert_after_current",
always_show_bufferline = false,
hover = {
enabled = true,
delay = 100,
reveal = { 'close' },
reveal = { "close" },
},
},
highlights = require("catppuccin.groups.integrations.bufferline").get(),
}

local timer = vim.loop.new_timer()
timer:start(1000, 1000, vim.schedule_wrap(function()
vim.cmd("redrawtabline")
end))
end

return M
2 changes: 0 additions & 2 deletions config/nvim/lua/plugins/session.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

local M = {
"Shatur/neovim-session-manager",
dependencies = "scope.nvim",
cmd = "SessionManager",
event = "LazyFile",
}
Expand Down Expand Up @@ -34,7 +33,6 @@ M.config = function()
group = group,
callback = function()
vim.cmd.ProjectRoot()
vim.cmd.ScopeSaveState()
require("session_manager").save_current_session()
end,
})
Expand Down

0 comments on commit db54636

Please sign in to comment.