Upgrade to AstroNvim v5

This commit is contained in:
2026-03-02 08:10:23 +01:00
parent 2f36eb3db4
commit 4f18b377a9
14 changed files with 99 additions and 168 deletions

View File

@@ -1,7 +1,7 @@
require("lazy").setup({
{
"AstroNvim/AstroNvim",
version = "^4", -- Remove version tracking to elect for nightly AstroNvim
version = "^5", -- Remove version tracking to elect for nightly AstroNvim
import = "astronvim.plugins",
opts = { -- AstroNvim options must be set here with the `import` key
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
@@ -13,36 +13,6 @@ require("lazy").setup({
},
{ import = "community" },
{ import = "plugins" },
{
"David-Kunz/gen.nvim",
opts = {
model = "mistral", -- The default model to use.
quit_map = "q", -- set keymap to close the response window
retry_map = "<c-r>", -- set keymap to re-send the current prompt
accept_map = "<c-cr>", -- set keymap to replace the previous selection with the last result
host = "localhost", -- The host running the Ollama service.
port = "11434", -- The port on which the Ollama service is listening.
display_mode = "float", -- The display mode. Can be "float" or "split" or "horizontal-split" or "vertical-split".
show_prompt = false, -- Shows the prompt submitted to Ollama. Can be true (3 lines) or "full".
show_model = false, -- Displays which model you are using at the beginning of your chat session.
no_auto_close = false, -- Never closes the window automatically.
file = false, -- Write the payload to a temporary file to keep the command short.
hidden = false, -- Hide the generation window (if true, will implicitly set `prompt.replace = true`), requires Neovim >= 0.10
init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end,
-- Function to initialize Ollama
command = function(options)
local body = {model = options.model, stream = true}
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
end,
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
-- This can also be a command string.
-- The executed command must return a JSON object with { response, context }
-- (context property is optional).
-- list_models = '<omitted lua function>', -- Retrieves a list of model names
result_filetype = "markdown", -- Configure filetype of the result buffer
debug = false -- Prints errors and the command which is run.
}
},
} --[[@as LazySpec]], {
-- Configure any other `lazy.nvim` configuration options here
install = { colorscheme = { "astrotheme", "habamax" } },
@@ -60,4 +30,3 @@ require("lazy").setup({
},
},
} --[[@as LazyConfig]])

View File

@@ -1,5 +0,0 @@
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.colorscheme.catppuccin" },
{ import = "astrocommunity.recipes.neovide" },
}

View File

@@ -15,7 +15,7 @@ return {
large_buf = { size = 1024 * 256, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
autopairs = true, -- enable autopairs at start
cmp = true, -- enable completion at start
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
diagnostics = { virtual_text = true, virtual_lines = false }, -- diagnostic settings on startup
highlighturl = true, -- highlight URLs at start
notifications = true, -- enable notifications at start
},
@@ -24,12 +24,23 @@ return {
virtual_text = true,
underline = true,
},
-- passed to `vim.filetype.add`
filetypes = {
-- see `:h vim.filetype.add` for usage
extension = {
foo = "fooscript",
},
filename = {
[".foorc"] = "fooscript",
},
pattern = {
[".*/etc/foo/.*"] = "fooscript",
},
},
-- vim options can be configured here
options = {
opt = { -- vim.opt.<key>
relativenumber = false, -- sets vim.opt.relativenumber
-- guifont = "Source Code Pro:h14",
guifont = "AgaveNerdFont:h16",
relativenumber = true, -- sets vim.opt.relativenumber
number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell
signcolumn = "yes", -- sets vim.opt.signcolumn to yes

View File

@@ -1,4 +1,4 @@
-- if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- AstroUI provides the basis for configuring the AstroNvim User Interface
-- Configuration documentation can be found with `:h astroui`

View File

@@ -1,13 +0,0 @@
return {
'Ramilito/kubectl.nvim',
opts = {},
cmd = { 'Kubectl', 'Kubectx', 'Kubens' },
keys = {
{ '<leader>k', '<cmd>lua require("kubectl").toggle()<cr>' },
{ '<C-k>', '<Plug>(kubectl.kill)', ft = 'k8s_*' },
{ '7', '<Plug>(kubectl.view_nodes)', ft = 'k8s_*' },
{ '8', '<Plug>(kubectl.view_overview)', ft = 'k8s_*' },
{ '<C-t>', '<Plug>(kubectl.view_top)', ft = 'k8s_*' },
},
}

View File

@@ -1,38 +1,27 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Mason plugins
-- Customize Mason
---@type LazySpec
return {
-- use mason-lspconfig to configure LSP installations
-- use mason-tool-installer for automatically installing Mason packages
{
"williamboman/mason-lspconfig.nvim",
-- overrides `require("mason-lspconfig").setup(...)`
opts = {
ensure_installed = {
"lua_ls",
-- add more arguments for adding more language servers
},
},
},
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
{
"jay-babu/mason-null-ls.nvim",
-- overrides `require("mason-null-ls").setup(...)`
"WhoIsSethDaniel/mason-tool-installer.nvim",
-- overrides `require("mason-tool-installer").setup(...)`
opts = {
-- Make sure to use the names found in `:Mason`
ensure_installed = {
-- install language servers
"lua-language-server",
-- install formatters
"stylua",
-- add more arguments for adding more null-ls sources
},
},
},
{
"jay-babu/mason-nvim-dap.nvim",
-- overrides `require("mason-nvim-dap").setup(...)`
opts = {
ensure_installed = {
"python",
-- add more arguments for adding more debuggers
-- install debuggers
"debugpy",
-- install any other package
"tree-sitter-cli",
},
},
},

View File

@@ -1,6 +1,7 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- You can also add or configure plugins by creating files in this `plugins/` folder
-- PLEASE REMOVE THE EXAMPLES YOU HAVE NO INTEREST IN BEFORE ENABLING THIS FILE
-- Here are some examples:
---@type LazySpec
@@ -17,26 +18,28 @@ return {
-- == Examples of Overriding Plugins ==
-- customize alpha options
-- customize dashboard options
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
" █████ ███████ ████████ ██████ ██████",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████",
" ",
" ███  ██ ██  ██ ██ ███  ███",
"███  ██ ██  ██ ██ ███ ███",
" ████  ██ ██  ██ ██ ██ ████ ██",
" ██ ██ ██ ██  ██  ██ ████ ██",
" ██   ████   ████   ██ ██  ██",
}
return opts
end,
"folke/snacks.nvim",
opts = {
dashboard = {
preset = {
header = table.concat({
" █████ ███████ ████████ ██████ ██████ ",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████ ",
"",
"███  ██ ██  ██ ██ ███  ███",
"████  ██ ██  ██ ██ ████  ████",
"██ ██  ██ ██  ██ ██ ██ ████ ██",
"██  ████  ██ ██  ██ ██  ██  ██",
"██   ████   ████   ██ ██  ██",
}, "\n"),
},
},
},
},
-- You can disable default plugins as follows:
@@ -46,10 +49,12 @@ return {
{
"L3MON4D3/LuaSnip",
config = function(plugin, opts)
require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
-- add more custom luasnip configuration such as filetype extend or custom snippets
local luasnip = require "luasnip"
luasnip.filetype_extend("javascript", { "javascriptreact" })
-- include the default astronvim config that calls the setup call
require "astronvim.plugins.configs.luasnip"(plugin, opts)
end,
},

View File

@@ -1,18 +1,5 @@
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- This will run last in the setup process and is a good place to configure
-- things like custom filetypes. This is just pure lua so anything that doesn't
-- This will run last in the setup process.
-- This is just pure lua so anything that doesn't
-- fit in the normal config locations above can go here
-- Set up custom filetypes
vim.filetype.add {
extension = {
foo = "fooscript",
},
filename = {
["Foofile"] = "fooscript",
},
pattern = {
["~/%.config/foo/.*"] = "fooscript",
},
}