Commit Graph
9584 Commits
Author SHA1 Message Date
Maria Solano bcc9242bc7 fix: remove quotes around nil deprecation alternatives (#36047) 2025-10-05 14:39:23 -07:00
Evgeni Chasnovski 98e3a571dd feat(pack): add code actions in confirmation buffer
Problem: No way to granularly operate on plugins when inside
confirmation buffer.

Solution: Implement code actions for in-process LSP that act on "plugin
at cursor":
  - Update (if has updates).
  - Skip updating (if has updates).
  - Delete.

  Activate via default `gra` or `vim.lsp.buf.code_action()`.
2025-10-05 19:20:06 +03:00
Evgeni Chasnovski 2728b4efe0 feat(pack): add [[ and ]] mappings in confirmation buffer
Problem: No easy/robust way to jump between plugin sections.

Solution: Add `[[` and `]]` mappings.
2025-10-05 19:20:05 +03:00
phanium 913b05bf63 fix(lsp): format_item should return string (#36025)
Problem: format_item return two value
Solution: `:h vim.ui.select()` say format_item should return string
2025-10-05 09:00:04 -07:00
zeertzjqandDoug Kearns 91cb1b182b vim-patch:a76ea52: runtime(doc): Use the optional tail command-name spec at :help :sign (#36041)
closes: vim/vim#18489

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-05 22:16:13 +08:00
Maria Solano b938638d2d fix(lsp): deprecate vim.lsp.protocol.Methods (#35998) 2025-10-04 21:09:13 -07:00
zeertzjq 2f35221774 fix(excmd): :trust executed even when inside false condition (#36032)
Problem:  :trust is executed even when inside false condition.
Solution: Make skip_cmd() return true for CMD_trust, as ex_trust() does
          not handle eap->skip itself.
2025-10-05 10:21:44 +08:00
Justin M. Keyes ea124068f2 feat(vim.pack): lockfile support #35827 2025-10-04 12:48:29 -04:00
Evgeni Chasnovski dc8235c48c feat(pack): prefer using revision from lockfile during install
Problem: Installing plugin always pulls latest `version` changes
  (usually from the default branch or "latest version tag"). It is more
  robust to prefer initial installation to use the latest recorded
  (i.e. "working") revision.

Solution: Prefer using revision from the lockfile (if present) during
  install. The extra `update()` will pull the latest changes.
2025-10-04 16:15:54 +03:00
Evgeni Chasnovski cfbc03a954 feat(pack)!: make update() include not active plugins by default
Problem: Running `update()` by default doesn't include not active
  plugins, because there was no way to get relevant `version` to get
  updates from. This might be a problem in presence of lazy loaded
  plugins, i.e. ones that can be "not *yet* active" but still needed to
  be updated.

Solution: Include not active plugins by default since their `version` is
  tracked via lockfile.
2025-10-04 16:13:39 +03:00
Evgeni Chasnovski a31f63f661 feat(pack)!: update get() to return revision regardless of opts.info
Problem: The revision data is returned behind `opts.info` flag because
  it required extra Git calls. With lockfile it is not the case.

Solution: Use lockfile to always set `rev` field in output of `get()`.
2025-10-04 16:13:38 +03:00
Evgeni Chasnovski 2c0b70e559 fix(pack)!: use lockfile in get() for data about non-active plugins
Problem: `get()` doesn't return `spec.version` about not-yet-active
  plugins (because there was no way to know that without `add()`).

Solution: Use lockfile data to set `spec.version` of non-active plugins.
2025-10-04 16:13:36 +03:00
Evgeni Chasnovski d7db552394 feat(pack): add initial lockfile tracking
Problem: Some use cases require or benefit from persistent on disk
  storage of plugin data (a.k.a. "lockfile"):

  1. Allow `update()` to act on not-yet-active plugins. Currently if
    `add()` is not yet called, then plugin's version is unknown
    and `update()` can't decide where to look for changes.

  2. Efficiently know plugin's dependencies without having to read
    'pkg.json' files on every load for every plugin. This is for the
    future, after there is `packspec` support (or other declaration of
    dependencies on plugin's side).

  3. Allow initial install to check out the exact latest "working" state
    for a reproducible setup. Currently it pulls the latest available
    `version.`

  4. Ensure that all declared plugins are installed, even if lazy loaded.
    So that later `add()` does not trigger auto-install (when there
    might be no Internet connection, for example) and there is no issues
    with knowing which plugins are used in the config (so even never
    loaded rare plugins are still installed and can be updated).

  5. Allow `add()` to detect if plugin's spec has changed between
    Nvim sessions and act accordingly. I.e. either set new `src` as
    origin or enforce `version.` This is not critical and can be done
    during `update()`, but it might be nice to have.

Solution: Add lockfile in JSON format that tracks (adds, updtes,
  removes) necessary data for described use cases. Here are the required
  data that enables each point:

    1. `name` -> `version` map.
    2. `name` -> `dependencies` map.
    3. `name` -> `rev` map. Probably also requires `name` -> `src` map
       to ensure that commit comes from correct origin.
    4. `name` -> `src` map. It would be good to also track the order,
       but that might be too many complications and redundant together
       with point 2.
    5. Map from `name` to all relevant spec fields. I.e. `name` -> `src`
       and `name` -> `version` for now. Storing data might be too much,
       but can be discussed, of course.

  This commit only adds lockfile tracking without implementing actual
  use cases. It is stored in user's config directory and is suggested to
  be tracked via version control.

  Example of a lockfile:

  ```json
  {
    # Extra nesting to more future proof.
    "plugins": {
      "plug-a": {
        "ref": "abcdef1"
        "src": "https://github.com/user/plug-a",
        # No `version` means it was `nil` (infer default branch later)
      },
      "plug-b": {
        "dependencies": ["plugin-a", "plug-c"],
        "src": "https://github.com/user/plug-b",
        "ref": "bcdefg2",
        # Enclose string `version` in quotes
        "version": "'dev'"
      },
      "plug-c": {
        "src": "https://github.com/user/plug-c",
        "ref": "cdefgh3",
        # Store `vim.version.Range` via its `tostring()` output
        "version": ">=0.0.0",
      }
    }
  }
  ```
2025-10-04 16:13:32 +03:00
b4513442a1 vim-patch:420923c: runtime(doc): update credits section (#36021)
closes: vim/vim#18485

https://github.com/vim/vim/commit/420923c0c5975c8b049495303bced70ebae50723

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Girish Palya <girishji@gmail.com>
2025-10-04 12:35:53 +00:00
zeertzjqandAliaksei Budavei 8db42b3b86 vim-patch:bfcf638: runtime(java): Make changes for JDK 25 (#36017)
- Add to the list of java.lang classes three new types: IO,
  ScopedValue, and ScopedValue.Carrier.
- Add to the list of java.lang interfaces a new type:
  ScopedValue.CallableOp.
- "Demote" RuntimePermission from the list of java.lang
  class types to javaLangDeprecated.
- Reintroduce supported syntax-preview-feature numbers 455
  and 488 as _a new number_ 507.

References:
https://bugs.openjdk.org/browse/JDK-8353641
https://openjdk.org/jeps/506 (Scoped Values)
https://openjdk.org/jeps/507 (Primitive Types in Patterns etc.)
https://openjdk.org/jeps/512 (Compact Source Files etc.)

closes: vim/vim#18479

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

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-10-04 19:15:48 +08:00
zeertzjqandMaria José Solano b6b80824cc vim-patch:9.1.1819: Cannot configure the inner foldlevel indicator (#36010)
Problem:  Cannot configure the inner foldlevel indicator for the
          foldcolumn
Solution: Add "foldinner" suboption value to the 'fillchar' option
          (Maria José Solano).

closes: vim/vim#18365

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

Co-authored-by: Maria José Solano <majosolano99@gmail.com>
2025-10-03 23:53:29 +00:00
zeertzjqandJan Claußen 2c76a50e20 vim-patch:9.1.1821: filetype: Not all PKL files are recognized (#36008)
Problem:  filetype: Not all PKL files are recognized
Solution: Detect *.pcf as pkl filetype, detect using the pkl-lsp://
          protocol as pkl filetype, include PKL syntax script
          (Jan Claußen)

This adds basic syntax support for the new PKL language by Apple.

What works:
- Shebang support
- Comment support
- Integers (decimal, hex, octal and binary) support
- Floating point support including exponentials
- Basic datatype support
- Unicode escape delimiters
- Escape code support
- String interpolation
- Support up to five pounds for custom delimiters
- Folding of multi-line comments and blocks

What doesn't work:

  The language heavily uses parameterized type declarations, which can get
  very complex. It is very hard to highlight this properly. There is
  official Tree-sitter support for this. Since it is hard to pull this off
  in a vim syntax file, I opted for basic support of the data types.

References:
  https://github.com/apple/pkl-pantry

fixes: vim/vim#18271
closes: vim/vim#18274

https://github.com/vim/vim/commit/67a8f2945e54def2a9a94aad919e4f489595acb7

Co-authored-by: Jan Claußen <jan.claussen10@web.de>
2025-10-04 06:01:16 +08:00
zeertzjqandMao-Yining 0124481c80 vim-patch:0a8b4ef: runtime(log): remove domain highlight (#36002)
The domain highlight is eazy to be confused and useless. Because we can
catch URL as a much obvious syntax.

closes: vim/vim#18467

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

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-10-03 17:30:40 +08:00
zeertzjqandChristian Brabandt 1939ec1763 vim-patch:09b1ce0: runtime(doc): fix typo after commit cfcf1a57cbef (#36001)
related: vim/vim#18452

https://github.com/vim/vim/commit/09b1ce08600bf2b423cb5b3a16952bf183bed1ff

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-03 17:30:24 +08:00
zeertzjq e4d8474ad9 vim-patch:12da242: runtime(new-tutor): fix mismatched line numbers in vim-02-beginner
closes: vim/vim#18466

https://github.com/vim/vim/commit/12da2427c7072d97db39d157e7a991b71b278a40
2025-10-03 16:16:52 +08:00
zeertzjqandRestorerZ c755172a34 vim-patch:9d57fe2: runtime(new-tutor): Updated English new tutor
This updates the new tutor with the changes from commit
b87f133b0724f7328e7dd41dd611af67f4ae3e39

closes: vim/vim#18461

https://github.com/vim/vim/commit/9d57fe278f71117414956a33c9beb1407c420ae2

Link to :checkhealth for clipboard support.

Co-authored-by: RestorerZ <restorer@mail2k.ru>
2025-10-03 16:16:26 +08:00
Yi Ming 18d6436ad2 fix(lsp): inlineCompletion: ignore out-of-range items #35990 2025-10-02 16:00:39 -07:00
Riley Bruins ac15b384a6 refactor(treesitter): use scratch buffer for string parser #35988
This commit changes `languagetree.lua` so that it creates a scratch
buffer under the hood when dealing with string parsers. This will make
it much easier to just use extmarks whenever we need to track injection
trees in `languagetree.lua`. This also allows us to remove the
`treesitter.c` code for parsing a string directly.

Note that the string parser's scratch buffer has `set noeol nofixeol` so
that the parsed source exactly matches the passed in string.
2025-10-02 15:33:18 -07:00
Gregory Anders 8eb0964537 feat(tui): native progress bars for Progress events #35973 2025-10-02 14:51:26 -07:00
9f33b69cfd vim-patch:cfcf1a5: runtime(doc): Clarify use of "noselect" in 'completeopt'
closes: vim/vim#18452

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

Co-authored-by: Girish Palya <girishji@gmail.com>
Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
2025-10-02 11:40:36 +08:00
zeertzjqandHirohito Higashi 3f422cb5eb vim-patch:6e28211: runtime(doc): Tweak documentation style
closes: vim/vim#18462

https://github.com/vim/vim/commit/6e282117c7409af15f33120e67a00c47eefbbba5

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-10-02 11:40:36 +08:00
Sergei Slipchenko a1bc5d0ae6 fix(diagnostics): showing stale diagnostics in handlers #35890
Fixes #35884

Problem: Since `once_buf_loaded` might call a callback passed to it at a
later point (which is it's reason to exist) that callback might end up
referring to stale diagnostics in a handler's `show` function. For
example, if we first call `vim.diagnostic.set` for an unloaded buffer,
then call `vim.diagnostic.reset` and only then load the buffer, we might
still see diagnostics from `vim.diagnostic.set` call, which are stale at
this point.

Solution: only keep one autocommand from the most reset `show` call and
delete it when `hide` is called.
2025-10-01 20:17:55 -07:00
zeertzjqandMiguel Barro d72c805e87 vim-patch:8337d77: runtime(netrw): MS-Windows: fix netrw not being able to navigate to parent folder (#35982)
fixes: vim/vim#18421
closes: vim/vim#18464

https://github.com/vim/vim/commit/8337d77effac6b556a4db1f5dd9f722c48e38a59

Co-authored-by: Miguel Barro <miguel.barro@live.com>
2025-10-02 01:57:53 +00:00
zeertzjqandRestorerZ c12efc50a9 vim-patch:a644b79: runtime(optwin): Update formatting of option descriptions (#35980)
closes: vim/vim#18446

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

Co-authored-by: RestorerZ <restorer@mail2k.ru>
2025-10-02 09:06:41 +08:00
zeertzjqandDoug Kearns 39c0425c4c vim-patch:0977c8b: runtime(vim): Update base syntax, contain user command replacement text (#35979)
Ensure that :command replacement text terminates at the end of the
logical line.

Add :command to the generator exclusion list.

fixes: vim/vim#18414 (@Dougaak)
fixes: vim/vim#18448 (Maxim Kim)
closes: vim/vim#18415

https://github.com/vim/vim/commit/0977c8b03e7eca56bb640acd2fd1c6f5fc825899

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-02 00:41:04 +00:00
zeertzjq 43f7434bd5 vim-patch:014c731: runtime(doc): make :h virtcol() more accurate (#35976)
The current description (especially the "unlimited width" part) is
inaccurate in several ways:
- The size of virtual text can depend on window width. In particular,
  the size of "above" virtual text can be equal to window width.
- A double-width character that doesn't fit adds 1 to the virtual column
  of the following characters.
- The size of 'showbreak' and 'breakindent' is counted.

related: vim/vim#5713
closes: vim/vim#18447

https://github.com/vim/vim/commit/014c731fa50c28c94d56545938b6a05a86234c30
2025-10-01 23:33:36 +00:00
v1nh1shungry 70460d557c fix(lsp): scope inline_completion autocmds to buffer (#35965)
Problem:
Autocmds in inline_completion Completor are not scoped to specific
buffers. When multiple buffers have inline completion enabled, events
(InsertEnter, CursorMovedI, TextChangedP, InsertLeave) in any buffer
trigger callbacks for all Completor instances, causing incorrect
behavior across buffers.

Solution:
Add `buffer = bufnr` parameter to nvim_create_autocmd() calls to make
them buffer-local. Each Completor instance now only responds to events
in its own buffer.
2025-10-01 06:56:56 -07:00
zeertzjq e6b2255ac7 vim-patch:4edaf89: runtime(doc): improve preinserted() doc
Change the second "if" to "because", otherwise it may be misinterpreted
that preinserted() can return non-zero just because these options are
set.

closes: vim/vim#18409

https://github.com/vim/vim/commit/4edaf8923335504c31810dc4c5213eaba84e7898
2025-09-30 09:32:33 +08:00
zeertzjqandGirish Palya 7b9c063d11 vim-patch:9.1.1797: completion: autocompletion can be improved
Problem:  completion: autocompletion can be improved
Solution: Add support for "longest" and "preinsert" in 'autocomplete';
          add preinserted() (Girish Palya)

* Add support for "longest" in 'completeopt' when 'autocomplete'
  is enabled. (Note: the cursor position does not change automatically
  when 'autocomplete' is enabled.)
* Add support for "preinsert" when 'autocomplete' is enabled. Ensure
  "preinsert" works the same with and without 'autocomplete'
* introduce the preinserted() Vim script function, useful for defining
  custom key mappings.

fixes: vim/vim#18314
closes: vim/vim#18387

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

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-30 09:32:33 +08:00
zeertzjqandEisuke Kawashima 4896178863 vim-patch:05e44e9: runtime(tex): add amsmath support to tex syntax script (#35958)
Problem:  tex syntax file does not support some of the math equation
          environments provided by amsmath.sty, therefore well-formed
          snippet is highlighted as "texBadMath"
Solution: add the environments

closes: vim/vim#18433

https://github.com/vim/vim/commit/05e44e978fc7acb5314ce16f5a41d8e75d34bd21

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-09-30 08:26:55 +08:00
zeertzjqandChristian Brabandt af2932e2dc vim-patch:992e307: runtime(doc): update list of modifiers at :h expand() (#35957)
fixes: vim/vim#18435

https://github.com/vim/vim/commit/992e30774f5ec81f53d5554c42137d3c85999081

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-30 08:26:40 +08:00
Maria Solano 9da316fcc4 fix(docs): force blank line after numbered list items #35950
Workaround until the vimdoc parser supports numbered list-items:
https://github.com/neovim/tree-sitter-vimdoc/issues/144
2025-09-28 21:01:20 -07:00
2739ab485e docs: json, tests, lsp #35754
Close #35926
Close #35818

Co-authored-by: skewb1k <skewb1kunix@gmail.com>
Co-authored-by: glepnir <glephunter@gmail.com>
2025-09-28 20:57:59 -07:00
zeertzjqandDoug Kearns 11b6fcdfa6 vim-patch:ae20d73: runtime(vim): Update base syntax, improve line-continuation skip patterns
Factor out the common prefix in line-continuation :syn-skip patterns.

closes: vim/vim#18416

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:23:42 +08:00
zeertzjqandDoug Kearns 7c9a4a2a71 vim-patch:f4a6acd: runtime(vim): Update base syntax, allow Vim9 :echo tail comments
- Match comments after Vim9 :echo and :execute.
- Match comments after Vim9 and legacy :eval.

closes: vim/vim#18420

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:19:07 +08:00
zeertzjqandDoug Kearns 2cd899f730 vim-patch:7bb733f: runtime(vim): Update base syntax, match null_tuple literal
closes: vim/vim#18404

https://github.com/vim/vim/commit/7bb733f6bf727efe3455c3355a38430ee9cd9cc7

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:17:13 +08:00
zeertzjqandDoug Kearns e9d8d1b061 vim-patch:57d243e: runtime(vim): Update base syntax, fix indented Vim9 :redir highlighting
Include post operator whitespace in the Vim9 variable assignment
lookahead so that "redir =>" doesn't match as an assignment.

fixes: vim/vim#18319
closes: vim/vim#18323

https://github.com/vim/vim/commit/57d243e27da804489e256add0398efb9310a4353

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:16:50 +08:00
zeertzjqandDoug Kearns 6b0365ae2f vim-patch:6f97624: runtime(vim): Update base syntax, fix Vim9 :for loop variable highlighting
Highlight the iteration variable's type in Vim9 :for {var} loops.

Reported by Aliaksei Budavei.

fixes: vim/vim#17961
closes: vim/vim#18163

https://github.com/vim/vim/commit/6f97624e115eb793e5b486244683ecb86959d859

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:16:17 +08:00
0ebb2ec4e4 vim-patch:4de931d: runtime(vim): Update base syntax, match enum constructor type args
closes: vim/vim#17840

https://github.com/vim/vim/commit/4de931daae88784aacd1dc4ecd92ca6fb4a45977

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-09-29 09:15:17 +08:00
zeertzjqandDoug Kearns 22f6b9d11f vim-patch:72473ce: runtime(vim): Update base syntax, match generic functions
Match Vim9 generic functions, added in vim/vim#17313.

closes: vim/vim#17722

https://github.com/vim/vim/commit/72473ce9f8e111072360a7589e2c5bee079305da

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:14:39 +08:00
zeertzjqandAliaksei Budavei c07a24e31c vim-patch:91ac18c: runtime(java): Recognise _module_ import declarations (#35947)
After two preview proposals (JEPs 476 and 494), _module_
import declarations are now a part of the language (JDK 25).

Reference:
https://openjdk.org/jeps/511

closes: vim/vim#18424

https://github.com/vim/vim/commit/91ac18cb036f87ceff83bf8d05f7c03b50b94633

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-09-29 01:03:42 +00:00
zeertzjq 0fa0717d4e vim-patch:9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)
Problem:  'nowrap' in a modeline may hide malicious code.
Solution: Forcibly use '>' as 'listchars' "extends" if 'nowrap' was set
          from a modeline (zeertzjq).

Manual `:setlocal nowrap` disables this behavior.  There is a separate
problem with `:set nowrap` that also applies to some other options.

related: vim/vim#18214
related: vim/vim#18399
closes: vim/vim#18425

https://github.com/vim/vim/commit/9d5208a9313dd8b0d62c97af5485f1715af98a1c

Cherry-pick some test_modeline.vim changes from patches 9.0.{0363,0626}.
2025-09-29 07:48:46 +08:00
glepnir fcf752476a fix(cmd): :update writes new file buffers only for real files #35939
Problem: :update should write new file buffers, but previous fix
affected special buffer types (acwrite, nofile, etc.).

Solution: Add bt_nofilename() check to only write new files for
buffers representing real filesystem paths.
2025-09-27 20:28:05 -07:00
Maria Solano 03032d1f73 fix(lsp): remove vim.lsp.diagnostic.reset() (#35938) 2025-09-27 14:53:00 -07:00
Maria Solano c5c6ddba91 feat(lsp): document method types (#35934) 2025-09-27 14:52:30 -07:00