Commit Graph

28090 Commits

Author SHA1 Message Date
dundargoc
404fdb0f36 build: cmake fixes
- 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.
2023-12-16 21:06:28 +01:00
Gregory Anders
8fb7419d7c
refactor: only reload colorscheme if &bg changed (#26598)
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.
2023-12-16 11:18:45 -06:00
dundargoc
7840760776 build: bump minimum cmake version to 3.13
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
2023-12-16 17:17:24 +01:00
dundargoc
896b400bff build: fix universal mac builds
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.
2023-12-16 16:47:22 +01:00
Christian Clason
69f5f0e20e vim-patch:82f19734bfcb
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>
2023-12-16 15:57:22 +01:00
Christian Clason
bf382df84f vim-patch:0f61943eb776
runtime(logtalk): Update Logtalk runtime files for the latest language spec (vim/vim#13697)

0f61943eb7

Co-authored-by: Paulo Moura <pmoura@logtalk.org>
2023-12-16 15:57:22 +01:00
Christian Clason
ba613d63c4 vim-patch:5eb9cb53d619
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>
2023-12-16 15:57:22 +01:00
Christian Clason
6b8084a6be vim-patch:0378f07fbaee
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>
2023-12-16 15:43:26 +01:00
notomo
c18f3cfcdb
fix(api): crash after nvim_win_set_config title/footer validation error (#26606) 2023-12-16 21:58:04 +08:00
Evgeni Chasnovski
574519d9d6 feat(highlight): tweak default color scheme
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.
2023-12-16 14:43:03 +01:00
zeertzjq
19fed6bde1
vim-patch:9.0.2168: Moving tabpages on :drop may cause an endless loop (#26605)
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#13676
closes: vim/vim#13686

df12e39b8b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 21:30:08 +08:00
dundargoc
a6d5bedb7d
vim-patch:9.0.1892: CI: no FreeBSD 14 support (#26604)
Problem:  CI: no FreeBSD 14 support
Solution: Drop support for FreeBSD 12, add FreeBSD 14

closes: vim/vim#13059

24a95f42b8

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>
2023-12-16 21:12:31 +08:00
bfredl
5ed55ff14c
Merge pull request #24723 from glepnir/popup
feat(complete): completeopt support popup like vim
2023-12-16 12:41:05 +01:00
mathew
e38027ef69 feat(ui): completeopt support popup like vim 2023-12-16 18:59:59 +08:00
bfredl
7e7da962de
Merge pull request #26512 from famiu/refactor/options/type_flags
refactor(options): remove option type macros
2023-12-16 11:39:30 +01:00
dundargoc
7cae94e91e vim-patch:e06f2b498ccc
runtime(doc): fix typo in change.txt

e06f2b498c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 10:29:50 +01:00
Gregory Anders
f4f7e29469
refactor(defaults): always set options, even if value hasn't changed (#26595)
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).
2023-12-15 16:35:55 -06:00
zeertzjq
0d26d192d8
vim-patch:9a775b4a2ae6 (#26588)
runtime(netrw): escape curdir in BrowseUpDir (vim/vim#13681)

 fixes vim/vim#13678

9a775b4a2a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 05:28:57 +08:00
Gregory Anders
224b2ec202
Merge pull request #26579 from gpanders/defer-set-tgc
refactor(defaults): defer setting 'termguicolors' until after VimEnter
2023-12-15 09:23:12 -06:00
dependabot[bot]
d82168e41c
ci: bump actions/upload-artifact from 3 to 4
Uploads are significantly faster, upwards of 90% improvement in worst case
scenarios.
2023-12-15 13:53:14 +01:00
dependabot[bot]
0463403030
ci: bump actions/download-artifact from 3 to 4
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.
2023-12-15 13:51:51 +01:00
Christian Clason
34f008e247 vim-patch:3afc9f2556fa
runtime(cmake): sync runtime files with upstream (vim/vim#13597)

3afc9f2556

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2023-12-15 10:30:13 +01:00
Christian Clason
65032e03e0 vim-patch:1c97b5c0c0b4
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>
2023-12-15 10:30:13 +01:00
Christian Clason
7e717805be vim-patch:b52e7ac7c61c
runtime(netrw): Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2` (vim/vim#13659)

* NetRW: Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2`
* NetRW: Fix wrong `w:netrw_bannercnt` setting

closes: vim/vim#13640

b52e7ac7c6

Co-authored-by: KSR-Yasuda <31273423+KSR-Yasuda@users.noreply.github.com>
2023-12-15 10:30:13 +01:00
Christian Clason
02e8582230 vim-patch:5a68cdf14915
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>
2023-12-15 10:30:13 +01:00
Christian Clason
745b74162c vim-patch:f6869212c9e1
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>
2023-12-15 10:30:13 +01:00
dundargoc
f31f260f0c build: rework --version generation
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.
2023-12-15 00:19:38 +01:00
zeertzjq
165e5ececc
vim-patch:17dca3cb97cd (#26584)
runtime(doc): grammar & typo fixes

closes: vim/vim#13654

17dca3cb97

Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-12-15 06:42:29 +08:00
zeertzjq
046efa106e
vim-patch:323dda1484d9 (#26583)
runtime(termdebug): add Tbreak command

closes: vim/vim#13656

323dda1484

Co-authored-by: iam28th <artyom28th@gmail.com>
2023-12-15 06:27:49 +08:00
Gregory Anders
b0e2643cb2 refactor(defaults): defer setting 'termguicolors' until after VimEnter
This ensures that any OptionSet autocommands will fire when the value is
changed.
2023-12-14 11:42:17 -06:00
Gregory Anders
ffeb31c2f9 fix(termcap): set 'nested' on TermResponse autocommand 2023-12-14 11:38:34 -06:00
Gregory Anders
ef38fdfdc6
refactor(diagnostic): use named namespaces (#26568)
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.
2023-12-14 09:19:33 -06:00
Gregory Anders
ddcbc5c78a
docs: add comment for OSC 11 tmux passthrough (#26566) 2023-12-14 08:38:26 -06:00
dependabot[bot]
7db9992445
ci: bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)
2023-12-14 14:16:35 +01:00
Lewis Russell
97bea3163a feat(lsp): more annotations 2023-12-14 12:39:18 +00:00
Famiu Haque
3c2c022e5e
refactor(options): remove option type macros
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.
2023-12-14 16:46:42 +06:00
Luuk van Baal
320e9c1c21 fix(extmark): only invalidate unpaired marks on deleted rows
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.
2023-12-14 08:55:00 +00:00
zeertzjq
aa05133b0e
test(nvim_open_term): don't resize after creating terminal (#26570)
This makes the screen states consistently have no EOB lines.
2023-12-14 16:41:08 +08:00
Raphael
619407eb54
feat(nvim_open_term): convert LF => CRLF (#26384)
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.
2023-12-14 16:08:00 +08:00
Gregory Anders
36552adb39
ci: add gpanders as reviewer for defaults and tui labels (#26567) 2023-12-13 20:06:59 -06:00
zeertzjq
846714ca3e
fix(tui): don't use tui->params[] for 'termsync' (#26565)
Problem:  'termsync' overwrites the first parameter of a format string
           when UNIBI_OUT() encounters an overflow.
Solution: Don't use tui->params[] for 'termsync'.
2023-12-14 09:32:05 +08:00
Jaehwang Jung
5aa1ba3efe
fix(defaults): background detection in tmux (#26557)
Wrap the query with passthrough sequence
2023-12-14 06:16:21 +08:00
dundargoc
1d63a057a6 docs: fix links 2023-12-13 20:31:16 +01:00
dundargoc
7908dc0d15 docs: move vim-patch wiki page to runtime documentation 2023-12-13 18:31:05 +01:00
dundargoc
fbd0f6658f docs: add installation and build guides from wiki to repo 2023-12-13 17:53:36 +01:00
dundargoc
c8223007d0 docs: add code-overview from wiki to src/nvim/README.md 2023-12-13 17:52:35 +01:00
Gregory Anders
ad6c4c2e9d
Merge pull request #26555 from gpanders/diagnostic-sign-fixup
Diagnostic sign fixups
2023-12-13 10:38:16 -06:00
dundargoc
ef58ee48f4
docs: add wiki FAQ to the runtime documentation (#26539)
Problem: Wiki contents are not discoverable and hard to maintain.
Solution: Move FAQ to runtime docs.

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2023-12-13 17:31:39 +01:00
Gregory Anders
a3b3978474 feat(diagnostics): support numhl and linehl for diagnostic signs 2023-12-13 09:56:10 -06:00
Gregory Anders
39112c72dd docs(diagnostic): fix typo in example 2023-12-13 09:43:27 -06:00