aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorshadmansaleh <shadmansaleh3@gmail.com>2021-06-02 09:32:37 +0600
committershadmansaleh <shadmansaleh3@gmail.com>2021-06-11 01:01:02 +0600
commit1e6c02510afd79659519f2a69075b36784134322 (patch)
tree7fbaef25232965a5a9aa074c730ae71f981e6c74 /src/nvim/syntax.c
parent687eb0b39f3bcad9566198b4c60bbd2755032991 (diff)
downloadrneovim-1e6c02510afd79659519f2a69075b36784134322.tar.gz
rneovim-1e6c02510afd79659519f2a69075b36784134322.tar.bz2
rneovim-1e6c02510afd79659519f2a69075b36784134322.zip
feat(runtime): Allow lua to be used in colorschemes
* tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index ed886ab7f9..ce81f26d38 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -6438,6 +6438,10 @@ int load_colors(char_u *name)
apply_autocmds(EVENT_COLORSCHEMEPRE, name, curbuf->b_fname, false, curbuf);
snprintf((char *)buf, buflen, "colors/%s.vim", name);
retval = source_runtime(buf, DIP_START + DIP_OPT);
+ if (retval == FAIL) {
+ snprintf((char *)buf, buflen, "colors/%s.lua", name);
+ retval = source_runtime(buf, DIP_START + DIP_OPT);
+ }
xfree(buf);
apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, FALSE, curbuf);