1
0
forked from aniani/vim

91 Commits

Author SHA1 Message Date
Christian Brabandt
fb49e3cde7
runtime(filetype): commit 99181205c5f8284a3 breaks V lang detection
so make the regex more strict and have it check for a parenthesis.

See:
https://github.com/vlang/v/blob/master/examples/submodule/mymodules/submodule/sub_functions.v

related: #16513

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 16:18:51 +01:00
Christian Brabandt
99181205c5
runtime(filetype): Improve Verilog detection by checking for modules definition
While at it, also increase the maximum number of lines to check to 500.

fixes: #16513

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:23:52 +01:00
Christian Brabandt
727c567a09
patch 9.1.1030: filetype: setting bash filetype is backwards incompatible
Problem:  filetype: setting bash filetype is backwards incompatible
Solution: revert patch v9.1.0965, detect bash scripts again as sh
          filetype

This reverts commit b9b762c21f2b61e0e7d8fee43d4d3dc8ecffd721.

related: #16309

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:03:46 +01:00
Christian Brabandt
668e9f2403
runtime(filetype): don't detect string interpolation as angular
fixes: #16375

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 09:20:55 +01:00
Wu, Zhenyu
4f73c07abf
patch 9.1.0998: filetype: TI assembly files are not recognized
Problem:  filetype: TI assembly files are not recognized
Solution: inspect '*.sa' and assembly files and detect TI assembly
          files, include filetype plugin and syntax script for TI
          assembly files (Wu, Zhenyu)

closes: #15827

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 20:26:38 +01:00
Luca Saccarola
b9b762c21f
patch 9.1.0965: filetype: sh filetype set when detecting the use of bash
Problem:  filetype: sh filetype set when detecting the use of bash
Solution: when bash is detected, use 'bash' filetype instead
          (Luca Saccarola)

closes: #16309

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-27 16:08:14 +01:00
Wu, Zhenyu
e2c27ca8ef
patch 9.1.0876: filetype: openCL files are not recognized
Problem:  filetype: openCL files are not recognized
Solution: detect '*.cl' files as opencl or lisp filetype,
          include a opencl syntax and filetype plugin (Wu, Zhenyu)

closes: #15825

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 21:03:09 +01:00
Wu, Zhenyu
bc32bbddcf
patch 9.1.0866: filetype: LLVM IR files are not recognized
Problem:  filetype: LLVM IR files are not recognized
Solution: detect '*.ll' files either as lifelines or llvm filetype
          (Wu, Zhenyu)

closes: #15824

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 22:55:36 +01:00
EliSauder
e57c9a19ed
patch 9.1.0635: filetype: SuperHTML template files not recognized
Problem:  filetype: SuperHTML template files not recognized
Solution: Update the filetype detection code to detect '*.shtml' either
          as HTML (Server Side Includes) or SuperHTML (template files)
          (EliSauder)

related: #15355
related: #15367

Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:28:11 +02:00
Ken Takata
eb4b903c9b
patch 9.1.0616: filetype: Make syntax highlighting off for MS Makefiles
Problem:  filetype: Make syntax highlighting off for MS Makefiles
Solution: Try to detect MS Makefiles and adjust syntax rules to it.
          (Ken Takata)

Highlighting of variable expansion in Microsoft Makefile can be broken.
E.g.:
2979cfc262/src/Make_mvc.mak (L1331)

Don't use backslash as escape characters if `make_microsoft` is set.
Also fix that `make_no_comments` was not considered if `make_microsoft`
was set.

Also add description for `make_microsoft` and `make_no_comments` to the
documentation and include a very simple filetype test

closes: #15341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ken Takata <kentkt@csc.jp>
2024-07-25 21:16:37 +02:00
igna_martinoli
37853b7de3
patch 9.1.0602: filetype: Prolog detection can be improved
Problem:  filetype: Prolog detection can be improved
Solution: update the prolog detection regex
          (igna_martinoli)

related: #10835
related: #15206
closes: #15253

Co-authored-by: clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 21:34:36 +02:00
igna_martinoli
7347642633
runtime(filetype): Fix Prolog file detection regex
Problem: filetype: .pro file detection for Prolog is broken
Solution: fixed the regex to only match on the tested
          cases (igna_martinoli)

fixes: #10835
closes: #15206

Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 07:33:32 +02:00
igna_martinoli
50dc83cf92
patch 9.1.0558: filetype: prolog detection can be improved
Problem:  filetype: prolog detection can be improved
Solution: Improved the Prolog file detection regex and added tests for
          all cases. (igna_martinoli)

fixes: #10835
closes: #15206

Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-10 21:25:04 +02:00
Christian Brabandt
c03f631b7b
patch 9.1.0555: filetype: angular ft detection is still problematic
Problem:  filetype: angular ft detection is still problematic
          (after 9.1.0551)
Solution: detect htmlangular filetype only by inspecting the content,
          do not try to determine it from a generic name like
          '*.component.html'

For the reasons mentioned here:

https://github.com/vim/vim/pull/13594#issuecomment-1834465890

related: #15190
related: #13594
related: #13604

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-10 19:31:00 +02:00
Dennis van den Berg
1ad194c0df
patch 9.1.0551: filetype: htmlangular files are not properly detected
Problem:  filetype: htmlangular files are not properly detected
Solution: Use the new htmlangular filetype for angular files, because
          since angular v17, those are no longer valid HTML files.
          (Dennis van den Berg)

Since Angular 17, the new Control Flow Syntax is not valid HTML. This PR
adds a new filetype detection for the HTML templates of Angular.

It first checks the filename. The Angular convention is to use
*.component.html for the template. However, this is not mandatory.

If the filename does not match, it will check the contents of the file
if it contains:

  - One of the Control-Flow blocks: @if, @for, @switch, @defer
  - A structural directive: *ngIf, *ngFor, *ngSwitch, *ngTemplateOutlet
  - Builtin Angular elements: ng-template or ng-content
  - String interpolation: {{ something }}

This enables the Angular LSP to attach only to htmlangular filetypes, as
well as language parsers, such as tree-sitter.

closes: #15190

Signed-off-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 19:44:32 +02:00
PowerUser64
aa61b8a908
patch 9.1.0505: filetype: Faust files are not recognized
Problem:  filetype: Faust files are not recognized
Solution: Detect '*.lib' files as Faust filetype, add detection for
          '*.dsp' files (Faust or Make), remove '*.lib' from Cobol
          filetype (PowerUser64)

closes: #14894

Signed-off-by: PowerUser64 <blake@blakenorth.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:32:11 +02:00
Afiq Nazrie
9718ed7ab9
runtime(filetype): update htmldjango detection
- update tags to detect djangohtml based on
  https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#built-in-tag-reference

- increase the lines to inspect to 40 lines

  10 lines is too few and might result in high false negative.
  Increasing it to 40 lines should reduce the false negative.

closes: #15037

Signed-off-by: Afiq Nazrie <afnazrie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:59:53 +02:00
Amelia Clarke
35dfe58a54
patch 9.1.0442: hare runtime files outdated
Problem:  hare runtime files outdated
Solution: runtime(hare): update hare.vim to match upstream
          (Amelia Clarke)

closes: #14836

Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 08:05:00 +02:00
Wu, Zhenyu
887a38cee7
patch 9.1.0401: filetype: zsh module files are not recognized
Problem:  filetype: zsh module files are not recognized
Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh
          filetype, determine zsh-modules '*.pro' from from it's content
          (Wu, Zhenyu)

closes: #14737

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-09 20:35:13 +02:00
Colin Caine
4b3fab14db
patch 9.1.0354: runtime(uci): No support for uci file types
Problem:  runtime(uci): No support for uci file types
          (Wu, Zhenyu)
Solution: include basic uci ftplugin and syntax plugins
          (Colin Caine)

closes: #14575

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Colin Caine <complaints@cmcaine.co.uk>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 23:53:02 +02:00
Wu, Zhenyu
61ee833a50
patch 9.1.0289: filetype: some TeX files are not recognized
Problem:  filetype: some TeX files are not recognized
Solution: Add more patterns for TeX files and inspect
          a few more files for being TeX files
          (Wu, Zhenyu)

closes: #14456

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:09:30 +02:00
dkearns
ef387c062b
runtime(filetype): Modula-2 files with priority not detected (#14055)
Problem:  Modula-2 files with a specified priority are not detected.
Solution: Match the priority syntax in module header lines when
          performing heuristic content detection.

Disable the :defcompile debug line.  This was accidentally left enabled
in commit 68a8947.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-19 20:58:30 +01:00
Doug Kearns
68a8947069
patch 9.1.0013: Modula2 filetype support lacking
Problem:  Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
          dialects, add compiler plugin, update syntax highlighting,
          include syntax tests, update Makefiles (Doug Kearns)

closes: #6796
closes: #8115

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Benjamin Kowarsch <trijezdci@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 17:59:04 +01:00
Christian Brabandt
10b4f75d4c
runtime(dist/ft): improve filetype detection for *.v (V/Verilog/Coq)
Patch provided by Dan Alt

closes: #13793

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 19:19:20 +01:00
Julien Marrec
2e31065a65
patch 9.0.2128: runtime(swig): add syntax and filetype plugins
Add syntax and filetype plugins for SWIG (Simplified Wrapper Interface
Generator) description files.

The default syntax for .i files highlights comments in a reverse
color scheme which doesn't look well.  This syntax builds
on vim's c++ syntax by adding highlighting for common swig
directives and user defined directives.  For an alternative
syntax, see vimscript #1247 (which I found after writing this).

closes: #13562

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:30:46 +01:00
Doug Kearns
e06afb7860
patch 9.0.1820: Rexx files may not be recognised
Problem:  Rexx files may not be recognised
Solution: Add shebang detection and improve disambiguation of *.cls
	  files

closes: #12951

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-29 22:21:35 +02:00
Doug Kearns
f97f6bbf56
patch 9.0.1797: Vimball/Visual Basic filetype detection conflict
Problem:  Vimball/Visual Basic filetype detection conflict
Solution: runtime(vb): Improve Vimball and Visual Basic detection logic

Only run Vimball Archiver's BufEnter autocommand on Vimball archives.
Fixes #2694.

closes: #12899

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-27 18:44:09 +02:00
Doug Kearns
19a3bc3add
patch 9.0.1773: cannot distinguish Forth and Fortran *.f files
Problem:  cannot distinguish Forth and Fortran *.f files
Solution: Add Filetype detection Code

Also add *.4th as a Forth filetype

closes: #12251

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-20 20:53:47 +02:00
Christian Brabandt
e978b4534a
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
* Dedicate upcoming Vim 9.1 to Bram

Also replace in a few more places Brams email address and mention new
maintainers.

* Remove Bram from any Maintainer role

* runtime: Align Header

* it's mailing list not mailinglist
2023-08-13 10:33:05 +02:00
Bram Moolenaar
f07d1a7108 patch 9.0.1623: the program to filetype translation is not exported
Problem:    The program to filetype translation is not exported.
Solution:   Export Exe2filetype().
2023-06-09 21:01:47 +01:00
Omar El Halabi
c9fbd2560f patch 9.0.1591: some "gomod" files are not recognized
Problem:    Some "gomod" files are not recognized.
Solution:   Check for "go.mod" file name before checking out the contents.
            (Omar El Halabi, closes #12462)
2023-05-29 19:59:45 +01:00
Gaetan Lepage
4ce1bda869 patch 9.0.1539: typst filetype is not recognized
Problem:    Typst filetype is not recognized.
Solution:   Distinguish between sql and typst. (Gaetan Lepage, closes #12363)
2023-05-10 22:01:55 +01:00
Bram Moolenaar
71badf9547 Update runtime files 2023-04-22 22:40:14 +01:00
Turiiya
80406c2618 patch 9.0.1478: filetypes for *.v files not detected properly
Problem:    Filetypes for *.v files not detected properly.
Solution:   Use the file contents to detect the filetype. (Turiiya,
            closes #12281)
2023-04-22 21:38:47 +01:00
Johan Kotlinski
065088d554 patch 9.0.1438: .fs files are falsely recognized as forth files
Problem:    .fs files are falsely recognized as forth files.
Solution:   Check 100 lines for something that looks like forth. (Johan
            Kotlinski, closes #12219, closes #11988)
2023-04-02 20:29:38 +01:00
Bram Moolenaar
f1dcd14fc5 Update runtime files 2022-12-31 15:30:45 +00:00
Chris Kipp
70ef3f546b patch 9.0.1057: conflict between supercollider and scala filetype detection
Problem:    Conflict between supercollider and scala filetype detection.
Solution:   Do not check for "Class : Method", it can appear in both
            filetypes. (Chris Kipp, closes #11699)
2022-12-14 16:42:15 +00:00
Bram Moolenaar
86b4816766 Update runtime files 2022-12-06 18:20:10 +00:00
Eisuke Kawashima
24482fbfd5 patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Problem:    When using dash it may not be recognize as filetype "sh".
Solution:   Add checks for "dash". (Eisuke Kawashima,closes #11600)
2022-11-24 10:58:10 +00:00
Doug Kearns
4ac8e7948c patch 9.0.0779: lsl and lm3 file extensions are not recognized
Problem:    lsl and lm3 file extensions are not recognized.
Solution:   Add *.lsl and *.lm3 patterns. (Doug Kearns, closes #11384)
2022-10-17 13:32:17 +01:00
Martin Tournoij
bd053f894b patch 9.0.0771: cannot always tell the difference beween tex and rexx files
Problem:    Cannot always tell the difference beween tex and rexx files.
Solution:   Recognize tex by a leading backslash. (Martin Tournoij,
            closes #11380)
2022-10-16 12:49:12 +01:00
Bram Moolenaar
be807d5824 patch 9.0.0349: filetype of *.sil files not well detected
Problem:    Filetype of *.sil files not well detected.
Solution:   Inspect the file contents to guess the filetype.
2022-09-01 15:01:25 +01:00
Bram Moolenaar
48c3f4e0bf Update runtime files 2022-08-08 15:42:38 +01:00
Gregory Anders
30e212dac1 patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Problem:    Pattern for detecting bitbake files is not sufficient.
Solution:   Adjust the pattern. (Gregory Anders, closes #10743)
2022-07-26 21:42:03 +01:00
Gregory Anders
fa49eb4827 patch 9.0.0055: bitbake files are not detected
Problem:    Bitbake files are not detected.
Solution:   Add bitbake filetype detection by file name and contents. (Gregory
            Anders, closes #10697)
2022-07-16 17:46:47 +01:00
Bram Moolenaar
cdbfc6dbab patch 9.0.0012: signature files not detected properly
Problem:    Signature files not detected properly.
Solution:   Add a function to better detect signature files. (Doug Kearns)
2022-06-30 16:25:21 +01:00
Bram Moolenaar
8b5901e2f9 patch 9.0.0006: not all Visual Basic files are recognized
Problem:    Not all Visual Basic files are recognized.
Solution:   Change detection of *.cls files. (Doug Kearns)
2022-06-29 14:39:12 +01:00
Bram Moolenaar
75ab590f85 Update runtime files 2022-04-18 15:36:40 +01:00
KnoP-01
93c7a45e86 patch 8.2.4766: KRL files using "deffct" not recognized
Problem:    KRL files using "deffct" not recognized.
Solution:   Adjust the pattern used for matching. (Patrick Meiser-Knosowski,
            closes #10200)
2022-04-16 21:14:04 +01:00
KnoP-01
f420ff2440 patch 8.2.4747: no filetype override for .sys files
Problem:    No filetype override for .sys files.
Solution:   Add g:filetype_sys. (Patrick Meiser-Knosowski, closes #10181)
2022-04-13 20:46:21 +01:00