From fbdb226318e3e1747b29f31ad07c0cce07e9f22a Mon Sep 17 00:00:00 2001 From: Auxiliary-Character Date: Fri, 1 Nov 2019 03:22:34 -0500 Subject: Added containedin=javaScript to html syntax region (#17) I was suprised to find when I started digging that this plugin already has a syntax region for html, since it didn't actually work for me. After investigating what was going on using [this](https://vim.fandom.com/wiki/Identify_the_syntax_highlighting_group_used_at_the_cursor), I came to the realization that the html plugin was already highlighting the content within script tags as JavaScript, and that this was taking priority over glsl highlighting that this plugin does. Well, according to [this StackOverflow answer](https://vim.fandom.com/wiki/Identify_the_syntax_highlighting_group_used_at_the_cursor), you can beat such priority conflicts by telling vim that this group (`ShaderScript`) `containedin` another group (`javaScript`). This appears to have solved the problem for me. --- after/syntax/html.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'after/syntax/html.vim') diff --git a/after/syntax/html.vim b/after/syntax/html.vim index 667b27a..9b8979c 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -5,5 +5,7 @@ syn include @GLSL syntax/glsl.vim syn region ShaderScript \ start=""me=s-1 \ contains=@GLSL,htmlScriptTag,@htmlPreproc -- cgit v1.2.3