Commit Graph
7300 Commits
Author SHA1 Message Date
Christian ClasonandTyler Miller d82efeccc7 vim-patch:9.1.0506: filetype: .envrc & .prettierignore not recognized
Problem:  filetype: .envrc & .prettierignore not recognized
Solution: Detect '.envrc' as shell and '.prettierignore' as gitignore
          filetype (Tyler Miller)

Support ft detection for `.envrc` files used by direnv, and
`.prettierignore` files used by prettier.

closes: vim/vim#15053
resolves: neovim/neovim#29405

https://github.com/vim/vim/commit/49012cd8c2fb0452847e5d213b07aa8a978f4762

Co-authored-by: Tyler Miller <tmillr@proton.me>
2024-06-21 11:17:33 +02:00
Christian ClasonandEvan Hanson 5eb604c642 vim-patch:17e0a19: runtime(scheme): update runtime files
Add TODO highlighting, disable text-wrapping, add "define-library" to
lispwords on CHICKEN. Update MAINTAINERS.

closes: vim/vim#15063

https://github.com/vim/vim/commit/17e0a1969da4e70771435fc7fa9d8c96d25c8b00

Co-authored-by: Evan Hanson <evhan@foldling.org>
2024-06-21 11:03:47 +02:00
Christian ClasonandAliaksei Budavei 7306adaebc vim-patch:beb02ed: runtime(java): Optionally highlight parameterised types
In the presence of parameterised types whose names begin
with a capital letter and end with a less-than sign "<" that
introduces a type argument or a list of comma-separated type
arguments, followed by a greater-than sign ">", a variable
"g:java_highlight_generics" can be defined to have some
components of such types uniformly coloured (by picking
highlight groups for javaGenericsC{1,2}, javaWildcardBound).

For example,
------------------------------------------------------------
java.io.InputStream stream = java.io.InputStream.nullInputStream();
java.util.function.Function<String,
    java.util.function.BiFunction<String, String, String>> updater =
	property -> (oldValue, newValue) -> oldValue;
java.util.logging.LogManager.getLogManager()
    .updateConfiguration(stream, updater);
------------------------------------------------------------

Note that the diamond form and explicit type arguments do
not qualify for this kind of recognition.

For example,
------------------------------------------------------------
new java.util.HashSet<>().<String>toArray(new String[0]);
------------------------------------------------------------

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.9
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.12.2.1

closes: vim/vim#15050

https://github.com/vim/vim/commit/beb02ed674bc61f179c4ff71e93bdeeb44fe9c4e

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-06-21 11:03:47 +02:00
zeertzjq f45403db19 vim-patch:9.1.0511: CursorMovedC triggered wrongly with setcmdpos()
Problem:  CursorMovedC triggered wrongly with setcmdpos()
          (after v9.1.0507)
Solution: Remove the premature triggering.  Also don't trigger when
          cursor didn't move. (zeertzjq)

closes: vim/vim#15064

https://github.com/vim/vim/commit/bc6f96708e3678dbb27ec4192d87cf94a15d4e9a
2024-06-21 14:13:33 +08:00
zeertzjqandShougo Matsushita 86ea42ce26 vim-patch:9.1.0507: hard to detect cursor movement in the command line
Problem:  hard to detect cursor movement in the command line
Solution: Add the CursorMovedC autocommand
          (Shougo Matsushita)

closes: vim/vim#15040

https://github.com/vim/vim/commit/d09521476f41dd8dbddb25b7acd0b299f9bf94d3

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-06-21 14:10:30 +08:00
yuyk 26c2a56d99 vim-patch:6ccf6da: runtime(gomod): add gomod filetype plugin (#29433)
closes: vim/vim#15060

https://github.com/vim/vim/commit/6ccf6da7a2a7a0b9d1e23a905b091d762e911609
2024-06-21 12:36:57 +08:00
Jaehwang Jung 0e3e1e6b6d fix(treesitter): don't open fold when o/O adds a line below #28709
Problem:
`o`-ing on a folded line opens the fold, because the new line gets the
fold level from the above line (level '='), which extends the fold to
the new line. `O` has a similar problem when run on the line below a
fold.

Solution:
Use -1 for the added line to get the lower level from the above/below
line.
2024-06-20 06:37:09 -07:00
zeertzjq b923fcbaf0 build(vim-patch.sh): don't ignore changes to version*.txt (#29425)
Suggest adding them to news.txt instead.

Also don't ignore changes to intro.txt and sponsor.txt, as they don't
change much these days, and it's necessary to consider whether to
include their changes in Nvim's intro.txt.
2024-06-20 20:16:53 +08:00
zeertzjqandPowerUser64 af0021f990 vim-patch:9.1.0505: filetype: Faust files are not recognized (#29426)
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: vim/vim#14894

https://github.com/vim/vim/commit/aa61b8a9087e9cd999ef07e0d87b60f43d68f2c6

Co-authored-by: PowerUser64 <blake@blakenorth.net>
2024-06-20 17:45:41 +08:00
Christian ClasonandAliaksei Budavei ac6f0c02cf vim-patch:94c5d8a: runtime(java): Remove the group exclusion list from @javaTop
Instances of anonymous classes can be passed as method
arguments and should be subject to line folding as well.

closes: vim/vim#15048

https://github.com/vim/vim/commit/94c5d8a5e20e1dd8c9e8434ee14e368276644f61

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-06-20 09:28:01 +02:00
zeertzjq 978b0263f8 Merge pull request #29413 from jiangyinzuo/vim-patch-9.1.0497
vim-patch:partial:9.1.{0497,0501}: termdebug can be further improved
2024-06-20 12:29:47 +08:00
Christian ClasonandMaxim Kim 38a1d41ac0 vim-patch:aeca717: runtime(nohlsearch): simplify mapping
Use <cmd> instead of <expr> with execute(...)[-1]

closes: vim/vim#15047

https://github.com/vim/vim/commit/aeca7176f3b7bdc2d698938062f6cad802fea783

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-06-19 22:50:54 +02:00
Justin M. Keyes ceea6898a8 fix(gen_help_html): handle delimiter, heading #29415
Problem:
vimdoc grammar added new forms that are not handled in our HTML
generator. https://github.com/neovim/tree-sitter-vimdoc/pull/134

Solution:
Update `gen_help_html.lua`.

Fixes #29277
2024-06-19 09:45:40 -07:00
Riley Bruins e5e81262af fix(diagnostics): don't apply extmarks to invalid lines #29321
Problem:
If there are errors in the last line of a buffer, something like `Gdk` or
`G2k3J` will produce an error (at least with `lua_ls`):

    Error executing vim.schedule lua callback:
    .../neovim/share/nvim/runtime/lua/vim/diagnostic.lua:1446: Invalid 'line': out of range

Solution:
Only set extmarks if the target buffer line still exists
2024-06-19 09:28:44 -07:00
Yinzuo JiangandUbaldo Tiberi b48192af37 vim-patch:partial:9.1.0497: termdebug can be further improved
Problem:  termdebug can be further improved
Solution: refactor save/restore, update docs,
          add a new save/restore test (Ubaldo Tiberi)

closes: vim/vim#15032

https://github.com/vim/vim/commit/a48637c105ce5ccf6f3296958c889d15dc3faaa4

Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
2024-06-19 21:23:21 +08:00
fe5d1279a4 vim-patch:1ce65e3: runtime(csv): include a simple csv filetype and syntax plugin (#29395)
* vim-patch:1ce65e3: runtime(csv): include a simple csv filetype and syntax plugin

fixes: vim/vim#15038

https://github.com/vim/vim/commit/1ce65e35ac6555054db1276e30d9d63421e6b346

Co-authored-by: Maxim Kim <habamax@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-06-19 09:41:03 +02:00
zeertzjqandLemonBoy 14aba67967 vim-patch:8.2.4724: current instance of last search pattern not easily spotted
Problem:    Current instance of last search pattern not easily spotted.
Solution:   Add CurSearch highlighting. (closes vim/vim#10133)

https://github.com/vim/vim/commit/a43993897aa372159f682df37562f159994dc85c

Some code is superseded by later patches that are already ported.

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-06-19 08:02:02 +08:00
Christian ClasonandAfiq Nazrie 6012f79557 vim-patch:9718ed7: 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: vim/vim#15037

https://github.com/vim/vim/commit/9718ed7ab989c0a0be88a0d749f24321eb0e6af1

Co-authored-by: Afiq Nazrie <afnazrie@gmail.com>
2024-06-19 00:22:58 +02:00
Christian ClasonandMaxim Kim 2791fd4e17 vim-patch:26de90c: runtime(nohlsearch): include the the simple nohlsearch package
fixes: vim/vim#15039
closes: vim/vim#15042

https://github.com/vim/vim/commit/26de90c6312cf16d7a4f2b6942befb4e1f14b960

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-06-18 23:59:39 +02:00
zeertzjqandChristian Brabandt 9d200c78a5 vim-patch:ca47114: runtime(doc): improve the vim-shebang example (#29382)
https://github.com/vim/vim/commit/ca471145321fa8089071330b7637ad3950ac4f11

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-18 07:11:17 +08:00
Yi Ming 7ce261c064 docs(lsp): format the handwritten part #29295 2024-06-17 16:04:40 -07:00
zeertzjq a46991e1c6 docs(news): fix inconsistencies (#29381) 2024-06-18 07:00:32 +08:00
zeertzjq c429c5f86f vim-patch:9.1.0495: Matched text isn't highlighted in cmdline pum
Problem:  Matched text isn't highlighted in cmdline pum.
Solution: Use cmdline completion pattern in cmdline mode.
          (zeertzjq)

closes: vim/vim#15029

https://github.com/vim/vim/commit/d8c9340fc67ca19f82ec3e77ec38296424e758cf

Cherry-pick syntax.txt change from runtime update.
2024-06-18 06:18:34 +08:00
Justin M. Keyes b60030b7bf Merge #28775 fix(man.vim): signcolumn causes broken wrap 2024-06-17 15:09:30 -07:00
zeertzjq 7746c54e10 Merge pull request #29357 from luukvbaal/statuscol
feat(column)!: rework 'statuscolumn' %r/l items
2024-06-17 06:33:15 +08:00
Christian ClasonandDoug Kearns c3cb56d8ec vim-patch:0ddab58: runtime(java): Add a config variable for commonly used compiler options
The value of g:javac_makeprg_params, if set, is added to the value of
'makeprg' as an option string.

closes: vim/vim#14999

https://github.com/vim/vim/commit/0ddab582fa13d1d653800494e45ecfba00974a18

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-06-16 23:24:55 +02:00
Christian ClasonandMohamed Akram 72ddf213a1 vim-patch:917ff8a: runtime(html): bump length of character references in syntax script (vim/vim#15022)
This allows handling longer references such as
`&CounterClockwiseContourIntegral;`.

https://github.com/vim/vim/commit/917ff8a19d2746dd922b7292dc61fb92e18b7ce2

Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
2024-06-16 23:24:55 +02:00
Luuk van Baal ad70c9892d feat(column)!: rework 'statuscolumn' %r/l items
Problem:  A custom 'statuscolumn' needs to check a bunch of options and
          placed signs to replicate the default number column.
Solution: Rework %l item to include the necessary logic to mimic the
          default number column. Remove now redundant %r item.
2024-06-16 19:04:34 +02:00
Christian ClasonandYinzuo Jiang 615e859a0e vim-patch:79da22d: runtime(kdl): fix KdlIndent and kdlComment in indent script (vim/vim#15019)
https://github.com/vim/vim/commit/79da22de755e28bd8d4f58fc4bf34cf94f45de63

Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-06-16 12:00:58 +02:00
Christian ClasonandAliaksei Budavei 2f87d363c1 vim-patch:371bab0: runtime(java): Fold multi-line comments with the syntax kind of &fdm (vim/vim#15016)
Also:

- Restore the capability to mark as an error braces nested
  in parens with g:javaInParen.
- Try not to fold top-level-type bodies.  (Defining multiple
  package-private top level types in a single source file is
  not recommended as it can impose order among compilation
  units; so it is assumed that only one such top level type
  is usually defined.)
- Compose ‘method header’ highlighting and block braces
  folding.
- Do not highlight block braces whenever ‘method header’
  highlighting is requested.

This bundling of ‘method headers’ and block braces for
highlighting can be traced back to Vim v5.0; however, no
comment or documentation entry conveys any justification.
For example, it is hard to discover the connection between
block braces for "while", "if", etc., statements and method
body block braces.  The former behaviour can be attained in,
e.g. ~/.vim/after/syntax/java.vim:

------------------------------------------------------------
if exists("g:java_highlight_functions")
    syn clear javaBlock javaInParen
    syn match javaBlockOther "[{}]"
    syn region javaBlock transparent matchgroup=javaBlockStart
	\ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold
    hi def link javaBlockStart javaFuncDef
    hi def link javaBlockOther javaBlockStart

    if exists("g:java_mark_braces_in_parens_as_errors")
	syn match javaInParen contained "[{}]"
    endif
endif
------------------------------------------------------------

Note: Read ‘a method header omitting a _throws_ clause’ for
every ‘method header’ appellation used above.

https://github.com/vim/vim/commit/371bab05947b32f26d1b32922e5dc38343a875bc

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-06-16 12:00:58 +02:00
Christian ClasonandDoug Kearns 191a70f9dd vim-patch:9.1.0492: filetype: Vim-script files not detected by shebang line
Problem:  Vim-script files may not be recognised
Solution: Add shebang line detection (Doug Kearns)

closes: vim/vim#15012

https://github.com/vim/vim/commit/0d4d23dac0a5a77ccb0ebf1dcf646afe0c6886bf

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-06-16 11:45:44 +02:00
zeertzjq 7e65f3757b docs: document 'list' behavior when 'listchars' excludes "tab" (#29360) 2024-06-16 06:08:36 +08:00
zeertzjqandChristian Brabandt c1d463fcaf vim-patch:52f2ff0: runtime(zip): revert unintended change to zip#Write()
This was wrongly included as of patch 1c6734291295bf8aa39577840b40bb
because apparently I messed up the use of git apply :/

https://github.com/vim/vim/commit/52f2ff03636fe120f3c9d00e9b3cdc1da251bd73

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-16 05:52:13 +08:00
zeertzjqandChristian Brabandt 6f1cbfc9ab vim-patch:1c67342: runtime(zip): MS-Windows: handle files with spaces properly
This change does the following 3 things:

1) non need to quote the file to be extracted

The zipfile plugin used to quote and fnameescape() the path to the
file to be extracted. However testing with unzip showed, that while this
works on Linux on Windows you shall not escape the blanks in filenames.

As long as the pathname is properly quoted, this words on Linux and
Windows.

2) reset shellslash (MS-Windows only)

When shellslash is set, filenames to the zip archive will be forward
quoted. However since the filename is eventually handed over to the
unzip command, we need to make sure to use native paths so that the
command will understand what file to open. Therefore, if shellslash is
set (and the shell is cmd.exe), replace any forward slashes by the
expected backslashes

3) style:
Use tabs for the Header, remove a few comments in the s:Escape() and
zip#read() functions

fixes: vim/vim#14998

https://github.com/vim/vim/commit/1c6734291295bf8aa39577840b40bb21a7f27120

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-16 05:51:53 +08:00
zeertzjqandChristian Brabandt c5e3321aa1 vim-patch:f4bc59c: runtime(doc): add another tag for vim-shebang feature (#29356)
related: vim/vim#15011

https://github.com/vim/vim/commit/f4bc59c4f67786e967db48e944c2cce2c0da8dc1

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-15 22:26:36 +08:00
zeertzjqanddkearns bb487ea12e vim-patch:ae321b5: runtime(vim): Update base-syntax, match shebang lines (vim/vim#15011) (#29351)
Match shebang lines in Vim9 and legacy script.

Mark these as an error if they appear anywhere other than the first line
of a legacy-script file.  In Vim9 script these match as normal line
comments rather than an error.

https://github.com/vim/vim/commit/ae321b51f7531b23545d64c3a98ed991a31dd5ee

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-06-15 21:28:23 +08:00
4faad4a950 vim-patch:9.1.0486: filetype: Snakemake files are not recognized
Problem:  filetype: Snakemake files are not recognized
Solution: Detect '*.smk' and Snakefile files as snakemake filetype
          (Riley Bruins)

See:
https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility

closes: vim/vim#14992

https://github.com/vim/vim/commit/82a579e15ad78f4b99d2957300da3076ccc7d378

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-06-15 10:27:59 +02:00
JerryandKuanju Chen 61aabe0730 fix(defaults): default @/Q broken when 'ignorecase' is set (#29343)
Problem:
When 'ignorecase' is set, the default keymap Q and Q would exit visual
mode.

This issue was raised in #28287 and a fix was applied in #28289.

However, `==` operator is subject to user `ignorecase` setting.

Solution:
Switching to `==#` operator would guarantee case sensitive comparison
between visual mode and linewise visual mode.

Co-authored-by: Kuanju Chen <kuanju.chen@mksinst.com>
2024-06-15 10:21:16 +08:00
6e28589e00 docs: misc (#29229)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
Co-authored-by: Jose Pedro Oliveira <jose.p.oliveira.oss@gmail.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-06-15 07:04:27 +08:00
zeertzjqandChristian Brabandt b969e3e0b9 vim-patch:c509c00: runtime(doc): fix wrong helptag for :defer
https://github.com/vim/vim/commit/c509c009bbc07eff678a9239a5813398e180f019

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-15 06:09:11 +08:00
zeertzjqandDoug Kearns a6e01d191a vim-patch:262e25e: runtime(vim): Update base-syntax, match :sleep arg
Match :sleep arg properly including a lone "m" with a leading count.

closes: vim/vim#15003

https://github.com/vim/vim/commit/262e25e5a10438770dc9e23e0d5ffcb116f05d0f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-06-15 06:06:53 +08:00
zeertzjqandChristian Brabandt f557a985ef vim-patch:d6d4e13: runtime(doc): rewrite mkdir() doc and simplify {flags} meaning
related: vim/vim#14991

https://github.com/vim/vim/commit/d6d4e1333659c0d2acee3133819498d014df47de

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-15 06:05:33 +08:00
zeertzjqanddkearns 0600754d8d vim-patch:a3bddb7: runtime(vim): Update base-syntax, match :catch and :throw args (vim/vim#14989)
Match :catch /{pattern}/ and :throw {expr1}.

https://github.com/vim/vim/commit/a3bddb759e77c52431a93a68674790dd02647cd1

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-06-15 06:01:50 +08:00
Christian ClasonandMisho 79ed11f257 vim-patch:79a14c0: runtime(keymap): include Georgian keymap
closes: vim/vim#15002

https://github.com/vim/vim/commit/79a14c061bb7c5caafba09b9244f87be37693cf6

Co-authored-by: Misho <nnamper@gmail.com>
2024-06-14 23:58:27 +02:00
zeertzjq e2ef533025 vim-patch:9.1.0479: fuzzy_match_str_with_pos() does unnecessary list operations
Problem:  fuzzy_match_str_with_pos() does unnecessary list operations.
Solution: Use fuzzy_match() directly (zeertzjq).

closes: vim/vim#14987

https://github.com/vim/vim/commit/2f95ca9fcef8495d60e298ac2cd6d702b90bfb18

N/A patch:

vim-patch:9.1.0478: potential deref of NULL pointer in fuzzy_match_str_with_pos
2024-06-15 04:47:23 +08:00
zeertzjqandglepnir dc4037f612 vim-patch:9.1.0476: Cannot see matched text in popup menu
Problem:  Cannot see matched text in popup menu
Solution: Introduce 2 new highlighting groups: PmenuMatch and
          PmenuMatchSel (glepnir)

closes: vim/vim#14694

https://github.com/vim/vim/commit/40c1c3317d92f8c2adadf744fab72e4458e2a9fa

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-15 04:47:23 +08:00
Mathias Fußenegger aa47af7e69 fix(lsp): tune completion word extraction for decorated labels (#29331)
Problem:

For snippets lsp.completion prefers the label if it is shorter than the
insertText or textEdit to support postfix completion cases but clangd
adds decoration characters to labels. E.g.: `•INT16_C(c)`

Solution:

Use parse_snippet on insertText/textEdit before checking if it is
shorter than the label.

Fixes https://github.com/neovim/neovim/issues/29301
2024-06-14 19:32:34 +02:00
Evgeni Chasnovski 458473acb8 fix(highlight): add StatusLineTerm/StatusLineTermNC to :color vim (#29313)
Problem: both `StatusLineTerm`/`StatusLineTermNC` are now explicitly
  used, but `:color vim` does not set them to the values used in Vim.
  This might be fine if `:color vim` is treated as "the state of default
  color scheme prior the big update", but it seems to be better treated
  as "Vim's default color scheme" (how it is documented in its header).

Solution: add `StatusLineTerm`/`StatusLineTermNC` definitions to
  'runtime/colors/vim.lua'.
  Use explicit foreground colors ('Whte'/'Black') instead of `guifg=bg`
  used in source, as the latter caused some problems in the past (if
  `Normal` is not defined, `nvim_set_hl()` can't recognize `'bg'` as the
  foreground value).
  Also realign the rest of the background conditional highlight groups.
2024-06-14 17:28:49 +08:00
Ilia CholyandMathias Fussenegger 0a9c81d709 refactor(lsp): use metatable for buf_versions (#29304)
This reduces the number of nil checks around buf_versions usage
Test changes were lifted from 5c33815

Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2024-06-14 11:03:58 +02:00
Tama McGlinn 81b372fecd fix(lsp): check for nil response from server (#29196)
this only changes the error message, so that it is clear that
the error is with the LSP server, rather than being a crash inside
nvim runtime scripts. We are already doing a lot of validation,
it's just that nil was being overlooked here.

This fixes issue #27395
2024-06-14 11:02:36 +02:00