Commit Graph

5998 Commits

Author SHA1 Message Date
b087c5452b patch 9.1.1936: filetype: Erlang lexical files are not recognized
Problem:  filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
          filetype plugins (Jon Parise).

leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.

This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.

Reference:
-  https://www.erlang.org/doc/apps/parsetools/leex.html

related: #18819
closes: #18832

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 14:45:48 +00:00
2b2580e61a patch 9.1.1935: filetype: not all Erlang files are recognized
Problem:  filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
          (John Parise).

*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)

Reference:
- https://www.erlang.org/doc/system/applications.html

Rebar is the Erlang build tool. rebar.config uses Erlang syntax.

Reference:
- https://rebar3.org/docs/configuration/configuration/

closes: #18835

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 10:02:45 +00:00
8b9b422111 runtime(doc): Update and clarify vim9.txt Section 3
closes: #18779

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 09:40:04 +00:00
49f731d243 runtime(doc): Improve :help :catch command specification
The pattern argument is optional.  See :help :sort for another example.

closes: #18834

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 09:23:16 +00:00
ab090993ad runtime(netrw): fix undefined variable curwin in s:NetrwMenu()
fixes: #18829

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 22:37:06 +00:00
3ba6a97fea patch 9.1.1934: filetype: not all starlark files are recognized
Problem:  filetype: not all starlark files are recognized
Solution: Detect *.sky files as starlark filetype (Bruno Belanyi)

References:
- https://docs.bazel.build/versions/0.17.1/skylark/spec.html

closes: #18807

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:48:55 +00:00
4bb44b287c runtime(doc): Change termdebug_config debug value to v:true in terminal.txt
closes: #18820

Signed-off-by: Rochish Manda <28740792+Rochish-Manda@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:42:13 +00:00
afd46fd9c9 runtime(doc): Correct typo in usr_30.txt regarding softtabstop
Fix typo in explanation of softtabstop and shiftwidth.

closes: #18823

Signed-off-by: Shin Rag <62047911+aquanjsw@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:37:16 +00:00
7f60105cba runtime(doc): fix typo in "appendbufline()", builtin.txt
closes: #18824

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:34:38 +00:00
bc1a82245c runtime(defaults): Update comment for reverting C comment strings
Add `g:` prefix, so the example works in vim9script as well (errors
without it).

closes: #18827

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
2025-11-28 20:25:41 +00:00
9ade3f5894 runtime(doc): Clarification in listener_add() doc
Make it clear that the overall end value can be greater than
line('$') + 1.

fixes: #18664
closes: #18828

Signed-off-by: Paul Ollis <paul@cleversheep.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:21:29 +00:00
cbcbff8712 patch 9.1.1933: completion: complete_match() is not useful
Problem:  completion: complete_match() Vim script function and
          'isexpand' option are not that useful and confusing
          (after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
          (Girish Palya).

complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.

* `f_complete_match()` in `insexpand.c` does not call any completion code.
   It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
   It does nothing on its own and amounts to misuse of a new option.

The following Vim script function can be used to implement the same
functionality:

```vim
  func CompleteMatch(triggers, sep=',')
    let line = getline('.')->strpart(0, col('.') - 1)
    let result = []
    for trig in split(a:triggers, a:sep)
      let idx = strridx(line, trig)
      if l:idx >= 0
        call add(result, [idx + 1, trig])
      endif
    endfor
    return result
  endfunc
```

related: #16716
fixes: #18563
closes: #18790

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 21:28:05 +00:00
c531501748 patch 9.1.1932: OSC terminal response hard to detect
Problem:  OSC terminal response hard to detect
Solution: Add the <OSC> and <xOSC> pseudo keys
          (Foxe Chen).

related: #18660
closes: #18799

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:53:36 +00:00
b217ffbef2 runtime(doc): remove outdated help about 'completeopt' "fuzzy"
closes: #18815

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:27:13 +00:00
33fbfe003c patch 9.1.1930: completion: 'completefuzzycollect' is too obscure
Problem:  completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
          behave like 'completefuzzycollect' is set when fuzzy
          completion is enabled (Girish Palya).

fixes: #18498
closes: #18788

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 21:00:16 +00:00
25a736e323 runtime(i3config/swayconfig): add all option for i3config only
Since i3 version 4.24, popup_during_fullscreen has new
option `all`. So add the `all` option for popup_during_fullscreen to
prevent `all` option highlighted as error.

However, sway won't implement `all` option for popup_during_fullscreen,
so let's remove the extra options from the syntax cluster in swayconfig
syntax script after sourcing the i3config.

Reference:
- https://i3wm.org/docs/userguide.html#_popups_during_fullscreen_mode
- https://github.com/swaywm/sway/issues/8746

closes: #18760

Signed-off-by: Robertus Chris <robertusdchris@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:37:09 +00:00
712b650332 runtime(doc): Fix typo in "Jumping to Changes", usr_08.txt
- Change "Prepended" (past tense) to "Prepend" (present tense,
  imperative).
- Add short examples clarifying the behavior of prepending a count to
  commands that jump to changes in diff mode.

closes: #18810

Signed-off-by: Brent Pappas <pappasbrent@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:12:28 +00:00
efa3b1f86d patch 9.1.1927: Wayland: clipboard code too complex
Problem:  Wayland: clipboard code too complex
Solution: Simplify clipboard related code around W23/W24
          (Foxe Chen).

Improve Wayland and clipboard related code:

- improve documentation
- remove unused code
- fix error handling
- remove warning per Clipboard_T

closes: #18794

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-25 22:04:58 +00:00
2190036c8c runtime(doc): Add environment variable expansion note to options
Add "Environment variables are expanded |:set_env|" documentation to
options that have the P_EXPAND flag but were missing this note.

Updated options:
- 'cdpath'
- 'dictionary'
- 'mkspellmem'
- 'packpath'
- 'runtimepath'
- 'spellfile'
- 'spellsuggest'
- 'thesaurus'
- 'ttytype'
- 'undodir'
- 'verbosefile'
- 'viewdir'
- 'viminfofile'

These options support environment variable expansion in their values
(e.g., $HOME, $USER) but the documentation didn't explicitly mention
this capability. This brings their documentation in line with other
options like backupdir, directory, and makeprg that already include
this note.

closes: #18791

Signed-off-by: Alex Plate <AlexPl292@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:30:19 +00:00
898ac80be6 runtime(new-tutor): update vim-02-beginner following 48940d9
closes: #18793

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:19:35 +00:00
48940d94f6 runtime(tutor): Improve style for chapter 2
closes: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:46:27 +00:00
58fafb6549 runtime(tutor): Add Spanish translation for chapter 2
related: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:45:21 +00:00
9cd512c7f5 runtime(tutor): Improve Spanish translation of chapter 1
related: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:43:43 +00:00
ea14bb7df9 runtime(haskell): Add syntax test
Add a test for issue #18776 (allow spaces in backticked operators).

closes: #18783

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:22:37 +00:00
8da886269a runtime(vim): Update base syntax, match full :history command
closes: #18784

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:18:51 +00:00
a08030c9f7 patch 9.1.1924: 'commentstring' requires +folding feature
Problem:  'commentstring' requires the +folding feature but is used in
	  contexts other than folding.
Solution: Remove the +folding feature guards from 'commentstring' and
          make it available in all builds (Doug Kearns).

closes: #18731

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 21:16:48 +00:00
ea86e53c2b runtime(vim): Update base syntax, match :debug and :break* commands
Match full :debug, :breakadd, :breakdel and :breaklist commands.

closes: #18748

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:57:15 +00:00
74b4f9242e runtime(compiler): set errorformat where missing
As a matter of caution it sets it to the default gcc errorformat:

```
errorformat=%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-Gg%\?make[%*\d]: *** [%f:%l:%m,%-Gg%\?make: *** [%f:%l:%m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory %*[`']%f',%X%*\a[%*\d]: Leaving directory %*[`']%f',%D%*\a: Entering directory %*[`']%f',%X%*\a: Leaving directory %*[`']%f',%DMaking %*\a in %f,%f|%l| %m
```

so that the compiler keeps working after switching to others.

While likely only a subset is needed; such a subset has been proposed in
a commented errorformat;

checked to work for yamllint but ran out of steam for other compilers;

closes: #18754

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:54:31 +00:00
d1288503aa runtime(php): Update indent script to 1.76 (from 1.75)
fixes: #18739 (editor hang on mixed syntax style)
closes: #18758

Signed-off-by: John Wellesz <john.wellesz@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:50:54 +00:00
ddb88ab796 runtime(haskell): allow spaces in backticked operators in syntax script
This formatting (although rare) is actually accepted by GHC, but vim
does not highlight it. This patch adds the simplest possible regex to
support the behavior.

Inconveniently, this might trigger weird formatting on lines that
contain errors, e.g. if the first backtick is removed from:

    a `b` c `d` e

then `c` is going to be marked as an operator, which seems weird but is
valid.

closes: #18776

Signed-off-by: Mirek Kratochvil <exa.exa@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:47:01 +00:00
7fe4b8c1bd runtime(c): Update signal constants in syntax script
closes: #18763

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Harry <166658338+harrystevens4@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 20:50:39 +00:00
040a47a470 runtime(netrw): Use proper UNC notation for temp files
closes: #18764

Signed-off-by: Guybrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 20:06:06 +00:00
c2cc63ec7d runtime(compiler): expand errorformats in maven compiler
matches malformed POM error messages and tries to catch other tools
as well.

closes: #18768

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 19:49:01 +00:00
d284277be9 runtime(doc): Remove :runtime completion (#11447) todo item
This was fixed in commit a6759381a5.

closes: #18769

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 19:44:16 +00:00
fb8ebf1ee0 runtime(compiler): Remove version check in rustc compiler
closes: #18347

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 17:18:41 +00:00
d0dd5614db runtime(compiler): add biome linter
closes: #18685

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 10:39:57 +00:00
f46616f0c4 runtime(vim): Update base syntax and generator, match :cd commands
Match :cd commands explicitly.

fixes: #17964
closes: #18736

Reported by Maxim Kim.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 10:17:17 +00:00
d5821638e2 runtime(new-tutor): escape tutor filename
If Vim is installed into the Windows "Program Files" directory the tutor
path name contains spaces and must therefore be quoted before passing to
:drop.

closes: #18742

Signed-off-by: Andrey Starodubtsev <andrey.starodubtsev@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:49:20 +00:00
384685fade patch 9.1.1914: runtime(netrw): wipes unnamed buffers
Problem:  runtime(netrw): LocalBrowseCheck() wipes unnamed buffers when
          g:netrw_fastbrowse=0 (Carlos Falgueras García)
Solution: Check that bufname() is not empty

fixes: #18740
closes: #18741

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:11:51 +00:00
eb732ed26d runtime(doc): Wrap overlength lines in uganda.txt
Wrap overlength lines and normalise URL indentation.

closes: #18737

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:01:42 +00:00
8644c3b7e6 runtime(help): Update syntax, match tables at :help :digraph-table
Match the digraph tables to avoid false positive matches for helpSpecial
etc.  No syntax groups should match in these tables.

closes: #18738

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 20:59:44 +00:00
23e12c0b7e patch 9.1.1909: filetype: .mom files recognized as nroff files
Problem:  filetype: .mom files recognized as nroff files
Solution: Detect *.mom files as groff filetype instead
          (Callum Andrew)

Reference:
- mom macros are written specifically for groff:
  https://www.schaffter.ca/mom/

closes: #18718

Signed-off-by: Callum Andrew <dev@candrew.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:45:41 +00:00
e9d296e52a runtime(erlang): recognize -if/-elif as erlangPreCondit in syntax script
The -if(Condition)/-elif(Condition) are compiler macros that evaluate
the following lines only if Condition evaluates to true.  This patch
enables syntax highlighting for these macros.

https://www.erlang.org/doc/system/macros.html#conditional-compilation

closes: #18729

Signed-off-by: Vadim Yanitskiy <fixeria@osmocom.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:36:46 +00:00
9ab6a22c90 runtime(doc): Improve :help :ls description formatting
Quote the special buffer names for consistency (see :help bufname()) and
so that they're not incorrectly highlighted as optional command
arguments.

closes: #18730

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:33:01 +00:00
4f19d2768a runtime(vim): Update base syntax, match :prompt command args
closes: #18732

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:17:11 +00:00
f85951fee0 runtime(css): improve cssBoxProp matches
closes: #18717

Signed-off-by: Neil Lambert <nlambert@pm.me>
Signed-off-by: Jay Sitter <jsit@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-11 18:01:31 +00:00
7dd51d3542 patch 9.1.1907: xterm: no support for mouse buttons 8 and 9
Problem:  xterm: no support for mouse buttons 8 and 9
Solution: Add support for terminals with xterm-like mouse functionality
          (notuxic)

closes: #18719

Signed-off-by: notuxic <notuxic@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-11 17:52:45 +00:00
efc3be77bb patch 9.1.1906: filetype: not all Ruby files are recognized
Problem:  filetype: not all Ruby files are recognized
Solution: Detect *.rbi and Brewfile as ruby filetype
          (botantony).

- `rbi` is a file extension used by Sorbet, typechecker for Ruby:
   https://sorbet.org/docs/rbi

- `Brewfile` is a bundler file for Homebrew package manager:
   https://docs.brew.sh/Brew-Bundle-and-Brewfile

closes: #18697

Signed-off-by: botantony <antonsm21@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-11 17:26:02 +00:00
b74ec159dd runtime(sqlcomplete): only set 'omnifunc' if dbext plugin was loaded
fixes: #18716

Co-authored-by: gcanat <72149218+gcanat@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-11 17:13:44 +00:00
97c37446e6 runtime(doc): Wrap some overlength lines in vim9{,class}.txt.
closes: #18724

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-11 16:47:24 +00:00