Skip to content

Commit 9dbfb3e

Browse files
Uzaaftazdanov
andauthored
feat(pack): Add nginx pack (#1481)
* feat(pack): Add nginx pack * Update lua/astrocommunity/pack/nginx/README.md Co-authored-by: Anton Ždanov <anton@azdanov.dev> --------- Co-authored-by: Anton Ždanov <anton@azdanov.dev>
1 parent 193c191 commit 9dbfb3e

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Nginx Language Pack
2+
3+
This plugin pack does the following:
4+
5+
- Adds `nginx` Treesitter parsers
6+
- Adds `nginx-language-server` language server
7+
- Adds `nginx-config-formatter` formatter
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
return {
2+
{
3+
"nvim-treesitter/nvim-treesitter",
4+
optional = true,
5+
opts = function(_, opts)
6+
if opts.ensure_installed ~= "all" then
7+
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "nginx" })
8+
end
9+
end,
10+
},
11+
{
12+
"williamboman/mason-lspconfig.nvim",
13+
optional = true,
14+
opts = function(_, opts)
15+
opts.ensure_installed =
16+
require("astrocore").list_insert_unique(opts.ensure_installed, { "nginx_language_server" })
17+
end,
18+
},
19+
{
20+
"WhoIsSethDaniel/mason-tool-installer.nvim",
21+
optional = true,
22+
opts = function(_, opts)
23+
opts.ensure_installed = require("astrocore").list_insert_unique(
24+
opts.ensure_installed,
25+
{ "nginx-config-formatter", "nginx_language_server" }
26+
)
27+
end,
28+
},
29+
{
30+
"stevearc/conform.nvim",
31+
optional = true,
32+
opts = {
33+
formatters_by_ft = {
34+
nginx = { "nginxfmt" },
35+
},
36+
},
37+
},
38+
}

0 commit comments

Comments
 (0)