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.
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.
Refactor the --version string to remove semicolons. Although semicolons are
present in LINK_OPTIONS, they are not actually included during compilation.
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'.
- add EXTERNALPROJECT_OPTIONS variable to main build
- use `REQUIRED` keyword for IWYU.
- remove check_c_compiler_flag checks when `ENABLE_COMPILER_SUGGESTIONS`
is `ON`. If we explicitly enable it then we probably want it to give
an error if it doesn't exist, rather than silently skip it.
- Move dependency interface libraries to their find module and use them
as a pseudo-imported target.
- Remove BUSTED_OUTPUT_TYPE. It's not used and we can reintroduce it
again if something similar is needed.
- Use LINK_OPTIONS intead of LINK_FLAGS when generating the `--version`
output.
Currently, setting &bg at all re-initializes highlights and reloads
the active colorscheme, even if the actual value of &bg has not changed.
With https://github.com/neovim/neovim/pull/26595 this causes a
regression since &bg is set unconditionally based on the value detected
from the terminal.
Instead, only reload the colorscheme if the actual value of &bg has
changed.
The benefits are primarily being able to use FetchContent, which allows
for a more flexible dependency handling. Other various quality-of-life
features such as `-B` and `-S` flags are also included.
This also removes broken `--version` generation as it does not work for
version 3.10 and 3.11 due to the `JOIN` generator expression.
Reference: https://github.com/neovim/neovim/issues/24004
Cmake 3.28+ will fail if two projects download the same file to prevent
scheduling problems. This can be circumvented by downloading luajit to a
unique location for each target. This is theoretically non-optimal since
we need to download the same file three times for universal builds, but
universal builds are rare and the convenience of this method outweighs
setting up the dependencies optimally. This fixes the currently broken
release workflow for mac.
Closes https://github.com/neovim/neovim/issues/26526.
runtime(doc): remove deprecation warning for gdefault
Deprecated can be misunderstood as being slated for removal; slightly
change wording to be clearer.
82f19734bf
Co-authored-by: dundargoc <gocdundar@gmail.com>
runtime(logtalk): Update Logtalk runtime files for the latest language spec (vim/vim#13697)
0f61943eb7
Co-authored-by: Paulo Moura <pmoura@logtalk.org>
runtime(racket): update Racket runtime files (vim/vim#13693)
This brings the included Racket runtime files to commit 43bfc87 (update
headers, 2023-12-15) of https://github.com/benknoble/vim-racket. Note
that not all files from that repository are included. (In particular,
the ftdetect script is omitted for now.)
5eb9cb53d6
Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
runtime(colorschemes): Update colorschemes (vim/vim#13691)
Minor changes:
- Regenerated using colortemplate 2.2.3
- Removed reversed gui-cursor for some of the colorschemes (retrobox, wildcharm, lunaperche)
- Change MatchParen for some of colorschemes.
0378f07fba
Co-authored-by: Maxim Kim <habamax@gmail.com>
Problem: Updating default color scheme produced some feedback.
Solution: Address the feedback.
Outline of the changes:
- Colors `Grey1` and `Grey2` are made a little bit more extreme (dark -
darker, light - lighter) to increase overall contrast.
- `gui` colors are treated as base with `cterm` colors falling back to
using 0-15 colors which come from terminal emulator.
- Update highlight group definition to not include attribute definition
if it is intended to staty uncolored.
- Tweak some specific highlight groups.
- Add a list of Neovim specific highlight groups which are now defined
differently in a breaking way.
- Minor tweaks in several other places related to default color scheme.
Problem: Moving tabpages on :drop may cause an endless loop
Solution: Disallow moving tabpages on :drop when cleaning up the arglist
first
Moving tabpages during drop command may cause an endless loop
When executing a :tab drop command, Vim will close all windows not in
the argument list. This triggers various autocommands. If a user has
created an 'au Tabenter * :tabmove -' autocommand, this can cause Vim to
end up in an endless loop, when trying to iterate over all tabs (which
would trigger the tabmove autocommand, which will change the tpnext
pointer, etc).
So instead of blocking all autocommands before we actually try to edit
the given file, lets simply disallow to move tabpages around. Otherwise,
we may change the expected number of events triggered during a :drop
command, which users may rely on (there is actually a test, that expects
various TabLeave/TabEnter autocommands) and would therefore be a
backwards incompatible change.
Don't make this an error, as this could trigger several times during the
drop command, but silently ignore the :tabmove command in this case (and
it should in fact finally trigger successfully when loading the given
file in a new tab). So let's just be quiet here instead.
fixes: vim/vim#13676closes: vim/vim#13686df12e39b8b
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: CI: no FreeBSD 14 support
Solution: Drop support for FreeBSD 12, add FreeBSD 14
closes: vim/vim#1305924a95f42b8
N/A patches cirrus:
vim-patch:8.2.4853: CI with FreeBSD is a bit outdated
vim-patch:8.2.4889: CI only tests with FreeBSD 12
vim-patch:9.0.0580: no CI running for MacOS on M1
vim-patch:9.0.0596: CI on Mac M1 has the channel feature disabled
vim-patch:9.0.0668: CI on Mac M1 only uses clang
vim-patch:9.0.0676: CI on Mac M1 with gcc actually uses clang
vim-patch:9.0.1024: CI doesn't use the latest FreeBSD version
vim-patch:9.0.1904: Cirrus-CI fails because we have used all credits
vim-patch:9.0.1912: Cirrus-CI running out of credits
vim-patch:9.0.1979: Cirrus CI disabled
N/A patches github actions:
vim-patch:ed37d9b3241a
vim-patch:8.2.3450: coveralls action fails
vim-patch:8.2.3488: issue template is not easy to use
vim-patch:8.2.3500: Github CI fails to install clang
vim-patch:8.2.3785: running CI on MacOS with gcc is not useful
vim-patch:4e30b5c3bc83
vim-patch:9a4ec5a62632
vim-patch:8.2.3821: ASAN test run fails
vim-patch:8.2.3827: huntr badge does not really fit in the list
vim-patch:8.2.3891: github CI: workflows may overlap
vim-patch:8.2.4061: codecov bash script is deprecated
vim-patch:8.2.4092: MacOS CI: unnecessarily doing "Install packages"
vim-patch:8.2.4096: Linux CI: unnecessarily installing packages
vim-patch:8.2.4222: MS-Windows: clumsy way to suppress progress on CI
vim-patch:8.2.4268: CI log output is long
vim-patch:8.2.4342: CI will soon switch to other windows version
vim-patch:8.2.4351: no coverage is measured on MS-Windows CI
vim-patch:8.2.4353: CI does not use the latest Lua and Python
vim-patch:8.2.4377: CI steps for Windows are a bit unorganized
vim-patch:8.2.4433: CI: cannot see interface versions for MS-Windows
vim-patch:8.2.4743: clang 14 is available on CI
vim-patch:8.2.4764: CI uses an older gcc version
vim-patch:8.2.4768: CI: codecov upload sometimes does not work
vim-patch:8.2.4816: still using older codecov app in some places of CI
vim-patch:8.2.4856: MinGW compiler complains about unknown escape sequence
vim-patch:8.2.4986: some github actions are outdated
vim-patch:8.2.5052: CI checkout step title is a bit cryptic
vim-patch:8.2.5086: CI runs on Windows 2019
vim-patch:8.2.5119: CI uses cache v2
vim-patch:9.0.0264: CI still runs on Ubuntu 18.04
vim-patch:9.0.0267: Coverity workflow still uses Ubuntu 18.04
vim-patch:9.0.0277: Coverity CI: update-alternatives not needed with Ubuntu 20.04
vim-patch:9.0.0302: CI for Coverity is bothered by deprecation warnings
vim-patch:9.0.0305: CI lists useless deprecation warnings
vim-patch:9.0.0401: CI uses older clang version
vim-patch:9.0.0536: CI: codecov action update available
vim-patch:9.0.0570: CI for Windows is still using codecov action 3.1.0
vim-patch:9.0.0573: outdated dependencies go unnoticed
vim-patch:9.0.0593: CI actions have too many permissions
vim-patch:9.0.0704: CI runs "tiny" and "small" builds, which are the same
vim-patch:9.0.0755: huge build on macos always fails on CI
vim-patch:9.0.0759: huge build on macos does not use Perl
vim-patch:9.0.0773: huge build on macos uses dynamic Perl
vim-patch:9.0.0847: CI: not totally clear what MS-Windows version is used
vim-patch:9.0.0937: forked repositories send out useless email
vim-patch:9.0.0941: CI failures in sound dummy
vim-patch:9.0.0946: CI: Error in Coverity flow is not reported
vim-patch:9.0.1071: Codecov action version is too specific
vim-patch:9.0.1114: CI does not use the latest Python version
vim-patch:9.0.1253: CI adds repository unnecessarily
vim-patch:9.0.1289: a newer version of clang can be used for CI
vim-patch:9.0.1384: setting HOMEBREW_NO_AUTO_UPDATE is not needed with version 4
vim-patch:9.0.1473: CI does not run sound tests
vim-patch:9.0.1474: CI runs with old version of Ubuntu and tools
vim-patch:9.0.1536: CI: sound dummy stopped working
vim-patch:9.0.1541: CI: sound dummy is disabled
vim-patch:9.0.1547: Coveralls workflow on CI is commented out
vim-patch:9.0.1548: CI: check in sound-dummy module may throw an error
vim-patch:9.0.1552: CI: sound-dummy module is not installed
vim-patch:9.0.1553: CI: using slightly outdated gcc version
vim-patch:9.0.1562: mixing package managers is not a good idea
vim-patch:9.0.1646: CI: codecov may take a very long time to run
vim-patch:8f5a8d8a8bdc
vim-patch:9.0.1713: Github CI fails to load snd-dummy kernel module
vim-patch:9.0.1733: CI: cannot cache linux-modules-extra
vim-patch:9.0.1736: Github Actions times out after 20 minutes
vim-patch:9.0.1748: CI: cannot label issues automatically
vim-patch:9.0.1751: CI: labeler configuration not found
vim-patch:9.0.1764: CI: label should not be set on all yml files
vim-patch:9180633e6892
vim-patch:9.0.1819: Github CI too complex
vim-patch:213c32318419
vim-patch:9.0.1903: CI fails because snd-dummy modules missing
vim-patch:9.0.1943: CI not run with clang-17
vim-patch:9.0.1954: CI: change netrw label in labeller bot
vim-patch:198734897ead
vim-patch:50f3ec2898a4
vim-patch:4b0018feca3a
vim-patch:cb5e7a2026d3
vim-patch:f1952d9fa8ef
vim-patch:9cc95aa0d8f5
vim-patch:a40e1687e757
vim-patch:c1c3b83816c8
vim-patch:1760331ae317
vim-patch:a02fe3480f8e
N/A patches build system:
vim-patch:8.2.0591: MS-Windows: should always support IPv6
vim-patch:8.2.3507: generating proto files may fail
vim-patch:8.2.3565: Makefile dependencies are outdated
vim-patch:8.2.3863: various build flags accidentally enabled
vim-patch:8.2.4130: MS-Windows: MSVC build may have libraries duplicated
vim-patch:8.2.4220: MS-Windows: some old compiler support remains
vim-patch:8.2.4244: MS-Windows: warning from MSVC on debug build
vim-patch:8.2.4271: MS-Windows: cannot build with Ruby 3.1.0
vim-patch:8.2.4284: old mac resources files are no longer used
vim-patch:8.2.4423: "make nvcmdidxs" fails
vim-patch:8.2.4491: MS-Windows makefile dependencies are outdated
vim-patch:8.2.4517: MS-Windows: cannot specify location of sodium library
vim-patch:8.2.4524: MS-Windows: cannot build with some sodium libraries
vim-patch:8.2.4596: installing tutor binary may fail
vim-patch:8.2.5031: cannot easily run the benchmarks
vim-patch:8.2.5090: MS-Windows: vim.def is no longer used
vim-patch:8.2.5101: MS-Windows with MinGW: $CC may be "cc" instead of "gcc"
vim-patch:8.2.5153: "make uninstall" does not remove colors/lists
vim-patch:8.2.5171: dependencies and proto files are outdated
vim-patch:9.0.0029: the bitmaps/vim.ico file is not in the distribution
vim-patch:9.0.0241: "make install" does not install shared syntax file
vim-patch:9.0.0242: "make install" still fails
vim-patch:9.0.0421: MS-Windows makefiles are inconsistently named
vim-patch:9.0.0477: missing dependency may cause crashes on incomplete build
vim-patch:9.0.0542: MSVC build still has support for 2012 edition
vim-patch:9.0.0588: MorphOS build is broken
vim-patch:9.0.0594: Makefile error message causes a shell error
vim-patch:9.0.0857: selecting MSVC 2017 does not set $PLATFORM
vim-patch:9.0.0879: unnecessary nesting in makefile
vim-patch:9.0.1342: MS-Windows: linking may fail with space in directory name
vim-patch:9.0.1486: parallel make might not work
vim-patch:9.0.1630: "make clean" at the toplevel fails
vim-patch:9.0.1681: Build Failure with Perl 5.38
vim-patch:9.0.1739: Leftover files in libvterm
vim-patch:9.0.1823: Autoconf 2.69 too old
vim-patch:9.0.1839: No Makefile rule to build cscope database
vim-patch:9.0.2028: confusing build dependencies
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Comparing against the old value before setting matched the original
C implementation, but there is no reason to use this restriction. In
particular, this inhibits using OptionSet to determine when the option
was set. If users need to handle a case where the option _changed_, it
is easy to do so in an OptionSet autocommand using v:option_new and
v:option_old (and friends).
Notable changes:
- Downloads are significantly faster, upwards of 90% improvement in worst case
scenarios.
- Artifacts can be downloaded from other workflow runs and repositories when
supplied with a PAT.
runtime(vim): Update syntax file, fix missing for highlight (vim/vim#13668)
Fix highlighting of :for command. Link the vimFor syntax group to the
vimCommand highlight group.
Error introduced in commit f686921
1c97b5c0c0
Co-authored-by: dkearns <dougkearns@gmail.com>
runtime(sbt): do not set b:did_ftplugin before sourcing scala ftplugin(vim/vim#13657)
The `b:did_ftplugin` guard was set and prevented us from actually sourcing `ftplugin/scala.vim`. Since the latter script also sets the guard properly, we can simply remove the guard here.
5a68cdf149
Co-authored-by: Karl Yngve Lervåg <karl.yngve@lervag.net>
runtime(vim): Update syntax file (vim/vim#13653)
Improve variable highlighting in :let, :unlet, :const and :for commands.
Match registers and local, global and terminal option variables.
f6869212c9
Co-authored-by: dkearns <dougkearns@gmail.com>
Having a dynamically generated string is more maintainable than having
multiple files.
Also add linker flags and any potential LTO flags to the --version
output.
Anonymous namespaces are more difficult to extend or hook into since
they do not appear in the output of nvim_get_namespaces(). Use named
namespaces instead.
Problem: We have `P_(BOOL|NUM|STRING)` macros to represent an option's type, which is redundant because `OptValType` can already do that. The current implementation of option type flags is also too limited to allow adding multitype options in the future.
Solution: Remove `P_(BOOL|NUM|STRING)` and replace it with a new `type_flags` attribute in `vimoption_T`. Also do some groundwork for adding multitype options in the future.
Side-effects: Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no longer gives an error.
Problem: Unpaired marks are invalidated if its column is deleted,
which may just be a "placeholder" column, e.g. for signs.
Solution: Only remove unpaired marks if its entire row is deleted.
Problem:
Unlike termopen(), nvim_open_term() PTYs do not carriage-return the
cursor on newline ("\n") input.
nvim --clean
:let chan_id = nvim_open_term(1, {})
:call chansend(chan_id, ["here", "are", "some", "lines"])
Actual behavior:
here
are
some
lines
Expected behaviour:
here
are
some
lines
Solution:
Add `force_crlf` option, and enable it by default.
Problem: 'termsync' overwrites the first parameter of a format string
when UNIBI_OUT() encounters an overflow.
Solution: Don't use tui->params[] for 'termsync'.