Commit Graph

5237 Commits

Author SHA1 Message Date
Justin M. Keyes
fe4faaf81a docs: dev-quickstart, dev-test #36304 2025-10-24 17:24:51 -07:00
Justin M. Keyes
a983e69708 docs: dev_tools, dev_arch 2025-10-24 02:14:29 +02:00
Justin M. Keyes
6f8ef3bdb4 docs(faq): h3 => h2 2025-10-24 02:07:37 +02:00
Justin M. Keyes
7838c242e9 docs: types, news, lua-plugin
- mention "lua_ls", not "luals". https://github.com/neovim/neovim/discussions/36182

Co-authored-by: Maria Solano <majosolano99@gmail.com>
2025-10-24 02:07:37 +02:00
Justin M. Keyes
4129fa5bac Merge #36299 improve PackChanged event 2025-10-23 18:29:24 -04:00
zeertzjq
67832710a5 fix(terminal): wrong row in TermRequest with full scrollback (#36298)
Problem:  Wrong row in TermRequest with full scrollback.
Solution: Subtract by the number of lines deleted from scrollback.
2025-10-24 06:01:13 +08:00
Evgeni Chasnovski
83f7d98518 docs(pack): add plugin hooks example
Problem: No examples of how to use `PackChanged[Pre]` for plugin hooks.

Solution: Add examples of creating plugin hooks.
2025-10-23 20:28:13 +03:00
Evgeni Chasnovski
a9db6ec6fa feat(pack): add active field to PackChanged event data
Problem: Inside `PackChanged[Pre]` callbacks it might be useful to tell
  if the affected plugin is active or not. It is already possible via
    extra `vim.pack.get({ 'plug-name' })[1].active`, but it is not quite
    user-friendly for something that might be needed frequently in real
    world use cases.

Solution: Supply extra `active` event data field.
2025-10-23 17:50:03 +03:00
Robert
cf48741227 docs(vimfn): getcwd() behavior #36222 2025-10-21 10:40:02 -07:00
Maria Solano
c90135d6e5 docs(ui): 'pumborder' #36255 2025-10-20 15:10:03 -07:00
Calum Smith
d3f5437542 docs(lsp): specify exactly how vim.lsp.config merges configs (#36214)
docs(lsp): specify exactly how `vim.lsp.config` merges configs…

Problem:

It already says that the behaviour is defined by `vim.tbl_deep_extend`,
but that can mean very different things depending on the `behavior`
parameter.

Solution:

Specify that it uses "force".
2025-10-16 18:43:15 -07:00
Mathias Fußenegger
cdc3702f8d revert "fix(lsp): _get_workspace_folders does not handle root_dir() function" #36183
This reverts commit 97ab24b9c7.

See discussion in https://github.com/neovim/neovim/pull/36071
2025-10-14 19:26:01 -07:00
Tomasz N
106cacc93b fix(pumblend): do not apply special highlight attrs from bg layer #36186
Problem: if pumblend >= 50, non-whitespace menu character gets italic,
bold, underline (or similar) attribute from the cell underneath, which
is not really useful and can't be "blended".

Solution: drop highlight combination for that special case (@zeertzjq
on #36133).

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-10-14 18:48:27 -07:00
zeertzjq
c8d6f3cf8a vim-patch:c95e143: runtime(doc): Miscellaneous documentation fixes (#36187)
- Use full option name for 'clipboard' at :help :put.
- Minor rewordings, typo fixes, and formatting fixes.

related: vim/vim#18453
closes: vim/vim#18572

c95e143819

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-14 23:09:25 +00:00
zeertzjq
dbddd5989a vim-patch:310082f: runtime(rst): Add support for rst_minlines
Following the approach used in other syntax definitions, add support for
defining the "syntax sync minlines=..." values for rst files in the
users' ~/.vimrc files, to allow the users to adjust that value in case
syntax highlighting stops working for some of the files they edit.

related: vim/vim#18566

310082f3cf

Co-authored-by: Dragan Simic <dsimic@manjaro.org>
2025-10-14 10:42:43 +08:00
zeertzjq
fc74b9fb34 vim-patch:83eb1da: runtime(doc): Normalise formatting of builtin function descriptions (#36172)
- Column align tags
- Move tags to the same line as the function signature
- Move descriptions to the line below the function signature
- Add missing hyperlinks to builtins in the description text

closes: vim/vim#18478

83eb1da19e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-14 02:23:26 +00:00
zeertzjq
c5ed5504f4 vim-patch:6ab4547: runtime(doc): fix inconsistent alignment (#36171)
closes: vim/vim#18562

6ab45471d4
2025-10-14 01:51:23 +00:00
zeertzjq
92b834fc7a vim-patch:9.1.1849: CTRL-F and CTRL-B don't work in more prompt
Problem:  CTRL-F and CTRL-B don't work in more prompt
Solution: Make CTRL-F and CTRL-B scroll by a screen down/up
          (Bjoern Foersterling)

closes: vim/vim#18545

fcf4c435af

Co-authored-by: bfoersterling <bjoern.foersterling@gmail.com>
2025-10-14 08:42:06 +08:00
zeertzjq
a65202e6bd vim-patch:partial:c58f91c: runtime(doc): Whitespace updates (#36160)
Use double sentence spacing and wrap lines at 'textwidth'.  Code
examples and tables were not wrapped unless this had already been done
locally.

closes: vim/vim#18453

c58f91c035

Fix incorrect docs in :h ModeChanged.
Cherry-pick :h bufnr() changes from patch 8.1.2080.

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-13 08:53:21 +00:00
zeertzjq
83c7193c11 vim-patch:9.1.1850: completion: not triggered after i_Ctrl-W/i_Ctrl-U (#36156)
Problem:  completion: not triggered after i_Ctrl-W/i_Ctrl-U
Solution: Trigger autocomplete when entering Insert mode
          (Girish Palya).

fixes: vim/vim#18535
closes: vim/vim#18543

da2dabc6f7

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-10-13 00:08:53 +00:00
zeertzjq
b0edab3631 vim-patch:40dec46: runtime(doc): Replace rotted URL links (#36151)
Both links to libXpm and mysyntax.vim are up but the listed
libXpm version is not offered anymore and mysyntax.vim is no
longer served at all.  The link for searching dictionary
extensions of Apache OpenOffice is broken; an alternative
link can be discovered from the home page.  Finally, the
English dictionaries Apache OpenOffice extension is probably
gone for good (is it incompatible with more recent versions
of the suite?) as its page neither available directly nor
discoverable through search.

closes: 18549

40dec4609d

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-10-13 07:24:58 +08:00
Tomas Slusny
c9b74f8b7e fix(difftool): ensure split layout, use systemlist #36145
- Always open the right window to the right, regardless of 'splitright'
  setting, ensuring the left window is always leftmost.
- Use `vim.fn.systemlist` for diffr output to avoid manual splitting.
- Add a test to verify window layout consistency with 'splitright' and
  'nosplitright' options.
- Escape quotes in git difftool example properly.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2025-10-12 05:11:27 +00:00
zeertzjq
f4e4799f27 docs: small fixes (#36146)
Close #35989
Close #36031
Close #36107

Co-authored-by: Kieran Moy <kfatyuip@gmail.com>
Co-authored-by: William Sprent <william@sprent.dk>
Co-authored-by: David Briscoe <43559+idbrii@users.noreply.github.com>
2025-10-12 12:16:14 +08:00
glepnir
072f126453 fix(ui): 'pumborder' parsing, shadow #36127
Problem:
1. Setting `pumborder=+,+,+,+,+,+,+,+` failed to render the custom
   border characters correctly. The issue occurred in `parse_winborder()`
   where it incorrectly used `p_winborder` instead of the `border_opt`
   parameter when the option value didn't contain commas.
2. In `pum_redraw()`, calling `parse_border_style()` directly with the
   option string failed to parse comma-separated border characters.
3. Missing documentation for PmenuShadow and PmenuShadowThrough
   highlight groups used by the shadow border style.
4. Coverity reports CID 631420: passing WinConfig (480 bytes) by value
   in `grid_draw_border()`.
5. crash when using `shadow` value on pumborder.

Solution:
1. Fix `parse_winborder()` to use `border_opt` parameter consistently,
   ensuring the correct option value is parsed regardless of which
   option (winborder/pumborder) is being set.
2. Update `pum_redraw()` to call `parse_winborder()` instead of
   `parse_border_style()`, properly handling both predefined styles
   and custom comma-separated border characters.
3. Add documentation for PmenuShadow (blended shadow areas) and
   PmenuShadowThrough (see-through corners) highlight groups.
4. Change `grid_draw_border()` to accept WinConfig by pointer.
5. When the "shadow" style is used, no additional row and column offset
   is applied, and the border width is reduced.
2025-10-11 19:48:27 -07:00
Tomas Slusny
fec02ae8e4 feat(plugins): nvim.difftool can compare directories #35448
Problem:
Built-in diff mode (nvim -d) does not support directory diffing
as required by git difftool -d. This makes it difficult to compare
entire directories, detect renames, and navigate changes efficiently.

Solution:
Add a DiffTool plugin and command that enables side-by-side diffing of
files and directories in Neovim. The plugin supports rename detection,
highlights changes in the quickfix list, and provides a user command for
easy invocation. This allows proper integration with git difftool -d for
directory comparison.

Example git config:

```ini
[diff]
    tool = nvim_difftool

[difftool "nvim_difftool"]
    cmd = nvim -c "packadd nvim.difftool" -c "DiffTool $LOCAL $REMOTE"
```

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-10-11 19:24:39 -07:00
zeertzjq
bc2fe135d1 vim-patch:6800da6: runtime(doc): Add missing optional tail command-name specs (#36140)
- Use the optional tail command-name specs at help entries for :keepalt,
  :lcd, :cfdo, :lfdo, :wundo, :rundo, :bdelete and :bunload.
- Add missing shortname tags.

closes: vim/vim#18547

6800da6ff1

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-11 23:41:13 +00:00
zeertzjq
b261515775 vim-patch:37aabac: runtime(doc): update credit section for Girish Palya (#36132)
closes: vim/vim#18544

37aabaca64

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-10-12 07:04:53 +08:00
atusy
97ab24b9c7 fix(lsp): _get_workspace_folders does not handle root_dir() function #36071
* fix(lsp): type of root_dir should be annotated with string|fun|nil
* feat(lsp): support root_dir as function in _get_workspace_folders
* feat(lsp): let checkhealth support root_dir() function

Examples:

    vim.lsp: Active Clients ~
    - lua_ls (id: 1)
      - Version: <Unknown>
      - Root directories:
          ~/foo/bar
          ~/dev/neovim

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-10-11 16:01:05 -07:00
Rob Pilling
ce27423132 feat: ":wall ++p" creates parent dirs for each buf #36121
`:wall ++p` will create parent directories if they do not exist, for
each modified buffer
2025-10-11 08:27:58 -07:00
glepnir
fafc329bbd feat(ui): 'pumborder' (popup menu border) #25541
Problem:
Popup menu cannot have a border.

Solution:
Support 'pumborder' option.
Generalize `win_redr_border` to `grid_redr_border`,
which redraws border for window grid and pum grid.
2025-10-10 07:14:50 -07:00
zeertzjq
f81014f25c vim-patch:1388fa6: runtime(doc): Add reference to 'wildoptions' in fuzzy-matching docs
The docs for fuzzy matching seems to try to list every possible use
case, but misses this one. It's a good idea to be consistent.

closes: vim/vim#18525

1388fa62d2

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-10-10 07:21:09 +08:00
zeertzjq
ec8405c473 vim-patch:partial:7dba04f: runtime(doc,vim): Update base syntax, match full :syntime command
- Use the optional tail command-name spec at :help :syntime.
- Match full :syntime command and highlight args.

7dba04f15c

Documentation changes only.

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-10 07:21:09 +08:00
Mike J McGuirk
4598305e0b fix(undotree): mark title field annotation as optional (#36102)
* fix(undotree): mark title field annotation as optional

* fix(doc): run make doc for undotree annotation change
2025-10-09 10:49:49 -04:00
zeertzjq
c401999e47 vim-patch:143686b: runtime(java): Fold adjacent "import" declarations (#36095)
Also, distinguish (by abbreviating their names) and manage
foldable kinds of syntax items: blocks of code ("b"), plain
comments ("c"), Javadoc comments ("d"), adjacent "import"
declarations ("i").  Fold all qualifying items by default;
otherwise, do not fold items of explicitly delisted kinds.
For example,
------------------------------------------------------------
	let g:java_ignore_folding = "bcdi"
------------------------------------------------------------

Resolves zzzyxwvut/java-vim#12.

closes: vim/vim#18492

143686b3c4

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-10-09 07:49:35 +08:00
zeertzjq
f21295d596 vim-patch:ec19075: runtime(doc): Normalise ellipsis dots in syntax.txt (#36094)
Use three dots rather than two.

closes: vim/vim#18521

ec19075f61

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-09 07:49:14 +08:00
zeertzjq
c58cc46094 vim-patch:f8b9251: runtime(doc): Fix typos in syntax.txt (#36073)
closes: vim/vim#18504

f8b9251d8f

Co-authored-by: Elijah Greenstein <197816462+elijahgreenstein@users.noreply.github.com>
2025-10-08 08:28:10 +08:00
altermo
9e1d3f4870 feat(runtime): undotree #35627
Problem
No builtin way to visualize and navigate the undo-tree.

Solution
Include an "opt" plugin.
2025-10-07 14:32:22 -07:00
zeertzjq
facde3dcbe vim-patch:8824526: runtime(zip): add *.pkpass to list of zip extensions (#36061)
Similar to a359c9c25e5c3c1e543fc720223aa7256e6f72cf.
See https://developer.apple.com/documentation/walletpasses/building-a-pass#Sign-the-Pass-and-Create-the-Bundle,
which explicitly mentions that pkpasses are just renamed ZIPs.

closes: vim/vim#18501

882452644c

Co-authored-by: MultisampledNight <contact@multisamplednight.com>
2025-10-07 00:08:22 +00:00
zeertzjq
c2a196f19b vim-patch:adc729c: runtime(doc): fix typo in :h credits section (#36048)
adc729cd32

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-05 23:32:59 +00:00
Maria Solano
729e0acd26 feat(lsp): pass client ID in code action filter (#36046) 2025-10-05 15:02:00 -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
zeertzjq
91cb1b182b vim-patch:a76ea52: runtime(doc): Use the optional tail command-name spec at :help :sign (#36041)
closes: vim/vim#18489

a76ea52a48

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
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