Commit Graph

33046 Commits

Author SHA1 Message Date
ee2fc31b36 vim-patch:9.1.1473: inconsistent range arg for :diffget/diffput (#34588)
Problem:  inconsistent range arg for :diffget/diffput
Solution: fix the range specification, place the cursor for :diffput and
          :diffget consistently on the last line (Yee Cheng Chin)

Previously, `:<range>diffget` only allowed using 1 or above in the range
value, making it impossible to use the command for a diff block at the
beginning of the file. Fix the range specification so the user can now
use 0 to specify the space before the first line. This allows
`:0,$+1diffget` to work to retrieve all the changes from the other file
instead of missing the first diff block. Also do this for `:diffput`.

Also, make `:diffput` work more similar to `:diffget`. Make it so that
if the cursor is on the last line and a new line is inserted in the
other file, doing `:diffput` will select that diff block below the line,
just like `:diffget` would.

Also clean up the logic a little bit for edge cases and for handling
line matched diff blocks better.

closes: vim/vim#17579

d75ab0cbf5

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-06-22 08:00:17 +08:00
0980617c0d build(msvc): suppress msvc build warning for different enum types (#34591)
Problem: Currently our CI is failing due to msvc warning 5287. This
warning tells us that we are performing a binary expression with enums
of two different types. In this case however, this is clearly intended
and valid.

Solution: Suppress warning 5287 on the line this occurs.
2025-06-22 06:54:51 +08:00
d0aedd36df fix(extui): set 'modifiable', 'noswapfile' for buffers (#34582)
Problem:  UI buffers may be 'unmodifiable' and use a 'swapfile'.
Solution: Set the 'modifiable' and 'noswapfile' options.

Co-authored-by:phanium <91544758+phanen@users.noreply.github.com>
2025-06-20 17:32:07 +02:00
cacb4ceeb4 test(prompt): nvim_paste in prompt buffer #34583 2025-06-20 07:07:27 -07:00
927dc3c2c4 vim-patch:476b65e: runtime(doc): mention using <script> instead of <sfile> in :autocmd (#34580)
fixes: vim/vim#17569

476b65ebac
2025-06-19 23:08:01 +00:00
528381587b refactor(lsp): redesign LSP folding state #34469 2025-06-19 06:23:40 -07:00
0dc900d744 fix(lsp): clear document_color autocmds #34573
**Problem:** When enabling document_color multiple times for the same
buffer (or when toggling it on and off), duplicate autocmds are created
since the previous ones are not cleared.

**Solution:** Clear the appropriate buffer-local autocmds when
enabling/disabling document color functionality.
2025-06-19 03:48:12 -07:00
150513a163 fix(lsp) type annotation for vim.lsp.Config.cmd #34574
The type annotation for `vim.lsp.ClientConfig.cmd` was changed,
but the update was not propagated to `vim.lsp.Config`.
2025-06-19 03:35:13 -07:00
487112d674 vim-patch:9.1.1468: filetype: bright(er)script files are not recognized
Problem:  filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
          brightscript filetype, include filetype plugins (Riley Bruins)

closes: vim/vim#17566

03e5ee25fd

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2025-06-19 11:10:38 +02:00
2379fb053a vim-patch:8b92af6: runtime(hgcommit): set comments and commentstring options in filetype plugin
closes: vim/vim#17480

8b92af645c

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2025-06-19 11:10:26 +02:00
255f313cf6 vim-patch:736cd18: runtime(ishd): set comments and commentstring options in filetype plugin
closes: vim/vim#17490

736cd18671

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2025-06-19 11:10:26 +02:00
f038213617 vim-patch:e4c157b: runtime(nroff,groff): update commentstyle in filetype plugins
closes: vim/vim#17516

e4c157b9c1

Co-authored-by: jtmr05 <62111562+jtmr05@users.noreply.github.com>
2025-06-19 11:10:26 +02:00
fb8dba413f vim-patch:9.1.1467: too many strlen() calls (#34572)
Problem:  too many strlen() calls
Solution: Change expand_env() to return string length
          (John Marriott)

This commit does the following changes:
- In expand_env_esc():
  - return the length of the returned dst string.
  - refactor to remove some calls to STRLEN() and STRCAT()
  - add check for out-of-memory condition.
- Change call sites in various source files to use the return value

closes: vim/vim#17561

fff0132399

Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-06-19 02:21:33 +00:00
8ed6f00ab0 vim-patch:9.1.1471: completion: inconsistent ordering with CTRL-P (#34571)
Problem:  completion: inconsistent ordering with CTRL-P
          (zeertzjq)
Solution: reset compl_curr_match when using CTRL-P (Girish Palya)

fixes: vim/vim#17425
closes: vim/vim#17434

5fbe72edda

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-19 09:24:13 +08:00
0456d75517 vim-patch:8311e7d: runtime(vim): fix incorrect highlighting of User autocmds (#34570)
There is no pattern after the user event name. The user event name is
the pattern.

closes: vim/vim#17568

8311e7d6b4
2025-06-18 23:49:15 +00:00
3594c213a7 fix(diagnostics): validate opts.signs #34565 2025-06-18 10:26:28 -07:00
8e17b72094 docs: vim_diff.txt #34502
Problem:
- Missing some important Vim features
- Since Nvim 0.5, package.path and package.cpath don't include
  `'runtimepath'` (thought `require()` can still find modules in
  `runtimepath`)

Closes #33938

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-06-18 06:19:00 -07:00
5cf135f9a0 vim-patch:9.1.1466: filetype: not all lex files are recognized
Problem:  filetype: not all lex files are recognized
Solution: detect *.ll as lex, llvm or lifelines filetype, depending on
          the content (Eisuke Kawashima)

closes: vim/vim#17560

48295111e5

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-06-18 14:37:06 +02:00
32f30c4874 feat(lsp): pass resolved config to cmd() #34550
Problem:
In LSP configs, the function form of `cmd()` cannot easily get the
resolved root dir (workspace). One of the main use-cases of a dynamic
`cmd()` is to be able to start a new server  whose binary may be located
*in the workspace* ([example](https://github.com/neovim/nvim-lspconfig/pull/3912)).

Compare `reuse_client()`, which also receives the resolved config.

Solution:
Pass the resolved config to `cmd()`.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-06-18 04:52:17 -07:00
aa8c86e8f3 Merge #34541 docs 2025-06-18 03:46:28 -07:00
237bb9cb59 docs(ui): type annotations for options #33983 2025-06-18 03:20:18 -07:00
cb2367a1e2 docs: api, misc 2025-06-18 12:13:55 +02:00
c8e54bf49d docs: deprecate <sfile> 2025-06-18 12:12:23 +02:00
3b85046ed5 fix(messages): "list_cmd" kind for :command, :version (#34529)
Problem:  No ext_messages kind for the :command, :version commands.
          :version is emitted as multiple events.
Solution: Assign them the "list_cmd" kind. Use `msg_put*` to properly
          format the message as a single event.
2025-06-18 07:54:49 +02:00
8af2aea24f Merge pull request #34492 from nenahp/fix-append-cursor
fix: cursor shape don't resume after `:append`
2025-06-18 06:59:05 +08:00
17c18efbe5 fix(lsp): support v:count in selection_range() #34551
Co-authored-by: Yi Ming <ofseed@foxmail.com>
2025-06-17 14:10:57 -07:00
b3c78f4b3c test(lsp): return tables instead of deserializing strings #34554 2025-06-17 13:41:49 -07:00
2c9d21f722 fix: cursor shape don't resume after :append
Problem: cursor shape don't resume after `:append`.
e.g. `seq 1000 | nvim --clean +"se gcr+=c:ver25" -`

Solution: emit missing ui event.
2025-06-18 00:40:22 +08:00
286371b4d2 feat(prompt): multiline prompt input #33371
Problem:
Cannot enter multiline prompts in a buftype=prompt buffer.

Solution:
- Support shift+enter (`<s-enter>`) to start a new line in the prompt.
- Pasting multiline text via OS paste, clipboard, "xp, etc.
- A/I in editable region works as usual.
- i/a/A/I outside of editable region moves cursor to end of current
  prompt.
- Support undo/redo in prompt buffer.
- Support o/O in prompt buffer.
- Expose prompt location as `':` mark.
2025-06-17 08:46:57 -07:00
496691f985 docs: vim.fs.dir.Opts type #34546
Follow the pattern of vim.fs.find.Opts
2025-06-17 07:14:25 -07:00
e74753a221 fix(docs): callback annotation for vim.ui.input #34507 2025-06-17 06:37:27 -07:00
006361fc6b fix(api): buffer updates in quickfix buffer #31105
Problem: Buffer events (specifically on_bytes callbacks) weren't triggered when the
quickfix list was modified, preventing buffer change notifications.

Solution: Add code to send both bytes and lines change notifications after
quickfix buffer updates to properly trigger all attached callbacks.
2025-06-17 06:31:14 -07:00
1bf9a07b3e build: slience new clang-tidy warnings #34539
Problem: The new cert-arr39-c and bugprone-tagged-union-member-count
checks introduced in clang-tidy 20 fail on Neovim's codebase, even
though the code is correct.

Solution: Disable these two checks by modifying the .clang-tidy
configuration file.
2025-06-17 02:19:57 -07:00
6976ff57dd vim-patch:152a450: runtime(sh): reset g:sh_fold_enabled after outputting its value in syntax script
fixes: vim/vim#10701
closes: vim/vim#17557

152a450d88

Co-authored-by: hakkadaikon <hakkadaikon@yahoo.co.jp>
2025-06-17 10:44:37 +02:00
cd06e0c9d6 fix(lsp): include client ID when receiving unknown fold kind (#34535) 2025-06-16 19:36:06 -07:00
ae0981070e vim-patch:9.1.1464: gv does not work in operator-pending mode (#34534)
Problem:  gv does not work in operator-pending mode
          (liushapku)
Solution: remove the check for checkclearop in nv_gv_cmd()
          (phanium)

fixes: vim/vim#3666
closes: vim/vim#17551

cb27992cda

Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
2025-06-17 00:27:41 +00:00
3e984cf02b vim-patch:9.1.1463: Integer overflow in getmarklist() after linewise operation (#34532)
Problem:  Integer overflow in getmarklist() after linewise operation.
Solution: Don't add 1 to MAXCOL (zeertzjq)

related: neovim/neovim#34524
closes: vim/vim#17552

93318a9933
2025-06-16 23:24:52 +00:00
5647b45e69 refactor(generator): use fmt() for string.format() more (#34528) 2025-06-17 06:50:51 +08:00
24bb110588 vim-patch:f548ec4: runtime(keymaps): Add Azerbaijani keymap (#34527)
closes: vim/vim#17541

f548ec46e4

Co-authored-by: Rasul Samadzade <rasul.samadzade@protonmail.com>
2025-06-17 06:47:05 +08:00
35756022cb fix(lsp): advertise supported fold kinds (#34461)
This commit also makes it so that folds which have an unsupported fold
kind have their `kind` ignored.
2025-06-16 16:05:00 -04:00
492ea28612 feat(lsp): handle disabled code actions (#34453)
This commit also makes it so that disabled code actions are not
displayed unless the trigger kind is "Invoked".
2025-06-16 12:41:42 -04:00
9f99bf48ea fix(lsp): add missing argument validations (#34519) 2025-06-16 06:19:20 -07:00
1d7823451e fix(lsp): use vim.notify for all message types #34489
Problem: Currently, vim.notify is only used to display messages when the
message type is Error.

Solution: Use vim.notify to display messages for all message types.
2025-06-16 05:02:59 -07:00
6ad2a13054 Merge pull request #34495 from bfredl/debwithrelinfo
fix(build): disable problematic marktree assert in RelWithDebInfo builds
2025-06-16 12:27:41 +02:00
576e8f62c2 fix(build): disable problematic marktree assert in RelWithDebInfo builds
Workaround (not a fix) for #27196 and for #33067

Asserts are meant to apply to debug builds but not release
builds for users. However the intermediate RelWithDebInfo
build type is quite often used by end users, so we might
want to disable certain problematic asserts there, while
still preserving them in Debug mode for CI.
2025-06-16 12:03:36 +02:00
b2722181b0 fix(edit): clear showcmd after clearing last put char (#34517)
Problem:  Screen may be updated by a msg_showcmd event before '"' is
          cleared from the screen with register insertion.
Solution: Emit the msg_showcmd event before clearing the '"'.
2025-06-16 11:03:35 +02:00
5fe582448c fix(treesitter): enable a gc for wasmtime 2025-06-16 09:19:17 +01:00
8cfb993fdf docs: support overloads and async 2025-06-16 09:18:42 +01:00
b92e3889fe vim-patch:631a50c: runtime(doc): mention cannot ignored events in eventignorewin (#34522)
closes: vim/vim#17545

631a50ceb9

Co-authored-by: glepnir <glephunter@gmail.com>
2025-06-16 02:14:20 +00:00
4b2c2eb120 docs(meta): fix incorrect bar -> backtick replacement (#34520) 2025-06-16 09:06:07 +08:00