diff --git a/lua/astrocommunity/pack/cs/README.md b/lua/astrocommunity/pack/cs/README.md new file mode 100644 index 000000000..ba71cac4d --- /dev/null +++ b/lua/astrocommunity/pack/cs/README.md @@ -0,0 +1,11 @@ +# C# Language Pack + +**Requirements:** `dotnet` must be in your `PATH` and executable + +This plugin pack does the following: + +- Adds `c_sharp` Treesitter parsers +- Adds `csharp_ls` language server +- Adds the following `null-ls` sources: + - [csharpier](https://github.com/belav/csharpier) +- Adds `coreclr` debug adapters for nvim-dap diff --git a/lua/astrocommunity/pack/cs/init.lua b/lua/astrocommunity/pack/cs/init.lua new file mode 100644 index 000000000..ea7149872 --- /dev/null +++ b/lua/astrocommunity/pack/cs/init.lua @@ -0,0 +1,27 @@ +local utils = require "astronvim.utils" +return { + -- CSharp support + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "c_sharp") + end + end, + }, + { + "jay-babu/mason-null-ls.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "csharpier") end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "csharp_ls") end, + }, + { + "mfussenegger/nvim-dap", + { + "jay-babu/mason-nvim-dap.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "coreclr") end, + }, + }, +}