chore(init): gated neovim version (#67)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
43beba9957
commit
b979b3d8ce
@ -51,6 +51,10 @@ Install `avante.nvim` using [lazy.nvim](https://github.com/folke/lazy.nvim):
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
>
|
||||||
|
> `avante.nvim` is currently only compatible with Neovim 0.10.0 or later. Please ensure that your Neovim version meets these requirements before proceeding.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
>
|
>
|
||||||
> If your neovim doesn't use LuaJIT, then change `build` to `make lua51`. By default running make will install luajit.
|
> If your neovim doesn't use LuaJIT, then change `build` to `make lua51`. By default running make will install luajit.
|
||||||
|
@ -185,6 +185,16 @@ end
|
|||||||
|
|
||||||
---@param opts? avante.Config
|
---@param opts? avante.Config
|
||||||
function M.setup(opts)
|
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
|
---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
|
---but most of the other functionality will only be called once from lazy.nvim
|
||||||
Config.setup(opts)
|
Config.setup(opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user