Skip to content

feat(pack): Add nginx pack #1481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(pack): Add nginx pack
  • Loading branch information
Uzaaft committed May 6, 2025
commit 4167220eae9e29217a3262fa63b25bbdced9cfde
7 changes: 7 additions & 0 deletions lua/astrocommunity/pack/nginx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# C# Language Pack

This plugin pack does the following:

- Adds `nginx` Treesitter parsers
- Adds `nginx-language-server` language server
- Adds `nginx-config-formatter` formatter
38 changes: 38 additions & 0 deletions lua/astrocommunity/pack/nginx/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
return {
{
"nvim-treesitter/nvim-treesitter",
optional = true,
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "nginx" })
end
end,
},
{
"williamboman/mason-lspconfig.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed =
require("astrocore").list_insert_unique(opts.ensure_installed, { "nginx_language_server" })
end,
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(
opts.ensure_installed,
{ "nginx-config-formatter", "nginx_language_server" }
)
end,
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
nginx = { "nginxfmt" },
},
},
},
}