85 lines
2.3 KiB
Lua
85 lines
2.3 KiB
Lua
-- an alternative might be:
|
|
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
local function breadcrumb()
|
|
local result = require 'nvim-treesitter'.statusline(
|
|
{
|
|
type_patterns = {
|
|
"class",
|
|
"impl",
|
|
"function",
|
|
"method",
|
|
"import",
|
|
"for",
|
|
"if",
|
|
"while",
|
|
"variable",
|
|
"comment",
|
|
},
|
|
separator = " ▶ "
|
|
}
|
|
)
|
|
if result == "" then
|
|
result = ' '
|
|
elseif result == nil then
|
|
result = ''
|
|
end
|
|
return result
|
|
end
|
|
|
|
require("lualine").setup {
|
|
options = {
|
|
icons_enabled = false,
|
|
theme = 'papercolor_light',
|
|
component_separators = {},
|
|
section_separators = {},
|
|
disabled_filetypes = {
|
|
statusline = {},
|
|
winbar = { "neo-tree" },
|
|
},
|
|
ignore_focus = {},
|
|
always_divide_middle = true,
|
|
globalstatus = false,
|
|
refresh = {
|
|
statusline = 1000,
|
|
tabline = 1000,
|
|
winbar = 1000,
|
|
}
|
|
},
|
|
sections = {
|
|
lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
|
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
|
lualine_c = {},
|
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
|
lualine_y = { 'filesize' },
|
|
lualine_z = { 'progress', 'location' }
|
|
},
|
|
inactive_sections = {
|
|
lualine_a = { { 'filename', path = 1, shorting_target = 50 } },
|
|
lualine_b = {},
|
|
lualine_c = {},
|
|
-- lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
|
lualine_x = {},
|
|
lualine_y = { 'filesize' },
|
|
lualine_z = { 'location' }
|
|
},
|
|
tabline = {},
|
|
winbar = {
|
|
lualine_a = {
|
|
{
|
|
breadcrumb,
|
|
color = { bg = '#2a2a2a', fg = '#cfcfcf' },
|
|
},
|
|
},
|
|
},
|
|
inactive_winbar = {
|
|
lualine_a = {
|
|
{
|
|
breadcrumb,
|
|
color = { bg = '#101010', fg = '#999999' },
|
|
draw_empty = true
|
|
}
|
|
},
|
|
},
|
|
extensions = {}
|
|
}
|