Commit Graph

28091 Commits

Author SHA1 Message Date
Lewis Russell
ade42d531b fix(build): teach cmake about vvars 2023-12-21 15:23:28 +00:00
Lewis Russell
e8d3c4cccb feat: generate types and docs for v variables 2023-12-21 14:19:10 +00:00
Lewis Russell
a8935d97ac docs: move vim-variables to separate file 2023-12-21 14:19:10 +00:00
Evgeni Chasnovski
d431a4d410
fix(runtime): source old color scheme in bundled color schemes (#26641)
Problem:
Bundled color schemes use `:hi clear` and only define Vim's highlight
groups. This results into Nvim-specific highlight groups using
definitions from Nvim's default color scheme, which are not always
linked to a Vim's highlight group.

Solution:
Restore links to Vim's highlight groups which were present before Nvim's
default color scheme update.
2023-12-21 20:53:43 +08:00
Luuk van Baal
2ded2e75f4 fix(column): avoid exceeding configured 'signcolumn' width 2023-12-21 10:57:01 +00:00
Evgeni Chasnovski
720a3518e3 refactor(runtime): rewrite 'vim' color scheme in Lua
Problem: Bundled 'vim' color scheme is written in Vimscript which
  implicitly assumes that the file is ported from Vim.
  This is not the case, at it is currently the Neovim's way of providing
  backward compatibility for color schemes.

Solution: Rewrite it in Lua to indicate that this runtime file comes
  from Neovim.
2023-12-21 11:06:39 +01:00
zeertzjq
8533adb484
refactor(IWYU): move decor provider types to decoration_defs.h (#26692) 2023-12-21 16:50:05 +08:00
zeertzjq
8c611f53fe
fixup: 2023-12-21 15:32:30 +08:00
zeertzjq
1045659097
fix(osc52): use nvim_chan_send() to stderr for copying (#26690)
The data to be written can be very long, so use nvim_chan_send() instead
of io.stdout:write() as the latter doesn't handle EAGAIN.

A difference of these two approaches is that nvim_chan_send() writes to
stderr, not stdout, so it won't work if client stderr is redirected.
2023-12-21 11:47:04 +08:00
zeertzjq
342c7da4bd
fix(channel): use os_write() instead of fwrite() for stderr (#26689)
This handles EAGAIN.

Related #26688
2023-12-21 10:39:10 +08:00
dundargoc
0c120307ca refactor: eliminate cyclic includes 2023-12-20 19:52:02 +01:00
Christian Clason
cc6a257c8c docs: apply current colorscheme to default highlight groups
Problem: Not all default highlight groups show their actual colors.
Solution: Refactor `vimhelp.lua` and apply it to all relevant lists (UI
groups, syntax groups, treesitter groups, LSP groups, diagnostic groups).
2023-12-20 18:58:40 +01:00
dundargoc
db4b0aeb92 docs: remove section on constants in style guide
It is needlessly restrictive and specific without good reason.
2023-12-20 18:49:54 +01:00
Christian Clason
095bd8d0f8 fix(buffer): do not filter help buffer
Problem: If a help buffer is opened without legacy syntax set (because
treesitter is enabled), Vim strips (some) markup. This means the syntax
engine fails to parse (some) syntax if treesitter highlighting is
disabled again.

Solution: Do not strip the help buffer of markup since (legacy or
treesitter) highlighting is always enabled in Nvim. Similarly, remove
redundant setting of filetype and give the function a more descriptive
name.
2023-12-20 17:44:31 +01:00
zeertzjq
99d1e7da28
ci(release): create version tag after "stable" tag (#26671) 2023-12-20 21:53:30 +08:00
Lewis Russell
2498747add refactor(treesitter): cleanup highlighter
- Remove some unused fields
- Prefix classes with `vim.`
- Move around some functions so the query stuff is at the top.
- Improve type hints
- Rework how hl_cache is implemented
2023-12-20 11:55:25 +00:00
dundargoc
365e185606 docs: document header structure
Reference: https://github.com/neovim/neovim/issues/6371
2023-12-20 12:50:38 +01:00
zeertzjq
184f842349
vim-patch:955652f6df9c (#26667)
runtime(doc): Update change.txt (vim/vim#13725)

Fix-up and clarify commit  e06f2b498ccca921f34a1bec4464f042a5a2cabd

955652f6df

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-12-20 07:02:48 +08:00
Christian Clason
2ed784f385 vim-patch:9.0.2179: no filetype detection for execline scripts
Problem:  no filetype detection for execline scripts
Solution: Add filetype detection for execline

as a prior to adding syntax support for execline (see
https://github.com/djpohly/vim-execline/issues/2), i went ahead and made
the filetype detection for execline scripts.

closes: vim/vim#13689

Signed-Off-By: Mazunki Hoksaas <rolferen@gmail.com>

63210c214a

Co-authored-by: Mazunki Hoksaas <rolferen@gmail.com>
2023-12-19 23:48:02 +01:00
Christian Clason
18933fc47f vim-patch:fbd72d2d4725
runtime(netrw): prevent E11 on FocusGained autocommand (vim/vim#13718)

fbd72d2d47

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-19 23:44:20 +01:00
Christian Clason
f7bc8bd4d1 vim-patch:379df7c1dbb2
runtime(8th): updated 8th syntax (vim/vim#13720)

* updated 8th.vim
* removed obsolete code

379df7c1db

Co-authored-by: ronaaron <ron@aaron-tech.com>
2023-12-19 23:44:20 +01:00
zeertzjq
c95845f3df
vim-patch:9.0.2177: Wrong cursor position when dragging out of window (#26661)
Problem:  Wrong cursor position when dragging out of window.
Solution: Don't use ScreenCols[] when mouse is not in current window.

closes: vim/vim#13717

ec14924368
2023-12-20 05:58:48 +08:00
zeertzjq
a61d8b615c
vim-patch:9.0.2178: reg_executing() wrong for :normal with range (#26660)
Problem:  reg_executing() returns wrong result in :normal with range
          when 'showcmd' is set (after 8.2.4705).
Solution: Reset "pending_end_reg_executing" when executing a register.

closes: vim/vim#13707

615202bd0e
2023-12-20 05:27:18 +08:00
zeertzjq
49efdf8413
test: "diff" flag of 'fillchars' (#26657) 2023-12-19 22:46:38 +08:00
zeertzjq
674a20ac47
test: sign on wrapped line with signcolumn=number (#26654) 2023-12-19 21:25:33 +08:00
James McCoy
0c22081f62
Merge pull request #26647 from jamessan/big-endian-timeout
ci(s390x): double TEST_TIMEOUT since tests are running via qemu
2023-12-19 06:30:13 -05:00
Jaehwang Jung
90a12d4a16 fix(treesitter): prepare highlight states for [s, ]s 2023-12-19 12:24:06 +01:00
dundargoc
7f6b775b45 refactor: use bool to represent boolean values 2023-12-19 11:43:21 +01:00
dundargoc
693aea0e9e
docs: small fixes (#26448)
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Jordan Mandel <jordan.mandel@live.com>
2023-12-19 13:29:13 +08:00
James McCoy
3d8cd0c5d3
ci(s390x): run build & test as a non-root user 2023-12-18 21:43:00 -05:00
zeertzjq
1cf51a07a6
fix(api): don't set coladd of mark (#26648) 2023-12-19 08:01:05 +08:00
James McCoy
1beef6cd21
ci(s390x): double TEST_TIMEOUT since tests are running via qemu 2023-12-18 17:46:25 -05:00
bfredl
80f75d063d
Merge pull request #26279 from agraven/x1-x2-mouse-api
feat(api): add forward and back mouse buttons
2023-12-18 21:47:06 +01:00
Amanda Graven
428edcde70
feat(api): add forward and back mouse buttons 2023-12-18 21:24:27 +01:00
Gregory Anders
3a4aa3fc58
refactor: soft-deprecate diagnostic signs configured with :sign-define (#26618)
Diagnostic signs should now be configured with vim.diagnostic.config(),
but "legacy" sign definitions should go through the standard deprecation
process to minimize the impact from breaking changes.
2023-12-18 11:04:44 -06:00
Jaehwang Jung
cd1b14f027
feat(termdebug): improve :Evaluate floating window (#26621)
Problem:
- The :Evaluate result window is not cleaned up when the cursor moves.
- This window is not focusable.

Solution:
Replace the old implementation from autozimu/LanguageClient-neovim with
vim.lsp.util.open_floating_preview and implement custom focusing logic.
Also remove g:termdebug_useFloatingHover option now that it's working
correctly.
2023-12-18 15:47:01 +00:00
dundargoc
6cb78e2d1c docs: add style rule regarding initialization
Specifically, specify that each initialization should be done on a
separate line.
2023-12-18 16:22:13 +01:00
Christian Clason
8c173cec29 vim-patch:b42703a662e8
runtime(tmux): Update tmux syntax rules (vim/vim#13708)

b42703a662

Co-authored-by: Eric Pruitt <eric.pruitt@gmail.com>
2023-12-18 10:25:08 +01:00
Christian Clason
8abae7c2e4 vim-patch:71cbe8e17a8c
runtime(fortan): update fortran syntax rules and doc notes

Update to the Fortran 2023 standard. Reorganize some code to reflect the
dropping of dialect support in the previous commit. Minor improvements.

closes: vim/vim#13712

71cbe8e17a

Co-authored-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
2023-12-18 10:25:08 +01:00
zeertzjq
7d279a09e0
fix(lua): handle array with holes in luaeval() (#26630) 2023-12-18 12:14:37 +08:00
zeertzjq
d956bc6379
fix(options): setting 'scroll' with resized grid (#26628) 2023-12-18 10:15:23 +08:00
zeertzjq
6abdc1ac1f
refactor: split WIN_EXECUTE() into two functions (#26627) 2023-12-18 09:05:59 +08:00
Yi Ming
e164f4c271
docs(diagnostic): add return value of vim.diagnostic.config() (#26615) 2023-12-17 18:11:47 -06:00
zeertzjq
75b8f4c8cb
test(core/job_spec): fix flakiness (#26623) 2023-12-18 07:09:32 +08:00
zeertzjq
d82a586a9e
refactor: move some anonymous enums back to non-defs headers (#26622)
It isn't really useful to put anonymous enums only used as arguments to
functions calls in _defs.h headers, as they will only be used by a file
that calls those functions, which requires including a non-defs header.

Also move os_msg() and os_errmsg() back to message.h, as on Windows they
are actual functions instead of macros.

Also remove gettext.h and globals.h from private/helpers.h.
2023-12-18 06:18:11 +08:00
dundargoc
69bc519b53 refactor: move non-symbols to defs.h headers 2023-12-17 19:03:18 +01:00
Jaehwang Jung
c0cb1e8e94 perf(treesitter): filter out trees outside the visible range early
Problem:
Treesitter highlighter's on_line was iterating all the parsed trees,
which can be quite a lot when injection is used. This may slow down
scrolling and cursor movement in big files with many comment injections
(e.g., lsp/_meta/protocol.lua).

Solution:
In on_win, collect trees inside the visible range, and use them in
on_line.

NOTE:
This optimization depends on the correctness of on_win's botline_guess
parameter (i.e., it's always greater than or equal to the line numbers
passed to on_line). The documentation does not guarantee this, but I
have never noticed a problem so far.
2023-12-17 15:40:59 +00:00
Daiki Noda
f0eb3ca916
build: eliminate semicolons from --version string
Refactor the --version string to remove semicolons. Although semicolons are
present in LINK_OPTIONS, they are not actually included during compilation.
2023-12-17 13:55:15 +01:00
Lewis Russell
5a2536de0c
refactor(lsp): move changetracking to separate file (#26577)
* refactor(lsp): move changetracking to separate file

- Prefixed changetracking types with `vim.lsp.`

* fixup!: make _reset_timer a local function

* fixup!: remove @private annotations

* fixup!: changetracking.lua -> _changetracking.lua

* fixup! types

* fixup! add send_changes_for_group
2023-12-17 09:54:38 +00:00
Famiu Haque
8f08b1efbd
refactor(options): use hashy for finding options (#26573)
Problem:
`findoption()` searches through the options[] table linearly for option
names, even though hashy can be used to generate a compile-time hash
table for it.

Solution:
Use hashy to generate a compile time hash table for finding options.
This also allows handling option aliases, so we don't need separate
options[] table entries for things like 'viminfo'.
2023-12-17 07:23:33 +08:00