line.lua
3174 bytes
1require("lualine").setup({
2 options = {
3 icons_enabled = true,
4 theme = "gruvbox",
5 component_separators = { left = "", right = "" },
6 section_separators = { left = "", right = "" },
7 disabled_filetypes = {
8 statusline = {},
9 winbar = {},
10 },
11 ignore_focus = {},
12 always_divide_middle = true,
13 globalstatus = false,
14 refresh = {
15 statusline = 1000,
16 tabline = 1000,
17 winbar = 1000,
18 },
19 show_filename_only = false,
20 },
21 sections = {
22 lualine_a = { "mode" },
23 lualine_b = { "branch", "diff", "diagnostics" },
24 lualine_c = {
25 {
26 "filename",
27 file_status = true, -- Displays file status (readonly status, modified status)
28 newfile_status = false, -- Display new file status (new file means no write after created)
29 path = 1, -- 0: Just the filename
30 -- 1: Relative path
31 -- 2: Absolute path
32 -- 3: Absolute path, with tilde as the home directory
33 -- 4: Filename and parent dir, with tilde as the home directory
34
35 shorting_target = 40, -- Shortens path to leave 40 spaces in the window
36 -- for other components. (terrible name, any suggestions?)
37 symbols = {
38 modified = "[+]", -- Text to show when the file is modified.
39 readonly = "[-]", -- Text to show when the file is non-modifiable or readonly.
40 unnamed = "[No Name]", -- Text to show for unnamed buffers.
41 newfile = "[New]", -- Text to show for newly created file before first write
42 },
43 },
44 },
45 lualine_x = {
46 "filetype",
47 {
48 require("lazy.status").updates,
49 cond = require("lazy.status").has_updates,
50 color = { fg = "#ff9e64" },
51 },
52 },
53 lualine_y = { "progress" },
54 lualine_z = { "location" },
55 },
56 inactive_sections = {
57 lualine_a = {},
58 lualine_b = {},
59 lualine_c = { "filename" },
60 lualine_x = { "location" },
61 lualine_y = {},
62 lualine_z = {},
63 },
64 tabline = {},
65 winbar = {},
66 inactive_winbar = {},
67 extensions = {},
68})
69
70require("bufferline").setup({
71 options = {
72 mode = "buffers",
73 themable = true,
74 numbers = "ordinal",
75 indicator = {
76 icon = "▎", -- this should be omitted if indicator style is not 'icon'
77 style = "icon",
78 },
79 modified_icon = "●",
80 close_icon = "",
81 left_trunc_marker = "",
82 right_trunc_marker = "",
83 max_name_length = 24,
84 max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
85 truncate_names = true, -- whether or not tab names should be truncated
86 tab_size = 18,
87 diagnostics = "nvim_lsp",
88 color_icons = true,
89 show_buffer_icons = true,
90 show_buffer_close_icons = false,
91 -- show_close_icon = false,
92 -- show_tab_indicators = true | false,
93 -- show_duplicate_prefix = true | false, -- whether to show duplicate buffer prefix
94 persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
95 move_wraps_at_ends = false, -- whether or not the move command "wraps" at the first or last position
96 -- can also be a table containing 2 custom separators
97 -- [focused and unfocused]. eg: { '|', '|' }
98 -- separator_style = "slant" | "slope" | "thick" | "thin" | { 'any', 'any' },
99 -- enforce_regular_tabs = false | true,
100 always_show_bufferline = true,
101 hover = {
102 enabled = false,
103 },
104 },
105})