mirror of
https://github.com/jessebot/dot_files.git
synced 2025-10-01 01:48:43 +00:00
adding barbar, a tab line for nvim
This commit is contained in:
parent
b47e3a8c76
commit
a7d04b4f55
3 changed files with 139 additions and 12 deletions
|
@ -56,6 +56,9 @@ require('user.folding')
|
|||
-- syntax highlgihting for hex codes
|
||||
require('user.nvim-colorizer')
|
||||
|
||||
-- tab line at top of window for tabs when there's more than one tab :)
|
||||
require('user.barbar')
|
||||
|
||||
-- status line at bottom of window for cool file facts
|
||||
require('user.lualine')
|
||||
|
||||
|
|
|
@ -17,22 +17,18 @@ return require('packer').startup(function(use)
|
|||
-- Packer, our neovim plugin manager, can manage itself
|
||||
use {'wbthomason/packer.nvim'}
|
||||
|
||||
-- ------------ makes sure the nerdfont icons are available --------------
|
||||
use { 'nvim-tree/nvim-web-devicons' }
|
||||
|
||||
-- -------------------- startup screen for neovim ------------------------
|
||||
use {'glepnir/dashboard-nvim'}
|
||||
|
||||
-- quick session manager (requires :PackerCompile) I don't use this a lot
|
||||
--use({'glepnir/dbsession.nvim',
|
||||
-- event = 'BufRead',
|
||||
-- config = function() require('dbsession').setup({}) end
|
||||
--})
|
||||
|
||||
-- cute halloween dashboard for neovim start screen :3
|
||||
-- use {'folke/drop.nvim'}
|
||||
|
||||
-- -------------------------- status line --------------------------------
|
||||
-- may replace soon, because it is very crowded
|
||||
use {'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
|
||||
}
|
||||
|
||||
-- -------------------- floating window plugins --------------------------
|
||||
|
@ -40,8 +36,7 @@ return require('packer').startup(function(use)
|
|||
use {"numToStr/FTerm.nvim"}
|
||||
|
||||
-- floating window for k9s (k8s dashboard TUI)
|
||||
use {'hsalem7/nvim-k8s',
|
||||
commit = 'f216b1736e6fb41fdbca1af684d89551151b7e31'}
|
||||
use {'hsalem7/nvim-k8s'}
|
||||
|
||||
-- NeoVim UI toolkit that supports floating windows
|
||||
use {'MunifTanjim/nui.nvim'}
|
||||
|
@ -56,6 +51,9 @@ return require('packer').startup(function(use)
|
|||
-- ---------------- scroll bar for the right hand side -------------------
|
||||
use {"petertriho/nvim-scrollbar"}
|
||||
|
||||
-- ------------------------------ tab line -------------------------------
|
||||
use {'romgrk/barbar.nvim', requires = 'nvim-tree/nvim-web-devicons'}
|
||||
|
||||
-- ------------------------------ git ------------------------------------
|
||||
-- git plugin for running git commands with :git -- 'tpope/vim-fugitive'
|
||||
use {'tpope/vim-fugitive'}
|
||||
|
@ -134,8 +132,37 @@ return require('packer').startup(function(use)
|
|||
config = function()
|
||||
require("barbecue").setup({
|
||||
show_dirname = false,
|
||||
context_follow_icon_color = true
|
||||
})
|
||||
show_basename = false,
|
||||
context_follow_icon_color = true,
|
||||
kinds = {
|
||||
File = "",
|
||||
Module = "",
|
||||
Namespace = "",
|
||||
Package = "",
|
||||
Class = "",
|
||||
Method = "",
|
||||
Property = "",
|
||||
Field = "🌾",
|
||||
Constructor = "",
|
||||
Enum = "",
|
||||
Interface = "",
|
||||
Function = "",
|
||||
Variable = "",
|
||||
Constant = "",
|
||||
String = "",
|
||||
Number = "",
|
||||
Boolean = "",
|
||||
Array = "",
|
||||
Object = "",
|
||||
Key = "",
|
||||
Null = "",
|
||||
EnumMember = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
},
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
|
|
97
.config/nvim/lua/user/barbar.lua
Normal file
97
.config/nvim/lua/user/barbar.lua
Normal file
|
@ -0,0 +1,97 @@
|
|||
-- Set barbar's options
|
||||
require("bufferline").setup({
|
||||
-- Enable/disable animations
|
||||
animation = true,
|
||||
|
||||
-- Enable/disable auto-hiding the tab bar when there is a single buffer
|
||||
auto_hide = true,
|
||||
|
||||
-- Enable/disable current/total tabpages indicator (top right corner)
|
||||
tabpages = true,
|
||||
|
||||
-- Enable/disable close button
|
||||
closable = true,
|
||||
|
||||
-- Enables/disable clickable tabs
|
||||
-- - left-click: go to buffer
|
||||
-- - middle-click: delete buffer
|
||||
clickable = true,
|
||||
|
||||
-- Enables / disables diagnostic symbols
|
||||
diagnostics = {
|
||||
-- you can use a list
|
||||
{enabled = true, icon = 'ff'}, -- ERROR
|
||||
{enabled = false}, -- WARN
|
||||
{enabled = false}, -- INFO
|
||||
{enabled = true}, -- HINT
|
||||
|
||||
-- OR `vim.diagnostic.severity`
|
||||
[vim.diagnostic.severity.ERROR] = {enabled = true, icon = 'ff'},
|
||||
[vim.diagnostic.severity.WARN] = {enabled = false},
|
||||
[vim.diagnostic.severity.INFO] = {enabled = false},
|
||||
[vim.diagnostic.severity.HINT] = {enabled = true},
|
||||
},
|
||||
|
||||
-- Excludes buffers from the tabline
|
||||
-- exclude_ft = {'javascript'},
|
||||
-- exclude_name = {'package.json'},
|
||||
|
||||
-- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`.
|
||||
hide = {extensions = true, inactive = true},
|
||||
|
||||
-- Disable highlighting alternate buffers
|
||||
highlight_alternate = false,
|
||||
|
||||
-- Disable highlighting file icons in inactive buffers
|
||||
highlight_inactive_file_icons = false,
|
||||
|
||||
-- Enable highlighting visible buffers
|
||||
highlight_visible = true,
|
||||
|
||||
-- Enable/disable icons
|
||||
-- if set to 'numbers', will show buffer index in the tabline
|
||||
-- if set to 'both', will show buffer index and icons in the tabline
|
||||
icons = true,
|
||||
|
||||
-- If set, the icon color will follow its corresponding buffer
|
||||
-- highlight group. By default, the Buffer*Icon group is linked to the
|
||||
-- Buffer* group (see Highlighting below). Otherwise, it will take its
|
||||
-- default value as defined by devicons.
|
||||
icon_custom_colors = false,
|
||||
|
||||
-- Configure icons on the bufferline.
|
||||
icon_separator_active = '▎',
|
||||
icon_separator_inactive = '▎',
|
||||
icon_close_tab = '',
|
||||
icon_close_tab_modified = '●',
|
||||
icon_pinned = '',
|
||||
|
||||
-- If true, new buffers will be inserted at the start/end of the list.
|
||||
-- Default is to insert after current buffer.
|
||||
insert_at_end = false,
|
||||
insert_at_start = false,
|
||||
|
||||
-- Sets the maximum padding width with which to surround each tab
|
||||
maximum_padding = 1,
|
||||
|
||||
-- Sets the minimum padding width with which to surround each tab
|
||||
minimum_padding = 1,
|
||||
|
||||
-- Sets the maximum buffer name length.
|
||||
maximum_length = 30,
|
||||
|
||||
-- If set, the letters for each buffer in buffer-pick mode will be
|
||||
-- assigned based on their name. Otherwise or in case all letters are
|
||||
-- already assigned, the behavior is to assign letters in order of
|
||||
-- usability (see order below)
|
||||
semantic_letters = true,
|
||||
|
||||
-- New buffer letters are assigned in this order. This order is
|
||||
-- optimal for the qwerty keyboard layout but might need adjustement
|
||||
-- for other layouts.
|
||||
letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP',
|
||||
|
||||
-- Sets the name of unnamed buffers. By default format is "[Buffer X]"
|
||||
-- where X is the buffer number. But only a static string is accepted here.
|
||||
no_name_title = nil,
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue