diff --git a/languages.toml b/languages.toml index 2bf9218e5128..cb5f1391db0b 100644 --- a/languages.toml +++ b/languages.toml @@ -1,5 +1,4 @@ -# Language support configuration. -# See the languages documentation: https://docs.helix-editor.com/master/languages.html +# Language support configuration. See the languages documentation: https://docs.helix-editor.com/master/languages.html [[language]] name = "rust" @@ -2369,3 +2368,16 @@ language-server = { command = "cs", args = ["launch", "com.disneystreaming.smith [[grammar]] name = "smithy" source = { git = "https://github.com/indoorvivants/tree-sitter-smithy", rev = "cf8c7eb9faf7c7049839585eac19c94af231e6a0" } + +[[language]] +name = "puppet" +scope = "source.puppet" +injection-regex = "puppet" +file-types = ["puppet"] +roots = [] +indent = { tab_width = 2, unit = " " } +comment-token = "#" + +[[grammar]] +name = "puppet" +source = { git = "https://github.com/neovim-puppet/tree-sitter-puppet", rev = "bdedf4d5b13b4020745a678364e2f441cd3abf2a" } diff --git a/runtime/queries/puppet/highlights.scm b/runtime/queries/puppet/highlights.scm new file mode 100644 index 000000000000..6720a7167cd6 --- /dev/null +++ b/runtime/queries/puppet/highlights.scm @@ -0,0 +1,68 @@ +(function) @function +(variable) @variable +[ + (identifier) +] @identifier + +[ + "class" + "define" + "plan" + "node" + "type" +] @keyword + +[ + "contain" + "include" + "inherits" + "require" +] @include + +[ + "case" + "else" + "elsif" + "if" + "unless" +] @conditional + +(string) @string +(regex) @regex +(integer) @number +(float) @float +(regex) @string.regex +(comment) @comment +[(true) (false)] @boolean + +(unprotected_string) @text + +[ + (chaining_arrow) + (operator) +] @operator + + +(interpolation + "${" @punctuation.special + "}" @punctuation.special) @none + +[ + "(" + ")" + "[" + "]" + "{" + "}" + ]@punctuation.bracket + +[ + "," + ":" + "::" +] @punctuation.delimiter + +[(type) (type_identifier)] @type + +(escape_sequence) @escape +