feat(ui): add config to turn off hints popup (#75)
This commit is contained in:
		
							parent
							
								
									2700cad921
								
							
						
					
					
						commit
						29dabc4768
					
				@ -138,6 +138,10 @@ _See [config.lua#L9](./lua/avante/config.lua) for the full config_
 | 
			
		||||
    ---@type string | fun(): any
 | 
			
		||||
    list_opener = "copen",
 | 
			
		||||
  },
 | 
			
		||||
  --- @class AvanteHintsConfig
 | 
			
		||||
  hints = {
 | 
			
		||||
    enbaled = true,
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -82,6 +82,10 @@ M.defaults = {
 | 
			
		||||
    ---@type string | fun(): any
 | 
			
		||||
    list_opener = "copen",
 | 
			
		||||
  },
 | 
			
		||||
  --- @class AvanteHintsConfig
 | 
			
		||||
  hints = {
 | 
			
		||||
    enbaled = true,
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
---@type avante.Config
 | 
			
		||||
@ -92,6 +96,10 @@ M.options = {}
 | 
			
		||||
---@field highlights AvanteConflictHighlights
 | 
			
		||||
M.diff = {}
 | 
			
		||||
 | 
			
		||||
---@class AvanteHintsConfig
 | 
			
		||||
---@field enabled boolean
 | 
			
		||||
M.hints = {}
 | 
			
		||||
 | 
			
		||||
---@param opts? avante.Config
 | 
			
		||||
function M.setup(opts)
 | 
			
		||||
  M.options = vim.tbl_deep_extend("force", M.defaults, opts or {})
 | 
			
		||||
 | 
			
		||||
@ -62,6 +62,9 @@ end
 | 
			
		||||
 | 
			
		||||
function Selection:setup_autocmds()
 | 
			
		||||
  Selection.did_setup = true
 | 
			
		||||
  if Config.hints.enabled == false then
 | 
			
		||||
    return self
 | 
			
		||||
  end
 | 
			
		||||
  api.nvim_create_autocmd({ "ModeChanged" }, {
 | 
			
		||||
    group = self.augroup,
 | 
			
		||||
    pattern = { "n:v", "n:V", "n:" }, -- Entering Visual mode from Normal mode
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user