diff options
| author | jgmdev <jgmdev@gmail.com> | 2024-06-12 02:48:51 -0400 |
|---|---|---|
| committer | jgmdev <jgmdev@gmail.com> | 2024-06-12 02:48:51 -0400 |
| commit | ef58b96e09e6da7f98ed5abc2e3148e53c6b1669 (patch) | |
| tree | a431010ea90bf1ea2b99673e070d7d29e10a83dd | |
| parent | e47ab4e1ffeb7f97cc17ad5fe350f811014330f6 (diff) | |
| download | pragtical-plugins-ef58b96e09e6da7f98ed5abc2e3148e53c6b1669.tar.gz pragtical-plugins-ef58b96e09e6da7f98ed5abc2e3148e53c6b1669.zip | |
Adapted language_nginx to better match conf files
This should prevent conflicts with latest language_ini changes.
| -rw-r--r-- | manifest.json | 2 | ||||
| -rw-r--r-- | plugins/language_nginx.lua | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/manifest.json b/manifest.json index 14be186..8037f91 100644 --- a/manifest.json +++ b/manifest.json @@ -1305,7 +1305,7 @@ "tags": [ "language" ], - "version": "0.1" + "version": "0.1.1" }, { "description": "Syntax for the [Nim](https://nim-lang.org) programming language", diff --git a/plugins/language_nginx.lua b/plugins/language_nginx.lua index 7124c1a..9de36b3 100644 --- a/plugins/language_nginx.lua +++ b/plugins/language_nginx.lua @@ -5,7 +5,10 @@ local syntax = require "core.syntax" syntax.add { name = "Nginx", - files = { "%.conf$" }, + files = { + PATHSEP .. "nginx%.conf$", + PATHSEP .. "nginx" .. PATHSEP .. ".*%.conf$" + }, comment = "#", patterns = { { pattern = "#.*", type = "comment" }, @@ -13,7 +16,7 @@ syntax.add { { pattern = { "'", "'", }, type = "string" }, { pattern = "[0-9]", type = "number" }, { pattern = "[%a_][%w_]*", type = "symbol" }, - { pattern = "%$%w+", type = "keyword2" } + { pattern = "%$[%w_]+", type = "keyword2" } }, symbols = { -- constant.language.module.events |
