1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-16 06:47:52 +01:00
Commit graph

428 commits

Author SHA1 Message Date
David Mandelberg
ed7d8e55ac
patch 9.1.1140: filetype: m17ndb files are not detected
Problem:  filetype: m17ndb files are not detected
Solution: detect m17ndb files as m17ndb filetype,
          include filetype, syntax and indent files for the
          new filetype (David Mandelberg).

References:

https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
format. https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/ has
examples of the files.

closes: 

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 09:41:42 +01:00
Peter Benjamin
72755b3c8e
patch 9.1.1042: filetype: just files are not recognized
Problem:  filetype: just files are not recognized
Solution: adjust filetype detection pattern, detect just shebang line,
          include just ftplugin, indent and syntax plugin
          (Peter Benjamin)

closes: 

Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:56:41 +01:00
Doug Kearns
221c53202d
runtime(vim): Split Vim legacy and Vim9 script indent tests
The indent test file is not highlighted correctly as it's currently a
syntactically erroneous mix of legacy and Vim9 script.  This is causing
spurious indent test failures as the indent script relies on syntax ID
tests to determine the context of lines being processed.

Splitting the tests into legacy and Vim9 specific files allows for
correct syntax highlighting and indenting.

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:54:33 +01:00
Jim Zhou
6d2efd4920
runtime(vim): update indentation plugin for Vim script
Make the indent script aware of enums and ensure those will be correctly
indented.

fixes: 
closes: 

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Jim Zhou <csd_189@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 10:36:56 +01:00
Aliaksei Budavei
9739086de2
runtime(vim): Use supported syntax in indent tests
For now, prefer mis-indentation of enum values (see )
rather than invalid syntax.

Related to  and .

closes: 

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:18:15 +01:00
Jon Parise
4ce1cb5bf1
runtime(graphql): contribute vim-graphql to Vim core
Contribute the core of my vim-graphql project (ftplugin, indent, syntax)
to the Vim project. This replaces the basic ftplugin support that was
already in the runtime with a more complete set of filetype settings. I
can assume maintainership for all of these files.

I'll continue to maintain the higher-level embedded filetype support
separately (in vim-graphql) for now, because it's fairly complex, but we
can consider integrating that code directly into vim later.

runtime files use the MIT license.

closes: 

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-23 09:57:42 +01:00
Luca Saccarola
b66cac1a8e
runtime(typst): add definition lists to formatlistpat, update maintainer
closes: 

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-09 20:31:04 +01:00
Lukas Zapletal
0acd3abfad
runtime(sh): better function support for bash/zsh in indent script
closes: 

Signed-off-by: Lukas Zapletal <lzap+git@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 21:52:44 +01:00
D. Ben Knoble
8e013b1421
runtime(racket): update Racket runtime files
This brings the included Racket runtime files to commit c41bc5a (indent
for[*]/lists with accumulator clause correctly, 2024-11-12) of
https://github.com/benknoble/vim-racket.

Note that not all files from that repository are included.

closes: 

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-13 19:45:38 +01:00
Serhii Khoma
5ca8f223f0
runtime(idris2): include filetype,indent+syntax plugins for (L)Idris2 + ipkg
closes: 

Co-authored-by: Christian Clason <ch.clason+github@icloud.com>
Signed-off-by: Serhii Khoma <srghma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 21:52:20 +01:00
Doug Kearns
7724d621f2
runtime(vim): Fix indent after :silent! function
See 35699f1749 (commitcomment-148816912)

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 20:36:28 +01:00
Aliaksei Budavei
9fd5d9674f
patch 9.1.0833: CI: recent ASAN changes do not work for indent tests
Problem:  CI: recent ASAN changes do not work for indent tests
Solution: Move code to runtime/indent/testdir/runtest.vim
          (Aliaksei Budavei)

closes: 

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 09:15:35 +01:00
Christian Brabandt
203c7225f5
CI: huge linux builds should also run syntax & indent tests
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-29 20:27:34 +01: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
Christian Brabandt
c6ed816761
runtime(yaml): do not re-indent when commenting out lines
It's a personal annoyance for me. I have to edit yaml files on a lot of
customer environments and whenever you type '#' at the start of the
line, the commented line will be indented by whatever indent the
previous line had.

I hate this seriously, because it makes un-commenting painful. So let's
fix this. But instead of messing with the indent function, let's just
remove the '0#' from cinkeys, so that Vim won't perform re-indenting
when commenting out such a yaml file.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:29:47 +02:00
David Pedersen
39eff4cdc0
runtime(proto): Add indent script for protobuf filetype
closes: 

Signed-off-by: David Pedersen <limero@me.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-07 21:23:59 +02:00
Yinzuo Jiang
c0f7505ede
runtime(lua): add/subtract a 'shiftwidth' after '('/')' in indentexpr
Problem:

- Current lua indentexpr does not indent for '(' ')'.
- Missing indent test for lua.

Solution:

- Match '(', ')' in `function GetLuaIndentIntern`.
- Add an indent test for lua.

closes: 

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-04 18:47:25 +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
Gregory Anders
e4b991ed36
patch 9.1.0610: filetype: OpenGL Shading Language files are not detected
Problem:  filetype: OpenGL Shading Language files are not detected
Solution: detect various file extensions as GLSL filetype, include
          indent and syntax script, do no longer recognize '*.comp'
          as Mason filetype (Gregory Anders)

closes: 

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-22 20:33:48 +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
Yinzuo Jiang
700cf8cfa1
patch 9.1.0586: ocaml runtime files are outdated
Problem:  ocaml runtime files are outdated
Solution: sync those files with the upstream repo,
          detect a few more ocaml files
          (Yinzuo Jiang)

closes: 

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-14 17:02:33 +02:00
Christian Brabandt
cb7928812e
runtime(vim): make &indentexpr available from the outside
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 20:02:31 +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
novenary
11d5992573
runtime(rust): use shiftwidth() in indent script
closes: 

Signed-off-by: novenary <novenary@kwak.zip>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 19:11:16 +02:00
RestorerZ
cd33faf614
patch 9.1.0527: inconsistent parameter in Makefiles for Vim executable
Problem:  inconsistent parameter in Makefiles for Vim executable
Solution: consistently use $VIMPROG across all Makefiles
          (RestorerZ)

closes: 

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:48:01 +02:00
Evan Hanson
17e0a1969d
runtime(scheme): update runtime files
Add TODO highlighting, disable text-wrapping, add "define-library" to
lispwords on CHICKEN. Update MAINTAINERS.

closes: 

Signed-off-by: Evan Hanson <evhan@foldling.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-21 07:49:39 +02:00
Yinzuo Jiang
79da22de75
runtime(kdl): fix KdlIndent and kdlComment in indent script ()
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:47:47 +02:00
Yinzuo Jiang
2e3b2a8d89
runtime(kdl): use shiftwidth() instead of &tabstop in indent script
closes: 

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:07:16 +02:00
inzuo Jiang
2d88210b3c
runtime(kdl): include syntax, indent and ftplugin files
closes: 

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Signed-off-by: inzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 21:13:56 +02:00
Christian Brabandt
76174e7110
runtime(asm): remove the indent plugin since it has too many issues
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-26 18:04:19 +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: 

Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 08:05:00 +02:00
Michael Soyka
af2254d2f3
runtime(vb): update vb indent plugin as vim9script
Include an updated vb indent script using vim9script.
Also update the runtime indent test files

Signed-off-by: Michael Soyka <mssr953@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:38:10 +02:00
K.Takata
957d903cb7
runtime(arduino): Add Arduino ftplugin and indent files ()
We already have Arduino syntax file, but we didn't have ftplugin and
indent files.

This commit adds a basic ftplugin file and a basic indent file.
Both of them are derived from {ftplugin,indent}/c.vim.

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:13:35 +02:00
Philip H
2d919d2744
patch 9.1.0386: filetype: stylus files not recognized
Problem:  filetype: stylus files not recognized
Solution: Detect '*.styl' and '*.stylus' as stylus filetype,
          include indent, filetype and syntax plugin
          (Philip H)

closes: 

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-01 18:42:11 +02:00
Marc Sven Schulte
2e9b9e9a9e
runtime(asm): missing setlocal in indent plugin ()
Signed-off-by: Marc Sven Schulte <167623652+msschulte@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-28 21:43:03 +02:00
Christian Brabandt
98b12ede31
runtime(asm): fix undefined variable in indent plugin
It's an indent script, so we need to set the  b:undo_indent variable
instead of the b:undo_ftplugin var.

fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 22:42:05 +02:00
Philip H
d3ff129ce8
runtime(astro): Add filetype, syntax and indent plugin
related: 
closes: 

ported from: https://github.com/wuelnerdotexe/vim-astro

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-21 15:50:31 +02:00
Wu, Zhenyu
27f17a6d34
runtime(asm): add basic indent support
closes: 

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:48:57 +02:00
Rocco Mao
63833bb021
runtime(json5): add basic indent support ()
Signed-off-by: Rocco Mao <dapeng.mao@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 19:02:44 +01:00
RestorerZ
8291e91c6b
runtime(indent-test): MS-Windows: Add Makefile for running indent tests
A few more unrelated changes:
- fix Vim script style of indent test
- Change comments to complete sentences in Filelist

closes: 
2024-03-16 15:13:21 +01:00
Christian Brabandt
b4eb3f1e44
runtime(yaml): disable multiline_scalar detection by default
There have been many complaints about Yaml indenting too much, because
it considers values to be multi-line by default, which leads to
unintended indenting for (apparently most) users.

So let's hide this feature behind the new feature flag, keep it
simple and prefer single line value key pairs by default.

If you want the old behaviour, set the following value: >

  :let g:yaml_indent_multiline_scalar = 1

If not set, it will indent the same as the previous line.

closes 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-29 17:28:07 +01:00
Christian Brabandt
f9ca139e3a
runtime(misc): announce adoption of various runtime files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-19 20:46:49 +01:00
Andrew Radev
415a5a951b
runtime(vim): Fix indent after line with literal dict
closes: 

Signed-off-by: Andrew Radev <andrey.radev@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 19:46:59 +01:00
D. Ben Knoble
83f627ff42
runtime(racket): add missing space to b:undo_indent var ()
This copies commit 2a4862a (fixup! indent: only reset some options when
has vim9, 2024-01-31) from https://github.com/benknoble/vim-racket and
fixes 26b0176a9 (runtime(racket): undo some indent options only when
vim9script is available (), 2024-01-30).

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:53:55 +01:00
D. Ben Knoble
26b0176a98
runtime(racket): undo some indent options only when vim9script is available ()
This copies commit 64edf95 (indent: only reset some options when has
vim9, 2024-01-30) from https://github.com/benknoble/vim-racket.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-30 23:32:59 +01:00
dkearns
50dbe16cd8
runtime(qml): Use shiftwidth() in indent plugin ()
Fixes 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 20:33:32 +01:00
Maxim Kim
211211052d
runtime(odin): include ftplugin, syntax and indent script ()
Note for Neovim Contributors: this is bundled as Vim9 Script. If you want to use this on Neovim, you need to convert the Vim9 scripts to Vim Script or Lua or leave it out.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-16 17:33:51 +01:00
Tim Pope
715a805889 runtime(cucumber): Updates to indent and syntax 2023-12-28 23:17:54 +01:00
Tim Pope
a907c91992 runtime(sass): Provide sass_recommended_style option 2023-12-28 23:17:54 +01:00
Lifepillar
0bca4a0018
runtime(context): update ConTeXt keywords and other minor fixes ()
Update to the ConTeXt runtime files. Changes:

1. shared syntax files updated with `mtxrun --script interface --vim`
   using the latest ConTeXt LMTX.

2. fixed reference to `make` tag in the help file.

3. added `keepend` to mitigate issues with embedded Lua syntax (see
   below).

4. the latest revision date of each ConTeXt runtime file has been
   updated to the date of this commit.

The issue about embedded Lua was reported by a user:

>Take the following valid ConTeXt file:

>   \starttext
>   \ctxlua{context("Text generated from Lua.")}
>   \ctxlua{context("Another text generated from Lua.")}
>   \stoptext

>On my Vim installation (including when I start Vim with `--clean`), the
>closing bracket and curly braces on line 2 are highlighted red and the
>syntax highlighting after that is off.

>I was trying to dig a little bit into what was going on, using the
>`synID()` and `synIDattr()` functions. It appears that the closing
>bracket on line 2 is matched as a `luaParentError` instead of the end
>of the `luaParen` region. Therefore, the `luaParen` region continues
>all the way to the end of the file. The closing curly brace on line
>2 is matched as a `luaError`, the 2nd `\ctxlua` on line 3 as
>`luaParen`, etc.

>This issue doesn't occur in a plain Lua file, where the closing bracket
>is correctly matched as the end of the `luaParen` region. So it seems
>that something goes wrong when the Lua syntax file is included in the
>ConTeXt one.

By adding `keepend`, the right parenthesis for some reason is still
highlighted as a `luaParenError`, but at least the right curly brace
should correctly end the Lua block.

From what I've seen, I think it is very difficult to embed Lua syntax
properly without help from the Lua syntax file (that is, without
patching it). It has global rules such as:

   syn match  luaParenError ")"
   syn match  luaError "}"

which make it difficult, if not impossible, to contain Lua syntax
without `keepend` (and its limitations).


Signed-off-by: Lifepillar <lifepillar@lifepillar.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 18:49:50 +01:00