From 1ff4f7af163b502787c702b283dfb6e538f725f1 Mon Sep 17 00:00:00 2001 From: PythonGermany <97847597+PythonGermany@users.noreply.github.com> Date: Sun, 27 Oct 2024 15:38:56 +0100 Subject: [PATCH 01/11] Add missing word in polish.lua (#24) --- lua/polish.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/polish.lua b/lua/polish.lua index 14c38cd4..5b65b7d0 100644 --- a/lua/polish.lua +++ b/lua/polish.lua @@ -1,7 +1,7 @@ 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 just pure lua so anything that doesn't +-- things like custom filetypes. This is just pure lua so anything that doesn't -- fit in the normal config locations above can go here -- Set up custom filetypes From 1f2e5231efb190d034634b7c11a73dd3a2a46311 Mon Sep 17 00:00:00 2001 From: Syamim Hazmi Date: Tue, 26 Nov 2024 18:20:56 +0800 Subject: [PATCH 02/11] typo in comment (#25) --- lua/lazy_setup.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua index 939d7b7b..8a198927 100644 --- a/lua/lazy_setup.lua +++ b/lua/lazy_setup.lua @@ -1,7 +1,7 @@ require("lazy").setup({ { "AstroNvim/AstroNvim", - version = "^4", -- Remove version tracking to elect for nighly AstroNvim + version = "^4", -- 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 From 4f9610c3b721bbff7446ea2a0b963e2777a6417c Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Wed, 26 Mar 2025 14:57:20 -0400 Subject: [PATCH 03/11] AstroNvim v5 (#29) * fix(astrocore): update to the new `diagnostics` settings style * fix(mason): move to installing Mason packages with `mason-tool-installer.nvim` * fix(user): update dashboard header example to use `snacks.dashboard` * fix(lazy_setup): bump version to v5 for release --- lua/lazy_setup.lua | 2 +- lua/plugins/astrocore.lua | 2 +- lua/plugins/mason.lua | 41 ++++++++++++++------------------------- lua/plugins/user.lua | 41 +++++++++++++++++++++------------------ 4 files changed, 39 insertions(+), 47 deletions(-) diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua index 8a198927..4d9552ff 100644 --- a/lua/lazy_setup.lua +++ b/lua/lazy_setup.lua @@ -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 diff --git a/lua/plugins/astrocore.lua b/lua/plugins/astrocore.lua index cda56a89..f7862913 100644 --- a/lua/plugins/astrocore.lua +++ b/lua/plugins/astrocore.lua @@ -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 }, diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 34296614..2d79b5f1 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -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", }, }, }, diff --git a/lua/plugins/user.lua b/lua/plugins/user.lua index 121089ef..b7de6df3 100644 --- a/lua/plugins/user.lua +++ b/lua/plugins/user.lua @@ -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: From 7da353c26f66750c0f13d5156a21ff22a8c212dd Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Wed, 26 Mar 2025 16:52:44 -0400 Subject: [PATCH 04/11] docs: update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 365674b3..71d48de2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # AstroNvim Template -**NOTE:** This is for AstroNvim v4+ +**NOTE:** This is for AstroNvim v5+ A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim) From 870c63b3942dbc1148ef0f2defd9af710cb64f5a Mon Sep 17 00:00:00 2001 From: Mark WENG Date: Sat, 29 Mar 2025 20:24:27 +0800 Subject: [PATCH 05/11] refactor: move filetype customization from polish.lua to astrocore.lua (#31) Co-authored-by: Mark Weng --- lua/plugins/astrocore.lua | 13 +++++++++++++ lua/polish.lua | 17 ++--------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lua/plugins/astrocore.lua b/lua/plugins/astrocore.lua index f7862913..03d7441f 100644 --- a/lua/plugins/astrocore.lua +++ b/lua/plugins/astrocore.lua @@ -24,6 +24,19 @@ 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. diff --git a/lua/polish.lua b/lua/polish.lua index 5b65b7d0..642719fe 100644 --- a/lua/polish.lua +++ b/lua/polish.lua @@ -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", - }, -} From 5db2f5789d6ef6ad2349db9fb243d41bb0e6acf8 Mon Sep 17 00:00:00 2001 From: Alessio <148966056+alessio-locatelli@users.noreply.github.com> Date: Sat, 31 May 2025 21:31:25 +0300 Subject: [PATCH 06/11] fix: do not be silent on clone fail (#32) --- init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2ce1cdd2..424e48dd 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,18 @@ -- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution -- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk. local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + local result = vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + if vim.v.shell_error ~= 0 then + -- stylua: ignore + vim.api.nvim_echo({ { ("Error cloning lazy.nvim:\n%s\n"):format(result), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) + vim.fn.getchar() + vim.cmd.quit() + end end + vim.opt.rtp:prepend(lazypath) -- validate that lazy is available From 89ebfd35d6415634d82cc6f2991bf66c842872d0 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Fri, 6 Jun 2025 08:18:42 -0400 Subject: [PATCH 07/11] chore: configure lua language server to disable formatting --- .luarc.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .luarc.json diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 00000000..8415579f --- /dev/null +++ b/.luarc.json @@ -0,0 +1,3 @@ +{ + "format.enable": false +} From ae96a25a77864a82d7e363ea4ca1fcfcfa20da94 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Fri, 27 Feb 2026 07:52:14 -0500 Subject: [PATCH 08/11] fix: luasnip setup needs to be called last to properly populate snippets --- lua/plugins/user.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/user.lua b/lua/plugins/user.lua index b7de6df3..d3326273 100644 --- a/lua/plugins/user.lua +++ b/lua/plugins/user.lua @@ -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, }, From 41599545bbbbe66c1dd968a8f07c5e3968690e6f Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Mon, 30 Mar 2026 09:36:13 -0400 Subject: [PATCH 09/11] Update for AstroNvim v6 (#38) * feat: update comments for AstroLSP v4 * feat(treesitter): update template to configure treesitter through AstroCore * feat: update AstroNvim version to v6 --- lua/lazy_setup.lua | 2 +- lua/plugins/astrolsp.lua | 15 +++++++-------- lua/plugins/treesitter.lua | 19 ++++++++++++++----- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua index 4d9552ff..8e1abfbd 100644 --- a/lua/lazy_setup.lua +++ b/lua/lazy_setup.lua @@ -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 diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index 720b9d36..b180a399 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -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 = { @@ -96,7 +95,7 @@ return { }, }, -- 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 diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 94436aad..3a9afe99 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -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 + }, }, }, } From 08e6b5a334f7a824fbc365bbb7268d53d35fd624 Mon Sep 17 00:00:00 2001 From: Ryoga <49950206+Ryoga-exe@users.noreply.github.com> Date: Thu, 2 Apr 2026 06:04:20 +0900 Subject: [PATCH 10/11] docs: Update README for AstroNvim version change (#39) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71d48de2..4488bde8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # AstroNvim Template -**NOTE:** This is for AstroNvim v5+ +**NOTE:** This is for AstroNvim v6+ A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim) From 49a7161b776f8bc6c23508819ea1ad4e7b359bee Mon Sep 17 00:00:00 2001 From: fuchami Date: Fri, 3 Apr 2026 01:13:03 +0900 Subject: [PATCH 11/11] fix: Replaced deprecated vim.lsp methods (#40) --- lua/plugins/astrolsp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index b180a399..b8b121f2 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -71,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, }, }, @@ -89,7 +89,7 @@ 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, }, },