Commit Graph

32519 Commits

Author SHA1 Message Date
zeertzjq
98ec3fdf74 vim-patch:9.1.1328: too many strlen() calls in indent.c (#33563)
Problem:  too many strlen() calls in indent.c
Solution: refactor indent.c slightly and remove strlen() calls
          (John Marriott)

closes: vim/vim#17156

eac45c558e

Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-04-21 19:16:29 +08:00
zeertzjq
e3c3f4730d vim-patch:7938c40: runtime(keymaps): update Brazilian keymaps (#33562)
closes: vim/vim#17161

7938c40b34

Co-authored-by: LuMarquesIlva <luismarques0504@proton.me>
2025-04-21 19:16:17 +08:00
zeertzjq
8051092414 Merge pull request #33561 from zeertzjq/vim-9.1.1304
vim-patch:9.1.{1304,1327}: filetype: some man files are not recognized
2025-04-21 19:09:29 +08:00
zeertzjq
9fafdcb99c vim-patch:9.1.1327: filetype: nroff detection can be improved
Problem:  filetype: nroff detection can be improved
Solution: improve nroff detection (Eisuke Kawashima)

- explicitly check roff comments and macros typically found in manpages
- do not try to detect alphabetically-sectioned files, except for n, as
  nroff
    - l: > 'l' happens to be a section for historical reasons
         <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391977>
    - n: e.g. /usr/share/man/mann/Tcl.n.gz
    - o: unsure (perhaps fedora-specific)
    - p: unsure (perhaps fedora-specific)

closes: vim/vim#17160

2cb42efc18

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-21 18:40:58 +08:00
zeertzjq
7da1639a14 vim-patch:9.1.1304: filetype: some man files are not recognized
Problem:  filetype: some man files are not recognized
          (e.g. 1p (POSIX commands))
Solution: update the filetype detection pattern and detect more man
          files as nroff (Eisuke Kawashima)

- sections are revised referring to
    - debian-12:/etc/manpath.config
    - fedora-41:/etc/man_db.conf
- detection logic is improved
- detection test is implemented

closes: vim/vim#17117

babdb0554a

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-21 18:40:58 +08:00
Christian Clason
1437144740 vim-patch:e125ee4: runtime(pov): deprecate #render and #statistics in syntax script
- 3.1g: active
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.1g/Docs/povuser.pdf#page=172
- 3.5 or later: deprecated
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.5/Linux/povlinux.tgz
  ─ povray-3.50c/html/povdoc_172.html
  - https://www.povray.org/documentation/3.7.0/r3_3.html#r3_3_2_7_1

closes: vim/vim#17177

e125ee4b9f

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-21 12:38:27 +02:00
Maria José Solano
d55330bcd1 refactor(lsp): use method type annotations for parameters 2025-04-21 11:35:29 +02:00
zeertzjq
351613bc1f vim-patch:187df69: runtime(doc): cross-link :| meaning :p and explain E749 (#33559)
E749 is given when :print (with any range) is issued on an empty buffer,
like the one you get with :new or :enew. Furthermore, due to Vi
compatibility :| is a synonym.

As a result, mappings intended to include a <bar> separator (esp. in the
case of boolean or "||") between commands can generate E749 on startup
when placed in a vimrc if the bars are not properly encoded or escaped.
[1]. Document this failure mode and synonym near the generated error,
and cross link with :help :bar. Note that one must read or scroll quite
a bit to find the mention of :| behaving like :print!

[1]: https://vi.stackexchange.com/q/46625/10604

closes: vim/vim#17173

187df69fd1

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2025-04-21 08:56:05 +00:00
Luuk van Baal
4b02d1f6f6 fix(gen_vimdoc): unnecessary assert for non-source files
Problem:  The presence of non-source files breaks `make doc`.
Solution: Replace assert with if statement to skip non-matching files.
2025-04-21 10:15:33 +02:00
zeertzjq
d3cded796c vim-patch:9.1.1326: invalid cursor position after 'tagfunc' (#33556)
Problem:  invalid cursor position after 'tagfunc'
          (gandalf4a)
Solution: call check_cursor() after executing the 'tagfunc'

9919085491

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-20 23:04:02 +00:00
zeertzjq
c7d8812ca7 vim-patch:2398460: runtime(doc): clarify 'includeexpr' is not used for <cfile> (#33540)
fixes: vim/vim#17139

2398460232

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-19 19:10:43 +08:00
zeertzjq
e4516a90b1 vim-patch:54081f0: runtime(nix): set iskeyword and b:match_words in ftplugin (#33541)
closes: vim/vim#17154

54081f0ce0

Co-authored-by: Arnie97 <arnie97@gmail.com>
2025-04-19 10:59:12 +00:00
Christian Clason
255bf6e5b1 vim-patch:9.1.1320: filetype: alsoft config files are not recognized
Problem:  filetype: alsoft config files are not recognized
Solution: detect alsoft config files as dosini filetype
          (David Mandelberg)

References:
* code with paths to config: ReadALConfig() in
  https://github.com/kcat/openal-soft/blob/master/alc/alconfig.cpp
* example config:
  https://github.com/kcat/openal-soft/blob/master/alsoftrc.sample

closes: vim/vim#17140

1d96caaa4b

Co-authored-by: David Mandelberg <david@mandelberg.org>
2025-04-19 10:52:12 +02:00
Christian Clason
1b0dedb81c vim-patch:9.1.1321: filetype: MS ixx and mpp files are not recognized
Problem:  filetype: MS ixx and mpp files are not recognized
Solution: detect *.mpp and *.ixx files as c++ filetype
          (Hampus Avekvist)

closes: vim/vim#17155

aee34ef23e

Co-authored-by: Hampus Avekvist <hampus.avekvist@hey.com>
2025-04-19 10:52:12 +02:00
zeertzjq
df96276b19 test(api/window_spec): check start_vcol on folded line (#33535) 2025-04-19 05:14:34 +00:00
zeertzjq
ed5e70465a test(api): nvim_win_text_height with virt_lines around fold (#33529) 2025-04-19 01:00:46 +00:00
zeertzjq
7380f8ec71 vim-patch:cb3b752: runtime(doc): clarify "nearest" value for 'completeopt' (#33534)
closes: vim/vim#17146

cb3b752f95

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-04-19 08:42:48 +08:00
phanium
dca8b3fede vim-patch:9.1.1322: small delete register cannot paste multi-line correctly (#33531)
Problem:  small delete register cannot paste multi-line correctly
          (after v8.2.2189)
Solution: caused by 032a2d050b82b146d70d6ff714838ee62c07d8ad, so make
          this logic handle charwise only (phanium)

closes: vim/vim#17151

7e93d4c617
2025-04-19 08:01:51 +08:00
zeertzjq
c67398d31b vim-patch:9.1.1319: Various typos in the code, issue with test_inst_complete.vim (#33527)
Problem:  Various typos in the code, redundant and strange use of
          :execute in test_ins_complete.vim (after 9.1.1315).
Solution: Fix typos in the code and in the documentation, use the
          executed command directly (zeertzjq).

closes: vim/vim#17143

98800979dc

Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2025-04-19 07:23:20 +08:00
zeertzjq
9397fdafe1 Merge pull request #33519 from zeertzjq/vim-9.1.1314
vim-patch:9.1.{1314,1318}: max allowed string width too small
2025-04-19 07:22:39 +08:00
Au.
44f1dbee0d fix(spell): save spell files to stdpath('data')/site/spell #33528 2025-04-18 08:56:20 -07:00
zeertzjq
0251a25541 vim-patch:9.1.1318: tests: test_format fails
Problem:  tests: test_format fails (after 9.1.1314).
Solution: Increase the string size.  Add missing test_format.res in
          NEW_TESTS_RES (zeertzjq).

closes: vim/vim#17144

e9a27ef373
2025-04-18 17:00:34 +08:00
zeertzjq
ccdb37b075 vim-patch:9.1.1314: max allowed string width too small
Problem:  max allowed string width too small
Solution: increased MAX_ALLOWED_STRING_WIDTH from 6400 to 1MiB
          (Hirohito Higashi)

closes: vim/vim#17138

06fdfa11c5

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-04-18 16:58:10 +08:00
zeertzjq
34791f7988 Merge pull request #33526 from zeertzjq/vim-3dca512
vim-patch: Vim syntax updates
2025-04-18 15:25:11 +08:00
zeertzjq
9045656014 vim-patch:9b171bd: runtime(vim): Update-base-syntax, match full :*grep, :make, :sort and :filter commands
closes: vim/vim#17082

9b171bdfd6

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:59:20 +08:00
zeertzjq
67d6f2baa4 vim-patch:520a2c7: runtime(vim): Update base-syntax, improve :command highlighting
- Match multiline :command definitions.
- Match custom completion funcref var names.

fixes: vim/vim#17001
closes: vim/vim#17067

520a2c7852

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:57:09 +08:00
zeertzjq
5662bdafc2 vim-patch:2f5a8c0: runtime(vim): Update base-syntax, match full :redir command
closes: vim/vim#17057

2f5a8c0b5b

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:55:45 +08:00
zeertzjq
3ee144aa95 vim-patch:2a6be83: runtime(vim): Update base-syntax, improve :set backslash handling
Improve backslash handling in :set option values. There is no special
handling for options supporting Windows path separators yet.

See :help option-backslash.

Remove the vimSetString syntax group. Option string values cannot be
specified with a quoted string, this is a command terminating tail
comment.

fixes: vim/vim#16913
closes: vim/vim#17034

2a6be83512

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:52:50 +08:00
zeertzjq
234be4aebc vim-patch:722fbd1: runtime(vim): Update base-syntax, match tuples
Tuples were introduced in commit 9cb865e.  See PR vim/vim#16776.

fixes: vim/vim#16965
closes: vim/vim#16935

722fbd1554

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:50:05 +08:00
zeertzjq
1e2f86394a vim-patch:adb703e: runtime(vim): Update base-syntax, match protected constructors
Support for protected constructors was added in commit 7e89800.

closes: 16618

adb703e1b9

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:46:06 +08:00
zeertzjq
700840f4b7 vim-patch:dd3f1c0: runtime(vim): Update base-syntax, match multiline return types
fixes vim/vim#14442.
closes: vim/vim#16914

dd3f1c0dda

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:45:36 +08:00
zeertzjq
e2fa151f9c vim-patch:0fab891: runtime(vim): Update base-syntax, improve :syntax highlighting
- Highlight missing :syntax subcommands.
- Don't highlight user specified syntax group names.

closes: vim/vim#16847

0fab89117f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:41:39 +08:00
zeertzjq
8e5ef60540 vim-patch:3dca512: runtime(vim): Update base-syntax and generator, only match valid predefined variables
- Only match valid predefined and option variables.
- Match scope dictionaries.
- Highlight scope prefixed variables as a scope dictionary accessor. The
  vimVarScope syntax group can be linked to vimVar to disable this.
- Include support for Neovim-only predefined and option variables.

Temporary collateral damage - scope dictionaries match instead of keys
in dictionary literals.

closes: vim/vim#16727

3dca512939

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:31:34 +08:00
ash
118759aa6b vim-patch:8f09684: runtime(jjdescription): Don't require a space to start comments (#33523)
Since jj v0.24.0 (December 2024), `JJ:` comments are recognised even
when not followed by a space.

closes: vim/vim#17130

8f09684569
2025-04-18 01:05:10 +00:00
zeertzjq
fe7cd80cbc Merge pull request #33521 from zeertzjq/vim-9.0.1653
vim-patch:9.0.{1653,1654},9.1.{0721,1317}
2025-04-18 08:30:21 +08:00
zeertzjq
e2e6c159d3 vim-patch:9.1.1317: noisy error when restoring folds from session fails
Problem:  noisy error when restoring folds from session fails
Solution: ignore errors silently when sourcing session file.
          (Igor Lacerda)

fixes: vim/vim#15813
closes: vim/vim#17127

cca5dea76e

Co-authored-by: Igor Lacerda <igorlfs@ufmg.br>
2025-04-18 08:11:41 +08:00
zeertzjq
0eb708aa8a vim-patch:9.1.0721: tests: test_mksession does not consider XDG_CONFIG_HOME
Problem:  tests: test_mksession does not consider XDG_CONFIG_HOME
Solution: allow to match $HOME/.vim/ and $HOME/.config/vim for &viewdir
          (John M Devin)

closes: vim/vim#15639

5b9237c2e7

Co-authored-by: John M Devin <john.m.devin@gmail.com>
2025-04-18 08:11:41 +08:00
zeertzjq
bd0555ecd4 vim-patch:9.0.1654: MS-Windows: test for default 'viewdir' fails
Problem:    MS-Windows: test for default 'viewdir' fails.
Solution:   Escape the pattern.

813b7a85f2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-04-18 08:11:41 +08:00
zeertzjq
827cfe4a76 vim-patch:9.0.1653: Amiga: default 'viewdir' may not work
Problem:    Amiga: default 'viewdir' may not work.
Solution:   Use "home:" instead of "$VIM". Add a test. (Christian Brabandt,
            closes vim/vim#12576)

b8b1c8ebd4

Cherry-pick Test_mkview_manual_fold() changes from 9.0.{0363,0626}.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-18 08:11:35 +08:00
zeertzjq
b4c759716a vim-patch:9.1.1315: completion: issue with fuzzy completion and 'completefuzzycollect' (#33520)
Problem:  chain complete does not work when 'cot' includes fuzzy
          and 'completefuzzycollect' collects wrong next word.
          (Konfekt)
Solution: compl_startpos is not set correctly, remove next word check
          in search_for_fuzzy_match (glepnir).

fixes vim/vim#17131
fixes vim/vim#16942
closes: vim/vim#17136

cfe502c575

Co-authored-by: glepnir <glephunter@gmail.com>
2025-04-18 07:22:50 +08:00
Au.
6926fc1615 fix(lsp): opts.reuse_win does not jump if buf is already open #33476
Problem:
`vim.lsp.buf.[implementation|definition|...]({ reuse_win = true })` does not
jump cursor to existing window if buffer is already open.

Steps to reproduce:
1. `nvim repro.lua`
2. Insert anything that lsp can read to open the library definition/implementation, e.g., `vim.keymap.set`
3. open `repro.lua` buffer and the library buffer side by side.
4. type `gd` over `set` to jump to the library definition.

The open buffer is scrolled to the target line, but cursor does not jump.

Solution:
Call nvim_set_current_win if necessary.
2025-04-17 07:46:18 -07:00
Lewis Russell
2fcdeb0128 refactor(lsp): gen_lsp
- Simplify usage:
  - Instead of `nvim -l src/gen/gen_lsp.lua gen` now just
    run `./src/gen/gen_lsp.lua`

- Removed `--methods` and `--capabilities` options.

- Improved rendering code in various areas.
2025-04-17 15:44:46 +01:00
Lewis Russell
d7e0d46ffa feat(lsp): use stricter types for methods
This change modifies gen_lsp.lua so alias types are generated for
various types of lsp methods to distinguish between notifications
and requests:
 - vim.lsp.protocol.Method.ServerToClient.Request
 - vim.lsp.protocol.Method.ServerToClient.Notification
 - vim.lsp.protocol.Method.ClientToServer.Request
 - vim.lsp.protocol.Method.ClientToServer.Notification

 These types are then used instead of `string` where appropriate.
2025-04-17 11:40:45 +01:00
Christian Clason
34b4df774d vim-patch:fbbaa6e: runtime: set 'cpoptions' for line-continuation in various runtime files
closes: vim/vim#17121

fbbaa6ebe9

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-17 09:25:41 +02:00
Christian Clason
5aa35691ab vim-patch:40daa13: runtime(gleam): Update ftplugin, use recommended_style config variable
Wrap the setting of basic whitespace formatting options in a conditional
block, following the de facto standard.

Setting 'et', 'sts' and 'sw' can be disabled by setting
"gleam_recommended_style" to false.

Follow up to PR vim/vim#17086.

closes: vim/vim#17128

40daa1358c

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-17 09:25:41 +02:00
zeertzjq
95a255a548 vim-patch:9.1.1312: tests: Test_backupskip() fails when HOME is defined (#33504)
Problem:  tests: Test_backupskip() fails when HOME is defined
Solution: unset $HOME temporarily

ad503fe927

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-17 07:44:42 +08:00
zeertzjq
f9f6dc4262 vim-patch:9.1.1310: completion: redundant check for preinsert effect (#33505)
Problem:  Duplicate check for preinsert effect, particularly for Ctrl_w
          and Ctrl_U.
Solution: Remove the specific check for Ctrl_w and Ctrl_U to eliminate
          redundancy (glepnir).

closes: vim/vim#17129

1c2b258250

Co-authored-by: glepnir <glephunter@gmail.com>
2025-04-16 23:44:12 +00:00
zeertzjq
e3e8dfe99c vim-patch:9.1.1307: make syntax does not reliably detect different flavors (#33498)
Problem:  GNU extensions, such as `ifeq` and `wildcard` function, are
          highlighted in BSDmakefile
Solution: detect BSD, GNU, or Microsoft implementation according to
	  filename, user-defined global variables, or file contents

closes: vim/vim#17089

f35bd76b31

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Roland Hieber <rohieb@users.noreply.github.com>
2025-04-17 07:13:05 +08:00
zeertzjq
95e29dab70 Merge pull request #33383 from zeertzjq/vim-9.1.1284
vim-patch:9.1.{1262,1284,1296,1306,1309}
2025-04-17 07:05:19 +08:00
zeertzjq
afca5b564e vim-patch:9.1.1309: tests: no test for 'pummaxwidth' with non-truncated "kind"
Problem:  tests: no test for 'pummaxwidth' with non-truncated "kind".
Solution: Add a test with "kind" and larger 'pummaxwidth' (zeertzjq).

closes: vim/vim#17126

031919c7ac
2025-04-17 06:46:34 +08:00