From 6dca50c83503b5e187f1c19198e46c36a4cf86d2 Mon Sep 17 00:00:00 2001 From: Ben Woodward Date: Wed, 23 Aug 2023 19:48:39 +0100 Subject: [PATCH] feat(pack): Add cue language pack (#531) --- lua/astrocommunity/pack/cue/README.md | 10 ++++++++++ lua/astrocommunity/pack/cue/init.lua | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 lua/astrocommunity/pack/cue/README.md create mode 100644 lua/astrocommunity/pack/cue/init.lua diff --git a/lua/astrocommunity/pack/cue/README.md b/lua/astrocommunity/pack/cue/README.md new file mode 100644 index 000000000..e6a2d3e0f --- /dev/null +++ b/lua/astrocommunity/pack/cue/README.md @@ -0,0 +1,10 @@ +# Cue Language Pack + +**Requirements:** `cue` must be in your `PATH` and executable + +This plugin pack does the following: + +- Adds `cue` Treesitter parsers +- Adds `dagger` language server +- Adds the following `null-ls` sources: + - [cueimports](https://github.com/asdine/cueimports) diff --git a/lua/astrocommunity/pack/cue/init.lua b/lua/astrocommunity/pack/cue/init.lua new file mode 100644 index 000000000..790b28c9d --- /dev/null +++ b/lua/astrocommunity/pack/cue/init.lua @@ -0,0 +1,21 @@ +local utils = require "astronvim.utils" +return { + -- Cue support + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "cue") + end + end, + }, + + { + "jay-babu/mason-null-ls.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "cueimports" }) end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "dagger") end, + }, +}