diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..8415579 --- /dev/null +++ b/.luarc.json @@ -0,0 +1,3 @@ +{ + "format.enable": false +} diff --git a/.neoconf.json b/.neoconf.json deleted file mode 100644 index 2d7a81f..0000000 --- a/.neoconf.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - }, - "lspconfig": { - "lua_ls": { - "Lua.format.enable": false - } - } -} diff --git a/README.md b/README.md index 4e32b9d..4e847fa 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,9 @@ A Neovim configuration based on the [AstroNvim](https://astronvim.com/) distribu ## ⚡ Requirements -- [Neovim v0.10+](https://neovim.io/) +- [Neovim v0.11+](https://neovim.io/) - [Git v2.19.0+](https://git-scm.com/) +- [Tree-sitter CLI](https://github.com/tree-sitter/tree-sitter/blob/master/crates/cli/README.md) (_Note:_ If not installed, this will be auto-installed with Mason if available) - A C compiler in your path and `libstdc++` installed (Ex. `gcc`, `clang`, `zig`, [Windows users please read this!](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support)) - [A Nerd Font](https://www.nerdfonts.com/) - [A Terminal with true color support](https://github.com/termstandard/colors?tab=readme-ov-file#truecolor-support-in-output-devices)[^1] diff --git a/init.lua b/init.lua index 9350f11..8a11096 100644 --- a/init.lua +++ b/init.lua @@ -8,7 +8,10 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup { -- Add AstroNvim and import the plugins it provides - { "AstroNvim/AstroNvim", version = "^5", import = "astronvim.plugins" }, + { "AstroNvim/AstroNvim", branch = "v6", import = "astronvim.plugins" }, + { "AstroNvim/astrolsp", branch = "v4" }, + { "AstroNvim/astrocore", branch = "v3" }, + { "AstroNvim/astroui", branch = "v4" }, -- Load AstroNvim community marketplace plugins before user plugins { import = "cape.community" }, -- Load CAPE plugins last diff --git a/lua/cape/plugins/bash.lua b/lua/cape/plugins/bash.lua index 3f6f77c..12af4d5 100644 --- a/lua/cape/plugins/bash.lua +++ b/lua/cape/plugins/bash.lua @@ -4,23 +4,16 @@ ---@type LazySpec return { - { + { -- Treesitter parsers to be installed and filetypes "astrocore", ---@type AstroCoreOpts opts = { - filetypes = { - pattern = { - ["%.env%.[%w_.-]+"] = "sh", - }, - }, - }, - }, - { -- Treesitter parsers to be installed - "nvim-treesitter", - opts = { - ensure_installed = { + filetypes = { pattern = { + ["%.env%.[%w_.-]+"] = "sh", + } }, + treesitter = { ensure_installed = { "bash", - }, + } }, }, }, { -- Tools to be installed diff --git a/lua/cape/plugins/docker.lua b/lua/cape/plugins/docker.lua index c0af942..1430d61 100644 --- a/lua/cape/plugins/docker.lua +++ b/lua/cape/plugins/docker.lua @@ -4,12 +4,19 @@ ---@type LazySpec return { - { -- Treesitter parsers to be installed - "nvim-treesitter", + { -- Treesitter parsers to be installed and filetypes + "AstroNvim/astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { - "dockerfile", + filetypes = { + filename = { + ["docker-compose.yml"] = "yaml.docker-compose", + ["docker-compose.yaml"] = "yaml.docker-compose", + }, }, + treesitter = { ensure_installed = { + "dockerfile", + } }, }, }, { -- Tools to be installed @@ -20,16 +27,4 @@ return { }, }, }, - { - "AstroNvim/astrocore", - ---@type AstroCoreOpts - opts = { - filetypes = { - filename = { - ["docker-compose.yml"] = "yaml.docker-compose", - ["docker-compose.yaml"] = "yaml.docker-compose", - }, - }, - }, - }, } diff --git a/lua/cape/plugins/html.lua b/lua/cape/plugins/html.lua index 64e0f38..d6a04ad 100644 --- a/lua/cape/plugins/html.lua +++ b/lua/cape/plugins/html.lua @@ -5,12 +5,13 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "html", "css", - }, + } }, }, }, { -- Tools to be installed @@ -39,7 +40,6 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { cssls = { settings = { css = { lint = { unknownAtRules = "ignore" } } } }, }, diff --git a/lua/cape/plugins/javascript.lua b/lua/cape/plugins/javascript.lua index 334586c..67bfcab 100644 --- a/lua/cape/plugins/javascript.lua +++ b/lua/cape/plugins/javascript.lua @@ -5,13 +5,16 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { - "javascript", - "typescript", - "tsx", - "jsdoc", + treesitter = { + ensure_installed = { + "javascript", + "typescript", + "tsx", + "jsdoc", + }, }, }, }, @@ -85,7 +88,6 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { vtsls = { settings = { diff --git a/lua/cape/plugins/jinja.lua b/lua/cape/plugins/jinja.lua index 665f44c..171e05b 100644 --- a/lua/cape/plugins/jinja.lua +++ b/lua/cape/plugins/jinja.lua @@ -4,22 +4,19 @@ ---@type LazySpec return { - { -- Set up filetypes + { -- Treesitter parsers to be installed and filetypes "AstroNvim/astrocore", ---@type AstroCoreOpts - opts = { filetypes = { extension = { - j2 = "jinja", - jinja2 = "jinja", - jinja = "jinja", - } } }, - }, - { -- Treesitter parsers to be installed - "nvim-treesitter", opts = { - ensure_installed = { + filetypes = { extension = { + j2 = "jinja", + jinja2 = "jinja", + jinja = "jinja", + } }, + treesitter = { ensure_installed = { "jinja", "jinja_inline", - }, + } }, }, }, { -- Tools to be installed diff --git a/lua/cape/plugins/json.lua b/lua/cape/plugins/json.lua index 29f0c3b..fc1cc2d 100644 --- a/lua/cape/plugins/json.lua +++ b/lua/cape/plugins/json.lua @@ -5,12 +5,13 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "json", "jsonc", - }, + } }, }, }, { -- Tools to be installed @@ -35,10 +36,9 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { jsonls = { - on_new_config = function(config) + before_init = function(_, config) if not config.settings.json.schemas then config.settings.json.schemas = {} end vim.list_extend(config.settings.json.schemas, require("schemastore").json.schemas()) end, diff --git a/lua/cape/plugins/lua.lua b/lua/cape/plugins/lua.lua index 831b984..cebe1c4 100644 --- a/lua/cape/plugins/lua.lua +++ b/lua/cape/plugins/lua.lua @@ -5,12 +5,13 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "lua", "luap", - }, + } }, }, }, { -- Tools to be installed @@ -50,7 +51,6 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { lua_ls = { settings = { Lua = { hint = { enable = true, arrayIndex = "Disable" } } } }, }, diff --git a/lua/cape/plugins/markdown.lua b/lua/cape/plugins/markdown.lua index 8e5e1cc..7f425c9 100644 --- a/lua/cape/plugins/markdown.lua +++ b/lua/cape/plugins/markdown.lua @@ -5,13 +5,17 @@ ---@type LazySpec return { - { -- Treesitter parsers to be installed - "nvim-treesitter", + { -- Treesitter parsers to be installed and filetypes + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + filetypes = { extensions = { + qmd = "markdown", + } }, + treesitter = { ensure_installed = { "markdown", "markdown_inline", - }, + } }, }, }, { -- Tools to be installed @@ -37,15 +41,4 @@ return { }, }, }, - { - "astrocore", - ---@type AstroCoreOpts - opts = { - filetypes = { - extensions = { - qmd = "markdown", - }, - }, - }, - }, } diff --git a/lua/cape/plugins/nextflow.lua b/lua/cape/plugins/nextflow.lua index 8353310..dca24ab 100644 --- a/lua/cape/plugins/nextflow.lua +++ b/lua/cape/plugins/nextflow.lua @@ -54,23 +54,6 @@ return { }, }, }, - { -- add nextflow_ls to mason-lspconfig - "AstroNvim/astrolsp", - ---@type AstroLSPOpts - opts = { - mason_lspconfig = { - servers = { - nextflow_ls = { - package = "nextflow-language-server", - filetypes = { "nextflow" }, - config = { - cmd = { "nextflow-language-server" }, - }, - }, - }, - }, - }, - }, { -- Icons "echasnovski/mini.icons", optional = true, diff --git a/lua/cape/plugins/other.lua b/lua/cape/plugins/other.lua index f50d298..e6e5388 100644 --- a/lua/cape/plugins/other.lua +++ b/lua/cape/plugins/other.lua @@ -1,12 +1,5 @@ ---@type LazySpec return { - { - "mason.nvim", - opts = { - -- add AstroNvim Mason registry - registries = { "github:AstroNvim/mason-registry" }, - }, - }, { "nvim-bqf", opts = { @@ -41,7 +34,6 @@ return { opts = { ensure_installed = { { "prettier", condition = function() return vim.fn.executable "npm" == 1 end }, - "tree-sitter-cli", }, }, }, @@ -49,7 +41,7 @@ return { "astrolsp", opts = { config = { - typos_lsp = { single_file_support = false }, + typos_lsp = { workspace_requires = true }, }, }, }, diff --git a/lua/cape/plugins/packer.lua b/lua/cape/plugins/packer.lua index 275749d..03cda22 100644 --- a/lua/cape/plugins/packer.lua +++ b/lua/cape/plugins/packer.lua @@ -4,23 +4,16 @@ ---@type LazySpec return { - { + { -- Treesitter parsers to be installed and filetypes "astrocore", ---@type AstroCoreOpts opts = { - filetypes = { - pattern = { - [".*%.pkr.*%.hcl"] = "hcl.packer", - }, - }, - }, - }, - { -- Treesitter parsers to be installed - "nvim-treesitter", - opts = { - ensure_installed = { + filetypes = { pattern = { + [".*%.pkr.*%.hcl"] = "hcl.packer", + } }, + treesitter = { ensure_installed = { "hcl", - }, + } }, }, }, { -- Linters to use diff --git a/lua/cape/plugins/python.lua b/lua/cape/plugins/python.lua index bf1d85f..9936e6d 100644 --- a/lua/cape/plugins/python.lua +++ b/lua/cape/plugins/python.lua @@ -6,11 +6,12 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "python", - }, + } }, }, }, { -- Tools to be installed @@ -67,7 +68,6 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { pyright = { before_init = function(_, c) diff --git a/lua/cape/plugins/rego.lua b/lua/cape/plugins/rego.lua index 8761cf3..1664e61 100644 --- a/lua/cape/plugins/rego.lua +++ b/lua/cape/plugins/rego.lua @@ -5,11 +5,12 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "rego", - }, + } }, }, }, { -- Tools to be installed diff --git a/lua/cape/plugins/sql.lua b/lua/cape/plugins/sql.lua index 6c98320..ca2b239 100644 --- a/lua/cape/plugins/sql.lua +++ b/lua/cape/plugins/sql.lua @@ -5,11 +5,12 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "sql", - }, + } }, }, }, { -- Tools to be installed diff --git a/lua/cape/plugins/svelte.lua b/lua/cape/plugins/svelte.lua index 5c33e18..122934c 100644 --- a/lua/cape/plugins/svelte.lua +++ b/lua/cape/plugins/svelte.lua @@ -5,11 +5,12 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "svelte", - }, + } }, }, }, { -- Tools to be installed @@ -36,7 +37,6 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { svelte = { settings = { diff --git a/lua/cape/plugins/toml.lua b/lua/cape/plugins/toml.lua index 84bcc69..217898f 100644 --- a/lua/cape/plugins/toml.lua +++ b/lua/cape/plugins/toml.lua @@ -5,11 +5,12 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { + treesitter = { ensure_installed = { "toml", - }, + } }, }, }, { -- Tools to be installed @@ -32,7 +33,6 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { taplo = { evenBetterToml = { schema = { catalogs = { "https://www.schemastore.org/api/json/catalog.json" } } } }, }, diff --git a/lua/cape/plugins/yaml.lua b/lua/cape/plugins/yaml.lua index 2383705..a6b70d3 100644 --- a/lua/cape/plugins/yaml.lua +++ b/lua/cape/plugins/yaml.lua @@ -5,13 +5,14 @@ ---@type LazySpec return { { -- Treesitter parsers to be installed - "nvim-treesitter", + "astrocore", + ---@type AstroCoreOpts opts = { - ensure_installed = { - "yaml", - }, - indent = { - disable = { "yaml" }, + treesitter = { + indent = function(lang) return lang ~= "yaml" end, + ensure_installed = { + "yaml", + }, }, }, }, @@ -36,10 +37,9 @@ return { "astrolsp", ---@type AstroLSPOpts opts = { - ---@diagnostic disable: missing-fields config = { yamlls = { - on_new_config = function(config) + before_init = function(_, config) config.settings.yaml.schemas = vim.tbl_deep_extend("force", config.settings.yaml.schemas or {}, require("schemastore").yaml.schemas()) end,