1 -- A blazing fast and easy to configure neovim statusline plugin written in pure lua.
2 -- https://github.com/nvim-lualine/lualine.nvim
7 --load = function(name)
8 -- vim.cmd.packadd("monokai-pro.nvim")
9 -- vim.cmd.packadd(name)
12 require("lualine").setup({
16 filetypes = { "snacks_picker_list", "snacks_picker_input" },
20 return vim.fn.fnamemodify(vim.fn.getcwd(), ":~")
29 lualine_c = { "filename" },
30 lualine_x = { "location" },
35 always_divide_middle = true,
36 component_separators = { left = "", right = "" },
39 refresh = { statusline = 200, tabline = 1000, winbar = 1000 },
40 section_separators = { left = "", right = "" },
41 theme = "github_dark_high_contrast",
42 --theme = "monokai-pro",
57 separator = { left = "", right = "" },
65 icon = { align = "left" },
69 path = 1, -- relative path from the cwd
70 symbols = { modified = " ", readonly = " " },
71 separator = { right = "" },
76 separator = { left = "", right = "" },
84 -- Same color values as the general color option can be used here.
85 added = "DiffAdd", -- Changes the diff's added color
86 modified = "DiffChange", -- Changes the diff's modified color
87 removed = "DiffDelete", -- Changes the diff's removed color you
89 symbols = { added = "+", modified = "~", removed = "-" }, -- Changes the diff symbols
90 separator = { right = "" },
97 local buf_ft = vim.bo.filetype
98 local excluded_buf_ft =
99 { toggleterm = true, NvimTree = true, ["neo-tree"] = true, TelescopePrompt = true }
101 if excluded_buf_ft[buf_ft] then
105 local bufnr = vim.api.nvim_get_current_buf()
106 local clients = vim.lsp.get_clients({ bufnr = bufnr })
108 if vim.tbl_isempty(clients) then
109 return "No Active LSP"
112 local active_clients = {}
113 for _, client in ipairs(clients) do
114 table.insert(active_clients, client.name)
117 return table.concat(active_clients, ", ")
120 separator = { left = "" },
124 sources = { "nvim_lsp", "nvim_diagnostic", "nvim_diagnostic", "vim_lsp", "coc" },
125 symbols = { error = " ", warn = " ", info = " ", hint = " " },
127 update_in_insert = false,
128 always_visible = false,
129 diagnostics_color = {
130 color_error = { fg = "red" },
131 color_warn = { fg = "yellow" },
132 color_info = { fg = "cyan" },
140 separator = { left = "", right = "" },
146 separator = { left = "" },
151 -- separator = { left = "" },
158 separator = { left = "", right = "" },
162 separator = { left = "" },
167 -- color = { fg = "black" },
169 -- unix = "", -- e712
170 -- dos = "", -- e70f
171 -- mac = "", -- e711
176 -- winbar = { lualine_c = { { "navic", draw_empty = true } } },