Skip to content

Commit 917fbf9

Browse files
Silently execute syntax include to avoid error if filetype does not exist.
1 parent c91fb47 commit 917fbf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/org/syntax.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ local function load_code_blocks()
1212
end
1313

1414
for _, ft in ipairs(orgfile.source_code_filetypes) do
15-
vim.cmd(string.format([[syntax include @orgmodeBlockSrc%s syntax/%s.vim]], ft, ft))
15+
vim.cmd(string.format([[silent! syntax include @orgmodeBlockSrc%s syntax/%s.vim]], ft, ft))
1616
vim.cmd([[unlet! b:current_syntax]])
1717
end
1818

0 commit comments

Comments
 (0)