1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-04-07 10:26:43 +02:00
Commit graph

509 commits

Author SHA1 Message Date
Luca Saccarola
421ed14b8a
runtime(typst): add folding to typst ftplugin
closes: 

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 22:01:10 +02:00
Trilowy
6e918538b1
runtime(gleam): add ftplugin for gleam files
fixes: 
closes: 

Signed-off-by: Trilowy <49493635+trilowy@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:08:30 +02:00
Wu, Zhenyu
347d43bd33
patch 9.1.0769: filetype: MLIR files are not recognized
Problem:  filetype: MLIR files are not recognized
Solution: Detect '*.mlir' files as mlir filetype,
          include a mlir filetype plugin
          (Wu, Zhenyu)

closes: 

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 21:58:35 +02:00
Andreas Schneider
4f51f3a573
runtime(spec): set comments and commentstring options
closes: 

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:02:10 +02:00
Konfekt
7c3f9af0ed
runtime(misc): unset compiler in various ftplugins
just to foster best practices

closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:26:46 +02:00
Konfekt
f416a2220f
runtime(systemd): small fixes to &keywordprg in ftplugin
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-02 19:28:44 +02:00
Aliaksei Budavei
85f054aa3f
runtime(java): Recognise the CommonMark form (///) of Javadoc comments
Complement "g:java_ignore_javadoc" with "g:java_ignore_html"
and "g:java_ignore_markdown" to allow selectively disabling
the recognition of HTML and CommonMark respectively.

(Note that this is not a preview feature.)

======================== LIMITATION ========================

According to the syntactical details of JEP 467:

> Any leading whitespace and the three initial / characters
> are removed from each line.
>
> The lines are shifted left, by removing leading whitespace
> characters, until the non-blank line with the least
> leading whitespace has no remaining leading whitespace.
>
> Additional leading whitespace and any trailing whitespace
> in each line is preserved, because it may be significant.

the following example:
------------------------------------------------------------
///    A summary sentence.
///     A list:
///      - Item A.
///     - Item B.
///
///     Some code span, starting here `
///      1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

should be interpreted as if it were written thus:
------------------------------------------------------------
///A summary sentence.
/// A list:
///  - Item A.
/// - Item B.
///
/// Some code span, starting here `
///  1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

Since automatic line rewriting will not be pursued, parts of
such comments having significant whitespace may be ‘wrongly’
highlighted.  For convenience, a &fex function is defined to
‘correct’ it: g:javaformat#RemoveCommonMarkdownWhitespace()
(:help ft-java-plugin).

References:
https://openjdk.org/jeps/467
https://spec.commonmark.org/0.31.2

closes: 

Co-authored-by: Tim Pope <code@tpope.net>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:40:04 +02:00
Riley Bruins
de6c1d1182
patch 9.1.0749: filetype: http files not recognized
Problem:  filetype: http files not recognized
Solution: detect '*.http' as http filetype, include
          http filetype plugin (Riley Bruins)

Based on the specification found
[here](https://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md)

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:34:04 +02:00
John M Devin
a7229c8a99
runtime(rmd,rrst): 'fex' option not properly restored
Add 'fex' to b:undo_ftplugin variable

closes: 

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-23 20:12:48 +02:00
zeertzjq
87b65652e8
runtime(modconf): remove erroneous :endif in ftplugin
regression introduced in f86568f918

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-20 21:47:19 +02:00
Konfekt
f86568f918
runtime(misc): simplify keywordprg in various ftplugins
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 19:37:38 +02:00
Konfekt
41c7bbaf8f
runtime(zsh,sh): set and unset compiler in ftplugin
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 18:19:43 +02:00
fundawang
e40157641c
runtime(spec): Recognize epoch when making spec changelog in ftplugin
closes: 

Signed-off-by: fundawang <fundawang@yeah.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:43:05 +02:00
Gregory Anders
150b5078ac
runtime(hcl,terraform): Add runtime files for HCL and Terraform
closes: 

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-04 22:19:45 +02:00
Marc Jakobi
9abd02d16a
runtime(nu): include filetype plugin
This is used to set the commentstring option.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Marc Jakobi <marc.jakobi@tiko.energy>
2024-09-01 09:21:16 +02:00
John M Devin
5d1c551057
runtime(mane): Improve <Plug>ManBS mapping
related:  and 
closes: 

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:36:08 +02:00
Luca Saccarola
1c4f40213b
runtime(man): Fix <Plug>ManBS
This change does 2 things:
- make sure the mapping <Plug>ManBS sets the buffer to modified
  to avoid a potential error message
- remove commented q mapping

fixes 
closes: 

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:17:19 +02:00
Yinzuo Jiang
fc762dfc9f
runtime(sql, mysql): fix E169: Command too recursive with sql_type_default = "mysql"
Problem: When setting "let g:sql_type_default = "mysql", editing .sql
file reports "E169: Command too recursive" error

Solution:

- Add 'let b:did_ftplugin = 1' at the top of ftplugin/sql.vim
- Add 'if exists("b:did_ftplugin") | finish | endif' in ftplugin/mysql.vim
- Add missing header information in ftplugin/mysql.vim
- Remove redundant code in ftplugin/sql.vim

fixes: 
closes: 

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 21:49:00 +02:00
Stanislav Asunkin
dd36d6cc7c
runtime(mediawiki): fix typo in doc, test for b:did_ftplugin var
closes: 

Signed-off-by: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com>
Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 14:43:30 +02:00
Adam Monsen
0aa65b48fb
patch 9.1.0655: filetype: goaccess config file not recognized
Problem:  filetype: goaccess config file not recognized
Solution: detect 'goaccess.conf' as goaccess filetype, also
          include a basic syntax and ftplugin (Adam Monsen)

Add syntax highlighting for GoAccess configuration file.

GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal in *nix systems or through your browser.

GoAccess home page: https://goaccess.io

closes: 

Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:58:00 +02:00
Yinzuo Jiang
e6471b415b
runtime(cuda): source c and cpp ftplugins
closes: 

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 18:15:30 +02:00
Yinzuo Jiang
011f2223e5
runtime(thrift): add ftplugin, indent and syntax scripts
Problem: Apache Thrift files misses ftplugin, indent and syntax scripts

Solution:
- add ftplugin and indent scripts
- add thrift indent test
- port the syntax script from apache/thrift (Apache License 2)

Reference:
https://diwakergupta.github.io/thrift-missing-guide/#_language_reference

closes: 

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:51:05 +02:00
Peter Aronoff
a7295ae7f5
runtime(autohotkey): include initial filetype plugin
closes: 

Signed-off-by: Peter Aronoff <peter@aronoff.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:24:33 +02:00
Christian Brabandt
4266daae17
runtime(mermaid): correct wrong comment options
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 20:32:04 +02:00
AvidSeeker
3088ef094d
patch 9.1.0593: filetype: Asymptote files are not recognized
Problem:  filetype: Asymptote files are not recognized
Solution: detect '*.asy' files as asy filetype, include
          ftplugin and syntax plugin (AvidSeeker).

Reference: https://asymptote.sourceforge.io/

closes: 

Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:42:17 +02:00
markmacode
babea52f4d
runtime(gomod): add recommended indent options to ftplugin
closes: 

Signed-off-by: markmacode <code@mamo.aleeas.com>
Signed-off-by: yu-yk <yukkuen.yu@linktivity.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:30:32 +02:00
markmacode
3e07d5aef1
runtime(go): add recommended indent options to ftplugin
related: 

Signed-off-by: markmacode <code@mamo.aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:26:47 +02:00
markmacode
6a54dcbbd6
runtime(gdscript): add recommended indent options to ftplugin
related: 

Signed-off-by: markmacode <code@mamo.aleeas.com>
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:18:06 +02:00
AvidSeeker
b5844104ab
patch 9.1.0592: runtime: filetype: Mediawiki files are not recognized
Problem:  filetype: Mediawiki files are not recognized
Solution: detect "*.mw" and "*.wiki" as mediawiki filetype,
          include basic syntax and filetype plugins.
          (AvidSeeker)

closes: 

Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:10:50 +02:00
Gregory Anders
1cc4cae961
runtime(typst): Add typst runtime files
closes: 

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:00:48 +02:00
Riley Bruins
fc533c9f06
runtime(mojo): include mojo ftplugin and indent script
Taken from excerpts of the Python ftplugin and adapted,
indent script simply sources the python indent script.

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 22:51:48 +02:00
Christian Brabandt
a3a14d5469
runtime(htmlangular): correct comment
related: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-10 19:33:33 +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: 

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
Yinzuo Jiang
4a7a4a3675
patch 9.1.0550: filetype: antlr4 files are not recognized
Problem:  filetype: antlr4 files are not recognized
Solution: Detect '*.g4' as antlr4 filetype, include a simple antlr4
          syntax and filetype plugin (Yinzuo Jiang)

closes: 

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 19:11:18 +02:00
AvidSeeker
ab03dd2085
runtime(hlsplaylist): include hlsplaylist ftplugin file
fixes: 
closes: 

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-08 21:11:34 +02:00
Riley Bruins
62f31e9499
patch 9.1.0544: filetype: ldapconf files are not recognized
Problem:  filetype: ldapconf files are not recognized
Solution: Detect '.ldaprc', 'ldap.conf' and 'ldaprc' files as ldapconf
          filetype, include a simple ldapconf ftplugin file
          (Riley Bruins)

[Specification](https://www.openldap.org/software//man.cgi?query=ldap.conf&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release)

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:20:22 +02:00
Riley Bruins
f77a0e9f41
runtime(cmakecache): include cmakecache ftplugin file
closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:18:31 +02:00
Riley Bruins
380f98002d
runtime(lex): include lex ftplugin file
Spec found [here](https://docs.oracle.com/cd/E19504-01/802-5880/lex-6/index.html)

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:17:16 +02:00
Riley Bruins
7d60dc2069
runtime(yacc): include yacc ftplugin file
closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:16:08 +02:00
Riley Bruins
08b0c12716
runtime(squirrel): include squirrel ftplugin file
Comment spec found [here](https://squirrel-lang.org/squirreldoc/reference/language/lexical_structure.html#comments)

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:14:59 +02:00
Riley Bruins
2c9ef3a671
runtime(objcpp): include objcpp ftplugin file
This one just sources the objc.vim ftplugin.

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:12:47 +02:00
Riley Bruins
94c1c6638a
runtime(tf): include tf ftplugin file
Adds ftplugin support for tf (TinyFugue). Comment support taken from
[here](1e8ac0bb01/src/command.c (L568))

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:07:56 +02:00
Riley Bruins
01e20902f4
runtime(mysql): include mysql ftplugin file
This one just sources from the SQL ftplugin. Without this, *.mysql
files don't inherit the common SQL settings.

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:02:23 +02:00
Riley Bruins
a264bb931e
runtime(javacc): include javacc ftplugin file
closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:59:42 +02:00
Riley Bruins
2525608d73
runtime(cabal): include cabal ftplugin file
closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:58:10 +02:00
Riley Bruins
f5398c8975
runtime(cuda): include CUDA ftplugin file
closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:56:43 +02:00
Riley Bruins
2c299eb258
runtime(editorconfig): include editorconfig ftplugin file
closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:54:32 +02:00
Riley Bruins
8906e22df5
runtime(kivy): update kivy syntax, include ftplugin
Kivy uses "#:" for preprocessing commands (like "#:import ...") which
were overridden by the comment syntax. This has been changed, and a
commentstring has been added.

closes: 

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:53:04 +02:00
Christian Brabandt
f095539b39
patch 9.1.0536: filetype: zone files are not recognized
Problem:  filetype: zone files are not recognized
          (rpdprd)
Solution: Detect '*.zone' files as bindzone filetype

fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 17:39:18 +02:00
Ivan Shapovalov
84ca1388d8
runtime(man): honor cmd modifiers before g:ft_man_open_mode
Give priority to (placement) command modifiers, specifically
`:vertical`, `:horizontal` and `:tab`, ahead of `g:ft_man_open_mode`,
so that if the user says e.g. `:vert Man`, Vim does the expected thing.

closes: 

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 16:57:18 +02:00