mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-14 14:33:50 -05:00
Resolve issues with loading order, closes #571
This commit is contained in:
@@ -94,9 +94,6 @@ def load_data()
|
||||
languages = load_languages
|
||||
heuristics = load_heuristics
|
||||
|
||||
# Reason can have ocaml as interpreter but let's not depend on it...
|
||||
languages["Reason"]["interpreters"] -= ["ocaml"]
|
||||
|
||||
for package in packages
|
||||
for filetype in package["filetypes"]
|
||||
if filetype["linguist"]
|
||||
@@ -584,13 +581,13 @@ def generate_ftdetect(packages, heuristics)
|
||||
|
||||
show_warnings(all_filetypes, expected_filetypes)
|
||||
|
||||
ftdetect = File.read('filetype.vim')
|
||||
ftdetect = File.read('ftdetect/polyglot.vim')
|
||||
|
||||
starting = '" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE'
|
||||
ending = '" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE'
|
||||
|
||||
File.write(
|
||||
'filetype.vim',
|
||||
'ftdetect/polyglot.vim',
|
||||
ftdetect.gsub(/(?<=#{starting}\n)(.*)(?=#{ending})/m) { output }
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user