Create winbar.lua
This commit is contained in:
		
							parent
							
								
									18e2a664fd
								
							
						
					
					
						commit
						be8fafd858
					
				|  | @ -0,0 +1,34 @@ | ||||||
|  | local M = { | ||||||
|  |   "utilyre/barbecue.nvim", | ||||||
|  |   name = "barbecue", | ||||||
|  |   version = "*", | ||||||
|  |   dependencies = { | ||||||
|  |     "SmiteshP/nvim-navic", | ||||||
|  |     "nvim-tree/nvim-web-devicons", -- optional dependency | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | M.config = function() | ||||||
|  |   -- triggers CursorHold event faster | ||||||
|  | vim.opt.updatetime = 200 | ||||||
|  | 
 | ||||||
|  | require("barbecue").setup({ | ||||||
|  |   create_autocmd = false, -- prevent barbecue from updating itself automatically | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | vim.api.nvim_create_autocmd({ | ||||||
|  |   "WinScrolled", -- or WinResized on NVIM-v0.9 and higher | ||||||
|  |   "BufWinEnter", | ||||||
|  |   "CursorHold", | ||||||
|  |   "InsertLeave", | ||||||
|  | 
 | ||||||
|  |   -- include this if you have set `show_modified` to `true` | ||||||
|  |   "BufModifiedSet", | ||||||
|  | }, { | ||||||
|  |   group = vim.api.nvim_create_augroup("barbecue.updater", {}), | ||||||
|  |   callback = function() | ||||||
|  |     require("barbecue.ui").update() | ||||||
|  |   end, | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | return M | ||||||
		Loading…
	
		Reference in New Issue