tmux bufferline

This commit is contained in:
Vítor Duarte Buchweitz 2024-09-23 15:20:39 -03:00
parent b41769f156
commit 9c088e3cc6
No known key found for this signature in database
GPG Key ID: 9F266AE3B36B21F3
3 changed files with 71 additions and 1 deletions

View File

@ -84,6 +84,8 @@ I hope you enjoy your Neovim journey,
P.S. You can delete this when you're done too. It's your config now! :)
--]]
vim.opt.termguicolors = true
-- Set <space> as the leader key
-- See `:help mapleader`
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
@ -868,7 +870,7 @@ require('lazy').setup({
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
vim.cmd.colorscheme 'tokyonight-moon'
-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
@ -959,6 +961,8 @@ require('lazy').setup({
require 'kickstart.plugins.go',
require 'kickstart.plugins.trouble',
require 'kickstart.plugins.nvim-dap-virtual-text',
require 'kickstart.plugins.bufferline',
require 'kickstart.plugins.tmux',
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.

View File

@ -0,0 +1,59 @@
return {
{
'akinsho/bufferline.nvim',
version = '*',
requires = 'kyazdani42/nvim-web-devicons', -- certifique-se de que 'requires' esteja correto
config = function()
local bufferline = require 'bufferline' -- Ajuste aqui: defina 'bufferline' corretamente
bufferline.setup {
options = {
mode = 'buffers',
style_preset = 'default', -- 'default' é uma string aqui, sem necessidade do bufferline.style_preset
themable = true,
numbers = 'none',
close_command = 'bdelete! %d',
right_mouse_command = 'bdelete! %d',
left_mouse_command = 'buffer %d',
middle_mouse_command = nil,
indicator = {
icon = '',
style = 'icon',
},
hover = {
enabled = true,
delay = 200,
reveal = { 'close' },
},
buffer_close_icon = '󰅖',
modified_icon = '',
close_icon = '',
left_trunc_marker = '',
right_trunc_marker = '',
name_formatter = function(buf) -- altere ou mantenha conforme necessário
-- seu código de formatação aqui
end,
max_name_length = 18,
max_prefix_length = 15,
truncate_names = true,
tab_size = 18,
diagnostics = 'nvim_lsp',
diagnostics_indicator = function(count, level)
local icon = level:match 'error' and '' or ''
return ' ' .. icon .. count
end,
-- e assim por diante para as outras opções...
-- Coloque suas demais configurações aqui
},
}
-- Agora adicionamos os mapeamentos de teclas
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
map('n', '<leader>bp', ':BufferLinePick<CR>', opts)
map('n', '<leader>bc', ':BufferLinePickClose<CR>', opts)
map('n', '<A-.>', ':BufferLineCycleNext<CR>', { noremap = true, silent = true })
map('n', '<A-,>', ':BufferLineCyclePrev<CR>', { noremap = true, silent = true })
end,
},
}

View File

@ -0,0 +1,7 @@
return {
{
'christoomey/vim-tmux-navigator',
config = function() end,
},
}