feat: Adapt configuration for AstroNvim v6

This commit is contained in:
Xavier Logerais
2026-07-07 16:10:12 +00:00
parent 6787aef5cd
commit 5d32fc8518
9 changed files with 87 additions and 77 deletions
+31 -28
View File
@@ -28,13 +28,12 @@ return {
-- { import = "astrocommunity.pack.html-css" },
-- { import = "astrocommunity.pack.angular" },
-- { import = "astrocommunity.pack.ansible" },
-- { import = "astrocommunity.pack.terraform" },
-- { import = "astrocommunity.pack.docker" },
-- { import = "astrocommunity.pack.helm" },
{ import = "astrocommunity.pack.ansible" },
{ import = "astrocommunity.pack.terraform" },
{ import = "astrocommunity.pack.docker" },
{ import = "astrocommunity.pack.helm" },
-- { import = "astrocommunity.pack.rainbow-delimiter-indent-blankline" },
{ import = "astrocommunity.indent.indent-rainbowline" },
-- Recipes
@@ -44,39 +43,24 @@ return {
{ import = "astrocommunity.recipes.cache-colorscheme" },
{ import = "astrocommunity.recipes.neo-tree-dark" },
{ import = "astrocommunity.recipes.neovide" },
-- { import = "astrocommunity.recipes.ai" },
{ import = "astrocommunity.recipes.ai" },
-- Completion
{ import = "astrocommunity.completion.blink-cmp-git" },
{ import = "astrocommunity.completion.blink-cmp-emoji" },
-- { import = "astrocommunity.completion.cmp-nerdfont" },
{ import = "astrocommunity.completion.minuet-ai-nvim" },
{ import = "astrocommunity.completion.cmp-nerdfont" },
{ import = "astrocommunity.completion.copilot-lua-cmp" },
-- { import = "astrocommunity.completion.cmp-spell" },
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
-- AI
{ import = "astrocommunity.ai.copilotchat-nvim" },
-- { import = "astrocommunity.completion.minuet-ai-nvim" },
-- Telescope
{ import = "astrocommunity.terminal-integration.toggleterm-manager-nvim" }, -- A Telescope extension to manage Toggleterm's terminals in NeoVim
-- { import = "astrocommunity.file-explorer.telescope-file-browser-nvim" },
-- Individual plugins (misc)
{ import = "astrocommunity.workflow.hardtime-nvim" }, -- Display hints to get rid of bad habits
{ import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.editing-support.nvim-devdocs" },
{ import = "astrocommunity.git.diffview-nvim" },
{ import = "astrocommunity.markdown-and-latex.render-markdown-nvim" },
-- { import = "astrocommunity.markdown-and-latex.markview-nvim" },
{ import = "astrocommunity.motion.marks-nvim" }, -- Display marks in the sign column
{ import = "astrocommunity.programming-language-support.kulala-nvim" }, -- A minimal HTTP-client interface for Neovim
-- Disabled
-- { import = "astrocommunity.bars-and-lines.smartcolumn-nvim" }, -- display a column when text width exceed defined limit
-- { import = "astrocommunity.editing-support.chatgpt-nvim" },
-- { import = "astrocommunity.programming-language-support.rest-nvim" },
-- { import = "astrocommunity.project.project-nvim" },
-- Individual plugins (colorschemes)
-- Colorschemes
{ import = "astrocommunity.colorscheme.vscode-nvim" },
{ import = "astrocommunity.colorscheme.github-nvim-theme" },
{ import = "astrocommunity.colorscheme.neosolarized-nvim" },
@@ -87,6 +71,25 @@ return {
{ import = "astrocommunity.colorscheme.tokyonight-nvim" },
{ import = "astrocommunity.colorscheme.onedarkpro-nvim" },
-- Individual plugins (misc)
{ import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.motion.marks-nvim" }, -- Display marks in the sign column
{ import = "astrocommunity.git.diffview-nvim" },
{ import = "astrocommunity.markdown-and-latex.render-markdown-nvim" },
-- { import = "astrocommunity.markdown-and-latex.markview-nvim" },
{ import = "astrocommunity.programming-language-support.kulala-nvim" }, -- A minimal HTTP-client interface for Neovim
{ import = "astrocommunity.indent.indent-rainbowline" },
{ import = "astrocommunity.editing-support.nvim-devdocs" },
-- { import = "astrocommunity.workflow.hardtime-nvim" }, -- Display hints to get rid of bad habits
-- Disabled
-- { import = "astrocommunity.bars-and-lines.smartcolumn-nvim" }, -- display a column when text width exceed defined limit
-- { import = "astrocommunity.editing-support.chatgpt-nvim" },
-- { import = "astrocommunity.programming-language-support.rest-nvim" },
-- { import = "astrocommunity.project.project-nvim" },
-- Individual plugins customization
-- {
-- "nvim-treesitter/nvim-treesitter",
+8 -8
View File
@@ -1,7 +1,7 @@
require("lazy").setup({
{
"AstroNvim/AstroNvim",
version = "^5", -- Remove version tracking to elect for nightly AstroNvim
version = "^6", -- 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
@@ -20,13 +20,13 @@ require("lazy").setup({
performance = {
rtp = {
-- disable some rtp plugins, add more to your liking
-- disabled_plugins = {
-- "gzip",
-- "netrwPlugin",
-- "tarPlugin",
-- "tohtml",
-- "zipPlugin",
-- },
disabled_plugins = {
-- "gzip",
-- "netrwPlugin",
-- "tarPlugin",
"tohtml",
"zipPlugin",
},
},
},
} --[[@as LazyConfig]])
+10 -15
View File
@@ -93,27 +93,15 @@ return {
-- Mappings can be configured through AstroCore as well.
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
mappings = {
-- first key is the mode
n = {
-- tables with just a `desc` key will be registered with which-key if it's installed
-- this is useful for naming menus
-- ["<Leader>b"] = { desc = "Buffers" },
-- setting a mapping to false will disable it
-- ["<C-S>"] = false,
-- Visual selection of pasted text
["gp"] = { "`[v`]", desc = "Visual selection of pasted text" },
-- second key is the lefthand side of the map
-- navigate buffer tabs
["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
-- mappings seen under group name "Buffer"
["<Leader>b"] = { desc = "Buffers" },
["<Leader>bn"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
["<Leader>bp"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
["<Leader>bd"] = {
function()
require("astroui.status.heirline").buffer_picker(
@@ -125,6 +113,13 @@ return {
["<Leader>bp"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
["<Leader>bn"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
-- tables with just a `desc` key will be registered with which-key if it's installed
-- this is useful for naming menus
-- ["<Leader>b"] = { desc = "Buffers" },
-- setting a mapping to false will disable it
-- ["<C-S>"] = false,
-- Normal mode : Custom mappings
["<F2>"] = { "<cmd>Neotree toggle<cr>", desc = "File Explorer" }, -- F26 corresponds to <Ctrl+F2> on my keyboard
["<F3>"] = {
@@ -160,7 +155,7 @@ return {
-- Clear Ctrl+l so that we can use it to clear the terminal
["<C-l>"] = false,
["<C-h>"] = false,
-- Clear Ctrl-J and Ctrl-K so that we can use them for apps running in the terminal (for example lazygit)
-- Clear Ctrl-J and Ctrl-K so that we can use them to navigate the terminal (for lazygit)
["<C-j>"] = false,
["<C-k>"] = false,
-- My terms
+9 -10
View File
@@ -41,19 +41,18 @@ return {
servers = {
-- "pyright"
},
-- customize language server configuration options passed to `lspconfig`
---@diagnostic disable: missing-fields
-- customize language server configuration passed to `vim.lsp.config`
-- client specific configuration can also go in `lsp/` in your configuration root (see `:h lsp-config`)
config = {
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
-- ["*"] = { capabilities = {} }, -- modify default LSP client settings such as capabilities
},
-- customize how language servers are attached
handlers = {
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server
-- function(server, opts) require("lspconfig")[server].setup(opts) end
-- a function with the key `*` modifies the default handler, functions takes the server name as the parameter
-- ["*"] = function(server) vim.lsp.enable(server) end
-- the key is the server that is being setup with `lspconfig`
-- the key is the server that is being setup with `vim.lsp.config`
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
},
-- Configure buffer local auto commands to add when attaching a language server
autocmds = {
@@ -72,7 +71,7 @@ return {
-- the rest of the autocmd options (:h nvim_create_autocmd)
desc = "Refresh codelens (buffer)",
callback = function(args)
if require("astrolsp").config.features.codelens then vim.lsp.codelens.refresh { bufnr = args.buf } end
if require("astrolsp").config.features.codelens then vim.lsp.codelens.enable(true, { bufnr = args.buf }) end
end,
},
},
@@ -90,13 +89,13 @@ return {
function() require("astrolsp.toggles").buffer_semantic_tokens() end,
desc = "Toggle LSP semantic highlight (buffer)",
cond = function(client)
return client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
return client:supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
end,
},
},
},
-- A custom `on_attach` function to be run after the default `on_attach` function
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`)
-- takes two parameters `client` and `bufnr` (`:h lsp-attach`)
on_attach = function(client, bufnr)
-- this would disable semanticTokensProvider for all clients
-- client.server_capabilities.semanticTokensProvider = nil
+14 -5
View File
@@ -1,15 +1,24 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Treesitter
-- --------------------
-- Treesitter customizations are handled with AstroCore
-- as nvim-treesitter simply provides a download utility for parsers
---@type LazySpec
return {
"nvim-treesitter/nvim-treesitter",
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
ensure_installed = {
"lua",
"vim",
-- add more arguments for adding more treesitter parsers
treesitter = {
highlight = true, -- enable/disable treesitter based highlighting
indent = true, -- enable/disable treesitter based indentation
auto_install = true, -- enable/disable automatic installation of detected languages
ensure_installed = {
"lua",
"vim",
-- add more arguments for adding more treesitter parsers
},
},
},
}
+3 -1
View File
@@ -49,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,
},
+2 -8
View File
@@ -1,11 +1,5 @@
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- 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
-- Needed for python3 through mise
-- Locate python3 using PATH
local python_path = vim.fn.exepath "python3"
if python_path == nil or python_path == "" then
else
vim.g.python3_host_prog = python_path
end