Added file-header pattern support to syntax
This commit is contained in:
@@ -2,6 +2,7 @@ local syntax = require "core.syntax"
|
||||
|
||||
syntax.add {
|
||||
files = "%.lua$",
|
||||
headers = "^#!.*[ /]lua",
|
||||
comment = "--",
|
||||
patterns = {
|
||||
{ pattern = { '"', '"', '\\' }, type = "string" },
|
||||
|
||||
@@ -2,6 +2,7 @@ local syntax = require "core.syntax"
|
||||
|
||||
syntax.add {
|
||||
files = "%.py$",
|
||||
headers = "^#!.*[ /]python",
|
||||
comment = "#",
|
||||
patterns = {
|
||||
{ pattern = { "#", "\n" }, type = "comment" },
|
||||
|
||||
@@ -2,6 +2,7 @@ local syntax = require "core.syntax"
|
||||
|
||||
syntax.add {
|
||||
files = { "%.xml$", "%.html?$" },
|
||||
headers = "<%?xml",
|
||||
patterns = {
|
||||
{ pattern = { "<!%-%-", "%-%->" }, type = "comment" },
|
||||
{ pattern = { '%f[^>][^<]', '%f[<]' }, type = "normal" },
|
||||
|
||||
Reference in New Issue
Block a user