39 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Lua
		
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Lua
		
	
	
	
local function getWords()
 | 
						|
    return tostring(vim.fn.wordcount().words) .. " Words"
 | 
						|
end
 | 
						|
 | 
						|
local function lint_progress()
 | 
						|
  local linters = require("lint").get_running()
 | 
						|
  if #linters == 0 then
 | 
						|
      return ""
 | 
						|
  end
 | 
						|
  return " " .. table.concat(linters, ", ")
 | 
						|
end
 | 
						|
 | 
						|
return {
 | 
						|
    'nvim-lualine/lualine.nvim',
 | 
						|
    dependencies = { 'nvim-tree/nvim-web-devicons', opt = true },
 | 
						|
    opts = {
 | 
						|
        options = {
 | 
						|
            theme = 'nightfly',
 | 
						|
            globalstatus = true
 | 
						|
        },
 | 
						|
        sections = {
 | 
						|
            lualine_a = {'mode'},
 | 
						|
            lualine_b = {'diff', 'diagnostics', lint_progress},
 | 
						|
            lualine_c = {'filename'},
 | 
						|
            lualine_x = {'encoding', 'fileformat', 'filetype'},
 | 
						|
            lualine_y = {'filesize', getWords},
 | 
						|
            lualine_z = {'branch'},
 | 
						|
        },
 | 
						|
        inactive_sections = {
 | 
						|
            lualine_a = {'mode'},
 | 
						|
            lualine_b = {},
 | 
						|
            lualine_c = {'filename'},
 | 
						|
            lualine_x = {},
 | 
						|
            lualine_y = {'filesize'},
 | 
						|
            lualine_z = {'branch'},
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |