From 710aa77fd8942de92be79a80ccea906fc7e3da8a Mon Sep 17 00:00:00 2001 From: kuroski Date: Mon, 15 Jun 2026 13:46:42 -0300 Subject: [PATCH 1/2] feat(pack): add odin language pack --- lua/astrocommunity/pack/odin/README.md | 9 +++++++++ lua/astrocommunity/pack/odin/init.lua | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 lua/astrocommunity/pack/odin/README.md create mode 100644 lua/astrocommunity/pack/odin/init.lua diff --git a/lua/astrocommunity/pack/odin/README.md b/lua/astrocommunity/pack/odin/README.md new file mode 100644 index 000000000..f7cd65dfd --- /dev/null +++ b/lua/astrocommunity/pack/odin/README.md @@ -0,0 +1,9 @@ +# Odin Language Pack + +**Requirements:** `odin` should be in your `PATH` to use the language server + +This plugin pack does the following: + +- Adds `odin` Treesitter parser +- Adds [`ols`](https://github.com/DanielGavin/ols) language server + - Formatting is handled by `odinfmt`, which is bundled with `ols` diff --git a/lua/astrocommunity/pack/odin/init.lua b/lua/astrocommunity/pack/odin/init.lua new file mode 100644 index 000000000..23aea4340 --- /dev/null +++ b/lua/astrocommunity/pack/odin/init.lua @@ -0,0 +1,24 @@ +return { + { + "AstroNvim/astrocore", + optional = true, + ---@type AstroCoreOpts + opts = { + treesitter = { ensure_installed = { "odin" } }, + }, + }, + { + "WhoIsSethDaniel/mason-tool-installer.nvim", + optional = true, + opts = function(_, opts) + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "ols" }) + end, + }, + { + "mason-org/mason-lspconfig.nvim", + optional = true, + opts = function(_, opts) + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "ols" }) + end, + }, +} From 289a7d459587f38a69d74b35e8ee5a5a04195df0 Mon Sep 17 00:00:00 2001 From: kuroski Date: Thu, 25 Jun 2026 19:37:57 -0300 Subject: [PATCH 2/2] feat(pack/odin): add odinfmt formatter via conform --- lua/astrocommunity/pack/odin/README.md | 2 +- lua/astrocommunity/pack/odin/init.lua | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lua/astrocommunity/pack/odin/README.md b/lua/astrocommunity/pack/odin/README.md index f7cd65dfd..48546c227 100644 --- a/lua/astrocommunity/pack/odin/README.md +++ b/lua/astrocommunity/pack/odin/README.md @@ -6,4 +6,4 @@ This plugin pack does the following: - Adds `odin` Treesitter parser - Adds [`ols`](https://github.com/DanielGavin/ols) language server - - Formatting is handled by `odinfmt`, which is bundled with `ols` +- Adds `odinfmt` formatter (bundled with `ols`) via [`conform.nvim`](https://github.com/stevearc/conform.nvim) diff --git a/lua/astrocommunity/pack/odin/init.lua b/lua/astrocommunity/pack/odin/init.lua index 23aea4340..9048d773b 100644 --- a/lua/astrocommunity/pack/odin/init.lua +++ b/lua/astrocommunity/pack/odin/init.lua @@ -8,17 +8,27 @@ return { }, }, { - "WhoIsSethDaniel/mason-tool-installer.nvim", + "mason-org/mason-lspconfig.nvim", optional = true, opts = function(_, opts) opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "ols" }) end, }, { - "mason-org/mason-lspconfig.nvim", + "WhoIsSethDaniel/mason-tool-installer.nvim", optional = true, opts = function(_, opts) + -- `ols` ships the `odinfmt` formatter binary alongside the language server opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "ols" }) end, }, + { + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + odin = { "odinfmt" }, + }, + }, + }, }