From e166f741ef054ea990aa6d1af85b97ceb82171bb Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 1 Sep 2020 08:33:15 +0200 Subject: Some major updates including heuristics - Allow to define heuristics in heuristics.yaml - Migrate all filetypes from vim beginning with "a" - Remove enhanced cpp syntax (it was too slow to load) - Use setf instead of set ft for setting filetype (faster) - Override native hauristics with au! - Add globbing of files for packages - Replace predefined dirs with extra_dirs and ignored_dirs - Allow to define proper order of packages with topological sort - Fix powershell detection - Lint and fix many packages.yaml issues - etc etd --- heuristics.yaml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 heuristics.yaml (limited to 'heuristics.yaml') diff --git a/heuristics.yaml b/heuristics.yaml new file mode 100644 index 00000000..28dff4ce --- /dev/null +++ b/heuristics.yaml @@ -0,0 +1,57 @@ +--- +extensions: [inp] +rules: +- lines: 1 + pattern: '^\*' + filetype: abaqus +- lines: 500 + pattern: '^header surface data' + ignore_case: true + filetype: trasys +--- +extensions: [asa] +rules: +- override: "g:filetype_asa" +- filetype: aspvbs +--- +extensions: [asp] +rules: +- override: "g:filetype_asp" +- lines: 3 + pattern: 'perlscript' + ignore_case: true + filetype: aspperl +- filetype: aspvbs +--- +extensions: [m] +rules: +- lines: 100 + rules: + - pattern: '^\s*/\*' + set: 'saw_comment' + - pattern: '^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])' + filetype: objc + - pattern: '^\s*%' + filetype: octave + - pattern: '^\s*\(\*' + filetype: mma + - pattern: '^\s*((type|var)\b|--)' + ignore_case: true + filetype: murphi +- if_set: "saw_comment" + filetype: objc +- override: "g:filetype_m" +- filetype: octave +--- +extensions: [fs] +rules: +- lines: 50 + rules: + - pattern: '^(: |new-device)' + filetype: forth + - pattern: '^\s*(#light|import|let|module|namespace|open|type)' + filetype: fsharp + - pattern: '\s*(#version|precision|uniform|varying|vec[234])' + filetype: glsl +- override: "g:filetype_fs" +- filetype: forth -- cgit v1.2.3