aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_cmake.lua
blob: aa6077c3bb9d8611f30b78d58fd3af0be89210b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- mod-version:3
local syntax = require "core.syntax"

syntax.add {
  name = "CMake",
  files = { "%.cmake$", "CMakeLists.txt$" },
  comment = "#",
  block_comment = { "#[[", "]]" },
  patterns = {
    { pattern = { '#%[=*%[', '%]=*%]' }, type = "comment"  },
    { pattern = "#.*",                   type = "comment"  },
    { pattern = { '%[=*%[', '%]=*%]' },  type = "string"   },
    { pattern = { '"', '"', '\\' },      type = "string"   },
    { pattern = "[%a_][%w_]*%f[(]",      type = "function" },
    { pattern = "[%a_][%w_]*",           type = "normal"   },
    { pattern = "%${[%a_][%w_]*%}",      type = "operator" },
  },
  symbols = {},
}