summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-02 00:36:09 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-02 00:36:09 +0200
commit560024abe07ac73b31574167653a9b94821365fb (patch)
tree16d00f8cf054f3d77271bc03473ab0b6711956f4
parent3ad297db5c1cf94660e4297ffa81b6281eab2884 (diff)
downloadvim-polyglot-4.13.1.tar.gz
vim-polyglot-4.13.1.zip
Resolve issues with loading order, closes #571v4.13.1
-rw-r--r--README.md3
-rw-r--r--after/syntax/cpp.vim374
-rw-r--r--after/syntax/ruby.vim4
-rw-r--r--filetype.vim1219
-rw-r--r--ftdetect/polyglot.vim3434
-rw-r--r--ftplugin/awk.vim41
-rw-r--r--plugin/polyglot.vim9
-rwxr-xr-xscripts/build7
-rw-r--r--syntax/odin.vim2
9 files changed, 3541 insertions, 1552 deletions
diff --git a/README.md b/README.md
index da678bf0..75dfdf2f 100644
--- a/README.md
+++ b/README.md
@@ -32,11 +32,10 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
You can also use Vim 8 built-in package manager:
```
+" You should put in your ~/.vimrc "packadd vim-polyglot"
git clone --depth 1 https://github.com/sheerun/vim-polyglot ~/.vim/pack/plugins/opt/vim-polyglot
```
-**And then add `packload` command to your `.vimrc`** (or `packadd vim-polyglot`)
-
NOTE: Not all features of individual language packs are available. We strip them from functionality slowing vim startup (for example we ignore `plugins` folder that is loaded regardless of file type, instead we prefer `ftplugin` which is loaded lazily).
If you need full functionality of any plugin, please use it directly with your plugin manager.
diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim
index 00ab539c..91030f39 100644
--- a/after/syntax/cpp.vim
+++ b/after/syntax/cpp.vim
@@ -4,9 +4,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') ==
" Vim syntax file
" Language: C++ (Standard library including C++11/14/17/20)
" Original Author: Jon Haggblad <https://github.com/octol>
-" Maintainer: bfrg <bfrg@users.noreply.github.com>
+" Maintainer: bfrg <https://github.com/bfrg>
" Website: https://github.com/bfrg/vim-cpp-modern
-" Last Change: Jun 23, 2020
+" Last Change: Oct 1, 2020
"
" This syntax file is based on:
" https://github.com/octol/vim-cpp-enhanced-highlight
@@ -17,18 +17,18 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') ==
syntax keyword cppSTLconstant
\ MB_CUR_MAX MB_LEN_MAX WCHAR_MAX WCHAR_MIN WEOF __STDC_UTF_16__ __STDC_UTF_32__
+syntax keyword cppSTLnamespace
+ \ std experimental rel_ops
+
syntax keyword cppSTLconstant
\ badbit digits digits10 eofbit failbit goodbit has_denorm has_denorm_loss has_infinity has_quiet_NaN has_signaling_NaN is_bounded is_exact is_iec559 is_integer is_modulo is_signed is_specialized max_exponent max_exponent10 min_exponent min_exponent10 nothrow npos radix round_style tinyness_before traps
-syntax keyword cppSTLVariable
+syntax keyword cppSTLvariable
\ cerr cin clog cout wcerr wcin wclog wcout
syntax keyword cppSTLexception
\ bad_alloc bad_exception bad_typeid bad_cast domain_error exception failure invalid_argument length_error logic_error out_of_range overflow_error range_error runtime_error underflow_error
-syntax keyword cppSTLfunctional
- \ binary_function binary_negate bit_and bit_not bit_or divides equal_to greater greater_equal less less_equal logical_and logical_not logical_or minus modulus multiplies negate not_equal_to plus unary_function unary_negate
-
syntax keyword cppSTLios
\ endl ends flush resetiosflags setbase setfill setiosflags setprecision setw ws
@@ -36,230 +36,83 @@ syntax keyword cppSTLios
\ boolalpha dec defaultfloat fixed hex hexfloat internal left noboolalpha noshowbase noshowpoint noshowpos noskipws nounitbuf nouppercase oct right scientific showbase showpoint showpos skipws unitbuf uppercase
syntax keyword cppSTLtype
- \ fmtflags iostate openmode
-
-" Some of these can be highlighted as both cppSTLios and cppSTLconstant
-" syntax keyword cppSTLconstant
-" \ adjustfield app ate basefield binary floatfield in out trunc boolalpha dec fixed hex internal left oct right scientific showbase showpoint showpos skipws unitbuf uppercase
+ \ fmtflags iostate openmode Init allocator auto_ptr basic_filebuf basic_fstream basic_ifstream basic_ios basic_iostream basic_istream basic_istringstream basic_ofstream basic_ostream basic_ostringstream basic_streambuf basic_string basic_stringbuf basic_stringstream binary_compose binder1st binder2nd bitset char_traits char_type const_mem_fun1_t const_mem_fun_ref1_t const_mem_fun_ref_t const_mem_fun_t const_pointer const_reference container_type deque difference_type div_t double_t event_callback filebuf first_type float_denorm_style float_round_style float_t fpos fstream gslice_array ifstream imaxdiv_t indirect_array int_type ios ios_base iostream istream istringstream istrstream iterator_category iterator_traits key_compare key_type ldiv_t list lldiv_t map mapped_type mask_array mbstate_t mem_fun1_t mem_fun_ref1_t mem_fun_ref_t mem_fun_t multimap multiset nothrow_t numeric_limits off_type ofstream ostream ostringstream ostrstream pair pointer pointer_to_binary_function pointer_to_unary_function pos_type priority_queue queue reference second_type seekdir sequence_buffer set sig_atomic_t size_type slice_array stack state_type stream streambuf streamoff streampos streamsize string stringbuf stringstream strstream strstreambuf temporary_buffer test_type time_t tm traits_type type_info u16string u32string unary_compose unary_negate valarray value_compare value_type vector wctrans_t wctype_t wfilebuf wfstream wifstream wint_t wios wiostream wistream wistringstream wofstream wostream wostringstream wstreambuf wstreampos wstring wstringbuf wstringstream codecvt codecvt_base codecvt_byname collate collate_byname ctype ctype_base ctype_byname locale messages messages_base messages_byname money_base money_get money_put moneypunct moneypunct_byname num_get num_put numpunct numpunct_byname time_base time_get time_get_byname time_put time_put_byname binary_function binary_negate bit_and bit_not bit_or divides equal_to greater greater_equal less less_equal logical_and logical_not logical_or minus modulus multiplies negate not_equal_to plus unary_function unary_negate bidirectional_iterator_tag forward_iterator_tag input_iterator_tag output_iterator_tag random_access_iterator_tag
syntax keyword cppSTLiterator
\ back_insert_iterator bidirectional_iterator const_iterator const_reverse_iterator forward_iterator front_insert_iterator input_iterator insert_iterator istream_iterator istreambuf_iterator iterator ostream_iterator ostreambuf_iterator output_iterator random_access_iterator raw_storage_iterator reverse_bidirectional_iterator reverse_iterator
-syntax keyword cppSTLiterator_tag
- \ bidirectional_iterator_tag forward_iterator_tag input_iterator_tag output_iterator_tag random_access_iterator_tag
-
-syntax keyword cppSTLnamespace
- \ experimental rel_ops std
-
-syntax keyword cppSTLtype
- \ Init allocator auto_ptr basic_filebuf basic_fstream basic_ifstream basic_ios basic_iostream basic_istream basic_istringstream basic_ofstream basic_ostream basic_ostringstream basic_streambuf basic_string basic_stringbuf basic_stringstream binary_compose binder1st binder2nd bitset char_traits char_type const_mem_fun1_t const_mem_fun_ref1_t const_mem_fun_ref_t const_mem_fun_t const_pointer const_reference container_type deque difference_type div_t double_t event_callback filebuf first_type float_denorm_style float_round_style float_t fpos fstream gslice_array ifstream imaxdiv_t indirect_array int_type ios ios_base iostream istream istringstream istrstream iterator_category iterator_traits key_compare key_type ldiv_t list lldiv_t map mapped_type mask_array mbstate_t mem_fun1_t mem_fun_ref1_t mem_fun_ref_t mem_fun_t multimap multiset nothrow_t numeric_limits off_type ofstream ostream ostringstream ostrstream pair pointer pointer_to_binary_function pointer_to_unary_function pos_type priority_queue queue reference second_type seekdir sequence_buffer set sig_atomic_t size_type slice_array stack state_type stream streambuf streamoff streampos streamsize string stringbuf stringstream strstream strstreambuf temporary_buffer test_type time_t tm traits_type type_info u16string u32string unary_compose unary_negate valarray value_compare value_type vector wctrans_t wctype_t wfilebuf wfstream wifstream wint_t wios wiostream wistream wistringstream wofstream wostream wostringstream wstreambuf wstreampos wstring wstringbuf wstringstream
+" Function templates that are called with template parameters
+syntax keyword cppSTLfunction
+ \ use_facet has_facet get
-" locale
-syntax keyword cppSTLtype
- \ codecvt codecvt_base codecvt_byname collate collate_byname ctype ctype_base ctype_byname locale messages messages_base messages_byname money_base money_get money_put moneypunct moneypunct_byname num_get num_put numpunct numpunct_byname time_base time_get time_get_byname time_put time_put_byname
-
-" template functions that are called with template parameters, like
-" std::use_facet<std::moneypunct<char, true>>(loc).curr_symbol()
-syntax keyword cppSTLfunction use_facet has_facet
-
-" std::get is a template function, so when called as std::get<N>(t), we want it
-" to be highlighted as a function
-syntax keyword cppSTLfunction get
+" Some of these keywords can be highlighted as cppSTLios or cppSTLconstant
+" syntax keyword cppSTLconstant
+" \ adjustfield app ate basefield binary floatfield in out trunc boolalpha dec fixed hex internal left oct right scientific showbase showpoint showpos skipws unitbuf uppercase
" C++11 extensions {{{1
if !exists('cpp_no_cpp11')
+ syntax keyword cppStatement nullptr
syntax keyword cppType char16_t char32_t
- syntax keyword cppSTLconstant nullptr
-
- " std containers
- syntax keyword cppSTLtype array
-
- " atomic
- syntax keyword cppSTLconstant ATOMIC_FLAG_INIT
- syntax keyword cppSTLenum memory_order
- syntax keyword cppSTLtype
- \ atomic atomic_bool atomic_char atomic_char16_t atomic_char32_t atomic_flag atomic_int atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_t atomic_int_fast8_t atomic_int_least16_t atomic_int_least32_t atomic_int_least64_t atomic_int_least8_t atomic_intmax_t atomic_intptr_t atomic_llong atomic_long atomic_ptrdiff_t atomic_schar atomic_short atomic_size_t atomic_uchar atomic_uint atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t atomic_uint_fast8_t atomic_uint_least16_t atomic_uint_least32_t atomic_uint_least64_t atomic_uint_least8_t atomic_uintmax_t atomic_uintptr_t atomic_ullong atomic_ulong atomic_ushort atomic_wchar_t
-
- " chrono
- syntax keyword cppSTLnamespace chrono
- syntax keyword cppSTLcast duration_cast time_point_cast
- syntax keyword cppSTLtype
- \ duration duration_values high_resolution_clock hours microseconds milliseconds minutes nanoseconds seconds steady_clock system_clock time_point treat_as_floating_point
-
- " condition_variable
- syntax keyword cppSTLtype condition_variable
-
- " cstddef
- syntax keyword cppSTLtype nullptr_t max_align_t
-
- " exception
- syntax keyword cppSTLtype exception_ptr nested_exception
-
- " functional
- syntax keyword cppSTLexception bad_function_call
- syntax keyword cppSTLfunctional function
- syntax keyword cppSTLfunction mem_fn
- syntax keyword cppSTLconstant _1 _2 _3 _4 _5 _6 _7 _8 _9
- syntax keyword cppSTLtype
- \ hash is_bind_expression is_placeholder reference_wrapper
-
- " iterator
- syntax keyword cppSTLiterator move_iterator
-
- " forward_list
- syntax keyword cppSTLtype forward_list
- " future
- syntax keyword cppSTLtype future packaged_task promise shared_future
- syntax keyword cppSTLenum future_status future_errc launch
- syntax keyword cppSTLexception future_error
-
- " initializer_list
- syntax keyword cppSTLtype initializer_list
-
- " ios
- syntax keyword cppSTLenum io_errc
- " syntax keyword cppSTLtype is_error_code_enum
-
- " limits
- syntax keyword cppSTLconstant max_digits10
-
- " locale
- syntax keyword cppSTLfunction isblank
- syntax keyword cppSTLtype
- \ codecvt_mode codecvt_utf16 codecvt_utf8 codecvt_utf8_utf16 wbuffer_convert wstring_convert
-
- " memory
- syntax keyword cppSTLconstant allocator_arg
- syntax keyword cppSTLexception bad_weak_ptr
- syntax keyword cppSTLfunction allocate_shared make_shared
- syntax keyword cppSTLfunction
- \ const_pointer_cast dynamic_pointer_cast static_pointer_cast
+ syntax keyword cppSTLnamespace chrono this_thread
syntax keyword cppSTLtype
- \ allocator_arg_t allocator_traits allocator_type default_delete enable_shared_from_this is_always_equal owner_less pointer_safety pointer_traits propagate_on_container_copy_assignment propagate_on_container_move_assignment propagate_on_container_swap rebind_alloc rebind_traits shared_ptr unique_ptr uses_allocator void_pointer const_void_pointer weak_ptr
+ \ array atomic atomic_bool atomic_char atomic_char16_t atomic_char32_t atomic_flag atomic_int atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_t atomic_int_fast8_t atomic_int_least16_t atomic_int_least32_t atomic_int_least64_t atomic_int_least8_t atomic_intmax_t atomic_intptr_t atomic_llong atomic_long atomic_ptrdiff_t atomic_schar atomic_short atomic_size_t atomic_uchar atomic_uint atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t atomic_uint_fast8_t atomic_uint_least16_t atomic_uint_least32_t atomic_uint_least64_t atomic_uint_least8_t atomic_uintmax_t atomic_uintptr_t atomic_ullong atomic_ulong atomic_ushort atomic_wchar_t duration duration_values high_resolution_clock hours microseconds milliseconds minutes nanoseconds seconds steady_clock system_clock time_point treat_as_floating_point condition_variable nullptr_t max_align_t exception_ptr nested_exception hash is_bind_expression is_placeholder reference_wrapper forward_list future packaged_task promise shared_future initializer_list codecvt_mode codecvt_utf16 codecvt_utf8 codecvt_utf8_utf16 wbuffer_convert wstring_convert allocator_arg_t allocator_traits allocator_type default_delete enable_shared_from_this is_always_equal owner_less pointer_safety pointer_traits propagate_on_container_copy_assignment propagate_on_container_move_assignment propagate_on_container_swap rebind_alloc rebind_traits shared_ptr unique_ptr uses_allocator void_pointer const_void_pointer weak_ptr adopt_lock_t condition_variable_any defer_lock_t lock_guard mutex once_flag recursive_mutex recursive_timed_mutex timed_mutex try_to_lock_t unique_lock bernoulli_distribution binomial_distribution cauchy_distribution chi_squared_distribution default_random_engine discard_block_engine discrete_distribution exponential_distribution extreme_value_distribution fisher_f_distribution gamma_distribution geometric_distribution independent_bits_engine knuth_b linear_congruential_engine lognormal_distribution mersenne_twister_engine minstd_rand minstd_rand0 mt19937 mt19937_64 negative_binomial_distribution normal_distribution piecewise_constant_distribution piecewise_linear_distribution poisson_distribution random_device ranlux24 ranlux24_base ranlux48 ranlux48_base seed_seq shuffle_order_engine student_t_distribution subtract_with_carry_engine uniform_int_distribution uniform_real_distribution weibull_distribution atto centi deca deci exa femto giga hecto kilo mega micro milli nano peta pico ratio ratio_add ratio_divide ratio_equal ratio_greater ratio_greater_equal ratio_less ratio_less_equal ratio_multiply ratio_not_equal ratio_subtract tera yocto yotta zepto zetta basic_regex match_results regex_traits sub_match syntax_option_type match_flag_type error_type scoped_allocator_adaptor outer_allocator_type inner_allocator_type error_code error_condition error_category is_error_code_enum is_error_condition_enum thread tuple tuple_size tuple_element type_index add_const add_cv add_lvalue_reference add_pointer add_rvalue_reference add_volatile aligned_storage aligned_union alignment_of common_type conditional decay enable_if extent false_type has_virtual_destructor integral_constant is_abstract is_arithmetic is_array is_assignable is_base_of is_class is_compound is_const is_constructible is_convertible is_copy_assignable is_copy_constructible is_default_constructible is_destructible is_empty is_enum is_floating_point is_function is_fundamental is_integral is_literal_type is_lvalue_reference is_member_function_pointer is_member_object_pointer is_member_pointer is_move_assignable is_move_constructible is_nothrow_assignable is_nothrow_constructible is_nothrow_copy_assignable is_nothrow_copy_constructible is_nothrow_default_constructible is_nothrow_destructible is_nothrow_move_assignable is_nothrow_move_constructible is_object is_pod is_pointer is_polymorphic is_reference is_rvalue_reference is_same is_scalar is_signed is_standard_layout is_trivial is_trivially_assignable is_trivially_constructible is_trivially_copy_assignable is_trivially_copy_constructible is_trivially_copyable is_trivially_default_constructible is_trivially_destructible is_trivially_move_assignable is_trivially_move_constructible is_union is_unsigned is_void is_volatile make_signed make_unsigned rank remove_all_extents remove_const remove_cv remove_extent remove_pointer remove_reference remove_volatile result_of true_type underlying_type hasher key_equal unordered_map unordered_multimap unordered_multiset unordered_set piecewise_construct_t function
- " mutex
- syntax keyword cppSTLenum cv_status
- syntax keyword cppSTLconstant defer_lock try_to_lock adopt_lock
- syntax keyword cppSTLtype
- \ adopt_lock_t condition_variable_any defer_lock_t lock_guard mutex once_flag recursive_mutex recursive_timed_mutex timed_mutex try_to_lock_t unique_lock
-
- " new
- syntax keyword cppSTLexception bad_array_new_length
-
- " numerics, cmath
syntax keyword cppSTLconstant
- \ FLT_EVAL_METHOD FP_INFINITE FP_NAN FP_NORMAL FP_SUBNORMAL FP_ZERO HUGE_VALF HUGE_VALL INFINITY MATH_ERREXCEPT MATH_ERRNO NAN math_errhandling
-
- " random
- syntax keyword cppSTLfunction generate_canonical
- syntax keyword cppSTLtype
- \ bernoulli_distribution binomial_distribution cauchy_distribution chi_squared_distribution default_random_engine discard_block_engine discrete_distribution exponential_distribution extreme_value_distribution fisher_f_distribution gamma_distribution geometric_distribution independent_bits_engine knuth_b linear_congruential_engine lognormal_distribution mersenne_twister_engine minstd_rand minstd_rand0 mt19937 mt19937_64 negative_binomial_distribution normal_distribution piecewise_constant_distribution piecewise_linear_distribution poisson_distribution random_device ranlux24 ranlux24_base ranlux48 ranlux48_base seed_seq shuffle_order_engine student_t_distribution subtract_with_carry_engine uniform_int_distribution uniform_real_distribution weibull_distribution
-
- " ratio
- syntax keyword cppSTLtype
- \ atto centi deca deci exa femto giga hecto kilo mega micro milli nano peta pico ratio ratio_add ratio_divide ratio_equal ratio_greater ratio_greater_equal ratio_less ratio_less_equal ratio_multiply ratio_not_equal ratio_subtract tera yocto yotta zepto zetta
+ \ _1 _2 _3 _4 _5 _6 _7 _8 _9 max_digits10 allocator_arg defer_lock try_to_lock adopt_lock math_errhandling
- " regex
- syntax keyword cppSTLiterator regex_iterator regex_token_iterator
- syntax keyword cppSTLexception regex_error
- syntax keyword cppSTLtype
- \ basic_regex match_results regex_traits sub_match syntax_option_type match_flag_type error_type
-
- " scoped_allocator
- syntax keyword cppSTLtype
- \ scoped_allocator_adaptor outer_allocator_type inner_allocator_type
-
- " system_error
- syntax keyword cppSTLenum errc
- syntax keyword cppSTLexception system_error
- syntax keyword cppSTLtype
- \ error_code error_condition error_category is_error_code_enum is_error_condition_enum
-
- " thread
- syntax keyword cppSTLnamespace this_thread
- syntax keyword cppSTLtype thread
+ syntax keyword cppSTLconstant
+ \ FLT_EVAL_METHOD FP_INFINITE FP_NAN FP_NORMAL FP_SUBNORMAL FP_ZERO HUGE_VALF HUGE_VALL INFINITY MATH_ERREXCEPT MATH_ERRNO NAN
- " tuple
- syntax keyword cppSTLtype tuple tuple_size tuple_element
- syntax keyword cppSTLfunction forward_as_tuple make_tuple tie tuple_cat
- " Note: ignore is also a function
- " syntax keyword cppSTLVariable ignore
+ syntax keyword cppSTLenum
+ \ memory_order future_status future_errc launch io_errc cv_status errc
- " typeindex
- syntax keyword cppSTLtype type_index
+ syntax keyword cppSTLfunction
+ \ duration_cast time_point_cast mem_fn const_pointer_cast dynamic_pointer_cast static_pointer_cast allocate_shared make_shared isblank generate_canonical forward_as_tuple make_tuple tie tuple_cat declval forward move move_if_noexcept
- " type_traits
- syntax keyword cppSTLtype
- \ add_const add_cv add_lvalue_reference add_pointer add_rvalue_reference add_volatile aligned_storage aligned_union alignment_of common_type conditional decay enable_if extent false_type has_virtual_destructor integral_constant is_abstract is_arithmetic is_array is_assignable is_base_of is_class is_compound is_const is_constructible is_convertible is_copy_assignable is_copy_constructible is_default_constructible is_destructible is_empty is_enum is_floating_point is_function is_fundamental is_integral is_literal_type is_lvalue_reference is_member_function_pointer is_member_object_pointer is_member_pointer is_move_assignable is_move_constructible is_nothrow_assignable is_nothrow_constructible is_nothrow_copy_assignable is_nothrow_copy_constructible is_nothrow_default_constructible is_nothrow_destructible is_nothrow_move_assignable is_nothrow_move_constructible is_object is_pod is_pointer is_polymorphic is_reference is_rvalue_reference is_same is_scalar is_signed is_standard_layout is_trivial is_trivially_assignable is_trivially_constructible is_trivially_copy_assignable is_trivially_copy_constructible is_trivially_copyable is_trivially_default_constructible is_trivially_destructible is_trivially_move_assignable is_trivially_move_constructible is_union is_unsigned is_void is_volatile make_signed make_unsigned rank remove_all_extents remove_const remove_cv remove_extent remove_pointer remove_reference remove_volatile result_of true_type underlying_type
+ syntax keyword cppSTLexception
+ \ bad_function_call future_error regex_error system_error bad_weak_ptr bad_array_new_length
- " unordered_map, unordered_set, unordered_multimap, unordered_multiset
- syntax keyword cppSTLiterator const_local_iterator local_iterator
- syntax keyword cppSTLtype
- \ hasher key_equal unordered_map unordered_multimap unordered_multiset unordered_set
+ " syntax keyword cppSTLiterator contained
+ syntax keyword cppSTLiterator
+ \ move_iterator regex_iterator regex_token_iterator const_local_iterator local_iterator
- " utility
- syntax keyword cppSTLtype piecewise_construct_t
- syntax keyword cppSTLconstant piecewise_construct
- syntax keyword cppSTLfunction declval forward move move_if_noexcept
+ " Note: ignore is also a function (could also be put under cppSTLvariable)
+ syntax match cppSTLconstant "\<ignore\>(\@!"
endif
" C++14 extensions {{{1
if !exists('cpp_no_cpp14')
- " chrono
- syntax keyword cppSTLnamespace literals chrono_literals
+ syntax keyword cppSTLnamespace literals chrono_literals string_literals
- " memory
syntax keyword cppSTLfunction make_unique
- " utility
syntax keyword cppSTLtype
- \ index_sequence index_sequence_for integer_sequence make_index_sequence make_integer_sequence
-
- " shared_mutex
- syntax keyword cppSTLtype shared_lock shared_timed_mutex
-
- " string
- syntax keyword cppSTLnamespace string_literals
-
- " tuple
- syntax keyword cppSTLtype tuple_element_t
-
- " type_traits
- syntax keyword cppSTLtype
- \ add_const_t add_cv_t add_lvalue_reference_t add_pointer_t add_rvalue_reference_t add_volatile_t aligned_storage_t aligned_union_t common_type_t conditional_t decay_t enable_if_t is_null_pointer make_signed_t make_unsigned_t remove_all_extents_t remove_const_t remove_cv_t remove_extent_t remove_pointer_t remove_reference_t remove_volatile_t result_of_t underlying_type_t
+ \ index_sequence index_sequence_for integer_sequence make_index_sequence make_integer_sequence shared_lock shared_timed_mutex tuple_element_t add_const_t add_cv_t add_lvalue_reference_t add_pointer_t add_rvalue_reference_t add_volatile_t aligned_storage_t aligned_union_t common_type_t conditional_t decay_t enable_if_t is_null_pointer make_signed_t make_unsigned_t remove_all_extents_t remove_const_t remove_cv_t remove_extent_t remove_pointer_t remove_reference_t remove_volatile_t result_of_t underlying_type_t
endif
" C++17 extensions {{{1
if !exists('cpp_no_cpp17')
- " any
- syntax keyword cppSTLtype any
- syntax keyword cppSTLexception bad_any_cast
- syntax keyword cppSTLcast any_cast
+ syntax keyword cppSTLnamespace filesystem execution
- " atomic
- syntax keyword cppSTLconstant is_always_lock_free
+ syntax keyword cppSTLtype
+ \ any is_execution_policy parallel_policy parallel_unsequenced_policy sequenced_policy directory_entry directory_iterator file_status file_time_type path recursive_directory_iterator space_info default_order default_order_t default_searcher boyer_moore_searcher boyer_moore_horspool_searcher memory_resource monotonic_buffer_resource polymorphic_allocator pool_options synchronized_pool_resource unsynchronized_pool_resource scoped_lock optional nullopt_t shared_mutex basic_string_view string_view u16string_view u32string_view wstring_view bool_constant conjunction disjunction has_unique_object_representations invoke_result invoke_result_t is_aggregate is_callable is_invocable is_invocable_r is_nothrow_invocable is_nothrow_invocable_r is_nothrow_swappable is_nothrow_swappable_with is_nowthrow_callable is_swappable is_swappable_with negation void_t node_type insert_return_type in_place_tag in_place_t in_place_type_t in_place_index_t monostate variant variant_size variant_alternative variant_alternative_t
- " chrono
- syntax keyword cppSTLbool treat_as_floating_point_v
+ syntax keyword cppSTLexception
+ \ bad_any_cast filesystem_error bad_optional_access bad_variant_access
- " execution
- syntax keyword cppSTLnamespace execution
- syntax keyword cppSTLconstant seq par par_unseq
- syntax keyword cppSTLbool is_execution_policy_v
- syntax keyword cppSTLtype
- \ is_execution_policy parallel_policy parallel_unsequenced_policy sequenced_policy
+ syntax keyword cppSTLconstant
+ \ is_always_lock_free seq par par_unseq copy_symlinks auto_format create_hard_links create_symlinks directories_only follow_directory_symlink generic_format group_all group_exec group_read group_write native_format others_all others_exec others_read others_write overwrite_existing owner_all owner_exec owner_read owner_write preferred_separator recursive set_gid set_uid skip_existing skip_permission_denied skip_symlinks sticky_bit update_existing hardware_destructive_interference_size hardware_constructive_interference_size tuple_size_v nullopt alignment_of_v rank_v extent_v variant_npos variant_size_v
- " filesystem
- syntax keyword cppSTLnamespace filesystem
- syntax keyword cppSTLexception filesystem_error
+ syntax keyword cppSTLbool
+ \ treat_as_floating_point_v is_execution_policy_v is_bind_expression_v is_placeholder_v is_error_code_enum_v is_error_condition_enum_v uses_allocator_v conjunction_v disjunction_v has_unique_object_representations_v has_virtual_destructor_v is_abstract_v is_aggregate_v is_arithmetic_v is_array_v is_assignable_v is_base_of_v is_callable_v is_class_v is_compound_v is_const_v is_constructible_v is_convertible_v is_copy_assignable_v is_copy_constructible_v is_default_constructible_v is_destructible_v is_empty_v is_enum_v is_floating_point_v is_function_v is_fundamental_v is_integral_v is_invocable_r_v is_invocable_v is_literal_type_v is_lvalue_reference_v is_member_function_pointer_v is_member_object_pointer_v is_member_pointer_v is_move_assignable_v is_move_constructible_v is_nothrow_assignable_v is_nothrow_constructible_v is_nothrow_copy_assignable_v is_nothrow_copy_constructible_v is_nothrow_default_constructible_v is_nothrow_destructible_v is_nothrow_invocable_r_v is_nothrow_invocable_v is_nothrow_move_assignable_v is_nothrow_move_constructible_v is_nothrow_swappable_v is_nothrow_swappable_with_v is_nowthrow_callable_v is_null_pointer_v is_object_v is_pod_v is_pointer_v is_polymorphic_v is_reference_v is_rvalue_reference_v is_same_v is_scalar_v is_signed_v is_standard_layout_v is_swappable_v is_swappable_with_v is_trivial_v is_trivially_assignable_v is_trivially_constructible_v is_trivially_copy_assignable_v is_trivially_copy_constructible_v is_trivially_copyable_v is_trivially_default_constructible_v is_trivially_destructible_v is_trivially_move_assignable_v is_trivially_move_constructible_v is_union_v is_unsigned_v is_void_v is_volatile_v negation_v
- syntax keyword cppSTLtype
- \ directory_entry directory_iterator file_status file_time_type path recursive_directory_iterator space_info
+ syntax keyword cppSTLfunction
+ \ reinterpret_pointer_cast make_from_tuple make_optional any_cast
syntax keyword cppSTLenum
\ copy_options directory_options file_type perm_options perms
@@ -267,152 +120,39 @@ if !exists('cpp_no_cpp17')
" Note: There is std::filesystem::path::format and std::format() in <format>
syntax match cppSTLenum "\<format\>(\@!"
- syntax keyword cppSTLconstant
- \ copy_symlinks auto_format create_hard_links create_symlinks directories_only follow_directory_symlink generic_format group_all group_exec group_read group_write native_format others_all others_exec others_read others_write overwrite_existing owner_all owner_exec owner_read owner_write preferred_separator recursive set_gid set_uid skip_existing skip_permission_denied skip_symlinks sticky_bit update_existing
-
" Note: these keywords are very likely to coincide with user-defined variables
" syntax keyword cppSTLconstant
" \ all mask unknown replace add remove nofollow none not_found regular directory symlink block character fifo socket unknown
" Note: these are also functions
" syntax keyword cppSTLconstant capacity free available
-
- " functional
- syntax keyword cppSTLbool is_bind_expression_v is_placeholder_v
- syntax keyword cppSTLtype
- \ default_order default_order_t default_searcher boyer_moore_searcher boyer_moore_horspool_searcher
-
- " memory
- syntax keyword cppSTLfunction reinterpret_pointer_cast
- syntax keyword cppSTLconstant uses_allocator_v
-
- " memory_resource
- syntax keyword cppSTLtype
- \ memory_resource monotonic_buffer_resource polymorphic_allocator pool_options synchronized_pool_resource unsynchronized_pool_resource
-
- " mutex
- syntax keyword cppSTLtype scoped_lock
-
- " new
- syntax keyword cppSTLconstant
- \ hardware_destructive_interference_size hardware_constructive_interference_size
-
- " optional
- syntax keyword cppSTLtype optional nullopt_t
- syntax keyword cppSTLexception bad_optional_access
- syntax keyword cppSTLconstant nullopt
- syntax keyword cppSTLfunction make_optional
-
- " shared_mutex
- syntax keyword cppSTLtype shared_mutex
-
- " string_view
- syntax keyword cppSTLtype
- \ basic_string_view string_view u16string_view u32string_view wstring_view
-
- " system_error
- syntax keyword cppSTLbool is_error_code_enum_v is_error_condition_enum_v
-
- " tuple
- syntax keyword cppSTLconstant tuple_size_v
- syntax keyword cppSTLfunction make_from_tuple
-
- " type_traits
- syntax keyword cppSTLconstant alignment_of_v rank_v extent_v
- syntax keyword cppSTLbool
- \ conjunction_v disjunction_v has_unique_object_representations_v has_virtual_destructor_v is_abstract_v is_aggregate_v is_arithmetic_v is_array_v is_assignable_v is_base_of_v is_callable_v is_class_v is_compound_v is_const_v is_constructible_v is_convertible_v is_copy_assignable_v is_copy_constructible_v is_default_constructible_v is_destructible_v is_empty_v is_enum_v is_floating_point_v is_function_v is_fundamental_v is_integral_v is_invocable_r_v is_invocable_v is_literal_type_v is_lvalue_reference_v is_member_function_pointer_v is_member_object_pointer_v is_member_pointer_v is_move_assignable_v is_move_constructible_v is_nothrow_assignable_v is_nothrow_constructible_v is_nothrow_copy_assignable_v is_nothrow_copy_constructible_v is_nothrow_default_constructible_v is_nothrow_destructible_v is_nothrow_invocable_r_v is_nothrow_invocable_v is_nothrow_move_assignable_v is_nothrow_move_constructible_v is_nothrow_swappable_v is_nothrow_swappable_with_v is_nowthrow_callable_v is_null_pointer_v is_object_v is_pod_v is_pointer_v is_polymorphic_v is_reference_v is_rvalue_reference_v is_same_v is_scalar_v is_signed_v is_standard_layout_v is_swappable_v is_swappable_with_v is_trivial_v is_trivially_assignable_v is_trivially_constructible_v is_trivially_copy_assignable_v is_trivially_copy_constructible_v is_trivially_copyable_v is_trivially_default_constructible_v is_trivially_destructible_v is_trivially_move_assignable_v is_trivially_move_constructible_v is_union_v is_unsigned_v is_void_v is_volatile_v negation_v
-
- syntax keyword cppSTLtype
- \ bool_constant conjunction disjunction has_unique_object_representations invoke_result invoke_result_t is_aggregate is_callable is_invocable is_invocable_r is_nothrow_invocable is_nothrow_invocable_r is_nothrow_swappable is_nothrow_swappable_with is_nowthrow_callable is_swappable is_swappable_with negation void_t
-
- " unordered_map, unordered_set, unordered_multimap, unordered_multiset
- syntax keyword cppSTLtype node_type insert_return_type
-
- " utility
- syntax keyword cppSTLtype
- \ in_place_tag in_place_t in_place_type_t in_place_index_t
-
- " variant
- syntax keyword cppSTLconstant variant_npos variant_size_v
- syntax keyword cppSTLexception bad_variant_access
- syntax keyword cppSTLtype
- \ monostate variant variant_size variant_alternative variant_alternative_t
endif
" C++20 extensions {{{1
if !exists('cpp_no_cpp20')
- syntax keyword cppType char8_t
- syntax keyword cppOperator co_await
- syntax keyword cppStatement consteval constinit concept requires co_yield co_return
-
- " atomic
- syntax keyword cppSTLtype atomic_ref
-
- " bit
- syntax keyword cppSTLtype endian
-
- " compare
- syntax keyword cppSTLtype
- \ weak_ordering strong_ordering partial_ordering weak_equality strong_equality common_comparison_category common_comparison_category_t
+ syntax keyword cppSTLnamespace ranges views
+ syntax keyword cppSTLconstant dynamic_extent
+ syntax keyword cppSTLvariable default_sentinel unreachable_sentinel
- " concepts
- syntax keyword cppSTLconcept
- \ assignable_from boolean common_reference_with common_with constructible_from convertible_to copy_constructible copyable default_constructible derived_from destructible equality_comparable equality_comparable_with equivalence_relation floating_point integral invocable movable move_constructible predicate regular regular_invocable relation same_as semiregular signed_integral strict_weak_order swappable swappable_with totally_ordered totally_ordered_with unsigned_integral default_initializable
-
- " concepts - named requirements
- " These are concepts that haven't made it into the C++ Standard yet
- " https://en.cppreference.com/w/cpp/named_req
- " http://en.cppreference.com/w/cpp/language/constraints
- if get(g:, 'cpp_named_requirements_highlight', 0)
- syntax keyword cppSTLNamedReq
- \ Allocator AllocatorAwareContainer AssociativeContainer BasicLockable BidirectionalIterator BinaryPredicate BinaryTypeTrait BitmaskType Callable CharTraits Clock Compare ConstExprIterator Container ContiguousContainer ContiguousIterator CopyAssignable CopyInsertable CopyInsertable DefaultInsertable EmplaceConstructible Erasable FormattedInputFunction FormattedOutputFunction ForwardIterator FunctionObject Hash InputIterator Iterator LessThanComparable LiteralType Lockable MoveAssignable MoveInsertable Mutex NullablePointer NumericType OutputIterator PODType RandomAccessIterator RandomNumberDistribution RandomNumberEngine RandomNumberEngineAdaptor RegexTraits ReversibleContainer SeedSequence SequenceContainer SharedMutex SharedTimedMutex StandardLayoutType TimedLockable TimedMutex TransformationTrait TrivialClock TrivialType TriviallyCopyable UnaryTypeTrait UnformattedInputFunction UnformattedOutputFunction UniformRandomBitGenerator UnorderedAssociativeContainer ValueSwappable
- hi def link cppSTLNamedReq Typedef
- endif
-
- " contract
- syntax keyword cppSTLtype contract_violation
-
- " coroutines
syntax keyword cppSTLtype
- \ coroutine_traits coroutine_handle noop_coroutine_handle noop_coroutine_promise suspend_never suspend_always
+ \ atomic_ref endian weak_ordering strong_ordering partial_ordering weak_equality strong_equality common_comparison_category common_comparison_category_t contract_violation coroutine_traits coroutine_handle noop_coroutine_handle noop_coroutine_promise suspend_never suspend_always remove_cvref remove_cvref_t is_bounded_array is_layout_compatible is_unbounded_array is_nothrow_convertible has_strong_structural_equality is_pointer_interconvertible_base_of unwrap_reference unwrap_reference_t unwrap_ref_decay unwrap_ref_decay_t basic_common_reference common_reference common_reference_t iterator_t sentinel_t dangling safe_iterator_t safe_subrange_t ref_view filter_view transform_view iota_view join_view empty_view single_view split_view common_view reverse_view view_interface span basic_syncbuf basic_osyncstream syncbuf wsyncbuf osyncstream wosyncstream jthread latch barrier stop_token stop_source stop_callback counting_semaphore binary_semaphore source_location compare_three_way_result compare_three_way_result_t contiguous_iterator_tag incrementable_traits iter_value_t iter_reference_t iter_difference_t iter_rvalue_reference_t iter_common_reference_t indirectly_readable_traits move_sentinel default_sentinel_t unreachable_sentinel_t common_iterator counted_iterator indirect_result_t projected type_identity type_identity_t
- " memory
syntax keyword cppSTLfunction
- \ make_unique_default_init make_shared_default_init allocate_shared_default_init uses_allocator_construction_args make_obj_using_allocator
-
- " type_traits
- syntax keyword cppSTLtype
- \ remove_cvref remove_cvref_t is_bounded_array is_layout_compatible is_unbounded_array is_nothrow_convertible has_strong_structural_equality is_pointer_interconvertible_base_of unwrap_reference unwrap_reference_t unwrap_ref_decay unwrap_ref_decay_t basic_common_reference common_reference common_reference_t
+ \ make_unique_default_init make_shared_default_init allocate_shared_default_init uses_allocator_construction_args make_obj_using_allocator is_corresponding_member subspan in_range is_pointer_interconvertible_with_class
syntax keyword cppSTLbool
- \ is_bounded_array_v is_layout_compatible_v is_unbounded_array_v is_nothrow_convertible_v has_strong_structural_equality_v is_pointer_interconvertible_base_of_v
-
- syntax keyword cppSTLfunction is_corresponding_member
-
- " ranges
- syntax keyword cppSTLnamespace ranges views
+ \ is_bounded_array_v is_layout_compatible_v is_unbounded_array_v is_nothrow_convertible_v has_strong_structural_equality_v is_pointer_interconvertible_base_of_v disable_sized_sentinel_for disable_sized_range enable_borrowed_range enable_view
syntax keyword cppSTLconcept
- \ range sized_range view input_range output_range forward_range bidirectional_range random_access_range contiguous_range common_range viewable_range
-
- syntax keyword cppSTLtype
- \ iterator_t sentinel_t dangling safe_iterator_t safe_subrange_t ref_view filter_view transform_view iota_view join_view empty_view single_view split_view common_view reverse_view view_interface
-
- " span
- syntax keyword cppSTLtype span
- syntax keyword cppSTLconstant dynamic_extent
- syntax keyword cppSTLfunction subspan
-
- " syncstream
- syntax keyword cppSTLtype
- \ basic_syncbuf basic_osyncstream syncbuf wsyncbuf osyncstream wosyncstream
+ \ assignable_from boolean common_reference_with common_with constructible_from convertible_to copy_constructible copyable default_constructible derived_from destructible equality_comparable equality_comparable_with equivalence_relation floating_point integral invocable movable move_constructible predicate regular regular_invocable relation same_as semiregular signed_integral strict_weak_order swappable swappable_with totally_ordered totally_ordered_with unsigned_integral default_initializable range sized_range view input_range output_range forward_range bidirectional_range random_access_range contiguous_range common_range viewable_range three_way_comparable three_way_comparable_with indirectly_readable indirectly_writable weakly_incrementable incrementable input_or_output_iterator sentinel_for sized_sentinel_for input_iterator output_iterator forward_iterator bidirectional_iterator random_access_iterator contiguous_iterator indirectly_unary_invocable indirectly_regular_unary_invocable indirect_unary_predicate indirect_binary_predicate indirect_equivalence_relation indirect_strict_weak_order indirectly_movable indirectly_movable_storable indirectly_copyable indirectly_copyable_storable indirectly_swappable indirectly_comparable permutable mergeable sortable
endif
+
" Boost {{{1
if !exists('cpp_no_boost')
syntax keyword cppSTLnamespace boost
- syntax keyword cppSTLcast lexical_cast
+ syntax keyword cppSTLfunction lexical_cast
endif
" }}}
@@ -421,18 +161,15 @@ endif
hi def link cppSTLbool Boolean
hi def link cppStatement Statement
hi def link cppSTLfunction Function
-hi def link cppSTLfunctional Typedef
hi def link cppSTLconstant Constant
hi def link cppSTLnamespace Constant
-hi def link cppSTLtype Typedef
-hi def link cppSTLexception Exception
+hi def link cppSTLtype Type
+hi def link cppSTLexception Type
hi def link cppSTLiterator Typedef
-hi def link cppSTLiterator_tag Typedef
hi def link cppSTLenum Typedef
hi def link cppSTLios Function
-hi def link cppSTLcast Statement
hi def link cppSTLconcept Typedef
-hi def link cppSTLVariable Identifier
+hi def link cppSTLvariable Identifier
" The keywords {inline, virtual, explicit, export, override, final} are
" standard C++ keywords and NOT types!
@@ -444,7 +181,6 @@ if get(g:, 'cpp_simple_highlight', 0)
hi link cppStructure Statement
hi link cppExceptions Statement
hi link cppStorageClass Statement
- hi link cppSTLexception Typedef
endif
endif
diff --git a/after/syntax/ruby.vim b/after/syntax/ruby.vim
index a135b6a8..78503c94 100644
--- a/after/syntax/ruby.vim
+++ b/after/syntax/ruby.vim
@@ -82,7 +82,7 @@ syn cluster rubyNotTop add=@yardTags,@yardDirectives,@yardTypes,@yardLists,@yard
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
hi def link yardComment rubyComment
" Tags
-hi def link yardGenericTag rubyTodo
+hi def link yardGenericTag rubyKeyword
hi def link yardAbstract yardGenericTag
hi def link yardApi yardGenericTag
hi def link yardAttr yardGenericTag
@@ -106,7 +106,7 @@ hi def link yardYield yardGenericTag
hi def link yardYieldParam yardGenericTag
hi def link yardYieldReturn yardGenericTag
" Directives
-hi def link yardGenericDirective rubyTodo
+hi def link yardGenericDirective rubyKeyword
hi def link yardAttribute yardGenericDirective
hi def link yardEndGroup yardGenericDirective
hi def link yardGroup yardGenericDirective
diff --git a/filetype.vim b/filetype.vim
index 34c31ef3..824eec6b 100644
--- a/filetype.vim
+++ b/filetype.vim
@@ -1,1215 +1,8 @@
-" Vim support file to detect file types
-"
-" Maintainer: Adam Stankiewicz <sheerun@sher.pl>
-" URL: https://github.com/sheerun/vim-polyglot
+" Oh yeah, we are loading before vim's filetype.vim so we can
+" make startup little faster by preventing it to load later
+if !exists("did_load_filetypes")
+ runtime! ftdetect/polyglot.vim
-" Listen very carefully, I will say this only once
-if exists("did_load_polyglot")
- finish
+ " We need to do it here to avoid recursive loop
+ runtime! ftdetect/*.vim
endif
-let did_load_polyglot = 1
-
-" Line continuation is used here, remove 'C' from 'cpoptions'
-let s:cpo_save = &cpo
-set cpo&vim
-
-" Disable all native vim ftdetect
-if exists('g:polyglot_test')
- autocmd!
-endif
-
-func! s:Observe(fn)
- let b:polyglot_observe = a:fn
- augroup polyglot-observer
- au! CursorHold,CursorHoldI,BufWritePost <buffer>
- \ execute('if polyglot#' . b:polyglot_observe . '() | au! polyglot-observer | endif')
- augroup END
-endfunc
-
-let s:disabled_packages = {}
-let s:new_polyglot_disabled = []
-
-if exists('g:polyglot_disabled')
- for pkg in g:polyglot_disabled
- let base = split(pkg, '\.')
- if len(base) > 0
- let s:disabled_packages[pkg] = 1
- call add(s:new_polyglot_disabled, base[0])
- endif
- endfor
-else
- let g:polyglot_disabled_not_set = 1
-endif
-
-function! s:SetDefault(name, value)
- if !exists(a:name)
- let {a:name} = a:value
- endif
-endfunction
-
-call s:SetDefault('g:markdown_enable_spell_checking', 0)
-call s:SetDefault('g:markdown_enable_input_abbreviations', 0)
-call s:SetDefault('g:markdown_enable_mappings', 0)
-
-" Enable jsx syntax by default
-call s:SetDefault('g:jsx_ext_required', 0)
-
-" Needed for sql highlighting
-call s:SetDefault('g:javascript_sql_dialect', 'sql')
-
-" Make csv loading faster
-call s:SetDefault('g:csv_start', 1)
-call s:SetDefault('g:csv_end', 2)
-
-" Disable json concealing by default
-call s:SetDefault('g:vim_json_syntax_conceal', 0)
-
-call s:SetDefault('g:filetype_euphoria', 'elixir')
-
-if !exists('g:python_highlight_all')
- call s:SetDefault('g:python_highlight_builtins', 1)
- call s:SetDefault('g:python_highlight_builtin_objs', 1)
- call s:SetDefault('g:python_highlight_builtin_types', 1)
- call s:SetDefault('g:python_highlight_builtin_funcs', 1)
- call s:SetDefault('g:python_highlight_builtin_funcs_kwarg', 1)
- call s:SetDefault('g:python_highlight_exceptions', 1)
- call s:SetDefault('g:python_highlight_string_formatting', 1)
- call s:SetDefault('g:python_highlight_string_format', 1)
- call s:SetDefault('g:python_highlight_string_templates', 1)
- call s:SetDefault('g:python_highlight_indent_errors', 1)
- call s:SetDefault('g:python_highlight_space_errors', 1)
- call s:SetDefault('g:python_highlight_doctests', 1)
- call s:SetDefault('g:python_highlight_func_calls', 1)
- call s:SetDefault('g:python_highlight_class_vars', 1)
- call s:SetDefault('g:python_highlight_operators', 1)
- call s:SetDefault('g:python_highlight_file_headers_as_comments', 1)
- call s:SetDefault('g:python_slow_sync', 1)
-endif
-
-" We need it because scripts.vim in vim uses "set ft=" which cannot be
-" overridden with setf (and we can't use set ft= so our scripts.vim work)
-func! s:Setf(ft)
- if &filetype !~# '\<'.a:ft.'\>'
- let &filetype = a:ft
- endif
-endfunc
-
-" Function used for patterns that end in a star: don't set the filetype if the
-" file name matches ft_ignore_pat.
-" When using this, the entry should probably be further down below with the
-" other StarSetf() calls.
-func! s:StarSetf(ft)
- if expand("<amatch>") !~ g:ft_ignore_pat && &filetype !~# '\<'.a:ft.'\>'
- let &filetype = a:ft
- endif
-endfunc
-
-augroup filetypedetect
-
-" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
-
-if !has_key(s:disabled_packages, 'sql')
- au BufNewFile,BufRead *.bdy,*.ddl,*.fnc,*.pck,*.pkb,*.pks,*.plb,*.pls,*.plsql,*.prc,*.spc,*.sql,*.tpb,*.tps,*.trg,*.tyb,*.tyc,*.typ,*.vw setf sql
-endif
-
-if !has_key(s:disabled_packages, 'gitignore')
- au BufNewFile,BufRead *.git/info/exclude,*/.config/git/ignore,{.,}gitignore setf gitignore
-endif
-
-if !has_key(s:disabled_packages, 'tads')
- au! BufNewFile,BufRead *.t call polyglot#detect#T()
-endif
-
-if !has_key(s:disabled_packages, 'prolog')
- au! BufNewFile,BufRead *.pl call polyglot#detect#Pl()
- au BufNewFile,BufRead *.pdb,*.pro,*.prolog,*.yap setf prolog
-endif
-
-if !has_key(s:disabled_packages, 'bzl')
- au BufNewFile,BufRead *.BUILD,*.bazel,*.bzl,BUCK,BUILD,BUILD.bazel,Tiltfile,WORKSPACE setf bzl
-endif
-
-if !has_key(s:disabled_packages, 'odin')
- au BufNewFile,BufRead *.odin setf odin
-endif
-
-if !has_key(s:disabled_packages, 'dosini')
- au BufNewFile,BufRead *.dof,*.ini,*.lektorproject,*.prefs,*.pro,*.properties,*/etc/pacman.conf,*/etc/yum.conf,{.,}editorconfig,{.,}npmrc,buildozer.spec setf dosini
- au BufNewFile,BufRead php.ini-* call s:StarSetf('dosini')
- au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
-endif
-
-if !has_key(s:disabled_packages, 'visual-basic')
- au! BufNewFile,BufRead *.bas call polyglot#detect#Bas()
- au BufNewFile,BufRead *.cls,*.ctl,*.dsm,*.frm,*.frx,*.sba,*.vba,*.vbs setf vb
-endif
-
-if !has_key(s:disabled_packages, 'basic')
- au BufNewFile,BufRead *.basic setf basic
-endif
-
-if !has_key(s:disabled_packages, 'trasys')
- au! BufNewFile,BufRead *.inp call polyglot#detect#Inp()
-endif
-
-if !has_key(s:disabled_packages, 'zig')
- au BufNewFile,BufRead *.zig,*.zir setf zig
- au BufNewFile,BufRead *.zir setf zir
-endif
-
-if !has_key(s:disabled_packages, 'zephir')
- au BufNewFile,BufRead *.zep setf zephir
-endif
-
-if !has_key(s:disabled_packages, 'help')
- au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
-endif
-
-if !has_key(s:disabled_packages, 'helm')
- au BufNewFile,BufRead */templates/*.tpl,*/templates/*.yaml setf helm
-endif
-
-if !has_key(s:disabled_packages, 'ansible')
- au BufNewFile,BufRead handlers.*.y{a,}ml,local.y{a,}ml,main.y{a,}ml,playbook.y{a,}ml,requirements.y{a,}ml,roles.*.y{a,}ml,site.y{a,}ml,tasks.*.y{a,}ml setf yaml.ansible
- au BufNewFile,BufRead host_vars/* call s:StarSetf('yaml.ansible')
- au BufNewFile,BufRead group_vars/* call s:StarSetf('yaml.ansible')
-endif
-
-if !has_key(s:disabled_packages, 'xsl')
- au BufNewFile,BufRead *.xsl,*.xslt setf xsl
-endif
-
-if !has_key(s:disabled_packages, 'xdc')
- au BufNewFile,BufRead *.xdc setf xdc
-endif
-
-if !has_key(s:disabled_packages, 'vue')
- au BufNewFile,BufRead *.vue,*.wpy setf vue
-endif
-
-if !has_key(s:disabled_packages, 'vmasm')
- au BufNewFile,BufRead *.mar setf vmasm
-endif
-
-if !has_key(s:disabled_packages, 'velocity')
- au BufNewFile,BufRead *.vm setf velocity
-endif
-
-if !has_key(s:disabled_packages, 'vcl')
- au BufNewFile,BufRead *.vcl setf vcl
-endif
-
-if !has_key(s:disabled_packages, 'vbnet')
- au BufNewFile,BufRead *.vb,*.vbhtml setf vbnet
-endif
-
-if !has_key(s:disabled_packages, 'vala')
- au BufNewFile,BufRead *.vala,*.valadoc,*.vapi setf vala
-endif
-
-if !has_key(s:disabled_packages, 'v')
- au BufNewFile,BufRead *.v setf v
-endif
-
-if !has_key(s:disabled_packages, 'unison')
- au BufNewFile,BufRead *.u,*.uu setf unison
-endif
-
-if !has_key(s:disabled_packages, 'typescript')
- au BufNewFile,BufRead *.tsx setf typescriptreact
- au BufNewFile,BufRead *.ts setf typescript
-endif
-
-if !has_key(s:disabled_packages, 'twig')
- au BufNewFile,BufRead *.xml.twig setf xml.twig
- au BufNewFile,BufRead *.twig setf html.twig
-endif
-
-if !has_key(s:disabled_packages, 'tptp')
- au BufNewFile,BufRead *.ax,*.p,*.tptp setf tptp
-endif
-
-if !has_key(s:disabled_packages, 'toml')
- au BufNewFile,BufRead *.toml,*/.cargo/config,*/.cargo/credentials,Cargo.lock,Gopkg.lock,Pipfile,poetry.lock setf toml
-endif
-
-if !has_key(s:disabled_packages, 'tmux')
- au BufNewFile,BufRead {.,}tmux*.conf setf tmux
-endif
-
-if !has_key(s:disabled_packages, 'thrift')
- au BufNewFile,BufRead *.thrift setf thrift
-endif
-
-if !has_key(s:disabled_packages, 'textile')
- au BufNewFile,BufRead *.textile setf textile
-endif
-
-if !has_key(s:disabled_packages, 'terraform')
- au BufNewFile,BufRead *.tf,*.tfvars setf terraform
-endif
-
-if !has_key(s:disabled_packages, 'systemd')
- au BufNewFile,BufRead *.automount,*.dnssd,*.link,*.mount,*.netdev,*.network,*.nspawn,*.path,*.service,*.slice,*.socket,*.swap,*.target,*.timer,*/systemd/*.conf setf systemd
- au BufNewFile,BufRead *.#* call s:StarSetf('systemd')
-endif
-
-if !has_key(s:disabled_packages, 'sxhkd')
- au BufNewFile,BufRead *.sxhkdrc,sxhkdrc setf sxhkdrc
-endif
-
-if !has_key(s:disabled_packages, 'swift')
- au BufNewFile,BufRead *.swift setf swift
-endif
-
-if !has_key(s:disabled_packages, 'svg-indent')
-endif
-
-if !has_key(s:disabled_packages, 'svg')
- au BufNewFile,BufRead *.svg setf svg
-endif
-
-if !has_key(s:disabled_packages, 'svelte')
- au BufNewFile,BufRead *.svelte setf svelte
-endif
-
-if !has_key(s:disabled_packages, 'stylus')
- au BufNewFile,BufRead *.styl,*.stylus setf stylus
-endif
-
-if !has_key(s:disabled_packages, 'solidity')
- au BufNewFile,BufRead *.sol setf solidity
-endif
-
-if !has_key(s:disabled_packages, 'smt2')
- au BufNewFile,BufRead *.smt,*.smt2 setf smt2
-endif
-
-if !has_key(s:disabled_packages, 'slime')
- au BufNewFile,BufRead *.slime setf slime
-endif
-
-if !has_key(s:disabled_packages, 'slim')
- au BufNewFile,BufRead *.slim setf slim
-endif
-
-if !has_key(s:disabled_packages, 'zinit')
-endif
-
-if !has_key(s:disabled_packages, 'sh')
- au BufNewFile,BufRead *.zsh,{.,}zfbfmarks,{.,}zlogin,{.,}zlogout,{.,}zprofile,{.,}zshenv,{.,}zshrc setf zsh
- au BufNewFile,BufRead {.,}zsh* call s:StarSetf('zsh')
- au BufNewFile,BufRead {.,}zlog* call s:StarSetf('zsh')
- au BufNewFile,BufRead {.,}zcompdump* call s:StarSetf('zsh')
- au BufNewFile,BufRead *.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh,*.sh.in,*.tmux,*.tool,*/etc/udev/cdsymlinks.conf,{.,}bash_aliases,{.,}bash_history,{.,}bash_logout,{.,}bash_profile,{.,}bashrc,{.,}cshrc,{.,}env,{.,}env.example,{.,}flaskenv,{.,}login,{.,}profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,zlogin,zlogout,zprofile,zshenv,zshrc setf sh
-endif
-
-if !has_key(s:disabled_packages, 'scss')
- au BufNewFile,BufRead *.scss setf scss
-endif
-
-if !has_key(s:disabled_packages, 'sbt')
- au BufNewFile,BufRead *.sbt setf sbt.scala
-endif
-
-if !has_key(s:disabled_packages, 'scala')
- au BufNewFile,BufRead *.kojo,*.sc,*.scala setf scala
-endif
-
-if !has_key(s:disabled_packages, 'rust')
- au BufNewFile,BufRead *.rs,*.rs.in setf rust
-endif
-
-if !has_key(s:disabled_packages, 'brewfile')
- au BufNewFile,BufRead Brewfile setf brewfile
-endif
-
-if !has_key(s:disabled_packages, 'yard')
-endif
-
-if !has_key(s:disabled_packages, 'rspec')
- au BufNewFile,BufRead *_spec.rb set ft=ruby syntax=rspec
-endif
-
-if !has_key(s:disabled_packages, 'ruby')
- au BufNewFile,BufRead *.erb,*.erb.deface,*.rhtml setf eruby
- au BufNewFile,BufRead *.axlsx,*.builder,*.cap,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.opal,*.pluginspec,*.podspec,*.rabl,*.rake,*.rant,*.rb,*.rbi,*.rbuild,*.rbw,*.rbx,*.rjs,*.ru,*.ruby,*.rxml,*.spec,*.thor,*.watchr,{.,}Brewfile,{.,}Guardfile,{.,}autotest,{.,}irbrc,{.,}pryrc,{.,}simplecov,Appraisals,Berksfile,Buildfile,Capfile,Cheffile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,KitchenSink,Mavenfile,Podfile,Puppetfile,Rakefile,Rantfile,Routefile,Snapfile,Thorfile,Vagrantfile,buildfile,vagrantfile setf ruby
- au BufNewFile,BufRead [Rr]akefile* call s:StarSetf('ruby')
-endif
-
-if !has_key(s:disabled_packages, 'rst')
- au BufNewFile,BufRead *.rest,*.rest.txt,*.rst,*.rst.txt setf rst
-endif
-
-if !has_key(s:disabled_packages, 'reason')
- au! BufNewFile,BufRead *.re call polyglot#detect#Re()
- au BufNewFile,BufRead *.rei setf reason
-endif
-
-if !has_key(s:disabled_packages, 'razor')
- au BufNewFile,BufRead *.cshtml,*.razor setf razor
-endif
-
-if !has_key(s:disabled_packages, 'raml')
- au BufNewFile,BufRead *.raml setf raml
-endif
-
-if !has_key(s:disabled_packages, 'raku')
- au! BufNewFile,BufRead *.t call polyglot#detect#T()
- au! BufNewFile,BufRead *.pm call polyglot#detect#Pm()
- au! BufNewFile,BufRead *.pl call polyglot#detect#Pl()
- au BufNewFile,BufRead *.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl6,*.pm6,*.pod6,*.raku,*.rakudoc,*.rakumod,*.rakutest,*.t6 setf raku
-endif
-
-if !has_key(s:disabled_packages, 'ragel')
- au BufNewFile,BufRead *.rl setf ragel
-endif
-
-if !has_key(s:disabled_packages, 'racket')
- au BufNewFile,BufRead *.rkt,*.rktd,*.rktl,*.scrbl setf racket
-endif
-
-if !has_key(s:disabled_packages, 'r-lang')
- au BufNewFile,BufRead *.rd setf rhelp
- au BufNewFile,BufRead *.S,*.r,*.rsx,*.s,{.,}Rprofile,expr-dist setf r
-endif
-
-if !has_key(s:disabled_packages, 'qml')
- au BufNewFile,BufRead *.qbs,*.qml setf qml
-endif
-
-if !has_key(s:disabled_packages, 'qmake')
- au BufNewFile,BufRead *.pri,*.pro setf qmake
-endif
-
-if !has_key(s:disabled_packages, 'requirements')
- au BufNewFile,BufRead *.pip,*require.{txt,in},*requirements.{txt,in},constraints.{txt,in} setf requirements
-endif
-
-if !has_key(s:disabled_packages, 'python-compiler')
-endif
-
-if !has_key(s:disabled_packages, 'python-indent')
-endif
-
-if !has_key(s:disabled_packages, 'python')
- au BufNewFile,BufRead *.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.ptl,*.py,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,{.,}gclient,{.,}pythonrc,{.,}pythonstartup,DEPS,SConscript,SConstruct,Snakefile,wscript setf python
-endif
-
-if !has_key(s:disabled_packages, 'purescript')
- au BufNewFile,BufRead *.purs setf purescript
-endif
-
-if !has_key(s:disabled_packages, 'puppet')
- au BufNewFile,BufRead *.epp setf embeddedpuppet
- au BufNewFile,BufRead *.pp,Modulefile setf puppet
-endif
-
-if !has_key(s:disabled_packages, 'pug')
- au BufNewFile,BufRead *.jade,*.pug setf pug
-endif
-
-if !has_key(s:disabled_packages, 'protobuf')
- au BufNewFile,BufRead *.proto setf proto
-endif
-
-if !has_key(s:disabled_packages, 'powershell')
- au BufNewFile,BufRead *.ps1xml setf ps1xml
- au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1
-endif
-
-if !has_key(s:disabled_packages, 'pony')
- au BufNewFile,BufRead *.pony setf pony
-endif
-
-if !has_key(s:disabled_packages, 'plantuml')
- au BufNewFile,BufRead *.iuml,*.plantuml,*.pu,*.puml,*.uml setf plantuml
-endif
-
-if !has_key(s:disabled_packages, 'blade')
- au BufNewFile,BufRead *.blade,*.blade.php setf blade
-endif
-
-if !has_key(s:disabled_packages, 'php')
- au BufNewFile,BufRead *.aw,*.ctp,*.fcgi,*.inc,*.php,*.php3,*.php4,*.php5,*.phps,*.phpt,*.phtml,{.,}php,{.,}php_cs,{.,}php_cs.dist,Phakefile setf php
-endif
-
-if !has_key(s:disabled_packages, 'cql')
- au BufNewFile,BufRead *.cql setf cql
-endif
-
-if !has_key(s:disabled_packages, 'pgsql')
- au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | set ft=sql
-endif
-
-if !has_key(s:disabled_packages, 'perl')
- au! BufNewFile,BufRead *.tt2 call polyglot#detect#Tt2()
- au! BufNewFile,BufRead *.t call polyglot#detect#T()
- au! BufNewFile,BufRead *.pm call polyglot#detect#Pm()
- au! BufNewFile,BufRead *.pl call polyglot#detect#Pl()
- au BufNewFile,BufRead *.xs setf xs
- au BufNewFile,BufRead *.comp,*.mason,*.mhtml setf mason
- au BufNewFile,BufRead *.pod setf pod
- au BufNewFile,BufRead *.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.psgi,{.,}gitolite.rc,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc setf perl
-endif
-
-if !has_key(s:disabled_packages, 'opencl')
- au BufNewFile,BufRead *.cl,*.opencl setf opencl
-endif
-
-if !has_key(s:disabled_packages, 'octave')
- au! BufNewFile,BufRead *.m call polyglot#detect#M()
- au BufNewFile,BufRead *.oct setf octave
-endif
-
-if !has_key(s:disabled_packages, 'ocaml')
- au BufNewFile,BufRead *.sexp setf sexplib
- au BufNewFile,BufRead *.root setf ocpbuildroot
- au BufNewFile,BufRead *.ocp setf ocpbuild
- au BufNewFile,BufRead _tags setf ocamlbuild_tags
- au BufNewFile,BufRead dune,dune-project,dune-workspace,jbuild setf dune
- au BufNewFile,BufRead _oasis setf oasis
- au BufNewFile,BufRead *.opam,*.opam.template,opam setf opam
- au BufNewFile,BufRead *.om,OMakefile,OMakeroot,OMakeroot.in setf omake
- au BufNewFile,BufRead *.eliom,*.eliomi,*.ml,*.ml.cppo,*.ml4,*.mli,*.mli.cppo,*.mlip,*.mll,*.mlp,*.mlt,*.mly,{.,}ocamlinit setf ocaml
-endif
-
-if !has_key(s:disabled_packages, 'objc')
- au! BufNewFile,BufRead *.m call polyglot#detect#M()
- au! BufNewFile,BufRead *.h call polyglot#detect#H()
-endif
-
-if !has_key(s:disabled_packages, 'nix')
- au BufNewFile,BufRead *.nix setf nix
-endif
-
-if !has_key(s:disabled_packages, 'nim')
- au BufNewFile,BufRead *.nim,*.nim.cfg,*.nimble,*.nimrod,*.nims,nim.cfg setf nim
-endif
-
-if !has_key(s:disabled_packages, 'nginx')
- au BufNewFile,BufRead *.nginx,*.nginxconf,*.vhost,*/nginx/*.conf,*nginx.conf,nginx*.conf,nginx.conf setf nginx
- au BufNewFile,BufRead */usr/local/nginx/conf/* call s:StarSetf('nginx')
- au BufNewFile,BufRead */etc/nginx/* call s:StarSetf('nginx')
-endif
-
-if !has_key(s:disabled_packages, 'murphi')
- au! BufNewFile,BufRead *.m call polyglot#detect#M()
-endif
-
-if !has_key(s:disabled_packages, 'moonscript')
- au BufNewFile,BufRead *.moon setf moon
-endif
-
-if !has_key(s:disabled_packages, 'meson')
- au BufNewFile,BufRead *.wrap setf dosini
- au BufNewFile,BufRead meson.build,meson_options.txt setf meson
-endif
-
-if !has_key(s:disabled_packages, 'mdx')
- au BufNewFile,BufRead *.mdx setf markdown.mdx
-endif
-
-if !has_key(s:disabled_packages, 'markdown')
- au BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr setf markdown
-endif
-
-if !has_key(s:disabled_packages, 'mathematica')
- au! BufNewFile,BufRead *.m call polyglot#detect#M()
- au BufNewFile,BufRead *.cdf,*.ma,*.mathematica,*.mma,*.mt,*.nb,*.nbp,*.wl,*.wls,*.wlt setf mma
-endif
-
-if !has_key(s:disabled_packages, 'mako')
- au BufNewFile,BufRead *.mako,*.mao setf mako
- au BufReadPre *.*.mao execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
- au BufNewFile *.*.mao execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
- au BufReadPre *.*.mako execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
- au BufNewFile *.*.mako execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
-endif
-
-if !has_key(s:disabled_packages, 'm4')
- au BufNewFile,BufRead *.at,*.m4 setf m4
-endif
-
-if !has_key(s:disabled_packages, 'lua')
- au BufNewFile,BufRead *.fcgi,*.lua,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,{.,}luacheckrc setf lua
-endif
-
-if !has_key(s:disabled_packages, 'log')
- au BufNewFile,BufRead *.LOG,*.log,*_LOG,*_log setf log
-endif
-
-if !has_key(s:disabled_packages, 'llvm')
- au BufNewFile,BufRead *.td setf tablegen
- au BufNewFile,BufRead *.ll setf llvm
-endif
-
-if !has_key(s:disabled_packages, 'livescript')
- au BufNewFile,BufRead *._ls,*.ls,Slakefile setf livescript
-endif
-
-if !has_key(s:disabled_packages, 'lilypond')
- au BufNewFile,BufRead *.ily,*.ly setf lilypond
-endif
-
-if !has_key(s:disabled_packages, 'less')
- au BufNewFile,BufRead *.less setf less
-endif
-
-if !has_key(s:disabled_packages, 'ledger')
- au BufNewFile,BufRead *.journal,*.ldg,*.ledger setf ledger
-endif
-
-if !has_key(s:disabled_packages, 'kotlin')
- au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin
-endif
-
-if !has_key(s:disabled_packages, 'julia')
- au BufNewFile,BufRead *.jl setf julia
-endif
-
-if !has_key(s:disabled_packages, 'jst')
- au BufNewFile,BufRead *.ect,*.ejs,*.jst setf jst
-endif
-
-if !has_key(s:disabled_packages, 'jsonnet')
- au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
-endif
-
-if !has_key(s:disabled_packages, 'json')
- au BufNewFile,BufRead *.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}htmlhintrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json
-endif
-
-if !has_key(s:disabled_packages, 'json5')
- au BufNewFile,BufRead *.json5 setf json5
-endif
-
-if !has_key(s:disabled_packages, 'jq')
- au BufNewFile,BufRead *.jq,{.,}jqrc setf jq
- au BufNewFile,BufRead {.,}jqrc* call s:StarSetf('jq')
-endif
-
-if !has_key(s:disabled_packages, 'htmldjango')
- au BufNewFile,BufRead *.j2,*.jinja,*.jinja2,*.njk setf htmldjango
-endif
-
-if !has_key(s:disabled_packages, 'jenkins')
- au BufNewFile,BufRead *.Jenkinsfile,*.jenkinsfile,Jenkinsfile setf Jenkinsfile
- au BufNewFile,BufRead Jenkinsfile* call s:StarSetf('Jenkinsfile')
-endif
-
-if !has_key(s:disabled_packages, 'javascript-sql')
-endif
-
-if !has_key(s:disabled_packages, 'ion')
- au BufNewFile,BufRead *.ion,~/.config/ion/initrc setf ion
-endif
-
-if !has_key(s:disabled_packages, 'idris2')
- au! BufNewFile,BufRead *.lidr call polyglot#detect#Lidr()
- au! BufNewFile,BufRead *.idr call polyglot#detect#Idr()
- au BufNewFile,BufRead *.ipkg,idris-response setf idris2
-endif
-
-if !has_key(s:disabled_packages, 'idris')
- au! BufNewFile,BufRead *.lidr call polyglot#detect#Lidr()
- au! BufNewFile,BufRead *.idr call polyglot#detect#Idr()
- au BufNewFile,BufRead idris-response setf idris
-endif
-
-if !has_key(s:disabled_packages, 'icalendar')
- au BufNewFile,BufRead *.ics setf icalendar
-endif
-
-if !has_key(s:disabled_packages, 'i3')
- au BufNewFile,BufRead *.i3.config,*.i3config,{.,}i3.config,{.,}i3config,i3.config,i3config setf i3config
-endif
-
-if !has_key(s:disabled_packages, 'html5')
- au! BufNewFile,BufRead *.html call polyglot#detect#Html()
- au BufNewFile,BufRead *.htm,*.html.hl,*.inc,*.st,*.xht,*.xhtml setf html
-endif
-
-if !has_key(s:disabled_packages, 'hive')
- au BufNewFile,BufRead *.hql,*.q,*.ql setf hive
-endif
-
-if !has_key(s:disabled_packages, 'hcl')
- au BufNewFile,BufRead *.hcl,*.nomad,*.workflow,Appfile setf hcl
-endif
-
-if !has_key(s:disabled_packages, 'haxe')
- au BufNewFile,BufRead *.hx,*.hxsl setf haxe
-endif
-
-if !has_key(s:disabled_packages, 'haskell')
- au BufNewFile,BufRead *.bpk,*.hs,*.hs-boot,*.hsc,*.hsig setf haskell
-endif
-
-if !has_key(s:disabled_packages, 'handlebars')
- au BufNewFile,BufRead *.handlebars,*.hb,*.hbs,*.hdbs setf html.handlebars
- au BufNewFile,BufRead *.hjs,*.hogan,*.hulk,*.mustache setf html.mustache
-endif
-
-if !has_key(s:disabled_packages, 'haml')
- au BufNewFile,BufRead *.haml,*.haml.deface,*.hamlbars,*.hamlc setf haml
-endif
-
-if !has_key(s:disabled_packages, 'grub')
- au BufNewFile,BufRead */boot/grub/grub.conf,*/boot/grub/menu.lst,*/etc/grub.conf setf grub
-endif
-
-if !has_key(s:disabled_packages, 'gradle')
-endif
-
-if !has_key(s:disabled_packages, 'groovy')
- au BufNewFile,BufRead *.gradle,*.groovy,*.grt,*.gtpl,*.gvy,Jenkinsfile setf groovy
-endif
-
-if !has_key(s:disabled_packages, 'graphql')
- au BufNewFile,BufRead *.gql,*.graphql,*.graphqls setf graphql
-endif
-
-if !has_key(s:disabled_packages, 'jsx')
- au BufNewFile,BufRead *.jsx setf javascriptreact
-endif
-
-if !has_key(s:disabled_packages, 'javascript')
- au BufNewFile,BufRead *.flow setf flow
- au BufNewFile,BufRead *._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.js,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile setf javascript
-endif
-
-if !has_key(s:disabled_packages, 'go')
- au BufNewFile,BufRead *.tmpl setf gohtmltmpl
- au BufNewFile,BufRead go.mod setf gomod
- au BufNewFile,BufRead *.go setf go
-endif
-
-if !has_key(s:disabled_packages, 'gnuplot')
- au BufNewFile,BufRead *.gnu,*.gnuplot,*.gp,*.gpi,*.p,*.plot,*.plt setf gnuplot
-endif
-
-if !has_key(s:disabled_packages, 'gmpl')
- au BufNewFile,BufRead *.mod setf gmpl
-endif
-
-if !has_key(s:disabled_packages, 'glsl')
- au! BufNewFile,BufRead *.fs call polyglot#detect#Fs()
- au BufNewFile,BufRead *.comp,*.fp,*.frag,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader setf glsl
-endif
-
-if !has_key(s:disabled_packages, 'git')
- au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
- au BufNewFile,BufRead {.,}gitsendemail.* call s:StarSetf('gitsendemail')
- au BufNewFile,BufRead git-rebase-todo setf gitrebase
- au BufNewFile,BufRead *.gitconfig,*.git/config,*.git/modules/*/config,*/.config/git/config,*/git/config,{.,}gitconfig,{.,}gitmodules setf gitconfig
- au BufNewFile,BufRead */{.,}gitconfig.d/* call s:StarSetf('gitconfig')
-endif
-
-if !has_key(s:disabled_packages, 'gdscript')
- au BufNewFile,BufRead *.gd setf gdscript3
-endif
-
-if !has_key(s:disabled_packages, 'fsharp')
- au! BufNewFile,BufRead *.fs call polyglot#detect#Fs()
- au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
-endif
-
-if !has_key(s:disabled_packages, 'forth')
- au! BufNewFile,BufRead *.fs call polyglot#detect#Fs()
- au BufNewFile,BufRead *.ft,*.fth setf forth
-endif
-
-if !has_key(s:disabled_packages, 'flatbuffers')
- au BufNewFile,BufRead *.fbs setf fbs
-endif
-
-if !has_key(s:disabled_packages, 'fish')
- au BufNewFile,BufRead *.fish setf fish
-endif
-
-if !has_key(s:disabled_packages, 'ferm')
- au BufNewFile,BufRead *.ferm,ferm.conf setf ferm
-endif
-
-if !has_key(s:disabled_packages, 'fennel')
- au BufNewFile,BufRead *.fnl setf fennel
-endif
-
-if !has_key(s:disabled_packages, 'erlang')
- au BufNewFile,BufRead *.app,*.app.src,*.erl,*.es,*.escript,*.hrl,*.xrl,*.yaws,*.yrl,Emakefile,rebar.config,rebar.config.lock,rebar.lock setf erlang
-endif
-
-if !has_key(s:disabled_packages, 'emblem')
- au BufNewFile,BufRead *.em,*.emblem setf emblem
-endif
-
-if !has_key(s:disabled_packages, 'emberscript')
- au BufNewFile,BufRead *.em,*.emberscript setf ember-script
-endif
-
-if !has_key(s:disabled_packages, 'elm')
- au BufNewFile,BufRead *.elm setf elm
-endif
-
-if !has_key(s:disabled_packages, 'elixir')
- au BufNewFile,BufRead *.eex,*.leex setf eelixir
- au BufNewFile,BufRead *.ex,*.exs,mix.lock setf elixir
-endif
-
-if !has_key(s:disabled_packages, 'dockerfile')
- au BufNewFile,BufRead docker-compose*.yaml,docker-compose*.yml setf yaml.docker-compose
- au BufNewFile,BufRead *.Dockerfile,*.dock,*.dockerfile,Dockerfile,dockerfile setf Dockerfile
- au BufNewFile,BufRead Dockerfile* call s:StarSetf('Dockerfile')
-endif
-
-if !has_key(s:disabled_packages, 'yaml')
- au BufNewFile,BufRead *.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml,*.yml.mysql,{.,}clang-format,{.,}clang-tidy,{.,}gemrc,fish_history,fish_read_history,glide.lock,yarn.lock setf yaml
-endif
-
-if !has_key(s:disabled_packages, 'dlang')
- au BufNewFile,BufRead *.sdl setf dsdl
- au BufNewFile,BufRead *.ddoc setf ddoc
- au BufNewFile,BufRead *.dd setf dd
- au BufNewFile,BufRead *.lst setf dcov
- au BufNewFile,BufRead *.d,*.di setf d
-endif
-
-if !has_key(s:disabled_packages, 'dhall')
- au BufNewFile,BufRead *.dhall setf dhall
-endif
-
-if !has_key(s:disabled_packages, 'dart')
- au BufNewFile,BufRead *.dart,*.drt setf dart
-endif
-
-if !has_key(s:disabled_packages, 'cue')
- au BufNewFile,BufRead *.cue setf cuesheet
-endif
-
-if !has_key(s:disabled_packages, 'cucumber')
- au BufNewFile,BufRead *.feature,*.story setf cucumber
-endif
-
-if !has_key(s:disabled_packages, 'crystal')
- au BufNewFile,BufRead *.ecr setf ecrystal
- au BufNewFile,BufRead *.cr,Projectfile setf crystal
-endif
-
-if !has_key(s:disabled_packages, 'cryptol')
- au BufNewFile,BufRead *.cry,*.cyl,*.lcry,*.lcyl setf cryptol
-endif
-
-if !has_key(s:disabled_packages, 'cjsx')
-endif
-
-if !has_key(s:disabled_packages, 'coffee-script')
- au BufNewFile,BufRead *.coffee.md,*.litcoffee setf litcoffee
- au BufNewFile,BufRead *._coffee,*.cake,*.cjsx,*.coffee,*.coffeekup,*.iced,Cakefile setf coffee
-endif
-
-if !has_key(s:disabled_packages, 'cmake')
- au BufNewFile,BufRead *.cmake,*.cmake.in,CMakeLists.txt setf cmake
-endif
-
-if !has_key(s:disabled_packages, 'clojure')
- au BufNewFile,BufRead *.boot,*.cl2,*.clj,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.edn,*.hic,build.boot,profile.boot,riemann.config setf clojure
-endif
-
-if !has_key(s:disabled_packages, 'carp')
- au BufNewFile,BufRead *.carp setf carp
-endif
-
-if !has_key(s:disabled_packages, 'cpp-modern')
-endif
-
-if !has_key(s:disabled_packages, 'caddyfile')
- au BufNewFile,BufRead Caddyfile setf caddyfile
-endif
-
-if !has_key(s:disabled_packages, 'awk')
- au BufNewFile,BufRead *.awk,*.gawk setf awk
-endif
-
-if !has_key(s:disabled_packages, 'ave')
- au BufNewFile,BufRead *.ave setf ave
-endif
-
-if !has_key(s:disabled_packages, 'autoit')
- au BufNewFile,BufRead *.au3 setf autoit
-endif
-
-if !has_key(s:disabled_packages, 'atlas')
- au BufNewFile,BufRead *.as,*.atl setf atlas
-endif
-
-if !has_key(s:disabled_packages, 'aspperl')
- au! BufNewFile,BufRead *.asp call polyglot#detect#Asp()
-endif
-
-if !has_key(s:disabled_packages, 'aspvbs')
- au! BufNewFile,BufRead *.asp call polyglot#detect#Asp()
- au! BufNewFile,BufRead *.asa call polyglot#detect#Asa()
-endif
-
-if !has_key(s:disabled_packages, 'asn')
- au BufNewFile,BufRead *.asn,*.asn1 setf asn
-endif
-
-if !has_key(s:disabled_packages, 'automake')
- au BufNewFile,BufRead GNUmakefile.am,[Mm]akefile.am setf automake
-endif
-
-if !has_key(s:disabled_packages, 'elf')
- au BufNewFile,BufRead *.am setf elf
-endif
-
-if !has_key(s:disabled_packages, 'autohotkey')
- au BufNewFile,BufRead *.ahk,*.ahkl setf autohotkey
-endif
-
-if !has_key(s:disabled_packages, 'asciidoc')
- au BufNewFile,BufRead *.adoc,*.asc,*.asciidoc setf asciidoc
-endif
-
-if !has_key(s:disabled_packages, 'art')
- au BufNewFile,BufRead *.art setf art
-endif
-
-if !has_key(s:disabled_packages, 'arduino')
- au BufNewFile,BufRead *.ino,*.pde setf arduino
-endif
-
-if !has_key(s:disabled_packages, 'c/c++')
- au! BufNewFile,BufRead *.h call polyglot#detect#H()
- au BufNewFile,BufRead *.c,*.cats,*.idc,*.qc,*enlightenment/*.cfg setf c
- au BufNewFile,BufRead *.c++,*.cc,*.cp,*.cpp,*.cxx,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.moc,*.tcc,*.tlh,*.tpp setf cpp
-endif
-
-if !has_key(s:disabled_packages, 'arch')
- au BufNewFile,BufRead {.,}arch-inventory,=tagging-method setf arch
-endif
-
-if !has_key(s:disabled_packages, 'aptconf')
- au BufNewFile,BufRead */.aptitude/config,*/etc/apt/apt.conf.d/*.conf,apt.conf setf aptconf
- au BufNewFile,BufRead */etc/apt/apt.conf.d/[^.]* call s:StarSetf('aptconf')
-endif
-
-if !has_key(s:disabled_packages, 'applescript')
- au BufNewFile,BufRead *.applescript,*.scpt setf applescript
-endif
-
-if !has_key(s:disabled_packages, 'apiblueprint')
- au BufNewFile,BufRead *.apib setf apiblueprint
-endif
-
-if !has_key(s:disabled_packages, 'apache')
- au BufNewFile,BufRead */etc/apache2/sites-*/*.com,*/etc/httpd/*.conf,{.,}htaccess setf apache
- au BufNewFile,BufRead srm.conf* call s:StarSetf('apache')
- au BufNewFile,BufRead httpd.conf* call s:StarSetf('apache')
- au BufNewFile,BufRead apache2.conf* call s:StarSetf('apache')
- au BufNewFile,BufRead apache.conf* call s:StarSetf('apache')
- au BufNewFile,BufRead access.conf* call s:StarSetf('apache')
- au BufNewFile,BufRead */etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
- au BufNewFile,BufRead */etc/apache2/sites-*/* call s:StarSetf('apache')
- au BufNewFile,BufRead */etc/apache2/mods-*/* call s:StarSetf('apache')
- au BufNewFile,BufRead */etc/apache2/conf.*/* call s:StarSetf('apache')
- au BufNewFile,BufRead */etc/apache2/*.conf* call s:StarSetf('apache')
-endif
-
-if !has_key(s:disabled_packages, 'ant')
- au BufNewFile,BufRead build.xml setf ant
-endif
-
-if !has_key(s:disabled_packages, 'xml')
- au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml
-endif
-
-if !has_key(s:disabled_packages, 'csv')
- au BufNewFile,BufRead *.csv,*.tab,*.tsv setf csv
-endif
-
-if !has_key(s:disabled_packages, 'ampl')
- au BufNewFile,BufRead *.run setf ampl
-endif
-
-if !has_key(s:disabled_packages, 'aml')
- au BufNewFile,BufRead *.aml setf aml
-endif
-
-if !has_key(s:disabled_packages, 'alsaconf')
- au BufNewFile,BufRead */etc/asound.conf,*/usr/share/alsa/alsa.conf,{.,}asoundrc setf alsaconf
-endif
-
-if !has_key(s:disabled_packages, 'aidl')
- au BufNewFile,BufRead *.aidl setf aidl
-endif
-
-if !has_key(s:disabled_packages, 'ahdl')
- au BufNewFile,BufRead *.tdf setf ahdl
-endif
-
-if !has_key(s:disabled_packages, 'ada')
- au BufNewFile,BufRead *.ada,*.ada_m,*.adb,*.adc,*.ads,*.gpr setf ada
-endif
-
-if !has_key(s:disabled_packages, 'acpiasl')
- au BufNewFile,BufRead *.asl,*.dsl setf asl
-endif
-
-if !has_key(s:disabled_packages, 'acedb')
- au BufNewFile,BufRead *.wrm setf acedb
-endif
-
-if !has_key(s:disabled_packages, 'abel')
- au BufNewFile,BufRead *.abl setf abel
-endif
-
-if !has_key(s:disabled_packages, 'abc')
- au BufNewFile,BufRead *.abc setf abc
-endif
-
-if !has_key(s:disabled_packages, 'abaqus')
- au! BufNewFile,BufRead *.inp call polyglot#detect#Inp()
-endif
-
-if !has_key(s:disabled_packages, 'abap')
- au BufNewFile,BufRead *.abap setf abap
-endif
-
-if !has_key(s:disabled_packages, 'aap')
- au BufNewFile,BufRead *.aap setf aap
-endif
-
-if !has_key(s:disabled_packages, 'a65')
- au BufNewFile,BufRead *.a65 setf a65
-endif
-
-if !has_key(s:disabled_packages, 'a2ps')
- au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,{.,}a2psrc,a2psrc setf a2ps
-endif
-
-if !has_key(s:disabled_packages, 'haproxy')
- au BufNewFile,BufRead *.cfg,haproxy.cfg setf haproxy
- au BufNewFile,BufRead haproxy*.conf* call s:StarSetf('haproxy')
-endif
-
-if !has_key(s:disabled_packages, 'conf')
- au BufNewFile,BufRead *.conf,auto.master,config setf conf
-endif
-
-if !has_key(s:disabled_packages, '8th')
- au BufNewFile,BufRead *.8th setf 8th
-endif
-
-" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
-
-au! BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
- \ call polyglot#shebang#Detect() | endif
-
-au BufEnter * if &ft == "" && expand("<afile>:e") == "" |
- \ call s:Observe('shebang#Detect') | endif
-
-augroup END
-
-if !has_key(s:disabled_packages, 'autoindent')
- " Code below re-implements sleuth for vim-polyglot
- let g:loaded_sleuth = 1
- let g:loaded_foobar = 1
-
- " Makes shiftwidth to be synchronized with tabstop by default
- if &shiftwidth == &tabstop
- let &shiftwidth = 0
- endif
-
- function! s:guess(lines) abort
- let options = {}
- let ccomment = 0
- let podcomment = 0
- let triplequote = 0
- let backtick = 0
- let xmlcomment = 0
- let heredoc = ''
- let minindent = 10
- let spaces_minus_tabs = 0
- let i = 0
-
- for line in a:lines
- let i += 1
-
- if !len(line) || line =~# '^\W*$'
- continue
- endif
-
- if line =~# '^\s*/\*'
- let ccomment = 1
- endif
- if ccomment
- if line =~# '\*/'
- let ccomment = 0
- endif
- continue
- endif
-
- if line =~# '^=\w'
- let podcomment = 1
- endif
- if podcomment
- if line =~# '^=\%(end\|cut\)\>'
- let podcomment = 0
- endif
- continue
- endif
-
- if triplequote
- if line =~# '^[^"]*"""[^"]*$'
- let triplequote = 0
- endif
- continue
- elseif line =~# '^[^"]*"""[^"]*$'
- let triplequote = 1
- endif
-
- if backtick
- if line =~# '^[^`]*`[^`]*$'
- let backtick = 0
- endif
- continue
- elseif &filetype ==# 'go' && line =~# '^[^`]*`[^`]*$'
- let backtick = 1
- endif
-
- if line =~# '^\s*<\!--'
- let xmlcomment = 1
- endif
- if xmlcomment
- if line =~# '-->'
- let xmlcomment = 0
- endif
- continue
- endif
-
- " This is correct order because both "<<EOF" and "EOF" matches end
- if heredoc != ''
- if line =~# heredoc
- let heredoc = ''
- endif
- continue
- endif
- let herematch = matchlist(line, '\C<<\W*\([A-Z]\+\)\s*$')
- if len(herematch) > 0
- let heredoc = herematch[1] . '$'
- endif
-
- let spaces_minus_tabs += line[0] == "\t" ? 1 : -1
-
- if line[0] == "\t"
- setlocal noexpandtab
- let &l:shiftwidth=&tabstop
- let b:sleuth_culprit .= ':' . i
- return 1
- elseif line[0] == " "
- let indent = len(matchstr(line, '^ *'))
- if (indent % 2 == 0 || indent % 3 == 0) && indent < minindent
- let minindent = indent
- endif
- endif
- endfor
-
- if minindent < 10
- setlocal expandtab
- let &l:shiftwidth=minindent
- let b:sleuth_culprit .= ':' . i
- return 1
- endif
-
- return 0
- endfunction
-
- function! s:detect_indent() abort
- if &buftype ==# 'help'
- return
- endif
-
- let b:sleuth_culprit = expand("<afile>:p")
- if s:guess(getline(1, 32))
- return
- endif
- let pattern = polyglot#sleuth#GlobForFiletype(&filetype)
- if len(pattern) == 0
- return
- endif
- let pattern = '{' . pattern . ',.git,.svn,.hg}'
- let dir = expand('%:p:h')
- let level = 3
- while isdirectory(dir) && dir !=# fnamemodify(dir, ':h') && level > 0
- " Ignore files from homedir and root
- if dir == expand('~') || dir == '/'
- unlet b:sleuth_culprit
- return
- endif
- for neighbor in glob(dir . '/' . pattern, 0, 1)[0:level]
- let b:sleuth_culprit = neighbor
- " Do not consider directories above .git, .svn or .hg
- if fnamemodify(neighbor, ":h:t")[0] == "."
- let level = 0
- continue
- endif
- if neighbor !=# expand('%:p') && filereadable(neighbor)
- if s:guess(readfile(neighbor, '', 32))
- return
- endif
- endif
- endfor
-
- let dir = fnamemodify(dir, ':h')
- let level -= 1
- endwhile
-
- unlet b:sleuth_culprit
- endfunction
-
- setglobal smarttab
-
- function! SleuthIndicator() abort
- let sw = &shiftwidth ? &shiftwidth : &tabstop
- if &expandtab
- return 'sw='.sw
- elseif &tabstop == sw
- return 'ts='.&tabstop
- else
- return 'sw='.sw.',ts='.&tabstop
- endif
- endfunction
-
- augroup polyglot-sleuth
- au!
- au FileType * call s:detect_indent()
- au User Flags call Hoist('buffer', 5, 'SleuthIndicator')
- augroup END
-
- command! -bar -bang Sleuth call s:detect_indent()
-endif
-
-func! s:verify()
- if exists("g:polyglot_disabled_not_set")
- if exists("g:polyglot_disabled")
- echohl WarningMsg
- echo "vim-polyglot: g:polyglot_disabled should be defined before loading vim-polyglot"
- echohl None
- endif
-
- unlet g:polyglot_disabled_not_set
- endif
-endfunc
-
-au VimEnter * call s:verify()
-
-" Save polyglot_disabled without postfixes
-if exists('g:polyglot_disabled')
- let g:polyglot_disabled = s:new_polyglot_disabled
-endif
-
-" Restore 'cpoptions'
-let &cpo = s:cpo_save
-unlet s:cpo_save
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
new file mode 100644
index 00000000..498450d8
--- /dev/null
+++ b/ftdetect/polyglot.vim
@@ -0,0 +1,3434 @@
+" Vim support file to detect file types
+"
+" Maintainer: Adam Stankiewicz <sheerun@sher.pl>
+" URL: https://github.com/sheerun/vim-polyglot
+
+" Listen very carefully, I will say this only once
+if exists("did_load_polyglot")
+ finish
+endif
+
+let did_load_polyglot = 1
+
+" It can happen vim filetype.vim loads first, then we need a reset
+if exists("did_load_filetypes")
+ au! filetypedetect
+endif
+
+" Prevent filetype.vim of vim from loading again
+let did_load_filetypes = 1
+
+" Line continuation is used here, remove 'C' from 'cpoptions'
+let s:cpo_save = &cpo
+set cpo&vim
+
+func! s:Observe(fn)
+ let b:polyglot_observe = a:fn
+ augroup polyglot-observer
+ au! CursorHold,CursorHoldI,BufWritePost <buffer>
+ \ execute('if polyglot#' . b:polyglot_observe . '() | au! polyglot-observer | endif')
+ augroup END
+endfunc
+
+let s:disabled_packages = {}
+let s:new_polyglot_disabled = []
+
+if exists('g:polyglot_disabled')
+ for pkg in g:polyglot_disabled
+ let base = split(pkg, '\.')
+ if len(base) > 0
+ let s:disabled_packages[pkg] = 1
+ call add(s:new_polyglot_disabled, base[0])
+ endif
+ endfor
+else
+ let g:polyglot_disabled_not_set = 1
+endif
+
+function! s:SetDefault(name, value)
+ if !exists(a:name)
+ let {a:name} = a:value
+ endif
+endfunction
+
+call s:SetDefault('g:markdown_enable_spell_checking', 0)
+call s:SetDefault('g:markdown_enable_input_abbreviations', 0)
+call s:SetDefault('g:markdown_enable_mappings', 0)
+
+" Enable jsx syntax by default
+call s:SetDefault('g:jsx_ext_required', 0)
+
+" Needed for sql highlighting
+call s:SetDefault('g:javascript_sql_dialect', 'sql')
+
+" Make csv loading faster
+call s:SetDefault('g:csv_start', 1)
+call s:SetDefault('g:csv_end', 2)
+
+" Disable json concealing by default
+call s:SetDefault('g:vim_json_syntax_conceal', 0)
+
+call s:SetDefault('g:filetype_euphoria', 'elixir')
+
+if !exists('g:python_highlight_all')
+ call s:SetDefault('g:python_highlight_builtins', 1)
+ call s:SetDefault('g:python_highlight_builtin_objs', 1)
+ call s:SetDefault('g:python_highlight_builtin_types', 1)
+ call s:SetDefault('g:python_highlight_builtin_funcs', 1)
+ call s:SetDefault('g:python_highlight_builtin_funcs_kwarg', 1)
+ call s:SetDefault('g:python_highlight_exceptions', 1)
+ call s:SetDefault('g:python_highlight_string_formatting', 1)
+ call s:SetDefault('g:python_highlight_string_format', 1)
+ call s:SetDefault('g:python_highlight_string_templates', 1)
+ call s:SetDefault('g:python_highlight_indent_errors', 1)
+ call s:SetDefault('g:python_highlight_space_errors', 1)
+ call s:SetDefault('g:python_highlight_doctests', 1)
+ call s:SetDefault('g:python_highlight_func_calls', 1)
+ call s:SetDefault('g:python_highlight_class_vars', 1)
+ call s:SetDefault('g:python_highlight_operators', 1)
+ call s:SetDefault('g:python_highlight_file_headers_as_comments', 1)
+ call s:SetDefault('g:python_slow_sync', 1)
+endif
+
+" We need it because scripts.vim in vim uses "set ft=" which cannot be
+" overridden with setf (and we can't use set ft= so our scripts.vim work)
+func! s:Setf(ft)
+ if &filetype !~# '\<'.a:ft.'\>'
+ let &filetype = a:ft
+ endif
+endfunc
+
+" Function used for patterns that end in a star: don't set the filetype if the
+" file name matches ft_ignore_pat.
+" When using this, the entry should probably be further down below with the
+" other StarSetf() calls.
+func! s:StarSetf(ft)
+ if expand("<amatch>") !~ g:ft_ignore_pat
+ exe 'setf ' . a:ft
+ endif
+endfunc
+
+augroup filetypedetect
+
+" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
+
+if !has_key(s:disabled_packages, 'sql')
+ au BufNewFile,BufRead *.bdy,*.ddl,*.fnc,*.pck,*.pkb,*.pks,*.plb,*.pls,*.plsql,*.prc,*.spc,*.sql,*.tpb,*.tps,*.trg,*.tyb,*.tyc,*.typ,*.vw setf sql
+endif
+
+if !has_key(s:disabled_packages, 'gitignore')
+ au BufNewFile,BufRead *.git/info/exclude,*/.config/git/ignore,{.,}gitignore setf gitignore
+endif
+
+if !has_key(s:disabled_packages, 'tads')
+ au! BufNewFile,BufRead *.t call polyglot#detect#T()
+endif
+
+if !has_key(s:disabled_packages, 'prolog')
+ au! BufNewFile,BufRead *.pl call polyglot#detect#Pl()
+ au BufNewFile,BufRead *.pdb,*.pro,*.prolog,*.yap setf prolog
+endif
+
+if !has_key(s:disabled_packages, 'bzl')
+ au BufNewFile,BufRead *.BUILD,*.bazel,*.bzl,BUCK,BUILD,BUILD.bazel,Tiltfile,WORKSPACE setf bzl
+endif
+
+if !has_key(s:disabled_packages, 'odin')
+ au BufNewFile,BufRead *.odin setf odin
+endif
+
+if !has_key(s:disabled_packages, 'dosini')
+ au BufNewFile,BufRead *.dof,*.ini,*.lektorproject,*.prefs,*.pro,*.properties,*/etc/pacman.conf,*/etc/yum.conf,{.,}editorconfig,{.,}npmrc,buildozer.spec setf dosini
+ au BufNewFile,BufRead php.ini-* call s:StarSetf('dosini')
+ au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
+endif
+
+if !has_key(s:disabled_packages, 'visual-basic')
+ au! BufNewFile,BufRead *.bas call polyglot#detect#Bas()
+ au BufNewFile,BufRead *.cls,*.ctl,*.dsm,*.frm,*.frx,*.sba,*.vba,*.vbs setf vb
+endif
+
+if !has_key(s:disabled_packages, 'basic')
+ au BufNewFile,BufRead *.basic setf basic
+endif
+
+if !has_key(s:disabled_packages, 'trasys')
+ au! BufNewFile,BufRead *.inp call polyglot#detect#Inp()
+endif
+
+if !has_key(s:disabled_packages, 'zig')
+ au BufNewFile,BufRead *.zig,*.zir setf zig
+ au BufNewFile,BufRead *.zir setf zir
+endif
+
+if !has_key(s:disabled_packages, 'zephir')
+ au BufNewFile,BufRead *.zep setf zephir
+endif
+
+if !has_key(s:disabled_packages, 'help')
+ au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
+endif
+
+if !has_key(s:disabled_packages, 'helm')
+ au BufNewFile,BufRead */templates/*.tpl,*/templates/*.yaml setf helm
+endif
+
+if !has_key(s:disabled_packages, 'ansible')
+ au BufNewFile,BufRead handlers.*.y{a,}ml,local.y{a,}ml,main.y{a,}ml,playbook.y{a,}ml,requirements.y{a,}ml,roles.*.y{a,}ml,site.y{a,}ml,tasks.*.y{a,}ml setf yaml.ansible
+ au BufNewFile,BufRead host_vars/* call s:StarSetf('yaml.ansible')
+ au BufNewFile,BufRead group_vars/* call s:StarSetf('yaml.ansible')
+endif
+
+if !has_key(s:disabled_packages, 'xsl')
+ au BufNewFile,BufRead *.xsl,*.xslt setf xsl
+endif
+
+if !has_key(s:disabled_packages, 'xdc')
+ au BufNewFile,BufRead *.xdc setf xdc
+endif
+
+if !has_key(s:disabled_packages, 'vue')
+ au BufNewFile,BufRead *.vue,*.wpy setf vue
+endif
+
+if !has_key(s:disabled_packages, 'vmasm')
+ au BufNewFile,BufRead *.mar setf vmasm
+endif
+
+if !has_key(s:disabled_packages, 'velocity')
+ au BufNewFile,BufRead *.vm setf velocity
+endif
+
+if !has_key(s:disabled_packages, 'vcl')
+ au BufNewFile,BufRead *.vcl setf vcl
+endif
+
+if !has_key(s:disabled_packages, 'vbnet')
+ au BufNewFile,BufRead *.vb,*.vbhtml setf vbnet
+endif
+
+if !has_key(s:disabled_packages, 'vala')
+ au BufNewFile,BufRead *.vala,*.valadoc,*.vapi setf vala
+endif
+
+if !has_key(s:disabled_packages, 'v')
+ au BufNewFile,BufRead *.v setf v
+endif
+
+if !has_key(s:disabled_packages, 'unison')
+ au BufNewFile,BufRead *.u,*.uu setf unison
+endif
+
+if !has_key(s:disabled_packages, 'typescript')
+ au BufNewFile,BufRead *.tsx setf typescriptreact
+ au BufNewFile,BufRead *.ts setf typescript
+endif
+
+if !has_key(s:disabled_packages, 'twig')
+ au BufNewFile,BufRead *.xml.twig setf xml.twig
+ au BufNewFile,BufRead *.twig setf html.twig
+endif
+
+if !has_key(s:disabled_packages, 'tptp')
+ au BufNewFile,BufRead *.ax,*.p,*.tptp setf tptp
+endif
+
+if !has_key(s:disabled_packages, 'toml')
+ au BufNewFile,BufRead *.toml,*/.cargo/config,*/.cargo/credentials,Cargo.lock,Gopkg.lock,Pipfile,poetry.lock setf toml
+endif
+
+if !has_key(s:disabled_packages, 'tmux')
+ au BufNewFile,BufRead {.,}tmux*.conf setf tmux
+endif
+
+if !has_key(s:disabled_packages, 'thrift')
+ au BufNewFile,BufRead *.thrift setf thrift
+endif
+
+if !has_key(s:disabled_packages, 'textile')
+ au BufNewFile,BufRead *.textile setf textile
+endif
+
+if !has_key(s:disabled_packages, 'terraform')
+ au BufNewFile,BufRead *.tf,*.tfvars setf terraform
+endif
+
+if !has_key(s:disabled_packages, 'systemd')
+ au BufNewFile,BufRead *.automount,*.dnssd,*.link,*.mount,*.netdev,*.network,*.nspawn,*.path,*.service,*.slice,*.socket,*.swap,*.target,*.timer,*/systemd/*.conf setf systemd
+ au BufNewFile,BufRead *.#* call s:StarSetf('systemd')
+endif
+
+if !has_key(s:disabled_packages, 'sxhkd')
+ au BufNewFile,BufRead *.sxhkdrc,sxhkdrc setf sxhkdrc
+endif
+
+if !has_key(s:disabled_packages, 'swift')
+ au BufNewFile,BufRead *.swift setf swift
+endif
+
+if !has_key(s:disabled_packages, 'svg-indent')
+endif
+
+if !has_key(s:disabled_packages, 'svg')
+ au BufNewFile,BufRead *.svg setf svg
+endif
+
+if !has_key(s:disabled_packages, 'svelte')
+ au BufNewFile,BufRead *.svelte setf svelte
+endif
+
+if !has_key(s:disabled_packages, 'stylus')
+ au BufNewFile,BufRead *.styl,*.stylus setf stylus
+endif
+
+if !has_key(s:disabled_packages, 'solidity')
+ au BufNewFile,BufRead *.sol setf solidity
+endif
+
+if !has_key(s:disabled_packages, 'smt2')
+ au BufNewFile,BufRead *.smt,*.smt2 setf smt2
+endif
+
+if !has_key(s:disabled_packages, 'slime')
+ au BufNewFile,BufRead *.slime setf slime
+endif
+
+if !has_key(s:disabled_packages, 'slim')
+ au BufNewFile,BufRead *.slim setf slim
+endif
+
+if !has_key(s:disabled_packages, 'zinit')
+endif
+
+if !has_key(s:disabled_packages, 'sh')
+ au BufNewFile,BufRead *.zsh,{.,}zfbfmarks,{.,}zlogin,{.,}zlogout,{.,}zprofile,{.,}zshenv,{.,}zshrc setf zsh
+ au BufNewFile,BufRead {.,}zsh* call s:StarSetf('zsh')
+ au BufNewFile,BufRead {.,}zlog* call s:StarSetf('zsh')
+ au BufNewFile,BufRead {.,}zcompdump* call s:StarSetf('zsh')
+ au BufNewFile,BufRead *.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh,*.sh.in,*.tmux,*.tool,*/etc/udev/cdsymlinks.conf,{.,}bash_aliases,{.,}bash_history,{.,}bash_logout,{.,}bash_profile,{.,}bashrc,{.,}cshrc,{.,}env,{.,}env.example,{.,}flaskenv,{.,}login,{.,}profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,zlogin,zlogout,zprofile,zshenv,zshrc setf sh
+endif
+
+if !has_key(s:disabled_packages, 'scss')
+ au BufNewFile,BufRead *.scss setf scss
+endif
+
+if !has_key(s:disabled_packages, 'sbt')
+ au BufNewFile,BufRead *.sbt setf sbt.scala
+endif
+
+if !has_key(s:disabled_packages, 'scala')
+ au BufNewFile,BufRead *.kojo,*.sc,*.scala setf scala
+endif
+
+if !has_key(s:disabled_packages, 'rust')
+ au BufNewFile,BufRead *.rs,*.rs.in setf rust
+endif
+
+if !has_key(s:disabled_packages, 'brewfile')
+ au BufNewFile,BufRead Brewfile setf brewfile
+endif
+
+if !has_key(s:disabled_packages, 'yard')
+endif
+
+if !has_key(s:disabled_packages, 'rspec')
+ au BufNewFile,BufRead *_spec.rb set ft=ruby syntax=rspec
+endif
+
+if !has_key(s:disabled_packages, 'ruby')
+ au BufNewFile,BufRead *.erb,*.erb.deface,*.rhtml setf eruby
+ au BufNewFile,BufRead *.axlsx,*.builder,*.cap,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.opal,*.pluginspec,*.podspec,*.rabl,*.rake,*.rant,*.rb,*.rbi,*.rbuild,*.rbw,*.rbx,*.rjs,*.ru,*.ruby,*.rxml,*.spec,*.thor,*.watchr,{.,}Brewfile,{.,}Guardfile,{.,}autotest,{.,}irbrc,{.,}pryrc,{.,}simplecov,Appraisals,Berksfile,Buildfile,Capfile,Cheffile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,KitchenSink,Mavenfile,Podfile,Puppetfile,Rakefile,Rantfile,Routefile,Snapfile,Thorfile,Vagrantfile,buildfile,vagrantfile setf ruby
+ au BufNewFile,BufRead [Rr]akefile* call s:StarSetf('ruby')
+endif
+
+if !has_key(s:disabled_packages, 'rst')
+ au BufNewFile,BufRead *.rest,*.rest.txt,*.rst,*.rst.txt setf rst
+endif
+
+if !has_key(s:disabled_packages, 'reason')
+ au! BufNewFile,BufRead *.re call polyglot#detect#Re()
+ au BufNewFile,BufRead *.rei setf reason
+endif
+
+if !has_key(s:disabled_packages, 'razor')
+ au BufNewFile,BufRead *.cshtml,*.razor setf razor
+endif
+
+if !has_key(s:disabled_packages, 'raml')
+ au BufNewFile,BufRead *.raml setf raml
+endif
+
+if !has_key(s:disabled_packages, 'raku')
+ au! BufNewFile,BufRead *.t call polyglot#detect#T()
+ au! BufNewFile,BufRead *.pm call polyglot#detect#Pm()
+ au! BufNewFile,BufRead *.pl call polyglot#detect#Pl()
+ au BufNewFile,BufRead *.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl6,*.pm6,*.pod6,*.raku,*.rakudoc,*.rakumod,*.rakutest,*.t6 setf raku
+endif
+
+if !has_key(s:disabled_packages, 'ragel')
+ au BufNewFile,BufRead *.rl setf ragel
+endif
+
+if !has_key(s:disabled_packages, 'racket')
+ au BufNewFile,BufRead *.rkt,*.rktd,*.rktl,*.scrbl setf racket
+endif
+
+if !has_key(s:disabled_packages, 'r-lang')
+ au BufNewFile,BufRead *.rd setf rhelp
+ au BufNewFile,BufRead *.S,*.r,*.rsx,*.s,{.,}Rprofile,expr-dist setf r
+endif
+
+if !has_key(s:disabled_packages, 'qml')
+ au BufNewFile,BufRead *.qbs,*.qml setf qml
+endif
+
+if !has_key(s:disabled_packages, 'qmake')
+ au BufNewFile,BufRead *.pri,*.pro setf qmake
+endif
+
+if !has_key(s:disabled_packages, 'requirements')
+ au BufNewFile,BufRead *.pip,*require.{txt,in},*requirements.{txt,in},constraints.{txt,in} setf requirements
+endif
+
+if !has_key(s:disabled_packages, 'python-compiler')
+endif
+
+if !has_key(s:disabled_packages, 'python-indent')
+endif
+
+if !has_key(s:disabled_packages, 'python')
+ au BufNewFile,BufRead *.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.ptl,*.py,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,{.,}gclient,{.,}pythonrc,{.,}pythonstartup,DEPS,SConscript,SConstruct,Snakefile,wscript setf python
+endif
+
+if !has_key(s:disabled_packages, 'purescript')
+ au BufNewFile,BufRead *.purs setf purescript
+endif
+
+if !has_key(s:disabled_packages, 'puppet')
+ au BufNewFile,BufRead *.epp setf embeddedpuppet
+ au BufNewFile,BufRead *.pp,Modulefile setf puppet
+endif
+
+if !has_key(s:disabled_packages, 'pug')
+ au BufNewFile,BufRead *.jade,*.pug setf pug
+endif
+
+if !has_key(s:disabled_packages, 'protobuf')
+ au BufNewFile,BufRead *.proto setf proto
+endif
+
+if !has_key(s:disabled_packages, 'powershell')
+ au BufNewFile,BufRead *.ps1xml setf ps1xml
+ au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1
+endif
+
+if !has_key(s:disabled_packages, 'pony')
+ au BufNewFile,BufRead *.pony setf pony
+endif
+
+if !has_key(s:disabled_packages, 'plantuml')
+ au BufNewFile,BufRead *.iuml,*.plantuml,*.pu,*.puml,*.uml setf plantuml
+endif
+
+if !has_key(s:disabled_packages, 'blade')
+ au BufNewFile,BufRead *.blade,*.blade.php setf blade
+endif
+
+if !has_key(s:disabled_packages, 'php')
+ au BufNewFile,BufRead *.aw,*.ctp,*.fcgi,*.inc,*.php,*.php3,*.php4,*.php5,*.phps,*.phpt,*.phtml,{.,}php,{.,}php_cs,{.,}php_cs.dist,Phakefile setf php
+endif
+
+if !has_key(s:disabled_packages, 'cql')
+ au BufNewFile,BufRead *.cql setf cql
+endif
+
+if !has_key(s:disabled_packages, 'pgsql')
+ au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | set ft=sql
+endif
+
+if !has_key(s:disabled_packages, 'perl')
+ au! BufNewFile,BufRead *.tt2 call polyglot#detect#Tt2()
+ au! BufNewFile,BufRead *.t call polyglot#detect#T()
+ au! BufNewFile,BufRead *.pm call polyglot#detect#Pm()
+ au! BufNewFile,BufRead *.pl call polyglot#detect#Pl()
+ au BufNewFile,BufRead *.xs setf xs
+ au BufNewFile,BufRead *.comp,*.mason,*.mhtml setf mason
+ au BufNewFile,BufRead *.pod setf pod
+ au BufNewFile,BufRead *.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.psgi,{.,}gitolite.rc,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc setf perl
+endif
+
+if !has_key(s:disabled_packages, 'opencl')
+ au BufNewFile,BufRead *.cl,*.opencl setf opencl
+endif
+
+if !has_key(s:disabled_packages, 'octave')
+ au! BufNewFile,BufRead *.m call polyglot#detect#M()
+ au BufNewFile,BufRead *.oct setf octave
+endif
+
+if !has_key(s:disabled_packages, 'ocaml')
+ au BufNewFile,BufRead *.sexp setf sexplib
+ au BufNewFile,BufRead *.root setf ocpbuildroot
+ au BufNewFile,BufRead *.ocp setf ocpbuild
+ au BufNewFile,BufRead _tags setf ocamlbuild_tags
+ au BufNewFile,BufRead dune,dune-project,dune-workspace,jbuild setf dune
+ au BufNewFile,BufRead _oasis setf oasis
+ au BufNewFile,BufRead *.opam,*.opam.template,opam setf opam
+ au BufNewFile,BufRead *.om,OMakefile,OMakeroot,OMakeroot.in setf omake
+ au BufNewFile,BufRead *.eliom,*.eliomi,*.ml,*.ml.cppo,*.ml4,*.mli,*.mli.cppo,*.mlip,*.mll,*.mlp,*.mlt,*.mly,{.,}ocamlinit setf ocaml
+endif
+
+if !has_key(s:disabled_packages, 'objc')
+ au! BufNewFile,BufRead *.m call polyglot#detect#M()
+ au! BufNewFile,BufRead *.h call polyglot#detect#H()
+endif
+
+if !has_key(s:disabled_packages, 'nix')
+ au BufNewFile,BufRead *.nix setf nix
+endif
+
+if !has_key(s:disabled_packages, 'nim')
+ au BufNewFile,BufRead *.nim,*.nim.cfg,*.nimble,*.nimrod,*.nims,nim.cfg setf nim
+endif
+
+if !has_key(s:disabled_packages, 'nginx')
+ au BufNewFile,BufRead *.nginx,*.nginxconf,*.vhost,*/nginx/*.conf,*nginx.conf,nginx*.conf,nginx.conf setf nginx
+ au BufNewFile,BufRead */usr/local/nginx/conf/* call s:StarSetf('nginx')
+ au BufNewFile,BufRead */etc/nginx/* call s:StarSetf('nginx')
+endif
+
+if !has_key(s:disabled_packages, 'murphi')
+ au! BufNewFile,BufRead *.m call polyglot#detect#M()
+endif
+
+if !has_key(s:disabled_packages, 'moonscript')
+ au BufNewFile,BufRead *.moon setf moon
+endif
+
+if !has_key(s:disabled_packages, 'meson')
+ au BufNewFile,BufRead *.wrap setf dosini
+ au BufNewFile,BufRead meson.build,meson_options.txt setf meson
+endif
+
+if !has_key(s:disabled_packages, 'mdx')
+ au BufNewFile,BufRead *.mdx setf markdown.mdx
+endif
+
+if !has_key(s:disabled_packages, 'markdown')
+ au BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr setf markdown
+endif
+
+if !has_key(s:disabled_packages, 'mathematica')
+ au! BufNewFile,BufRead *.m call polyglot#detect#M()
+ au BufNewFile,BufRead *.cdf,*.ma,*.mathematica,*.mma,*.mt,*.nb,*.nbp,*.wl,*.wls,*.wlt setf mma
+endif
+
+if !has_key(s:disabled_packages, 'mako')
+ au BufNewFile,BufRead *.mako,*.mao setf mako
+ au BufReadPre *.*.mao execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
+ au BufNewFile *.*.mao execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
+ au BufReadPre *.*.mako execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
+ au BufNewFile *.*.mako execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
+endif
+
+if !has_key(s:disabled_packages, 'm4')
+ au BufNewFile,BufRead *.at,*.m4 setf m4
+endif
+
+if !has_key(s:disabled_packages, 'lua')
+ au BufNewFile,BufRead *.fcgi,*.lua,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,{.,}luacheckrc setf lua
+endif
+
+if !has_key(s:disabled_packages, 'log')
+ au BufNewFile,BufRead *.LOG,*.log,*_LOG,*_log setf log
+endif
+
+if !has_key(s:disabled_packages, 'llvm')
+ au BufNewFile,BufRead *.td setf tablegen
+ au BufNewFile,BufRead *.ll setf llvm
+endif
+
+if !has_key(s:disabled_packages, 'livescript')
+ au BufNewFile,BufRead *._ls,*.ls,Slakefile setf livescript
+endif
+
+if !has_key(s:disabled_packages, 'lilypond')
+ au BufNewFile,BufRead *.ily,*.ly setf lilypond
+endif
+
+if !has_key(s:disabled_packages, 'less')
+ au BufNewFile,BufRead *.less setf less
+endif
+
+if !has_key(s:disabled_packages, 'ledger')
+ au BufNewFile,BufRead *.journal,*.ldg,*.ledger setf ledger
+endif
+
+if !has_key(s:disabled_packages, 'kotlin')
+ au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin
+endif
+
+if !has_key(s:disabled_packages, 'julia')
+ au BufNewFile,BufRead *.jl setf julia
+endif
+
+if !has_key(s:disabled_packages, 'jst')
+ au BufNewFile,BufRead *.ect,*.ejs,*.jst setf jst
+endif
+
+if !has_key(s:disabled_packages, 'jsonnet')
+ au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
+endif
+
+if !has_key(s:disabled_packages, 'json')
+ au BufNewFile,BufRead *.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}htmlhintrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json
+endif
+
+if !has_key(s:disabled_packages, 'json5')
+ au BufNewFile,BufRead *.json5 setf json5
+endif
+
+if !has_key(s:disabled_packages, 'jq')
+ au BufNewFile,BufRead *.jq,{.,}jqrc setf jq
+ au BufNewFile,BufRead {.,}jqrc* call s:StarSetf('jq')
+endif
+
+if !has_key(s:disabled_packages, 'htmldjango')
+ au BufNewFile,BufRead *.j2,*.jinja,*.jinja2,*.njk setf htmldjango
+endif
+
+if !has_key(s:disabled_packages, 'jenkins')
+ au BufNewFile,BufRead *.Jenkinsfile,*.jenkinsfile,Jenkinsfile setf Jenkinsfile
+ au BufNewFile,BufRead Jenkinsfile* call s:StarSetf('Jenkinsfile')
+endif
+
+if !has_key(s:disabled_packages, 'javascript-sql')
+endif
+
+if !has_key(s:disabled_packages, 'ion')
+ au BufNewFile,BufRead *.ion,~/.config/ion/initrc setf ion
+endif
+
+if !has_key(s:disabled_packages, 'idris2')
+ au! BufNewFile,BufRead *.lidr call polyglot#detect#Lidr()
+ au! BufNewFile,BufRead *.idr call polyglot#detect#Idr()
+ au BufNewFile,BufRead *.ipkg,idris-response setf idris2
+endif
+
+if !has_key(s:disabled_packages, 'idris')
+ au! BufNewFile,BufRead *.lidr call polyglot#detect#Lidr()
+ au! BufNewFile,BufRead *.idr call polyglot#detect#Idr()
+ au BufNewFile,BufRead idris-response setf idris
+endif
+
+if !has_key(s:disabled_packages, 'icalendar')
+ au BufNewFile,BufRead *.ics setf icalendar
+endif
+
+if !has_key(s:disabled_packages, 'i3')
+ au BufNewFile,BufRead *.i3.config,*.i3config,{.,}i3.config,{.,}i3config,i3.config,i3config setf i3config
+endif
+
+if !has_key(s:disabled_packages, 'html5')
+ au! BufNewFile,BufRead *.html call polyglot#detect#Html()
+ au BufNewFile,BufRead *.htm,*.html.hl,*.inc,*.st,*.xht,*.xhtml setf html
+endif
+
+if !has_key(s:disabled_packages, 'hive')
+ au BufNewFile,BufRead *.hql,*.q,*.ql setf hive
+endif
+
+if !has_key(s:disabled_packages, 'hcl')
+ au BufNewFile,BufRead *.hcl,*.nomad,*.workflow,Appfile setf hcl
+endif
+
+if !has_key(s:disabled_packages, 'haxe')
+ au BufNewFile,BufRead *.hx,*.hxsl setf haxe
+endif
+
+if !has_key(s:disabled_packages, 'haskell')
+ au BufNewFile,BufRead *.bpk,*.hs,*.hs-boot,*.hsc,*.hsig setf haskell
+endif
+
+if !has_key(s:disabled_packages, 'handlebars')
+ au BufNewFile,BufRead *.handlebars,*.hb,*.hbs,*.hdbs setf html.handlebars
+ au BufNewFile,BufRead *.hjs,*.hogan,*.hulk,*.mustache setf html.mustache
+endif
+
+if !has_key(s:disabled_packages, 'haml')
+ au BufNewFile,BufRead *.haml,*.haml.deface,*.hamlbars,*.hamlc setf haml
+endif
+
+if !has_key(s:disabled_packages, 'grub')
+ au BufNewFile,BufRead */boot/grub/grub.conf,*/boot/grub/menu.lst,*/etc/grub.conf setf grub
+endif
+
+if !has_key(s:disabled_packages, 'gradle')
+endif
+
+if !has_key(s:disabled_packages, 'groovy')
+ au BufNewFile,BufRead *.gradle,*.groovy,*.grt,*.gtpl,*.gvy,Jenkinsfile setf groovy
+endif
+
+if !has_key(s:disabled_packages, 'graphql')
+ au BufNewFile,BufRead *.gql,*.graphql,*.graphqls setf graphql
+endif
+
+if !has_key(s:disabled_packages, 'jsx')
+ au BufNewFile,BufRead *.jsx setf javascriptreact
+endif
+
+if !has_key(s:disabled_packages, 'javascript')
+ au BufNewFile,BufRead *.flow setf flow
+ au BufNewFile,BufRead *._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.js,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile setf javascript
+endif
+
+if !has_key(s:disabled_packages, 'go')
+ au BufNewFile,BufRead *.tmpl setf gohtmltmpl
+ au BufNewFile,BufRead go.mod setf gomod
+ au BufNewFile,BufRead *.go setf go
+endif
+
+if !has_key(s:disabled_packages, 'gnuplot')
+ au BufNewFile,BufRead *.gnu,*.gnuplot,*.gp,*.gpi,*.p,*.plot,*.plt setf gnuplot
+endif
+
+if !has_key(s:disabled_packages, 'gmpl')
+ au BufNewFile,BufRead *.mod setf gmpl
+endif
+
+if !has_key(s:disabled_packages, 'glsl')
+ au! BufNewFile,BufRead *.fs call polyglot#detect#Fs()
+ au BufNewFile,BufRead *.comp,*.fp,*.frag,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader setf glsl
+endif
+
+if !has_key(s:disabled_packages, 'git')
+ au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
+ au BufNewFile,BufRead {.,}gitsendemail.* call s:StarSetf('gitsendemail')
+ au BufNewFile,BufRead git-rebase-todo setf gitrebase
+ au BufNewFile,BufRead *.gitconfig,*.git/config,*.git/modules/*/config,*/.config/git/config,*/git/config,{.,}gitconfig,{.,}gitmodules setf gitconfig
+ au BufNewFile,BufRead */{.,}gitconfig.d/* call s:StarSetf('gitconfig')
+endif
+
+if !has_key(s:disabled_packages, 'gdscript')
+ au BufNewFile,BufRead *.gd setf gdscript3
+endif
+
+if !has_key(s:disabled_packages, 'fsharp')
+ au! BufNewFile,BufRead *.fs call polyglot#detect#Fs()
+ au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
+endif
+
+if !has_key(s:disabled_packages, 'forth')
+ au! BufNewFile,BufRead *.fs call polyglot#detect#Fs()
+ au BufNewFile,BufRead *.ft,*.fth setf forth
+endif
+
+if !has_key(s:disabled_packages, 'flatbuffers')
+ au BufNewFile,BufRead *.fbs setf fbs
+endif
+
+if !has_key(s:disabled_packages, 'fish')
+ au BufNewFile,BufRead *.fish setf fish
+endif
+
+if !has_key(s:disabled_packages, 'ferm')
+ au BufNewFile,BufRead *.ferm,ferm.conf setf ferm
+endif
+
+if !has_key(s:disabled_packages, 'fennel')
+ au BufNewFile,BufRead *.fnl setf fennel
+endif
+
+if !has_key(s:disabled_packages, 'erlang')
+ au BufNewFile,BufRead *.app,*.app.src,*.erl,*.es,*.escript,*.hrl,*.xrl,*.yaws,*.yrl,Emakefile,rebar.config,rebar.config.lock,rebar.lock setf erlang
+endif
+
+if !has_key(s:disabled_packages, 'emblem')
+ au BufNewFile,BufRead *.em,*.emblem setf emblem
+endif
+
+if !has_key(s:disabled_packages, 'emberscript')
+ au BufNewFile,BufRead *.em,*.emberscript setf ember-script
+endif
+
+if !has_key(s:disabled_packages, 'elm')
+ au BufNewFile,BufRead *.elm setf elm
+endif
+
+if !has_key(s:disabled_packages, 'elixir')
+ au BufNewFile,BufRead *.eex,*.leex setf eelixir
+ au BufNewFile,BufRead *.ex,*.exs,mix.lock setf elixir
+endif
+
+if !has_key(s:disabled_packages, 'dockerfile')
+ au BufNewFile,BufRead docker-compose*.yaml,docker-compose*.yml setf yaml.docker-compose
+ au BufNewFile,BufRead *.Dockerfile,*.dock,*.dockerfile,Dockerfile,dockerfile setf Dockerfile
+ au BufNewFile,BufRead Dockerfile* call s:StarSetf('Dockerfile')
+endif
+
+if !has_key(s:disabled_packages, 'yaml')
+ au BufNewFile,BufRead *.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml,*.yml.mysql,{.,}clang-format,{.,}clang-tidy,{.,}gemrc,fish_history,fish_read_history,glide.lock,yarn.lock setf yaml
+endif
+
+if !has_key(s:disabled_packages, 'dlang')
+ au BufNewFile,BufRead *.sdl setf dsdl
+ au BufNewFile,BufRead *.ddoc setf ddoc
+ au BufNewFile,BufRead *.dd setf dd
+ au BufNewFile,BufRead *.lst setf dcov
+ au BufNewFile,BufRead *.d,*.di setf d
+endif
+
+if !has_key(s:disabled_packages, 'dhall')
+ au BufNewFile,BufRead *.dhall setf dhall
+endif
+
+if !has_key(s:disabled_packages, 'dart')
+ au BufNewFile,BufRead *.dart,*.drt setf dart
+endif
+
+if !has_key(s:disabled_packages, 'cue')
+ au BufNewFile,BufRead *.cue setf cuesheet
+endif
+
+if !has_key(s:disabled_packages, 'cucumber')
+ au BufNewFile,BufRead *.feature,*.story setf cucumber
+endif
+
+if !has_key(s:disabled_packages, 'crystal')
+ au BufNewFile,BufRead *.ecr setf ecrystal
+ au BufNewFile,BufRead *.cr,Projectfile setf crystal
+endif
+
+if !has_key(s:disabled_packages, 'cryptol')
+ au BufNewFile,BufRead *.cry,*.cyl,*.lcry,*.lcyl setf cryptol
+endif
+
+if !has_key(s:disabled_packages, 'cjsx')
+endif
+
+if !has_key(s:disabled_packages, 'coffee-script')
+ au BufNewFile,BufRead *.coffee.md,*.litcoffee setf litcoffee
+ au BufNewFile,BufRead *._coffee,*.cake,*.cjsx,*.coffee,*.coffeekup,*.iced,Cakefile setf coffee
+endif
+
+if !has_key(s:disabled_packages, 'cmake')
+ au BufNewFile,BufRead *.cmake,*.cmake.in,CMakeLists.txt setf cmake
+endif
+
+if !has_key(s:disabled_packages, 'clojure')
+ au BufNewFile,BufRead *.boot,*.cl2,*.clj,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.edn,*.hic,build.boot,profile.boot,riemann.config setf clojure
+endif
+
+if !has_key(s:disabled_packages, 'carp')
+ au BufNewFile,BufRead *.carp setf carp
+endif
+
+if !has_key(s:disabled_packages, 'cpp-modern')
+endif
+
+if !has_key(s:disabled_packages, 'caddyfile')
+ au BufNewFile,BufRead Caddyfile setf caddyfile
+endif
+
+if !has_key(s:disabled_packages, 'awk')
+ au BufNewFile,BufRead *.awk,*.gawk setf awk
+endif
+
+if !has_key(s:disabled_packages, 'ave')
+ au BufNewFile,BufRead *.ave setf ave
+endif
+
+if !has_key(s:disabled_packages, 'autoit')
+ au BufNewFile,BufRead *.au3 setf autoit
+endif
+
+if !has_key(s:disabled_packages, 'atlas')
+ au BufNewFile,BufRead *.as,*.atl setf atlas
+endif
+
+if !has_key(s:disabled_packages, 'aspperl')
+ au! BufNewFile,BufRead *.asp call polyglot#detect#Asp()
+endif
+
+if !has_key(s:disabled_packages, 'aspvbs')
+ au! BufNewFile,BufRead *.asp call polyglot#detect#Asp()
+ au! BufNewFile,BufRead *.asa call polyglot#detect#Asa()
+endif
+
+if !has_key(s:disabled_packages, 'asn')
+ au BufNewFile,BufRead *.asn,*.asn1 setf asn
+endif
+
+if !has_key(s:disabled_packages, 'automake')
+ au BufNewFile,BufRead GNUmakefile.am,[Mm]akefile.am setf automake
+endif
+
+if !has_key(s:disabled_packages, 'elf')
+ au BufNewFile,BufRead *.am setf elf
+endif
+
+if !has_key(s:disabled_packages, 'autohotkey')
+ au BufNewFile,BufRead *.ahk,*.ahkl setf autohotkey
+endif
+
+if !has_key(s:disabled_packages, 'asciidoc')
+ au BufNewFile,BufRead *.adoc,*.asc,*.asciidoc setf asciidoc
+endif
+
+if !has_key(s:disabled_packages, 'art')
+ au BufNewFile,BufRead *.art setf art
+endif
+
+if !has_key(s:disabled_packages, 'arduino')
+ au BufNewFile,BufRead *.ino,*.pde setf arduino
+endif
+
+if !has_key(s:disabled_packages, 'c/c++')
+ au! BufNewFile,BufRead *.h call polyglot#detect#H()
+ au BufNewFile,BufRead *.c,*.cats,*.idc,*.qc,*enlightenment/*.cfg setf c
+ au BufNewFile,BufRead *.c++,*.cc,*.cp,*.cpp,*.cxx,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.moc,*.tcc,*.tlh,*.tpp setf cpp
+endif
+
+if !has_key(s:disabled_packages, 'arch')
+ au BufNewFile,BufRead {.,}arch-inventory,=tagging-method setf arch
+endif
+
+if !has_key(s:disabled_packages, 'aptconf')
+ au BufNewFile,BufRead */.aptitude/config,*/etc/apt/apt.conf.d/*.conf,apt.conf setf aptconf
+ au BufNewFile,BufRead */etc/apt/apt.conf.d/[^.]* call s:StarSetf('aptconf')
+endif
+
+if !has_key(s:disabled_packages, 'applescript')
+ au BufNewFile,BufRead *.applescript,*.scpt setf applescript
+endif
+
+if !has_key(s:disabled_packages, 'apiblueprint')
+ au BufNewFile,BufRead *.apib setf apiblueprint
+endif
+
+if !has_key(s:disabled_packages, 'apache')
+ au BufNewFile,BufRead */etc/apache2/sites-*/*.com,*/etc/httpd/*.conf,{.,}htaccess setf apache
+ au BufNewFile,BufRead srm.conf* call s:StarSetf('apache')
+ au BufNewFile,BufRead httpd.conf* call s:StarSetf('apache')
+ au BufNewFile,BufRead apache2.conf* call s:StarSetf('apache')
+ au BufNewFile,BufRead apache.conf* call s:StarSetf('apache')
+ au BufNewFile,BufRead access.conf* call s:StarSetf('apache')
+ au BufNewFile,BufRead */etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
+ au BufNewFile,BufRead */etc/apache2/sites-*/* call s:StarSetf('apache')
+ au BufNewFile,BufRead */etc/apache2/mods-*/* call s:StarSetf('apache')
+ au BufNewFile,BufRead */etc/apache2/conf.*/* call s:StarSetf('apache')
+ au BufNewFile,BufRead */etc/apache2/*.conf* call s:StarSetf('apache')
+endif
+
+if !has_key(s:disabled_packages, 'ant')
+ au BufNewFile,BufRead build.xml setf ant
+endif
+
+if !has_key(s:disabled_packages, 'xml')
+ au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml
+endif
+
+if !has_key(s:disabled_packages, 'csv')
+ au BufNewFile,BufRead *.csv,*.tab,*.tsv setf csv
+endif
+
+if !has_key(s:disabled_packages, 'ampl')
+ au BufNewFile,BufRead *.run setf ampl
+endif
+
+if !has_key(s:disabled_packages, 'aml')
+ au BufNewFile,BufRead *.aml setf aml
+endif
+
+if !has_key(s:disabled_packages, 'alsaconf')
+ au BufNewFile,BufRead */etc/asound.conf,*/usr/share/alsa/alsa.conf,{.,}asoundrc setf alsaconf
+endif
+
+if !has_key(s:disabled_packages, 'aidl')
+ au BufNewFile,BufRead *.aidl setf aidl
+endif
+
+if !has_key(s:disabled_packages, 'ahdl')
+ au BufNewFile,BufRead *.tdf setf ahdl
+endif
+
+if !has_key(s:disabled_packages, 'ada')
+ au BufNewFile,BufRead *.ada,*.ada_m,*.adb,*.adc,*.ads,*.gpr setf ada
+endif
+
+if !has_key(s:disabled_packages, 'acpiasl')
+ au BufNewFile,BufRead *.asl,*.dsl setf asl
+endif
+
+if !has_key(s:disabled_packages, 'acedb')
+ au BufNewFile,BufRead *.wrm setf acedb
+endif
+
+if !has_key(s:disabled_packages, 'abel')
+ au BufNewFile,BufRead *.abl setf abel
+endif
+
+if !has_key(s:disabled_packages, 'abc')
+ au BufNewFile,BufRead *.abc setf abc
+endif
+
+if !has_key(s:disabled_packages, 'abaqus')
+ au! BufNewFile,BufRead *.inp call polyglot#detect#Inp()
+endif
+
+if !has_key(s:disabled_packages, 'abap')
+ au BufNewFile,BufRead *.abap setf abap
+endif
+
+if !has_key(s:disabled_packages, 'aap')
+ au BufNewFile,BufRead *.aap setf aap
+endif
+
+if !has_key(s:disabled_packages, 'a65')
+ au BufNewFile,BufRead *.a65 setf a65
+endif
+
+if !has_key(s:disabled_packages, 'a2ps')
+ au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,{.,}a2psrc,a2psrc setf a2ps
+endif
+
+if !has_key(s:disabled_packages, 'haproxy')
+ au BufNewFile,BufRead *.cfg,haproxy.cfg setf haproxy
+ au BufNewFile,BufRead haproxy*.conf* call s:StarSetf('haproxy')
+endif
+
+if !has_key(s:disabled_packages, 'conf')
+ au BufNewFile,BufRead *.conf,auto.master,config setf conf
+endif
+
+if !has_key(s:disabled_packages, '8th')
+ au BufNewFile,BufRead *.8th setf 8th
+endif
+
+" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
+
+au! BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
+ \ call polyglot#shebang#Detect() | endif
+
+au BufEnter * if &ft == "" && expand("<afile>:e") == "" |
+ \ call s:Observe('shebang#Detect') | endif
+
+augroup END
+
+if !has_key(s:disabled_packages, 'autoindent')
+ " Code below re-implements sleuth for vim-polyglot
+ let g:loaded_sleuth = 1
+ let g:loaded_foobar = 1
+
+ " Makes shiftwidth to be synchronized with tabstop by default
+ if &shiftwidth == &tabstop
+ let &shiftwidth = 0
+ endif
+
+ function! s:guess(lines) abort
+ let options = {}
+ let ccomment = 0
+ let podcomment = 0
+ let triplequote = 0
+ let backtick = 0
+ let xmlcomment = 0
+ let heredoc = ''
+ let minindent = 10
+ let spaces_minus_tabs = 0
+ let i = 0
+
+ for line in a:lines
+ let i += 1
+
+ if !len(line) || line =~# '^\W*$'
+ continue
+ endif
+
+ if line =~# '^\s*/\*'
+ let ccomment = 1
+ endif
+ if ccomment
+ if line =~# '\*/'
+ let ccomment = 0
+ endif
+ continue
+ endif
+
+ if line =~# '^=\w'
+ let podcomment = 1
+ endif
+ if podcomment
+ if line =~# '^=\%(end\|cut\)\>'
+ let podcomment = 0
+ endif
+ continue
+ endif
+
+ if triplequote
+ if line =~# '^[^"]*"""[^"]*$'
+ let triplequote = 0
+ endif
+ continue
+ elseif line =~# '^[^"]*"""[^"]*$'
+ let triplequote = 1
+ endif
+
+ if backtick
+ if line =~# '^[^`]*`[^`]*$'
+ let backtick = 0
+ endif
+ continue
+ elseif &filetype ==# 'go' && line =~# '^[^`]*`[^`]*$'
+ let backtick = 1
+ endif
+
+ if line =~# '^\s*<\!--'
+ let xmlcomment = 1
+ endif
+ if xmlcomment
+ if line =~# '-->'
+ let xmlcomment = 0
+ endif
+ continue
+ endif
+
+ " This is correct order because both "<<EOF" and "EOF" matches end
+ if heredoc != ''
+ if line =~# heredoc
+ let heredoc = ''
+ endif
+ continue
+ endif
+ let herematch = matchlist(line, '\C<<\W*\([A-Z]\+\)\s*$')
+ if len(herematch) > 0
+ let heredoc = herematch[1] . '$'
+ endif
+
+ let spaces_minus_tabs += line[0] == "\t" ? 1 : -1
+
+ if line[0] == "\t"
+ setlocal noexpandtab
+ let &l:shiftwidth=&tabstop
+ let b:sleuth_culprit .= ':' . i
+ return 1
+ elseif line[0] == " "
+ let indent = len(matchstr(line, '^ *'))
+ if (indent % 2 == 0 || indent % 3 == 0) && indent < minindent
+ let minindent = indent
+ endif
+ endif
+ endfor
+
+ if minindent < 10
+ setlocal expandtab
+ let &l:shiftwidth=minindent
+ let b:sleuth_culprit .= ':' . i
+ return 1
+ endif
+
+ return 0
+ endfunction
+
+ function! s:detect_indent() abort
+ if &buftype ==# 'help'
+ return
+ endif
+
+ let b:sleuth_culprit = expand("<afile>:p")
+ if s:guess(getline(1, 32))
+ return
+ endif
+ let pattern = polyglot#sleuth#GlobForFiletype(&filetype)
+ if len(pattern) == 0
+ return
+ endif
+ let pattern = '{' . pattern . ',.git,.svn,.hg}'
+ let dir = expand('%:p:h')
+ let level = 3
+ while isdirectory(dir) && dir !=# fnamemodify(dir, ':h') && level > 0
+ " Ignore files from homedir and root
+ if dir == expand('~') || dir == '/'
+ unlet b:sleuth_culprit
+ return
+ endif
+ for neighbor in glob(dir . '/' . pattern, 0, 1)[0:level]
+ let b:sleuth_culprit = neighbor
+ " Do not consider directories above .git, .svn or .hg
+ if fnamemodify(neighbor, ":h:t")[0] == "."
+ let level = 0
+ continue
+ endif
+ if neighbor !=# expand('%:p') && filereadable(neighbor)
+ if s:guess(readfile(neighbor, '', 32))
+ return
+ endif
+ endif
+ endfor
+
+ let dir = fnamemodify(dir, ':h')
+ let level -= 1
+ endwhile
+
+ unlet b:sleuth_culprit
+ endfunction
+
+ setglobal smarttab
+
+ function! SleuthIndicator() abort
+ let sw = &shiftwidth ? &shiftwidth : &tabstop
+ if &expandtab
+ return 'sw='.sw
+ elseif &tabstop == sw
+ return 'ts='.&tabstop
+ else
+ return 'sw='.sw.',ts='.&tabstop
+ endif
+ endfunction
+
+ augroup polyglot-sleuth
+ au!
+ au FileType * call s:detect_indent()
+ au User Flags call Hoist('buffer', 5, 'SleuthIndicator')
+ augroup END
+
+ command! -bar -bang Sleuth call s:detect_indent()
+endif
+
+func! s:verify()
+ if exists("g:polyglot_disabled_not_set")
+ if exists("g:polyglot_disabled")
+ echohl WarningMsg
+ echo "vim-polyglot: g:polyglot_disabled should be defined before loading vim-polyglot"
+ echohl None
+ endif
+
+ unlet g:polyglot_disabled_not_set
+ endif
+endfunc
+
+au VimEnter * call s:verify()
+
+" Save polyglot_disabled without postfixes
+if exists('g:polyglot_disabled')
+ let g:polyglot_disabled = s:new_polyglot_disabled
+endif
+
+augroup filetypedetect
+
+" Ignored extensions
+if exists("*fnameescape")
+au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew,?\+.pacsave,?\+.pacnew
+ \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r"))
+au BufNewFile,BufRead *~
+ \ let s:name = expand("<afile>") |
+ \ let s:short = substitute(s:name, '\~$', '', '') |
+ \ if s:name != s:short && s:short != "" |
+ \ exe "doau filetypedetect BufRead " . fnameescape(s:short) |
+ \ endif |
+ \ unlet! s:name s:short
+au BufNewFile,BufRead ?\+.in
+ \ if expand("<afile>:t") != "configure.in" |
+ \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) |
+ \ endif
+elseif &verbose > 0
+ echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()"
+endif
+
+" Pattern used to match file names which should not be inspected.
+" Currently finds compressed files.
+if !exists("g:ft_ignore_pat")
+ let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
+endif
+
+" Vim help file
+au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
+
+" Abaqus or Trasys
+au BufNewFile,BufRead *.inp call dist#ft#Check_inp()
+
+" 8th (Firth-derivative)
+au BufNewFile,BufRead *.8th setf 8th
+
+" A-A-P recipe
+au BufNewFile,BufRead *.aap setf aap
+
+" A2ps printing utility
+au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps
+
+" ABAB/4
+au BufNewFile,BufRead *.abap setf abap
+
+" ABC music notation
+au BufNewFile,BufRead *.abc setf abc
+
+" ABEL
+au BufNewFile,BufRead *.abl setf abel
+
+" AceDB
+au BufNewFile,BufRead *.wrm setf acedb
+
+" Ada (83, 9X, 95)
+au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada
+if has("vms")
+ au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada
+else
+ au BufNewFile,BufRead *.gpr setf ada
+endif
+
+" AHDL
+au BufNewFile,BufRead *.tdf setf ahdl
+
+" AIDL
+au BufNewFile,BufRead *.aidl setf aidl
+
+" AMPL
+au BufNewFile,BufRead *.run setf ampl
+
+" Ant
+au BufNewFile,BufRead build.xml setf ant
+
+" Arduino
+au BufNewFile,BufRead *.ino,*.pde setf arduino
+
+" Apache config file
+au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache
+au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache
+
+" XA65 MOS6510 cross assembler
+au BufNewFile,BufRead *.a65 setf a65
+
+" Applescript
+au BufNewFile,BufRead *.scpt setf applescript
+
+" Applix ELF
+au BufNewFile,BufRead *.am
+ \ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
+
+" ALSA configuration
+au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
+
+" Arc Macro Language
+au BufNewFile,BufRead *.aml setf aml
+
+" APT config file
+au BufNewFile,BufRead apt.conf setf aptconf
+au BufNewFile,BufRead */.aptitude/config setf aptconf
+au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf
+
+" Arch Inventory file
+au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch
+
+" ART*Enterprise (formerly ART-IM)
+au BufNewFile,BufRead *.art setf art
+
+" AsciiDoc
+au BufNewFile,BufRead *.asciidoc,*.adoc setf asciidoc
+
+" ASN.1
+au BufNewFile,BufRead *.asn,*.asn1 setf asn
+
+" Active Server Pages (with Visual Basic Script)
+au BufNewFile,BufRead *.asa
+ \ if exists("g:filetype_asa") |
+ \ exe "setf " . g:filetype_asa |
+ \ else |
+ \ setf aspvbs |
+ \ endif
+
+" Active Server Pages (with Perl or Visual Basic Script)
+au BufNewFile,BufRead *.asp
+ \ if exists("g:filetype_asp") |
+ \ exe "setf " . g:filetype_asp |
+ \ elseif getline(1) . getline(2) . getline(3) =~? "perlscript" |
+ \ setf aspperl |
+ \ else |
+ \ setf aspvbs |
+ \ endif
+
+" Grub (must be before catch *.lst)
+au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
+
+" Assembly (all kinds)
+" *.lst is not pure assembly, it has two extra columns (address, byte codes)
+au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
+
+" Macro (VAX)
+au BufNewFile,BufRead *.mar setf vmasm
+
+" Atlas
+au BufNewFile,BufRead *.atl,*.as setf atlas
+
+" Autoit v3
+au BufNewFile,BufRead *.au3 setf autoit
+
+" Autohotkey
+au BufNewFile,BufRead *.ahk setf autohotkey
+
+" Automake
+au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
+
+" Autotest .at files are actually m4
+au BufNewFile,BufRead *.at setf m4
+
+" Avenue
+au BufNewFile,BufRead *.ave setf ave
+
+" Awk
+au BufNewFile,BufRead *.awk,*.gawk setf awk
+
+" B
+au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
+
+" BASIC or Visual Basic
+au BufNewFile,BufRead *.bas call dist#ft#FTVB("basic")
+
+" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
+au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
+
+" IBasic file (similar to QBasic)
+au BufNewFile,BufRead *.iba,*.ibi setf ibasic
+
+" FreeBasic file (similar to QBasic)
+au BufNewFile,BufRead *.fb,*.bi setf freebasic
+
+" Batch file for MSDOS.
+au BufNewFile,BufRead *.bat,*.sys setf dosbatch
+" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
+au BufNewFile,BufRead *.cmd
+ \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
+
+" Batch file for 4DOS
+au BufNewFile,BufRead *.btm call dist#ft#FTbtm()
+
+" BC calculator
+au BufNewFile,BufRead *.bc setf bc
+
+" BDF font
+au BufNewFile,BufRead *.bdf setf bdf
+
+" BibTeX bibliography database file
+au BufNewFile,BufRead *.bib setf bib
+
+" BibTeX Bibliography Style
+au BufNewFile,BufRead *.bst setf bst
+
+" BIND configuration
+" sudoedit uses namedXXXX.conf
+au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
+
+" BIND zone
+au BufNewFile,BufRead named.root setf bindzone
+au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
+
+" Blank
+au BufNewFile,BufRead *.bl setf blank
+
+" Blkid cache file
+au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
+
+" BSDL
+au BufNewFile,BufRead *bsd,*.bsdl setf bsdl
+
+" Bazel (http://bazel.io)
+autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl
+if has("fname_case")
+ " There is another check for BUILD further below.
+ autocmd BufRead,BufNewFile *.BUILD,BUILD setf bzl
+endif
+
+" C or lpc
+au BufNewFile,BufRead *.c call dist#ft#FTlpc()
+au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
+
+" Calendar
+au BufNewFile,BufRead calendar setf calendar
+
+" C#
+au BufNewFile,BufRead *.cs setf cs
+
+" CSDL
+au BufNewFile,BufRead *.csdl setf csdl
+
+" Cabal
+au BufNewFile,BufRead *.cabal setf cabal
+
+" Cdrdao TOC
+au BufNewFile,BufRead *.toc setf cdrtoc
+
+" Cdrdao config
+au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf
+
+" Cfengine
+au BufNewFile,BufRead cfengine.conf setf cfengine
+
+" ChaiScript
+au BufRead,BufNewFile *.chai setf chaiscript
+
+" Comshare Dimension Definition Language
+au BufNewFile,BufRead *.cdl setf cdl
+
+" Conary Recipe
+au BufNewFile,BufRead *.recipe setf conaryrecipe
+
+" Controllable Regex Mutilator
+au BufNewFile,BufRead *.crm setf crm
+
+" Cyn++
+au BufNewFile,BufRead *.cyn setf cynpp
+
+" Cynlib
+" .cc and .cpp files can be C++ or Cynlib.
+au BufNewFile,BufRead *.cc
+ \ if exists("cynlib_syntax_for_cc")|setf cynlib|else|setf cpp|endif
+au BufNewFile,BufRead *.cpp
+ \ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif
+
+" C++
+au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp
+if has("fname_case")
+ au BufNewFile,BufRead *.C,*.H setf cpp
+endif
+
+" .h files can be C, Ch C++, ObjC or ObjC++.
+" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
+" detected automatically.
+au BufNewFile,BufRead *.h call dist#ft#FTheader()
+
+" Ch (CHscript)
+au BufNewFile,BufRead *.chf setf ch
+
+" TLH files are C++ headers generated by Visual C++'s #import from typelibs
+au BufNewFile,BufRead *.tlh setf cpp
+
+" Cascading Style Sheets
+au BufNewFile,BufRead *.css setf css
+
+" Century Term Command Scripts (*.cmd too)
+au BufNewFile,BufRead *.con setf cterm
+
+" Changelog
+au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch,*/debian/changelog
+ \ setf debchangelog
+
+au BufNewFile,BufRead [cC]hange[lL]og
+ \ if getline(1) =~ '; urgency='
+ \| setf debchangelog
+ \| else
+ \| setf changelog
+ \| endif
+
+au BufNewFile,BufRead NEWS
+ \ if getline(1) =~ '; urgency='
+ \| setf debchangelog
+ \| endif
+
+" CHILL
+au BufNewFile,BufRead *..ch setf chill
+
+" Changes for WEB and CWEB or CHILL
+au BufNewFile,BufRead *.ch call dist#ft#FTchange()
+
+" ChordPro
+au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
+
+" Clean
+au BufNewFile,BufRead *.dcl,*.icl setf clean
+
+" Clever
+au BufNewFile,BufRead *.eni setf cl
+
+" Clever or dtd
+au BufNewFile,BufRead *.ent call dist#ft#FTent()
+
+" Clipper (or FoxPro; could also be eviews)
+au BufNewFile,BufRead *.prg
+ \ if exists("g:filetype_prg") |
+ \ exe "setf " . g:filetype_prg |
+ \ else |
+ \ setf clipper |
+ \ endif
+
+" Clojure
+au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
+
+" Cmake
+au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake
+
+" Cmusrc
+au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc
+au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc
+
+" Cobol
+au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol
+" cobol or zope form controller python script? (heuristic)
+au BufNewFile,BufRead *.cpy
+ \ if getline(1) =~ '^##' |
+ \ setf python |
+ \ else |
+ \ setf cobol |
+ \ endif
+
+" Coco/R
+au BufNewFile,BufRead *.atg setf coco
+
+" Cold Fusion
+au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
+
+" Configure scripts
+au BufNewFile,BufRead configure.in,configure.ac setf config
+
+" CUDA Cumpute Unified Device Architecture
+au BufNewFile,BufRead *.cu,*.cuh setf cuda
+
+" Dockerfile; Podman uses the same syntax with name Containerfile
+au BufNewFile,BufRead Containerfile,Dockerfile,*.Dockerfile setf dockerfile
+
+" WildPackets EtherPeek Decoder
+au BufNewFile,BufRead *.dcd setf dcd
+
+" Enlightenment configuration files
+au BufNewFile,BufRead *enlightenment/*.cfg setf c
+
+" Eterm
+au BufNewFile,BufRead *Eterm/*.cfg setf eterm
+
+" Euphoria 3 or 4
+au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck()
+if has("fname_case")
+ au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck()
+endif
+
+" Lynx config files
+au BufNewFile,BufRead lynx.cfg setf lynx
+
+" Quake
+au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake
+au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
+
+" Quake C
+au BufNewFile,BufRead *.qc setf c
+
+" Configure files
+au BufNewFile,BufRead *.cfg setf cfg
+
+" Cucumber
+au BufNewFile,BufRead *.feature setf cucumber
+
+" Communicating Sequential Processes
+au BufNewFile,BufRead *.csp,*.fdr setf csp
+
+" CUPL logic description and simulation
+au BufNewFile,BufRead *.pld setf cupl
+au BufNewFile,BufRead *.si setf cuplsim
+
+" Dart
+au BufRead,BufNewfile *.dart,*.drt setf dart
+
+" Debian Control
+au BufNewFile,BufRead */debian/control setf debcontrol
+au BufNewFile,BufRead control
+ \ if getline(1) =~ '^Source:'
+ \| setf debcontrol
+ \| endif
+
+" Debian Copyright
+au BufNewFile,BufRead */debian/copyright setf debcopyright
+au BufNewFile,BufRead copyright
+ \ if getline(1) =~ '^Format:'
+ \| setf debcopyright
+ \| endif
+
+" Debian Sources.list
+au BufNewFile,BufRead */etc/apt/sources.list setf debsources
+au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
+
+" Deny hosts
+au BufNewFile,BufRead denyhosts.conf setf denyhosts
+
+" dnsmasq(8) configuration files
+au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
+
+" ROCKLinux package description
+au BufNewFile,BufRead *.desc setf desc
+
+" the D language or dtrace
+au BufNewFile,BufRead *.d call dist#ft#DtraceCheck()
+
+" Desktop files
+au BufNewFile,BufRead *.desktop,*.directory setf desktop
+
+" Dict config
+au BufNewFile,BufRead dict.conf,.dictrc setf dictconf
+
+" Dictd config
+au BufNewFile,BufRead dictd.conf setf dictdconf
+
+" Diff files
+au BufNewFile,BufRead *.diff,*.rej setf diff
+au BufNewFile,BufRead *.patch
+ \ if getline(1) =~ '^From [0-9a-f]\{40\} Mon Sep 17 00:00:00 2001$' |
+ \ setf gitsendemail |
+ \ else |
+ \ setf diff |
+ \ endif
+
+" Dircolors
+au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS setf dircolors
+
+" Diva (with Skill) or InstallShield
+au BufNewFile,BufRead *.rul
+ \ if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' |
+ \ setf ishd |
+ \ else |
+ \ setf diva |
+ \ endif
+
+" DCL (Digital Command Language - vms) or DNS zone file
+au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl')
+
+" DOT
+au BufNewFile,BufRead *.dot,*.gv setf dot
+
+" Dylan - lid files
+au BufNewFile,BufRead *.lid setf dylanlid
+
+" Dylan - intr files (melange)
+au BufNewFile,BufRead *.intr setf dylanintr
+
+" Dylan
+au BufNewFile,BufRead *.dylan setf dylan
+
+" Microsoft Module Definition
+au BufNewFile,BufRead *.def setf def
+
+" Dracula
+au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula
+
+" Datascript
+au BufNewFile,BufRead *.ds setf datascript
+
+" dsl
+au BufNewFile,BufRead *.dsl setf dsl
+
+" DTD (Document Type Definition for XML)
+au BufNewFile,BufRead *.dtd setf dtd
+
+" DTS/DSTI (device tree files)
+au BufNewFile,BufRead *.dts,*.dtsi setf dts
+
+" EDIF (*.edf,*.edif,*.edn,*.edo) or edn
+au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif
+au BufNewFile,BufRead *.edn
+ \ if getline(1) =~ '^\s*(\s*edif\>' |
+ \ setf edif |
+ \ else |
+ \ setf clojure |
+ \ endif
+
+" EditorConfig (close enough to dosini)
+au BufNewFile,BufRead .editorconfig setf dosini
+
+" Embedix Component Description
+au BufNewFile,BufRead *.ecd setf ecd
+
+" Eiffel or Specman or Euphoria
+au BufNewFile,BufRead *.e,*.E call dist#ft#FTe()
+
+" Elinks configuration
+au BufNewFile,BufRead elinks.conf setf elinks
+
+" ERicsson LANGuage; Yaws is erlang too
+au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang
+
+" Elm
+au BufNewFile,BufRead *.elm setf elm
+
+" Elm Filter Rules file
+au BufNewFile,BufRead filter-rules setf elmfilt
+
+" ESMTP rc file
+au BufNewFile,BufRead *esmtprc setf esmtprc
+
+" ESQL-C
+au BufNewFile,BufRead *.ec,*.EC setf esqlc
+
+" Esterel
+au BufNewFile,BufRead *.strl setf esterel
+
+" Essbase script
+au BufNewFile,BufRead *.csc setf csc
+
+" Exim
+au BufNewFile,BufRead exim.conf setf exim
+
+" Expect
+au BufNewFile,BufRead *.exp setf expect
+
+" Exports
+au BufNewFile,BufRead exports setf exports
+
+" Falcon
+au BufNewFile,BufRead *.fal setf falcon
+
+" Fantom
+au BufNewFile,BufRead *.fan,*.fwt setf fan
+
+" Factor
+au BufNewFile,BufRead *.factor setf factor
+
+" Fetchmail RC file
+au BufNewFile,BufRead .fetchmailrc setf fetchmail
+
+" FlexWiki - disabled, because it has side effects when a .wiki file
+" is not actually FlexWiki
+"au BufNewFile,BufRead *.wiki setf flexwiki
+
+" Focus Executable
+au BufNewFile,BufRead *.fex,*.focexec setf focexec
+
+" Focus Master file (but not for auto.master)
+au BufNewFile,BufRead auto.master setf conf
+au BufNewFile,BufRead *.mas,*.master setf master
+
+" Forth
+au BufNewFile,BufRead *.fs,*.ft,*.fth setf forth
+
+" Reva Forth
+au BufNewFile,BufRead *.frt setf reva
+
+" Fortran
+if has("fname_case")
+ au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran
+endif
+au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran
+
+" Framescript
+au BufNewFile,BufRead *.fsl setf framescript
+
+" FStab
+au BufNewFile,BufRead fstab,mtab setf fstab
+
+" GDB command files
+au BufNewFile,BufRead .gdbinit setf gdb
+
+" GDMO
+au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
+
+" Gedcom
+au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
+
+" Git
+au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
+au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
+au BufNewFile,BufRead */.config/git/config setf gitconfig
+au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
+if !empty($XDG_CONFIG_HOME)
+ au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
+endif
+au BufNewFile,BufRead git-rebase-todo setf gitrebase
+au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
+au BufNewFile,BufRead .msg.[0-9]*
+ \ if getline(1) =~ '^From.*# This line is ignored.$' |
+ \ setf gitsendemail |
+ \ endif
+au BufNewFile,BufRead *.git/*
+ \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
+ \ setf git |
+ \ endif
+
+" Gkrellmrc
+au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc
+
+" GP scripts (2.0 and onward)
+au BufNewFile,BufRead *.gp,.gprc setf gp
+
+" GPG
+au BufNewFile,BufRead */.gnupg/options setf gpg
+au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg
+au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg
+if !empty($GNUPGHOME)
+ au BufNewFile,BufRead $GNUPGHOME/options setf gpg
+ au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg
+endif
+
+" gnash(1) configuration files
+au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
+
+" Gitolite
+au BufNewFile,BufRead gitolite.conf setf gitolite
+au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
+
+" Gnuplot scripts
+au BufNewFile,BufRead *.gpi setf gnuplot
+
+" Go (Google)
+au BufNewFile,BufRead *.go setf go
+
+" GrADS scripts
+au BufNewFile,BufRead *.gs setf grads
+
+" Gretl
+au BufNewFile,BufRead *.gretl setf gretl
+
+" Groovy
+au BufNewFile,BufRead *.gradle,*.groovy setf groovy
+
+" GNU Server Pages
+au BufNewFile,BufRead *.gsp setf gsp
+
+" Group file
+au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group
+
+" GTK RC
+au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
+
+" Haml
+au BufNewFile,BufRead *.haml setf haml
+
+" Hamster Classic | Playground files
+au BufNewFile,BufRead *.hsc,*.hsm setf hamster
+
+" Haskell
+au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
+au BufNewFile,BufRead *.lhs setf lhaskell
+au BufNewFile,BufRead *.chs setf chaskell
+
+" Haste
+au BufNewFile,BufRead *.ht setf haste
+au BufNewFile,BufRead *.htpp setf hastepreproc
+
+" Hercules
+au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
+
+" HEX (Intel)
+au BufNewFile,BufRead *.hex,*.h32 setf hex
+
+" Hollywood
+au BufRead,BufNewFile *.hws setf hollywood
+
+" Tilde (must be before HTML)
+au BufNewFile,BufRead *.t.html setf tilde
+
+" HTML (.shtml and .stm for server side)
+au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
+
+" HTML with Ruby - eRuby
+au BufNewFile,BufRead *.erb,*.rhtml setf eruby
+
+" HTML with M4
+au BufNewFile,BufRead *.html.m4 setf htmlm4
+
+" Some template. Used to be HTML Cheetah.
+au BufNewFile,BufRead *.tmpl setf template
+
+" Host config
+au BufNewFile,BufRead */etc/host.conf setf hostconf
+
+" Hosts access
+au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess
+
+" Hyper Builder
+au BufNewFile,BufRead *.hb setf hb
+
+" Httest
+au BufNewFile,BufRead *.htt,*.htb setf httest
+
+" Icon
+au BufNewFile,BufRead *.icn setf icon
+
+" IDL (Interface Description Language)
+au BufNewFile,BufRead *.idl call dist#ft#FTidl()
+
+" Microsoft IDL (Interface Description Language) Also *.idl
+" MOF = WMI (Windows Management Instrumentation) Managed Object Format
+au BufNewFile,BufRead *.odl,*.mof setf msidl
+
+" Icewm menu
+au BufNewFile,BufRead */.icewm/menu setf icemenu
+
+" Indent profile (must come before IDL *.pro!)
+au BufNewFile,BufRead .indent.pro setf indent
+au BufNewFile,BufRead indent.pro call dist#ft#ProtoCheck('indent')
+
+" IDL (Interactive Data Language)
+au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang')
+
+" Indent RC
+au BufNewFile,BufRead indentrc setf indent
+
+" Inform
+au BufNewFile,BufRead *.inf,*.INF setf inform
+
+" Initng
+au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng
+
+" Innovation Data Processing
+au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat
+au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog
+au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog
+au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog
+au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog
+
+" Ipfilter
+au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter
+
+" Informix 4GL (source - canonical, include file, I4GL+M4 preproc.)
+au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl
+
+" .INI file for MSDOS
+au BufNewFile,BufRead *.ini setf dosini
+
+" SysV Inittab
+au BufNewFile,BufRead inittab setf inittab
+
+" Inno Setup
+au BufNewFile,BufRead *.iss setf iss
+
+" J
+au BufNewFile,BufRead *.ijs setf j
+
+" JAL
+au BufNewFile,BufRead *.jal,*.JAL setf jal
+
+" Jam
+au BufNewFile,BufRead *.jpl,*.jpr setf jam
+
+" Java
+au BufNewFile,BufRead *.java,*.jav setf java
+
+" JavaCC
+au BufNewFile,BufRead *.jj,*.jjt setf javacc
+
+" JavaScript, ECMAScript, ES module script, CommonJS script
+au BufNewFile,BufRead *.js,*.javascript,*.es,*.mjs,*.cjs setf javascript
+
+" JavaScript with React
+au BufNewFile,BufRead *.jsx setf javascriptreact
+
+" Java Server Pages
+au BufNewFile,BufRead *.jsp setf jsp
+
+" Java Properties resource file (note: doesn't catch font.properties.pl)
+au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
+
+" Jess
+au BufNewFile,BufRead *.clp setf jess
+
+" Jgraph
+au BufNewFile,BufRead *.jgr setf jgraph
+
+" Jovial
+au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
+
+" JSON
+au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
+
+" Kixtart
+au BufNewFile,BufRead *.kix setf kix
+
+" Kimwitu[++]
+au BufNewFile,BufRead *.k setf kwt
+
+" Kivy
+au BufNewFile,BufRead *.kv setf kivy
+
+" Kotlin
+au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin
+
+" KDE script
+au BufNewFile,BufRead *.ks setf kscript
+
+" Kconfig
+au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig
+
+" Lace (ISE)
+au BufNewFile,BufRead *.ace,*.ACE setf lace
+
+" Latte
+au BufNewFile,BufRead *.latte,*.lte setf latte
+
+" Limits
+au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits
+
+" LambdaProlog (*.mod too, see Modsim)
+au BufNewFile,BufRead *.sig setf lprolog
+
+" LDAP LDIF
+au BufNewFile,BufRead *.ldif setf ldif
+
+" Ld loader
+au BufNewFile,BufRead *.ld setf ld
+
+" Less
+au BufNewFile,BufRead *.less setf less
+
+" Lex
+au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex
+
+" Libao
+au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao
+
+" Libsensors
+au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors
+
+" LFTP
+au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp
+
+" Lifelines (or Lex for C++!)
+au BufNewFile,BufRead *.ll setf lifelines
+
+" Lilo: Linux loader
+au BufNewFile,BufRead lilo.conf setf lilo
+
+" Lisp (*.el = ELisp, *.cl = Common Lisp)
+" *.jl was removed, it's also used for Julia, better skip than guess wrong.
+if has("fname_case")
+ au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp
+else
+ au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,.emacs,.sawfishrc setf lisp
+endif
+
+" SBCL implementation of Common Lisp
+au BufNewFile,BufRead sbclrc,.sbclrc setf lisp
+
+" Liquid
+au BufNewFile,BufRead *.liquid setf liquid
+
+" Lite
+au BufNewFile,BufRead *.lite,*.lt setf lite
+
+" LiteStep RC files
+au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep
+
+" Login access
+au BufNewFile,BufRead */etc/login.access setf loginaccess
+
+" Login defs
+au BufNewFile,BufRead */etc/login.defs setf logindefs
+
+" Logtalk
+au BufNewFile,BufRead *.lgt setf logtalk
+
+" LOTOS
+au BufNewFile,BufRead *.lot,*.lotos setf lotos
+
+" Lout (also: *.lt)
+au BufNewFile,BufRead *.lou,*.lout setf lout
+
+" Lua
+au BufNewFile,BufRead *.lua setf lua
+
+" Luarocks
+au BufNewFile,BufRead *.rockspec setf lua
+
+" Linden Scripting Language (Second Life)
+au BufNewFile,BufRead *.lsl setf lsl
+
+" Lynx style file (or LotusScript!)
+au BufNewFile,BufRead *.lss setf lss
+
+" M4
+au BufNewFile,BufRead *.m4
+ \ if expand("<afile>") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif
+
+" MaGic Point
+au BufNewFile,BufRead *.mgp setf mgp
+
+" Mail (for Elm, trn, mutt, muttng, rn, slrn, neomutt)
+au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
+
+" Mail aliases
+au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases
+
+" Mailcap configuration file
+au BufNewFile,BufRead .mailcap,mailcap setf mailcap
+
+" Makefile
+"au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make
+
+" MakeIndex
+au BufNewFile,BufRead *.ist,*.mst setf ist
+
+" Mallard
+au BufNewFile,BufRead *.page setf mallard
+
+" Manpage
+au BufNewFile,BufRead *.man setf man
+
+" Man config
+au BufNewFile,BufRead */etc/man.conf,man.config setf manconf
+
+" Maple V
+au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
+
+" Map (UMN mapserver config file)
+au BufNewFile,BufRead *.map setf map
+
+" Markdown
+au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown
+
+" Mason
+au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
+
+" Mathematica, Matlab, Murphi or Objective C
+au BufNewFile,BufRead *.m call dist#ft#FTm()
+
+" Mathematica notebook
+au BufNewFile,BufRead *.nb setf mma
+
+" Maya Extension Language
+au BufNewFile,BufRead *.mel setf mel
+
+" Mercurial (hg) commit file
+au BufNewFile,BufRead hg-editor-*.txt setf hgcommit
+
+" Mercurial config (looks like generic config file)
+au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
+
+" Meson Build system config
+au BufNewFile,BufRead meson.build,meson_options.txt setf meson
+
+" Messages (logs mostly)
+au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages
+
+" Metafont
+au BufNewFile,BufRead *.mf setf mf
+
+" MetaPost
+au BufNewFile,BufRead *.mp setf mp
+
+" MGL
+au BufNewFile,BufRead *.mgl setf mgl
+
+" MIX - Knuth assembly
+au BufNewFile,BufRead *.mix,*.mixal setf mix
+
+" MMIX or VMS makefile
+au BufNewFile,BufRead *.mms call dist#ft#FTmms()
+
+" Symbian meta-makefile definition (MMP)
+au BufNewFile,BufRead *.mmp setf mmp
+
+" Modsim III (or LambdaProlog)
+au BufNewFile,BufRead *.mod
+ \ if getline(1) =~ '\<module\>' |
+ \ setf lprolog |
+ \ else |
+ \ setf modsim3 |
+ \ endif
+
+" Modula 2 (.md removed in favor of Markdown)
+au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
+
+" Modula 3 (.m3, .i3, .mg, .ig)
+au BufNewFile,BufRead *.[mi][3g] setf modula3
+
+" Monk
+au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
+
+" MOO
+au BufNewFile,BufRead *.moo setf moo
+
+" Modconf
+au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
+
+" Mplayer config
+au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
+
+" Motorola S record
+au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec
+
+" Mrxvtrc
+au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc
+
+" Msql
+au BufNewFile,BufRead *.msql setf msql
+
+" Mysql
+au BufNewFile,BufRead *.mysql setf mysql
+
+" Mutt setup files (must be before catch *.rc)
+au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc')
+
+" M$ Resource files
+au BufNewFile,BufRead *.rc,*.rch setf rc
+
+" MuPAD source
+au BufRead,BufNewFile *.mu setf mupad
+
+" Mush
+au BufNewFile,BufRead *.mush setf mush
+
+" Mutt setup file (also for Muttng)
+au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
+
+" N1QL
+au BufRead,BufNewfile *.n1ql,*.nql setf n1ql
+
+" Nano
+au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc
+
+" Nastran input/DMAP
+"au BufNewFile,BufRead *.dat setf nastran
+
+" Natural
+au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural
+
+" Noemutt setup file
+au BufNewFile,BufRead Neomuttrc setf neomuttrc
+
+" Netrc
+au BufNewFile,BufRead .netrc setf netrc
+
+" Ninja file
+au BufNewFile,BufRead *.ninja setf ninja
+
+" NPM RC file
+au BufNewFile,BufRead npmrc,.npmrc setf dosini
+
+" Novell netware batch files
+au BufNewFile,BufRead *.ncf setf ncf
+
+" Nroff/Troff (*.ms and *.t are checked below)
+au BufNewFile,BufRead *.me
+ \ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" |
+ \ setf nroff |
+ \ endif
+au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
+au BufNewFile,BufRead *.[1-9] call dist#ft#FTnroff()
+
+" Nroff or Objective C++
+au BufNewFile,BufRead *.mm call dist#ft#FTmm()
+
+" Not Quite C
+au BufNewFile,BufRead *.nqc setf nqc
+
+" NSE - Nmap Script Engine - uses Lua syntax
+au BufNewFile,BufRead *.nse setf lua
+
+" NSIS
+au BufNewFile,BufRead *.nsi,*.nsh setf nsis
+
+" OCAML
+au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml
+
+" Occam
+au BufNewFile,BufRead *.occ setf occam
+
+" Omnimark
+au BufNewFile,BufRead *.xom,*.xin setf omnimark
+
+" OpenROAD
+au BufNewFile,BufRead *.or setf openroad
+
+" OPL
+au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
+
+" Oracle config file
+au BufNewFile,BufRead *.ora setf ora
+
+" Packet filter conf
+au BufNewFile,BufRead pf.conf setf pf
+
+" Pacman Config (close enough to dosini)
+au BufNewFile,BufRead */etc/pacman.conf setf dosini
+
+" Pacman hooks
+au BufNewFile,BufRead *.hook
+ \ if getline(1) == '[Trigger]' |
+ \ setf dosini |
+ \ endif
+
+" Pam conf
+au BufNewFile,BufRead */etc/pam.conf setf pamconf
+
+" Pam environment
+au BufNewFile,BufRead pam_env.conf,.pam_environment setf pamenv
+
+" PApp
+au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
+
+" Password file
+au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
+
+" Pascal (also *.p)
+au BufNewFile,BufRead *.pas,*.pp setf pascal
+
+" Delphi or Lazarus program file
+au BufNewFile,BufRead *.dpr,*.lpr setf pascal
+
+" PDF
+au BufNewFile,BufRead *.pdf setf pdf
+
+" PCMK - HAE - crm configure edit
+au BufNewFile,BufRead *.pcmk setf pcmk
+
+" Perl
+if has("fname_case")
+ au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl()
+else
+ au BufNewFile,BufRead *.pl call dist#ft#FTpl()
+endif
+au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
+au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
+au BufNewFile,BufRead *.raku,*.rakumod setf perl6
+
+" Perl, XPM or XPM2
+au BufNewFile,BufRead *.pm
+ \ if getline(1) =~ "XPM2" |
+ \ setf xpm2 |
+ \ elseif getline(1) =~ "XPM" |
+ \ setf xpm |
+ \ else |
+ \ setf perl |
+ \ endif
+
+" Perl POD
+au BufNewFile,BufRead *.pod setf pod
+au BufNewFile,BufRead *.pod6 setf pod6
+
+" Php, php3, php4, etc.
+" Also Phtml (was used for PHP 2 in the past)
+" Also .ctp for Cake template file
+au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
+
+" PHP config
+au BufNewFile,BufRead php.ini-* setf dosini
+
+" Pike and Cmod
+au BufNewFile,BufRead *.pike,*.pmod setf pike
+au BufNewFile,BufRead *.cmod setf cmod
+
+" Pinfo config
+au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo
+
+" Palm Resource compiler
+au BufNewFile,BufRead *.rcp setf pilrc
+
+" Pine config
+au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
+
+" Pipenv Pipfiles
+au BufNewFile,BufRead Pipfile setf config
+au BufNewFile,BufRead Pipfile.lock setf json
+
+" PL/1, PL/I
+au BufNewFile,BufRead *.pli,*.pl1 setf pli
+
+" PL/M (also: *.inp)
+au BufNewFile,BufRead *.plm,*.p36,*.pac setf plm
+
+" PL/SQL
+au BufNewFile,BufRead *.pls,*.plsql setf plsql
+
+" PLP
+au BufNewFile,BufRead *.plp setf plp
+
+" PO and PO template (GNU gettext)
+au BufNewFile,BufRead *.po,*.pot setf po
+
+" Postfix main config
+au BufNewFile,BufRead main.cf setf pfmain
+
+" PostScript (+ font files, encapsulated PostScript, Adobe Illustrator)
+au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr
+
+" PostScript Printer Description
+au BufNewFile,BufRead *.ppd setf ppd
+
+" Povray
+au BufNewFile,BufRead *.pov setf pov
+
+" Povray configuration
+au BufNewFile,BufRead .povrayrc setf povini
+
+" Povray, PHP or assembly
+au BufNewFile,BufRead *.inc call dist#ft#FTinc()
+
+" Printcap and Termcap
+au BufNewFile,BufRead *printcap
+ \ let b:ptcap_type = "print" | setf ptcap
+au BufNewFile,BufRead *termcap
+ \ let b:ptcap_type = "term" | setf ptcap
+
+" PCCTS / ANTRL
+"au BufNewFile,BufRead *.g setf antrl
+au BufNewFile,BufRead *.g setf pccts
+
+" PPWizard
+au BufNewFile,BufRead *.it,*.ih setf ppwiz
+
+" Obj 3D file format
+" TODO: is there a way to avoid MS-Windows Object files?
+au BufNewFile,BufRead *.obj setf obj
+
+" Oracle Pro*C/C++
+au BufNewFile,BufRead *.pc setf proc
+
+" Privoxy actions file
+au BufNewFile,BufRead *.action setf privoxy
+
+" Procmail
+au BufNewFile,BufRead .procmail,.procmailrc setf procmail
+
+" Progress or CWEB
+au BufNewFile,BufRead *.w call dist#ft#FTprogress_cweb()
+
+" Progress or assembly
+au BufNewFile,BufRead *.i call dist#ft#FTprogress_asm()
+
+" Progress or Pascal
+au BufNewFile,BufRead *.p call dist#ft#FTprogress_pascal()
+
+" Software Distributor Product Specification File (POSIX 1387.2-1995)
+au BufNewFile,BufRead *.psf setf psf
+au BufNewFile,BufRead INDEX,INFO
+ \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' |
+ \ setf psf |
+ \ endif
+
+" Prolog
+au BufNewFile,BufRead *.pdb setf prolog
+
+" Promela
+au BufNewFile,BufRead *.pml setf promela
+
+" Google protocol buffers
+au BufNewFile,BufRead *.proto setf proto
+
+" Protocols
+au BufNewFile,BufRead */etc/protocols setf protocols
+
+" Pyrex
+au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
+
+" Python, Python Shell Startup and Python Stub Files
+" Quixote (Python-based web framework)
+au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc setf python
+au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
+
+" Radiance
+au BufNewFile,BufRead *.rad,*.mat setf radiance
+
+" Ratpoison config/command files
+au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison
+
+" RCS file
+au BufNewFile,BufRead *\,v setf rcs
+
+" Readline
+au BufNewFile,BufRead .inputrc,inputrc setf readline
+
+" Registry for MS-Windows
+au BufNewFile,BufRead *.reg
+ \ if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif
+
+" Renderman Interface Bytestream
+au BufNewFile,BufRead *.rib setf rib
+
+" Rego Policy Language
+au BufNewFile,BufRead *.rego setf rego
+
+" Rexx
+au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx
+
+" R (Splus)
+if has("fname_case")
+ au BufNewFile,BufRead *.s,*.S setf r
+else
+ au BufNewFile,BufRead *.s setf r
+endif
+
+" R Help file
+if has("fname_case")
+ au BufNewFile,BufRead *.rd,*.Rd setf rhelp
+else
+ au BufNewFile,BufRead *.rd setf rhelp
+endif
+
+" R noweb file
+if has("fname_case")
+ au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw setf rnoweb
+else
+ au BufNewFile,BufRead *.rnw,*.snw setf rnoweb
+endif
+
+" R Markdown file
+if has("fname_case")
+ au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd
+else
+ au BufNewFile,BufRead *.rmd,*.smd setf rmd
+endif
+
+" R reStructuredText file
+if has("fname_case")
+ au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
+else
+ au BufNewFile,BufRead *.rrst,*.srst setf rrst
+endif
+
+" Rexx, Rebol or R
+au BufNewFile,BufRead *.r,*.R call dist#ft#FTr()
+
+" Remind
+au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
+
+" Resolv.conf
+au BufNewFile,BufRead resolv.conf setf resolv
+
+" Relax NG Compact
+au BufNewFile,BufRead *.rnc setf rnc
+
+" Relax NG XML
+au BufNewFile,BufRead *.rng setf rng
+
+" RPL/2
+au BufNewFile,BufRead *.rpl setf rpl
+
+" Robots.txt
+au BufNewFile,BufRead robots.txt setf robots
+
+" Rpcgen
+au BufNewFile,BufRead *.x setf rpcgen
+
+" reStructuredText Documentation Format
+au BufNewFile,BufRead *.rst setf rst
+
+" RTF
+au BufNewFile,BufRead *.rtf setf rtf
+
+" Interactive Ruby shell
+au BufNewFile,BufRead .irbrc,irbrc setf ruby
+
+" Ruby
+au BufNewFile,BufRead *.rb,*.rbw setf ruby
+
+" RubyGems
+au BufNewFile,BufRead *.gemspec setf ruby
+
+" Rust
+au BufNewFile,BufRead *.rs setf rust
+
+" Rackup
+au BufNewFile,BufRead *.ru setf ruby
+
+" Bundler
+au BufNewFile,BufRead Gemfile setf ruby
+
+" Ruby on Rails
+au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
+
+" Rantfile and Rakefile is like Ruby
+au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby
+
+" S-lang (or shader language, or SmallLisp)
+au BufNewFile,BufRead *.sl setf slang
+
+" Samba config
+au BufNewFile,BufRead smb.conf setf samba
+
+" SAS script
+au BufNewFile,BufRead *.sas setf sas
+
+" Sass
+au BufNewFile,BufRead *.sass setf sass
+
+" Sather
+au BufNewFile,BufRead *.sa setf sather
+
+" Scala
+au BufNewFile,BufRead *.scala setf scala
+
+" SBT - Scala Build Tool
+au BufNewFile,BufRead *.sbt setf sbt
+
+" Scilab
+au BufNewFile,BufRead *.sci,*.sce setf scilab
+
+" SCSS
+au BufNewFile,BufRead *.scss setf scss
+
+" SD: Streaming Descriptors
+au BufNewFile,BufRead *.sd setf sd
+
+" SDL
+au BufNewFile,BufRead *.sdl,*.pr setf sdl
+
+" sed
+au BufNewFile,BufRead *.sed setf sed
+
+" Sieve (RFC 3028, 5228)
+au BufNewFile,BufRead *.siv,*.sieve setf sieve
+
+" Sendmail
+au BufNewFile,BufRead sendmail.cf setf sm
+
+" Sendmail .mc files are actually m4. Could also be MS Message text file.
+au BufNewFile,BufRead *.mc call dist#ft#McSetf()
+
+" Services
+au BufNewFile,BufRead */etc/services setf services
+
+" Service Location config
+au BufNewFile,BufRead */etc/slp.conf setf slpconf
+
+" Service Location registration
+au BufNewFile,BufRead */etc/slp.reg setf slpreg
+
+" Service Location SPI
+au BufNewFile,BufRead */etc/slp.spi setf slpspi
+
+" Setserial config
+au BufNewFile,BufRead */etc/serial.conf setf setserial
+
+" SGML
+au BufNewFile,BufRead *.sgm,*.sgml
+ \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' |
+ \ setf sgmllnx |
+ \ elseif getline(1) =~ '<!DOCTYPE.*DocBook' || getline(2) =~ '<!DOCTYPE.*DocBook' |
+ \ let b:docbk_type = "sgml" |
+ \ let b:docbk_ver = 4 |
+ \ setf docbk |
+ \ else |
+ \ setf sgml |
+ \ endif
+
+" SGMLDECL
+au BufNewFile,BufRead *.decl,*.dcl,*.dec
+ \ if getline(1).getline(2).getline(3) =~? '^<!SGML' |
+ \ setf sgmldecl |
+ \ endif
+
+" SGML catalog file
+au BufNewFile,BufRead catalog setf catalog
+
+" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
+" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
+" NOTE: Patterns ending in a star are further down, these have lower priority.
+au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash")
+au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
+au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
+
+
+" Shell script (Arch Linux) or PHP file (Drupal)
+au BufNewFile,BufRead *.install
+ \ if getline(1) =~ '<?php' |
+ \ setf php |
+ \ else |
+ \ call dist#ft#SetFileTypeSH("bash") |
+ \ endif
+
+" tcsh scripts (patterns ending in a star further below)
+au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
+
+" csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
+" (patterns ending in a start further below)
+au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
+
+" Z-Shell script (patterns ending in a star further below)
+au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
+au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
+au BufNewFile,BufRead *.zsh setf zsh
+
+" Scheme
+au BufNewFile,BufRead *.scm,*.ss,*.rkt setf scheme
+
+" Screen RC
+au BufNewFile,BufRead .screenrc,screenrc setf screen
+
+" Simula
+au BufNewFile,BufRead *.sim setf simula
+
+" SINDA
+au BufNewFile,BufRead *.sin,*.s85 setf sinda
+
+" SiSU
+au BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst,*._sst setf sisu
+au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu
+
+" SKILL
+au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
+
+" SLRN
+au BufNewFile,BufRead .slrnrc setf slrnrc
+au BufNewFile,BufRead *.score setf slrnsc
+
+" Smalltalk (and TeX)
+au BufNewFile,BufRead *.st setf st
+au BufNewFile,BufRead *.cls
+ \ if getline(1) =~ '^%' |
+ \ setf tex |
+ \ elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' |
+ \ setf rexx |
+ \ else |
+ \ setf st |
+ \ endif
+
+" Smarty templates
+au BufNewFile,BufRead *.tpl setf smarty
+
+" SMIL or XML
+au BufNewFile,BufRead *.smil
+ \ if getline(1) =~ '<?\s*xml.*?>' |
+ \ setf xml |
+ \ else |
+ \ setf smil |
+ \ endif
+
+" SMIL or SNMP MIB file
+au BufNewFile,BufRead *.smi
+ \ if getline(1) =~ '\<smil\>' |
+ \ setf smil |
+ \ else |
+ \ setf mib |
+ \ endif
+
+" SMITH
+au BufNewFile,BufRead *.smt,*.smith setf smith
+
+" Snobol4 and spitbol
+au BufNewFile,BufRead *.sno,*.spt setf snobol4
+
+" SNMP MIB files
+au BufNewFile,BufRead *.mib,*.my setf mib
+
+" Snort Configuration
+au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
+au BufNewFile,BufRead *.rules call dist#ft#FTRules()
+
+" Spec (Linux RPM)
+au BufNewFile,BufRead *.spec setf spec
+
+" Speedup (AspenTech plant simulator)
+au BufNewFile,BufRead *.speedup,*.spdata,*.spd setf spup
+
+" Slice
+au BufNewFile,BufRead *.ice setf slice
+
+" Spice
+au BufNewFile,BufRead *.sp,*.spice setf spice
+
+" Spyce
+au BufNewFile,BufRead *.spy,*.spi setf spyce
+
+" Squid
+au BufNewFile,BufRead squid.conf setf squid
+
+" SQL for Oracle Designer
+au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
+
+" SQL
+au BufNewFile,BufRead *.sql call dist#ft#SQL()
+
+" SQLJ
+au BufNewFile,BufRead *.sqlj setf sqlj
+
+" SQR
+au BufNewFile,BufRead *.sqr,*.sqi setf sqr
+
+" OpenSSH configuration
+au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig
+au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig
+
+" OpenSSH server configuration
+au BufNewFile,BufRead sshd_config setf sshdconfig
+au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf setf sshdconfig
+
+" Stata
+au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata
+" Also *.class, but not when it's a Java bytecode file
+au BufNewFile,BufRead *.class
+ \ if getline(1) !~ "^\xca\xfe\xba\xbe" | setf stata | endif
+
+" SMCL
+au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl
+
+" Stored Procedures
+au BufNewFile,BufRead *.stp setf stp
+
+" Standard ML
+au BufNewFile,BufRead *.sml setf sml
+
+" Sratus VOS command macro
+au BufNewFile,BufRead *.cm setf voscm
+
+" Swift
+au BufNewFile,BufRead *.swift setf swift
+au BufNewFile,BufRead *.swift.gyb setf swiftgyb
+
+" Swift Intermediate Language
+au BufNewFile,BufRead *.sil setf sil
+
+" Sysctl
+au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
+
+" Systemd unit files
+au BufNewFile,BufRead */systemd/*.{automount,dnssd,link,mount,netdev,network,nspawn,path,service,slice,socket,swap,target,timer} setf systemd
+" Systemd overrides
+au BufNewFile,BufRead */etc/systemd/*.conf.d/*.conf setf systemd
+au BufNewFile,BufRead */etc/systemd/system/*.d/*.conf setf systemd
+au BufNewFile,BufRead */.config/systemd/user/*.d/*.conf setf systemd
+" Systemd temp files
+au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd
+au BufNewFile,BufRead */etc/systemd/system/.#* setf systemd
+au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd
+au BufNewFile,BufRead */.config/systemd/user/.#* setf systemd
+
+" Synopsys Design Constraints
+au BufNewFile,BufRead *.sdc setf sdc
+
+" Sudoers
+au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
+
+" SVG (Scalable Vector Graphics)
+au BufNewFile,BufRead *.svg setf svg
+
+" Tads (or Nroff or Perl test file)
+au BufNewFile,BufRead *.t
+ \ if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif
+
+" Tags
+au BufNewFile,BufRead tags setf tags
+
+" TAK
+au BufNewFile,BufRead *.tak setf tak
+
+" Task
+au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata
+au BufRead,BufNewFile *.task setf taskedit
+
+" Tcl (JACL too)
+au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl setf tcl
+
+" TealInfo
+au BufNewFile,BufRead *.tli setf tli
+
+" Telix Salt
+au BufNewFile,BufRead *.slt setf tsalt
+
+" Tera Term Language
+au BufRead,BufNewFile *.ttl setf teraterm
+
+" Terminfo
+au BufNewFile,BufRead *.ti setf terminfo
+
+" TeX
+au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
+au BufNewFile,BufRead *.tex call dist#ft#FTtex()
+
+" ConTeXt
+au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
+
+" Texinfo
+au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
+
+" TeX configuration
+au BufNewFile,BufRead texmf.cnf setf texmf
+
+" Tidy config
+au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
+
+" TF mud client
+au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
+
+" tmux configuration
+au BufNewFile,BufRead {.,}tmux*.conf setf tmux
+
+" TPP - Text Presentation Program
+au BufNewFile,BufReadPost *.tpp setf tpp
+
+" Treetop
+au BufRead,BufNewFile *.treetop setf treetop
+
+" Trustees
+au BufNewFile,BufRead trustees.conf setf trustees
+
+" TSS - Geometry
+au BufNewFile,BufReadPost *.tssgm setf tssgm
+
+" TSS - Optics
+au BufNewFile,BufReadPost *.tssop setf tssop
+
+" TSS - Command Line (temporary)
+au BufNewFile,BufReadPost *.tsscl setf tsscl
+
+" TWIG files
+au BufNewFile,BufReadPost *.twig setf twig
+
+" Typescript
+au BufNewFile,BufReadPost *.ts setf typescript
+
+" TypeScript with React
+au BufNewFile,BufRead *.tsx setf typescriptreact
+
+" Motif UIT/UIL files
+au BufNewFile,BufRead *.uit,*.uil setf uil
+
+" Udev conf
+au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf
+
+" Udev permissions
+au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm
+"
+" Udev symlinks config
+au BufNewFile,BufRead */etc/udev/cdsymlinks.conf setf sh
+
+" UnrealScript
+au BufNewFile,BufRead *.uc setf uc
+
+" Updatedb
+au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
+
+" Upstart (init(8)) config files
+au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
+au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
+au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart
+au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
+au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
+au BufNewFile,BufRead */.config/upstart/*.override setf upstart
+
+" Vera
+au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
+
+" Verilog HDL
+au BufNewFile,BufRead *.v setf verilog
+
+" Verilog-AMS HDL
+au BufNewFile,BufRead *.va,*.vams setf verilogams
+
+" SystemVerilog
+au BufNewFile,BufRead *.sv,*.svh setf systemverilog
+
+" VHDL
+au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho setf vhdl
+
+" Vim script
+au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim
+
+" Viminfo file
+au BufNewFile,BufRead .viminfo,_viminfo setf viminfo
+
+" Virata Config Script File or Drupal module
+au BufRead,BufNewFile *.hw,*.module,*.pkg
+ \ if getline(1) =~ '<?php' |
+ \ setf php |
+ \ else |
+ \ setf virata |
+ \ endif
+
+" Visual Basic (also uses *.bas) or FORM
+au BufNewFile,BufRead *.frm call dist#ft#FTVB("form")
+
+" SaxBasic is close to Visual Basic
+au BufNewFile,BufRead *.sba setf vb
+
+" Vgrindefs file
+au BufNewFile,BufRead vgrindefs setf vgrindefs
+
+" VRML V1.0c
+au BufNewFile,BufRead *.wrl setf vrml
+
+" Vroom (vim testing and executable documentation)
+au BufNewFile,BufRead *.vroom setf vroom
+
+" Vue.js Single File Component
+au BufNewFile,BufRead *.vue setf vue
+
+" WebAssembly
+au BufNewFile,BufRead *.wast,*.wat setf wast
+
+" Webmacro
+au BufNewFile,BufRead *.wm setf webmacro
+
+" Wget config
+au BufNewFile,BufRead .wgetrc,wgetrc setf wget
+
+" Website MetaLanguage
+au BufNewFile,BufRead *.wml setf wml
+
+" Winbatch
+au BufNewFile,BufRead *.wbt setf winbatch
+
+" WSML
+au BufNewFile,BufRead *.wsml setf wsml
+
+" WPL
+au BufNewFile,BufRead *.wpl setf xml
+
+" WvDial
+au BufNewFile,BufRead wvdial.conf,.wvdialrc setf wvdial
+
+" CVS RC file
+au BufNewFile,BufRead .cvsrc setf cvsrc
+
+" CVS commit file
+au BufNewFile,BufRead cvs\d\+ setf cvs
+
+" WEB (*.web is also used for Winbatch: Guess, based on expecting "%" comment
+" lines in a WEB file).
+au BufNewFile,BufRead *.web
+ \ if getline(1)[0].getline(2)[0].getline(3)[0].getline(4)[0].getline(5)[0] =~ "%" |
+ \ setf web |
+ \ else |
+ \ setf winbatch |
+ \ endif
+
+" Windows Scripting Host and Windows Script Component
+au BufNewFile,BufRead *.ws[fc] setf wsh
+
+" XHTML
+au BufNewFile,BufRead *.xhtml,*.xht setf xhtml
+
+" X Pixmap (dynamically sets colors, use BufEnter to make it work better)
+au BufEnter *.xpm
+ \ if getline(1) =~ "XPM2" |
+ \ setf xpm2 |
+ \ else |
+ \ setf xpm |
+ \ endif
+au BufEnter *.xpm2 setf xpm2
+
+" XFree86 config
+au BufNewFile,BufRead XF86Config
+ \ if getline(1) =~ '\<XConfigurator\>' |
+ \ let b:xf86conf_xfree86_version = 3 |
+ \ endif |
+ \ setf xf86conf
+au BufNewFile,BufRead */xorg.conf.d/*.conf
+ \ let b:xf86conf_xfree86_version = 4 |
+ \ setf xf86conf
+
+" Xorg config
+au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf
+
+" Xinetd conf
+au BufNewFile,BufRead */etc/xinetd.conf setf xinetd
+
+" XS Perl extension interface language
+au BufNewFile,BufRead *.xs setf xs
+
+" X resources file
+au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults
+
+" Xmath
+au BufNewFile,BufRead *.msc,*.msf setf xmath
+au BufNewFile,BufRead *.ms
+ \ if !dist#ft#FTnroff() | setf xmath | endif
+
+" XML specific variants: docbk and xbl
+au BufNewFile,BufRead *.xml call dist#ft#FTxml()
+
+" XMI (holding UML models) is also XML
+au BufNewFile,BufRead *.xmi setf xml
+
+" CSPROJ files are Visual Studio.NET's XML-based project config files
+au BufNewFile,BufRead *.csproj,*.csproj.user setf xml
+
+" Qt Linguist translation source and Qt User Interface Files are XML
+" However, for .ts Typescript is more common.
+au BufNewFile,BufRead *.ui setf xml
+
+" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
+au BufNewFile,BufRead *.tpm setf xml
+
+" Xdg menus
+au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml
+
+" ATI graphics driver configuration
+au BufNewFile,BufRead fglrxrc setf xml
+
+" Web Services Description Language (WSDL)
+au BufNewFile,BufRead *.wsdl setf xml
+
+" XLIFF (XML Localisation Interchange File Format) is also XML
+au BufNewFile,BufRead *.xlf setf xml
+au BufNewFile,BufRead *.xliff setf xml
+
+" XML User Interface Language
+au BufNewFile,BufRead *.xul setf xml
+
+" X11 xmodmap (also see below)
+au BufNewFile,BufRead *Xmodmap setf xmodmap
+
+" Xquery
+au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery
+
+" XSD
+au BufNewFile,BufRead *.xsd setf xsd
+
+" Xslt
+au BufNewFile,BufRead *.xsl,*.xslt setf xslt
+
+" Yacc
+au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
+
+" Yacc or racc
+au BufNewFile,BufRead *.y call dist#ft#FTy()
+
+" Yaml
+au BufNewFile,BufRead *.yaml,*.yml setf yaml
+
+" Raml
+au BufNewFile,BufRead *.raml setf raml
+
+" yum conf (close enough to dosini)
+au BufNewFile,BufRead */etc/yum.conf setf dosini
+
+" Zimbu
+au BufNewFile,BufRead *.zu setf zimbu
+" Zimbu Templates
+au BufNewFile,BufRead *.zut setf zimbutempl
+
+" Zope
+" dtml (zope dynamic template markup language), pt (zope page template),
+" cpt (zope form controller page template)
+au BufNewFile,BufRead *.dtml,*.pt,*.cpt call dist#ft#FThtml()
+" zsql (zope sql method)
+au BufNewFile,BufRead *.zsql call dist#ft#SQL()
+
+" Z80 assembler asz80
+au BufNewFile,BufRead *.z8a setf z8a
+
+augroup END
+
+
+" Source the user-specified filetype file, for backwards compatibility with
+" Vim 5.x.
+if exists("myfiletypefile") && filereadable(expand(myfiletypefile))
+ execute "source " . myfiletypefile
+endif
+
+
+" Check for "*" after loading myfiletypefile, so that scripts.vim is only used
+" when there are no matching file name extensions.
+" Don't do this for compressed files.
+augroup filetypedetect
+au BufNewFile,BufRead *
+ \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
+ \ | runtime! scripts.vim | endif
+au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
+
+
+" Extra checks for when no filetype has been detected now. Mostly used for
+" patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim
+" script file.
+" Most of these should call s:StarSetf() to avoid names ending in .gz and the
+" like are used.
+
+" More Apache style config files
+au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle')
+au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
+
+" More Apache config files
+au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache')
+au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
+
+" Asterisk config file
+au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk')
+au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm')
+
+" Bazaar version control
+au BufNewFile,BufRead bzr_log.* setf bzr
+
+" Bazel build file
+if !has("fname_case")
+ au BufNewFile,BufRead *.BUILD,BUILD setf bzl
+endif
+
+" BIND zone
+au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone')
+
+" Calendar
+au BufNewFile,BufRead */.calendar/*,
+ \*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
+ \ call s:StarSetf('calendar')
+
+" Changelog
+au BufNewFile,BufRead [cC]hange[lL]og*
+ \ if getline(1) =~ '; urgency='
+ \| call s:StarSetf('debchangelog')
+ \|else
+ \| call s:StarSetf('changelog')
+ \|endif
+
+" Crontab
+au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab')
+
+" dnsmasq(8) configuration
+au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq')
+
+" Dracula
+au BufNewFile,BufRead drac.* call s:StarSetf('dracula')
+
+" Fvwm
+au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm')
+au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook
+ \ let b:fvwm_version = 1 | call s:StarSetf('fvwm')
+au BufNewFile,BufRead *fvwm2rc*
+ \ if expand("<afile>:e") == "m4"
+ \| call s:StarSetf('fvwm2m4')
+ \|else
+ \| let b:fvwm_version = 2 | call s:StarSetf('fvwm')
+ \|endif
+
+" Gedcom
+au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom')
+
+" Git
+au BufNewFile,BufRead */.gitconfig.d/*,/etc/gitconfig.d/* call s:StarSetf('gitconfig')
+
+" Gitolite
+au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
+
+" GTK RC
+au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc')
+
+" Jam
+au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam')
+
+" Jargon
+au! BufNewFile,BufRead *jarg*
+ \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE'
+ \| call s:StarSetf('jargon')
+ \|endif
+
+" Java Properties resource file (note: doesn't catch font.properties.pl)
+au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')
+
+" Kconfig
+au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
+
+" Lilo: Linux loader
+au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
+
+" Logcheck
+au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck')
+
+" Makefile
+au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make')
+
+" Ruby Makefile
+au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
+
+" Mail (also matches muttrc.vim, so this is below the other checks)
+au BufNewFile,BufRead {neo,}mutt[[:alnum:]._-]\\\{6\} setf mail
+
+au BufNewFile,BufRead reportbug-* call s:StarSetf('mail')
+
+" Modconf
+au BufNewFile,BufRead */etc/modutils/*
+ \ if executable(expand("<afile>")) != 1
+ \| call s:StarSetf('modconf')
+ \|endif
+au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf')
+
+" Mutt setup file
+au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
+au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
+
+" Neomutt setup file
+au BufNewFile,BufRead .neomuttrc*,*/.neomutt/neomuttrc* call s:StarSetf('neomuttrc')
+au BufNewFile,BufRead neomuttrc*,Neomuttrc* call s:StarSetf('neomuttrc')
+
+" Nroff macros
+au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
+
+" OpenBSD hostname.if
+au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config')
+
+" Pam conf
+au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')
+
+" Printcap and Termcap
+au BufNewFile,BufRead *printcap*
+ \ if !did_filetype()
+ \| let b:ptcap_type = "print" | call s:StarSetf('ptcap')
+ \|endif
+au BufNewFile,BufRead *termcap*
+ \ if !did_filetype()
+ \| let b:ptcap_type = "term" | call s:StarSetf('ptcap')
+ \|endif
+
+" ReDIF
+" Only used when the .rdf file was not detected to be XML.
+au BufRead,BufNewFile *.rdf call dist#ft#Redif()
+
+" Remind
+au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
+
+" SGML catalog file
+au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
+
+" Shell scripts ending in a star
+au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
+au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
+au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
+
+" tcsh scripts ending in a star
+au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")
+
+" csh scripts ending in a star
+au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
+
+" VHDL
+au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
+
+" Vim script
+au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
+
+" Subversion commit file
+au BufNewFile,BufRead svn-commit*.tmp setf svn
+
+" X resources file
+au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults')
+
+" XFree86 config
+au BufNewFile,BufRead XF86Config-4*
+ \ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf')
+au BufNewFile,BufRead XF86Config*
+ \ if getline(1) =~ '\<XConfigurator\>'
+ \| let b:xf86conf_xfree86_version = 3
+ \|endif
+ \|call s:StarSetf('xf86conf')
+
+" X11 xmodmap
+au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
+
+" Xinetd conf
+au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd')
+
+" yum conf (close enough to dosini)
+au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
+
+" Z-Shell script ending in a star
+au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
+au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
+
+
+" Plain text files, needs to be far down to not override others. This avoids
+" the "conf" type being used if there is a line starting with '#'.
+au BufNewFile,BufRead *.text,README setf text
+
+" Help files match *.txt but should have a last line that is a modeline.
+au BufNewFile,BufRead *.txt
+ \ if getline('$') !~ 'vim:.*ft=help'
+ \| setf text
+ \| endif
+
+" NOTE: The above command could have ended the filetypedetect autocmd group
+" and started another one. Let's make sure it has ended to get to a consistent
+" state.
+augroup END
+
+" Generic configuration file. Use FALLBACK, it's just guessing!
+au filetypedetect BufNewFile,BufRead,StdinReadPost *
+ \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
+ \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'
+ \ || getline(4) =~ '^#' || getline(5) =~ '^#') |
+ \ setf FALLBACK conf |
+ \ endif
+
+" Restore 'cpoptions'
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/ftplugin/awk.vim b/ftplugin/awk.vim
index fbccec1c..4425ac47 100644
--- a/ftplugin/awk.vim
+++ b/ftplugin/awk.vim
@@ -3,9 +3,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1
" Vim filetype plugin
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
-" Last Change: 2017 Feb 17
+" Last Change: 2020 Sep 28
" This plugin was prepared by Mark Sikora
+" This plugin was updated as proposed by Doug Kearns
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -15,8 +16,44 @@ endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
-let b:undo_ftplugin = "setl commentstring<"
+let s:cpo_save = &cpo
+set cpo&vim
+setlocal comments=:#
setlocal commentstring=#\ %s
+setlocal formatoptions-=t formatoptions+=croql
+
+setlocal define=function
+setlocal suffixesadd+=.awk
+
+let b:undo_ftplugin = "setl fo< com< cms< def< sua<" .
+ \ " | unlet! b:browsefilter"
+
+" TODO: set this in scripts.vim?
+if exists("g:awk_is_gawk")
+ setlocal include=@include
+ setlocal suffixesadd+=.gawk
+ if has("unix") || has("win32unix")
+ setlocal formatprg=gawk\ -f-\ -o/dev/stdout
+ let b:undo_ftplugin .= " | setl fp<"
+ endif
+
+ let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
+ let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
+ let path = substitute(path, ':', ',', 'g')
+
+ let &l:path = path
+ let b:undo_ftplugin .= " | setl inc< path<"
+endif
+
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
+ let b:browsefilter = "Awk Source Files (*.awk,*.gawk)\t*.awk;*.gawk\n" .
+ \ "All Files (*.*)\t*.*\n"
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: nowrap sw=2 sts=2 ts=8
endif
diff --git a/plugin/polyglot.vim b/plugin/polyglot.vim
deleted file mode 100644
index ab74485f..00000000
--- a/plugin/polyglot.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-if !exists("did_load_polyglot")
- if expand("<sfile>:p") =~# '/pack/' && (exists("did_load_filetypes") || exists("did_indent_on"))
- echohl WarningMsg
- echo "Improper install of vim-polyglot. Please add 'packload' to .vimrc"
- echohl None
- end
- filetype plugin indent on
- syntax enable
-endif
diff --git a/scripts/build b/scripts/build
index 42ff4f3a..8b40e571 100755
--- a/scripts/build
+++ b/scripts/build
@@ -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 }
)
diff --git a/syntax/odin.vim b/syntax/odin.vim
index 553f4612..393929e9 100644
--- a/syntax/odin.vim
+++ b/syntax/odin.vim
@@ -25,6 +25,7 @@ syntax keyword odinCase case
syntax keyword odinContinue continue
syntax keyword odinBreak break
syntax keyword odinSizeOf size_of
+syntax keyword odinOffsetOf offset_of
syntax keyword odinTypeInfoOf type_info_of
syntax keyword odinTypeIdOf typeid_of
syntax keyword odinTypeOf type_of
@@ -102,6 +103,7 @@ highlight link odinNotIn Keyword
highlight link odinContinue Keyword
highlight link odinBreak Keyword
highlight link odinSizeOf Keyword
+highlight link odinOffsetOf Keyword
highlight link odinTypeOf Keyword
highlight link odinTypeInfoOf Keyword
highlight link odinTypeIdOf Keyword