fix(filetype): fixup scd filetype detection (#18403)

This commit is contained in:
Gregory Anders
2022-05-03 15:03:42 -06:00
committed by GitHub
parent 9005ffbe77
commit 815b65d777

View File

@@ -335,7 +335,7 @@ function M.scd(bufnr)
local first = "^%S+%(%d[0-9A-Za-z]*%)"
local opt = [[%s+"[^"]*"]]
local line = getlines(bufnr, 1)
if findany(line, { "$", first .. opt .. "$", first .. opt .. opt .. "$" }) then
if findany(line, { first .. "$", first .. opt .. "$", first .. opt .. opt .. "$" }) then
vim.bo[bufnr].filetype = "scdoc"
else
vim.bo[bufnr].filetype = "supercollider"