Commit Graph

9441 Commits

Author SHA1 Message Date
zeertzjq
99d16af86a vim-patch:e8bbdb9: runtime(doc): Add :defe[r] shortname spec and tag (#35741)
closes: vim/vim#18281

e8bbdb90e4

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-13 01:39:53 +00:00
zeertzjq
c7a9404019 vim-patch:becf184: runtime(misc): removing saccarosium from maintainer list (#35740)
closes: vim/vim#17848

becf1844e0

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 01:18:18 +00:00
zeertzjq
a47ef74ff1 docs: add some missing items to vim_diff.txt (#35731) 2025-09-13 08:40:12 +08:00
zeertzjq
cf9b7a37cc vim-patch:9.1.1753: defaults: 'diffopt' option value can be improved (#35727)
Problem:  defaults: 'diffopt' option value can be improved
Solution: Update diffopt defaults to include "indent-heuristic" and
          "inline:char" (Yee Cheng Chin)

The default diff options have not been updated much despite new
functionality having been added to Vim.

- indent-heurstic: This has been enabled by default in Git since
  33de716387 in 2017. Given that Vim uses xdiff from Git, it makes sense
  to track the default configuration from Git.

- inline:char: This turns on character-wise inline highlighting which is
  generally much better than the default inline:simple. It has been
  implemented since vim/vim#16881 and we have not seen reports of any issues
  with it, and it has received good feedbacks.

closes: vim/vim#18255

976b365305

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-09-12 03:57:05 +00:00
zeertzjq
0f3fef9bab vim-patch:15070ee: runtime(python): Update syntax, fix pythonEllipsis pattern (#35724)
fixes: vim/vim#18263
closes: vim/vim#18264

15070eee2f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-12 00:17:04 +00:00
zeertzjq
c06f0970b0 vim-patch:a0f37db: runtime(doc): use a single pattern in :h 'incsearch' example (#35721)
related: https://github.com/vim/vim/pull/18262#issuecomment-3277008408
closes: vim/vim#18270

a0f37dbbf4
2025-09-11 23:08:02 +00:00
altermo
2e70f3522b docs: plugins.txt #35680
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-10 21:16:13 -07:00
zeertzjq
5377cd34a9 vim-patch:5a9ef93: runtime(doc): Update autocmd examples for command line autocompletion (#35713)
In Windows [/] should be escaped [\/]:

	autocmd CmdlineChanged [:\/\?] call wildtrigger()

This updated example works both in Linux and Windows.

closes: vim/vim#18262

5a9ef93b2c

Co-authored-by: Maxim Kim <habamax@gmail.com>
2025-09-11 08:02:47 +08:00
zeertzjq
c4ecb7256b vim-patch:b2c8848: runtime(doc): improve docs related to 'autocomplete'
Manual completion can still be used when 'autocomplete' is set, so
saying "active" is better than "enabled".

closes: vim/vim#18261

b2c8848055
2025-09-11 07:23:29 +08:00
zeertzjq
5a7586a109 vim-patch:9.1.1750: completion: preinserted text highlighed using ComplMatchIns
Problem:  completion: preinserted text highlighed using ComplMatchIns
Solution: Use highlighting group PreInsert and update the documentation
          (Girish Palya).

When "preinsert" is included in 'completeopt', only the PreInsert
highlight group should be applied, whether autocompletion is active or not.
Previously, ComplMatchIns was used when autocompletion was not enabled.

Related to https://github.com/vim/vim/pull/18213.

closes: vim/vim#18254

2525c56e42

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-11 07:23:28 +08:00
zeertzjq
9076fdc123 fix(runtime): add "Added", "Changed", "Removed" to "vim" colorscheme (#35704)
These were added to syncolor.vim in Vim patch 9.1.0016.
2025-09-11 06:55:43 +08:00
Jan Edmund Lazo
58ee249c2c vim-patch:9.0.0729: the rightleft and arabic features are disabled
Problem:    The rightleft and arabic features are disabled.
Solution:   Re-enable the features, some users want to use the functionality.

ae906c8b1b

bug-reports -> bug-report

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-09-09 23:45:44 -04:00
zeertzjq
739fc26d77 vim-patch:80981e1: runtime(doc): mention 'findfunc' at :h :find (#35697)
fixes: vim/vim#18250
related: vim/vim#18253

80981e1db9

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-10 07:02:53 +08:00
bfredl
b95aedeae4 Merge pull request #35536 from bfredl/skipahead
perf(highlight): allow decoration providers to skip ranges without data

fixes #35644
2025-09-09 20:53:31 +02:00
bfredl
5119c03be7 fix(treesitter): use subpriorities for tree ordering
This partially reverts 0b8a72b739,
that is unreverts 15e77a56b7

"priority" is an internal neovim concept which does not occur in shared
queries. Ideally a single priority space should eventually be enough
for our needs. But as we don't want to poke at the usages of
priorities right now in the wider ecosystem,
introduce the "subpriorities" so that treesitter code can distinguish
highlights of the same priorities with different tree nesting depth.

This mainly affects `injection.combined` as parent-tree nodes might appear
in the middle of child-tree nodes which otherwise is not possible.
2025-09-09 12:56:49 +02:00
bfredl
f9d2115a35 perf(highlight): allow decoration providers to skip ranges without data
Continuing the work of #31400

That PR allowed the provider to be invoked multiple times per line.
We want only to do that when there actually is more data later on the
line. Additionally, we want to skip over lines which contain no new
highlight items. The TS query cursor already tells us what the next
position with more data is, so there is no need to reinvoke the range
callback before that.

NB: this removes the double buffering introduced in #32619 which
is funtamentally incompatible with this (nvim core is supposed to keep
track of long ranges by itself, without requiring a callback reinvoke
blitz). Need to adjust the priorities some other way to fix the same issue.
2025-09-09 12:54:04 +02:00
zeertzjq
12868474db vim-patch:77cfc49: runtime(python): highlight ellipsis literals
The ellipsis literal (`...`) can be used in multiple contexts:

- Placeholders:     `class Foo: ...`
- Containers:       `Tuple[int, ...]`
- Assignments:      `x = ...`

This is a trickier pattern to match because we can't rely on keyword
boundaries, so we instead look for exactly three dots (`...`).

This does mean that we will match the `...` portion of `x...x`, which
isn't valid Python syntax, but I think that's an acceptable trade-off
that avoids making this pattern much more complex.

Reference:
- https://docs.python.org/3/library/constants.html#Ellipsis

closes: vim/vim#18107

77cfc49060

Co-authored-by: Jon Parise <jon@indelible.org>
2025-09-09 11:39:23 +08:00
zeertzjq
53e78bec7c vim-patch:6bb16d2: runtime(python): Update syntax file, fix f-string float highlighting
Fix matching of floats at the beginning of an f-string replacement
field, immediately after the opening brace.

The existing pattern, using `\zs`, cannot consume the already matched
`{` so use a lookbehind instead.

See comment: https://github.com/vim/vim/pull/17962#issuecomment-3201550443

closes: vim/vim#18220

6bb16d2cee

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-09 11:37:12 +08:00
zeertzjq
eb19206e03 vim-patch:9.1.1742: complete: preinsert does not work well with 'autocomplete' (#35692)
Problem:  complete: preinsert does not work well with preinsert
Solution: Make "preinsert" completeopt value work with autocompletion
          (Girish Palya)

This change extends Insert mode autocompletion so that 'preinsert' also
works when 'autocomplete' is enabled.

Try: `:set ac cot=preinsert`

See `:help 'cot'` for more details.

closes: vim/vim#18213

fa6fd41a94

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-09 03:35:41 +00:00
zeertzjq
c951fa9eeb Merge pull request #35690 from zeertzjq/vim-9.1.1738
vim-patch:9.1.{1738,1744},d7d6a6f
2025-09-09 09:14:43 +08:00
notomo
bbfcde3ab2 fix(lsp): check if buffer is valid in scheduled client:on_attach() #35672
Problem:
lsp._capability.is_enabled() can raise error if buffer is invalid in client:on_attach().

- error
```
./build/bin/nvim --clean --headless +"source ./minimal.lua"
vim.schedule callback: ...omo/workspace/neovim/runtime/lua/vim/lsp/_capability.lua:209: scoped variable: Invalid buffer id: 2
stack traceback:
        [C]: in function '__index'
        ...omo/workspace/neovim/runtime/lua/vim/lsp/_capability.lua:209: in function 'is_enabled'
        ...e/notomo/workspace/neovim/runtime/lua/vim/lsp/client.lua:1108: in function <...e/notomo/workspace/neovim/runtime/lua/vim/lsp/client.lua:1101>
```
- reproduction minimal.lua
```lua
vim.opt.runtimepath:append("/path/to/nvim-lspconfig/")
vim.lsp.enable("lua_ls")

vim.cmd.tabedit("runtime/lua/vim/_defaults.lua")
vim.api.nvim_create_autocmd({ "LspAttach" }, {
  group = vim.api.nvim_create_augroup("test", {}),
  callback = function()
    vim.cmd.tabedit("runtime/lua/vim/_defaults.lua")
    local bufnr = vim.api.nvim_get_current_buf()
    vim.api.nvim_buf_delete(bufnr, { force = true })
  end,
})
```

Solution:
Check whether buffer is valid.
2025-09-08 17:52:25 -07:00
zeertzjq
327a2d57eb vim-patch:d7d6a6f: runtime(doc): Improve doc for cmdline-autocompletion
- Address https://github.com/vim/vim/pull/18219#issuecomment-3264634710
- Make the cmdline-autocompletion help more user friendly

closes: vim/vim#18245

d7d6a6f05a

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-09 08:30:34 +08:00
Justin M. Keyes
1cb1cfead0 docs: drop "xx.vim" syntax help-tags #35623
Problem:
These "foo.vim" syntax tags add 100+ useless tags to help. In
particular, "progress.vim" is the first match for "progress", which not
the result anyone is actually looking for, since Nvim 0.12 gained the
"progress-message" feature.

Solution:
Drop the "foo.vim" syntax tags. The "ft-foo" tags are more appropriately
named.
2025-09-07 20:45:22 -07:00
zeertzjq
29f30ad91c vim-patch:9.1.1679: unclear what key causes CmdlineLeave autocommand (#35677)
Problem:  unclear what key causes CmdlineLeave autocommand
Solution: Set |v:char| to the key (Girish Palya).

related: vim/vim#17806
closes: vim/vim#18063

ba9551d131

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-08 11:40:12 +08:00
Evgeni Chasnovski
0c49167490 docs: adjust *lua-plugin-init* wording #35600
Problem: Unnecessarily anecdotal wording.

Solution: Adjust wording while delivering the same message.
2025-09-07 15:04:09 -07:00
Evgeni Chasnovski
fa3920282d fix(pack): handle Git environment variables #35626
Problem: Some environment variables which are useful when working inside
  a bare repository can affect any Git operation.

Solution: Explicitly unset problematic environment variables.
2025-09-07 14:42:09 -07:00
skewb1k
448f15ca39 feat(json): pretty-format (indent) with vim.json.encode() #35424
Problem:
There is no straightforward way to pretty-print objects as JSON.
The existing `vim.inspect` outputs LON.

Solution:
Introduce an `indent` option for `vim.json.encode()` which enables
human-readable output with configurable indentation.

Adapts PR to upstream: openresty/lua-cjson#114
2025-09-07 14:38:27 -07:00
Evgeni Chasnovski
7853cde29a feat(pack): vim.pack.get() gets VCS info #35631
Problem:
Force resolve `spec.version` overrides the information about whether
a user supplied `version` or not. Knowing it might be useful in some use
cases (like comparing to previously set `spec` to detect if it has
changed).

Solution:
Do not resolve `spec.version`. This also improves speed when triggering
events and calling `get()`.
- Place default branch first when listing all branches.
- Use correct terminology in `get_hash` helper.
- Do not return `{ '' }` if there are no tags.

Problem:
There is no way to get more information about installed plugins, like
current revision or default branch (necessary if resolving default
`spec.version` manually). As computing Git data migth take some time,
also allow `get()` to limit output to only necessary set of plugins.

Solution:
- introduce arguments to `get(names, opts)`, which follows other
  `vim.pack` functions. Plugin extra info is returned by default and
  should be opt-out via `opts.info = false`.
  - Examples:
    - Get current revision: `get({ 'plug-name' })[1].rev`
    - Get default branch: `get({ 'plug_name' })[1].branches[1]`
- `update()` and `del()` act on plugins in the same order their names
  are supplied. This is less surprising.
- default `opts.info` to `true` since this simplifies logic for the
  common user, while still leaving the door open for a faster `get()` if
  needed.
2025-09-07 09:59:31 -07:00
zeertzjq
4521f6da7d vim-patch:1ed2ff7: runtime(m4): Remove m4Type and leftover m4Function in syntax script
closes: vim/vim#18223

1ed2ff77d8

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-09-07 21:22:52 +08:00
zeertzjq
91fa613fad vim-patch:6505dc6: runtime(nu): Add new Nushell runtime files
See: https://github.com/elkasztano/nushell-syntax-vim

Thanks to Pete Cruz (@Petesta) for promoting this addition.

closes: vim/vim#18208

6505dc69d3

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-07 21:22:12 +08:00
zeertzjq
30dc9934a6 vim-patch:efb913a: runtime(m4): Remove m4Function
closes: vim/vim#18211

efb913a4f5

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-09-07 21:21:33 +08:00
Maria José Solano
21f2c2b19c docs(lsp): tweak inline_completion.get code snippet #35657
`replace_keycodes` is true if `expr` is set, and "Accept" is a better
term to describe the keymap.
2025-09-06 16:12:32 -07:00
Lewis Russell
ef48104c31 fix(types): nvim_get_win_config return type #35639 2025-09-06 14:19:12 -07:00
Phạm Bình An
798bb3f66a docs: details dict in nvim_buf_get_extmark() #35289
Problem: The document of nvim_buf_get_extmark currently lacks the
following:
- "details" directory: nvim_buf_get_extmarks() allows an option details
  to get a "details" directory in result, but it doesn't mention where
  that "details" directory is, what fields does it have.

Solution: Add docs for "details" directory in nvim_buf_get_extmarks()
2025-09-06 13:38:31 -07:00
zeertzjq
63b53c8d15 vim-patch:dfcd9ac: runtime(ada): mark as unmaintained, fix a few issues with the ftplugin
closes: vim/vim#18178

dfcd9ac120

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-06 08:16:23 +08:00
zeertzjq
26c9f31b91 vim-patch:f737ff8: runtime(hamster): do not globally set ignorecase
related: vim/vim#15772

f737ff8c88

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-06 08:15:58 +08:00
zeertzjq
54208da5c4 vim-patch:510ca80: runtime(m4): Improve comments, distinguish them from #-lines
closes: vim/vim#18200

510ca80c58

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-09-06 08:15:37 +08:00
zeertzjq
b399a13f70 vim-patch:f1212a7: runtime(python): Do not match contained identifiers as pythonType
related: vim/vim#17962
closes: vim/vim#18206

f1212a7b45

Co-authored-by: Rob B <github@0x7e.net>
2025-09-06 07:08:23 +08:00
zeertzjq
665d5d80ac vim-patch:d2b28dd: runtime(python): add syntax support inside f-strings
fixes: vim/vim#14033
closes: vim/vim#17962

d2b28ddfc2

Co-authored-by: Rob B <github@0x7e.net>
2025-09-06 07:07:34 +08:00
Evgeni Chasnovski
069be91106 feat(pack): use nvim_echo{kind=progress} to report progress #35625
Problem: Progress reports use plain `nvim_echo()` with manually
  constructed messages and populate history on every call.

Solution: Use `nvim_echo()` with newly added `kind=progress` which (at
  least for now) is meant to be a unified interface for showing progress
  report. Also save in history only first and last progress report
  messages.
2025-09-05 07:12:28 -07:00
zeertzjq
0bafbe872b vim-patch:9.1.1732: filetype: .inc file detection can be improved (#35635)
Problem:  filetype: .inc file detection can be improved
Solution: Update filetype detection for Pascal and BitBake code
          (Martin Schwan).

Fix the detection of .inc files containing Pascal and BitBake code:

- the concatenated string, merged from three lines, only contains one
  beginning and the pattern "^" would not match as expected. Use a range()
  loop to iterate each line string individually. This way, the pattern "^"
  works for beginning of lines.

- improve BitBake include file detection by also matching forward-slashes
  "/" in variable names and assignment operators with a dot ".=" and "=.".
  Valid examples, which should match, are:

    PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
    MACHINEOVERRIDES =. "qemuall:"
    BBPATH .= ":${LAYERDIR}"

- parse twenty instead of just three lines, to accommodate for potential
  comments at the beginning of files

closes: vim/vim#18202

9fd1a657d2

Co-authored-by: Martin Schwan <m.schwan@phytec.de>
2025-09-05 17:22:24 +08:00
Justin M. Keyes
2affb8373f docs: api events 2025-09-04 00:11:52 -04:00
Justin M. Keyes
9c3099f0cf docs: lsp, misc
- Problem: It's not clear for new plugin developers that `:help` uses
  a help-tags file for searching the docs, generated by `:helptags`.
  - Solution: Hint to the |:helptags| docs for regenerating the tags
    file for their freshly written documentation.

Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
2025-09-03 23:03:51 -04:00
zeertzjq
17da1ad8f4 vim-patch:9.1.1730: filetype: vivado journal/log files are not recognized (#35613)
Problem:  filetype: vivado journal/log files are not recognized
Solution: Detect vivado*.{jou,log} as tcl filetype (Wu Zhenyu).

closes: vim/vim#18191

9a6cafdc1c

Also fix missing anchor in the pattern from the port of patch 9.1.1602.

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2025-09-04 07:16:47 +08:00
zeertzjq
967d226f96 vim-patch:f165798: runtime(m4): update syntax script
This change does the following to the M4 syntax script:

- In M4 there are no "strings" in the usual sense. Instead, M4 has
  quotes, but the text inside a quoted region is rescanned just like
  outside, and quotes can be nested.
- The old m4String region was misleading and removed. A new m4Quoted
  region reflects proper quoting semantics.
- Removed a duplicate highlight rule.
- Fixed a typo in a highlight group name (m4builtin → m4Builtin).
- Added a reference link to the POSIX M4 specification.
- Removed outdated maintainer URL.

closes: vim/vim#18192

f165798184

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-09-03 21:28:11 +08:00
zeertzjq
c4c9daf7e2 vim-patch:e0704a3: runtime(keymap): Add transliteration (buckwalter) arabic keymap
References:
- https://en.wikipedia.org/wiki/Buckwalter_transliteration
- http://qamus.org/transliteration.htm

closes: vim/vim#18186

e0704a3593

Co-authored-by: Rafael Ketsetsides <rketsetsides@gmail.com>
2025-09-03 21:27:24 +08:00
zeertzjq
1ae09bf545 vim-patch:4c39d0c: runtime(doc): quote partial urls with a backtick (#35606)
closes: vim/vim#18194

4c39d0cc9b

Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
2025-09-03 09:07:01 +08:00
Shadman
79bfeecdb4 feat(editor)!: insert-mode ctrl-r should work like paste #35477
Problem:
insert-mode ctrl-r input is treated like raw user input, which is almost
never useful. This means any newlines in the input are affected by
autoindent, etc., which is:
- slow
- usually breaks the formatting of the input

Solution:
- ctrl-r should be treated like a paste, not user-input.
- does not affect `<c-r>=`, so `<c-r>=@x` can still be used to get the
  old behavior.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-09-01 21:05:16 -07:00
zeertzjq
b4d21f141c vim-patch:71149df: runtime(java): Dismiss "g:markdown_fenced_languages" for Java buffers (#35596)
No support is provided or planned for language recognition
in code snippets of documentation comments.  Requesting to
load arbitrary syntax plugins with the aid of the concerned
variable is therefore wasteful in general and erroneous when
paired languages ":syn-include" one another without taking
steps to manage circularity.

related: vim/vim#17308
related: vim/vim#17220
closes: vim/vim#18172

71149dfec5

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-09-02 08:28:07 +08:00
Justin M. Keyes
a5e7ccc329 docs: Lua plugin development guide 2025-09-01 19:42:45 -04:00