lualine and bufferline
This commit is contained in:
@ -18,13 +18,59 @@ return {
|
|||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
require("bufferline").setup({
|
require("bufferline").setup({
|
||||||
options = {
|
options = {
|
||||||
|
-- separator_style = "slope",
|
||||||
|
separator_style = "slant",
|
||||||
|
hover = {
|
||||||
|
enabled = true,
|
||||||
|
delay = 200,
|
||||||
|
reveal = { "close" },
|
||||||
|
},
|
||||||
|
indicator = {
|
||||||
|
-- icon = "▎", -- this should be omitted if indicator style is not 'icon'
|
||||||
|
style = "underline", -- | 'underline' | 'none',
|
||||||
|
},
|
||||||
|
offsets = {
|
||||||
|
{
|
||||||
|
filetype = "NvimTree",
|
||||||
|
text = "File Explorer",
|
||||||
|
highlight = "Directory",
|
||||||
|
separator = true, -- use a "true" to enable the default, or set your own character
|
||||||
|
},
|
||||||
|
},
|
||||||
mode = "tabs",
|
mode = "tabs",
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||||
local symbols = { error = " ", warning = " ", info = " ", hint = " " }
|
local symbols = { error = " ", warning = " ", info = " ", hint = " " }
|
||||||
local icon = symbols[level] or level
|
local icon = symbols[level] or level
|
||||||
return "" .. icon .. count
|
return "" .. icon .. count
|
||||||
end,
|
end,
|
||||||
|
custom_areas = {
|
||||||
|
left = function()
|
||||||
|
local result = {}
|
||||||
|
local seve = vim.diagnostic.severity
|
||||||
|
local error = #vim.diagnostic.get(0, { severity = seve.ERROR })
|
||||||
|
local warning = #vim.diagnostic.get(0, { severity = seve.WARN })
|
||||||
|
local info = #vim.diagnostic.get(0, { severity = seve.INFO })
|
||||||
|
local hint = #vim.diagnostic.get(0, { severity = seve.HINT })
|
||||||
|
|
||||||
|
if error ~= 0 then
|
||||||
|
table.insert(result, { text = " " .. error, fg = "#EC5241" })
|
||||||
|
end
|
||||||
|
|
||||||
|
if warning ~= 0 then
|
||||||
|
table.insert(result, { text = " " .. warning, fg = "#EFB839" })
|
||||||
|
end
|
||||||
|
|
||||||
|
if hint ~= 0 then
|
||||||
|
table.insert(result, { text = " " .. hint, fg = "#A3BA5E" })
|
||||||
|
end
|
||||||
|
|
||||||
|
if info ~= 0 then
|
||||||
|
table.insert(result, { text = " " .. info, fg = "#7EA9A7" })
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end,
|
||||||
|
},
|
||||||
max_name_length = 30,
|
max_name_length = 30,
|
||||||
truncate_name = false,
|
truncate_name = false,
|
||||||
show_close_icon = false,
|
show_close_icon = false,
|
||||||
|
@ -64,7 +64,7 @@ return {
|
|||||||
getLightbulb,
|
getLightbulb,
|
||||||
{
|
{
|
||||||
"filename",
|
"filename",
|
||||||
path = 1, -- 0 = just filename, 1 = relative path, 2 = absolute path
|
path = 4, -- 0 = just filename, 1 = relative path, 2 = absolute path
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
|
Reference in New Issue
Block a user