From 005eb12cfebdb2cd8f11708f5e6c38934841566c Mon Sep 17 00:00:00 2001 From: Edgar Date: Mon, 17 May 2021 21:54:16 +0200 Subject: [PATCH] update readme accordingly --- highlight/README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/highlight/README.md b/highlight/README.md index 89b19d7f..c04c7c08 100644 --- a/highlight/README.md +++ b/highlight/README.md @@ -18,7 +18,7 @@ tree-sitter-javascript = "0.19" Define the list of highlight names that you will recognize: ```rust -let highlight_names : Vec = [ +let highlight_names = &[ "attribute", "constant", "function.builtin", @@ -37,11 +37,7 @@ let highlight_names : Vec = [ "variable", "variable.builtin", "variable.parameter", -] -.iter() -.cloned() -.map(String::from) -.collect(); +]; ``` Create a highlighter. You need one of these for each thread that you're using for syntax highlighting: