1 -- A blazing fast and easy to configure neovim statusline plugin written in pure lua.
 
   2 -- https://github.com/nvim-lualine/lualine.nvim
 
   7                 require("lualine").setup({
 
  11                                         filetypes = { "snacks_picker_list", "snacks_picker_input" },
 
  15                                                                 return vim.fn.fnamemodify(vim.fn.getcwd(), ":~")
 
  24                                 lualine_c = { "filename" },
 
  25                                 lualine_x = { "location" },
 
  30                                 always_divide_middle = true,
 
  31                                 component_separators = { left = "", right = "" },
 
  34                                 refresh = { statusline = 200, tabline = 1000, winbar = 1000 },
 
  35                                 section_separators = { left = "", right = "" },
 
  51                                                 separator = { left = "", right = "" },
 
  59                                                 icon = { align = "left" },
 
  63                                                 path = 1, -- relative path from the cwd
 
  64                                                 symbols = { modified = " ", readonly = " " },
 
  65                                                 separator = { right = "" },
 
  70                                                 separator = { left = "", right = "" },
 
  78                                                         -- Same color values as the general color option can be used here.
 
  79                                                         added = "DiffAdd", -- Changes the diff's added color
 
  80                                                         modified = "DiffChange", -- Changes the diff's modified color
 
  81                                                         removed = "DiffDelete", -- Changes the diff's removed color you
 
  83                                                 symbols = { added = "+", modified = "~", removed = "-" }, -- Changes the diff symbols
 
  84                                                 separator = { right = "" },
 
  91                                                         local buf_ft = vim.bo.filetype
 
  92                                                         local excluded_buf_ft =
 
  93                                                                 { toggleterm = true, NvimTree = true, ["neo-tree"] = true, TelescopePrompt = true }
 
  95                                                         if excluded_buf_ft[buf_ft] then
 
  99                                                         local bufnr = vim.api.nvim_get_current_buf()
 
 100                                                         local clients = vim.lsp.get_clients({ bufnr = bufnr })
 
 102                                                         if vim.tbl_isempty(clients) then
 
 103                                                                 return "No Active LSP"
 
 106                                                         local active_clients = {}
 
 107                                                         for _, client in ipairs(clients) do
 
 108                                                                 table.insert(active_clients, client.name)
 
 111                                                         return table.concat(active_clients, ", ")
 
 114                                                 separator = { left = "" },
 
 118                                                 sources = { "nvim_lsp", "nvim_diagnostic", "nvim_diagnostic", "vim_lsp", "coc" },
 
 119                                                 symbols = { error = "  ", warn = "  ", info = "  ", hint = " " },
 
 121                                                 update_in_insert = false,
 
 122                                                 always_visible = false,
 
 123                                                 diagnostics_color = {
 
 124                                                         color_error = { fg = "red" },
 
 125                                                         color_warn = { fg = "yellow" },
 
 126                                                         color_info = { fg = "cyan" },
 
 134                                                 separator = { left = "", right = "" },
 
 140                                                 separator = { left = "" },
 
 145                                         --      separator = { left = "" },
 
 152                                                 separator = { left = "", right = "" },
 
 156                                                 separator = { left = "" },
 
 161                                         --      color = { fg = "black" },
 
 163                                         --              unix = "", -- e712
 
 164                                         --              dos = "", -- e70f
 
 165                                         --              mac = "", -- e711
 
 170                         winbar = { lualine_c = { { "navic", draw_empty = true } } },