Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
@@ -234,6 +234,15 @@ H.autocmds = function()
|
||||
|
||||
-- automatically setup Avante filetype to markdown
|
||||
vim.treesitter.language.register("markdown", "Avante")
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
["avanterules"] = "jinja",
|
||||
},
|
||||
pattern = {
|
||||
["%.avanterules%.[%w_.-]+"] = "jinja",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
---@param current boolean? false to disable setting current, otherwise use this to track across tabs.
|
||||
@@ -359,16 +368,6 @@ end)
|
||||
|
||||
---@param opts? avante.Config
|
||||
function M.setup(opts)
|
||||
if vim.fn.has("nvim-0.10") == 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Avante requires at least nvim-0.10", "ErrorMsg" },
|
||||
{ "Please upgrade your neovim version", "WarningMsg" },
|
||||
{ "Press any key to exit", "ErrorMsg" },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
vim.cmd([[quit]])
|
||||
end
|
||||
|
||||
---PERF: we can still allow running require("avante").setup() multiple times to override config if users wish to
|
||||
---but most of the other functionality will only be called once from lazy.nvim
|
||||
Config.setup(opts)
|
||||
|
||||
Reference in New Issue
Block a user