mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-12 13:33:49 -05:00
Disable languages also from heuristics, fixes #673
This commit is contained in:
@@ -427,18 +427,10 @@ def rule_to_code(rule)
|
||||
end.join("\n")
|
||||
end
|
||||
|
||||
if rule.has_key?("if_set")
|
||||
if rule.has_key?("if")
|
||||
return <<~EOS
|
||||
if #{rule["negative"] ? "!" : ""}#{rule["if_set"]}
|
||||
#{indent(rule_to_code(except(rule, "if_set", "negative")), 2)}
|
||||
endif
|
||||
EOS
|
||||
end
|
||||
|
||||
if rule.has_key?("if_exists")
|
||||
return <<~EOS
|
||||
if #{rule["negative"] ? "!" : ""}exists("#{rule["if_exists"]}")
|
||||
#{indent(rule_to_code(except(rule, "if_exists", "negative")), 2)}
|
||||
if #{rule["if"]}
|
||||
#{indent(rule_to_code(except(rule, "if")), 2)}
|
||||
endif
|
||||
EOS
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user