Commit Graph

24699 Commits

Author SHA1 Message Date
dundargoc
ffd216e869
build: create test/CMakeLists.txt and move test-related code (#22179)
Having a clear separation between build code and test code makes it
easier to get a higher-level understanding of how the neovim build
works.
2023-02-08 23:46:39 +01:00
dundargoc
5638813066
build: reuse source files with interface library (#22177)
This will minimize duplication by only needing to specify required files for nvim and libnvim once.
2023-02-08 19:31:10 +01:00
bfredl
7404f481ba
Merge pull request #22172 from bfredl/cells
perf(ui): mitigate redraw latency regression from TUI refactor
2023-02-08 18:36:36 +01:00
dundargoc
2294210660
ci: remove fail summary (#22174)
The tests already have a summary at the end, there's no need for an
additional fail summary wrapper.
2023-02-08 18:32:17 +01:00
dundargoc
eebed91d11
build: remove unused function get_test_target (#22176) 2023-02-08 18:20:45 +01:00
dundargoc
d6d3a92013
build: replace check-single-includes with clang-tidy (#22061)
Clang-tidy already does what check-single-includes does automatically on
top of its regular linting. It is also generator independent, so it
doesn't take an eternity to run on slower generators such as Visual
Studio.
2023-02-08 18:16:48 +01:00
bfredl
28e26e05bc perf(ui): mitigate redraw latency regression from TUI refactor
While the new RPC encoder/decoder implementation in general should have
less overhead than the deleted UIBridge serializer previously used for
the TUI, it regresses on redraw latency in one important aspect.

The old bridge implementation allowed the TUI to process a
previous screen line internally in parallel with the main thread
rendering the next one in win_line etc. As printing the escape
sequences in highlighted cells has a considerable hit in profiles,
this has a substantial effect on redraw latency. The RPC implementation,
however, waits with sending any data until either a flush, or the buffer is full.

This change lowers the granularity of communication again, using an
adjustable threshold counted in number of cell events (discounting
long repeats and clearing as maximum a single extra event).

The current value is guesstimated to something simple on a reasonable
scale, which should be bigger than a single line, but multiple events
for a big multi-window screen.
2023-02-08 18:02:55 +01:00
bfredl
625e990976 refactor(ui): cleanup 'redrawdebug', introduce "flush" mode 2023-02-08 18:02:55 +01:00
dundargoc
f4c836ad70
build(windows): specify Windows 8 as the minimum version (#22173)
This will allow MSVC to use newer features not available in Vista and
Windows 7.
2023-02-08 17:37:15 +01:00
dundargoc
0fc9a232e0
ci: remove unnecessary END_MARKER variable (#22171) 2023-02-08 16:21:50 +01:00
dundargoc
3074ae6971
ci(oldtest): make a copy of scripts of ci/common in testdir (#22170)
Having separate copies makes it easier to not accidentally break
something when modifying the scripts.
2023-02-08 16:21:05 +01:00
Christian Clason
464b7b1e77
Merge pull request #22165 from clason/bump-Luv
build(deps): bump Luv to HEAD - e8e7b7e13
docs(luvref): update to latest version
2023-02-08 14:37:50 +01:00
Christian Clason
07a6bc2be3
build(deps): bump libuv to HEAD - 62c2374a8 (#22166) 2023-02-08 14:37:04 +01:00
Christian Clason
d0008bd626 docs(luvref): update to version bump 2023-02-08 11:28:32 +01:00
dundargoc
4d2c1004e9
build: prefer -D <variable>=<value> over -D<variable>=<value> (#22164)
This makes it easier to see that -D is referring to the entire
"<variable>=<value>", rather than only <variable>. It also help syntax
highlighters highlight built-in variables.
2023-02-08 11:00:16 +01:00
Christian Clason
893c7b9bb1 build(deps): bump Luv to HEAD - e8e7b7e13 2023-02-08 10:58:39 +01:00
Enan Ajmain
645daaf5e9
build(Windows): make bundling nvim-qt optional (#21866)
Closes https://github.com/neovim/neovim/issues/14552.
2023-02-08 10:08:18 +01:00
Christian Clason
1ca4a8b1dd
vim-patch:9.0.1291: Move language files are not recognized (#22162)
Problem:    Move language files are not recognized.
Solution:   Recognize Move language files. (Amaan Qureshi, closes vim/vim#11947)

6642982bea

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-02-08 09:47:55 +01:00
dundargoc
81c5483dcb
ci: add universal macos job (#22156)
The universal macos release is particularly sensitive to build system
changes. Adding a job that builds a universal binary whenever a cmake
file is changed will help prevent future release breaks.
2023-02-07 23:09:08 +01:00
dundargoc
d38dfdca58
build: remove duplicate INTERFACE keyword (#22106) 2023-02-07 21:37:16 +01:00
dundargoc
c1d76363ac
ci: simplify how environment variables are used (#22067)
Having a clear separation between when we manipulate variables and when
we export them to GITHUB_ENV makes it less error-prone.
2023-02-07 14:43:45 +01:00
Christian Clason
8fbe75b3dd
vim-patch:9.0.1288: FunC files are not recognized (#22153)
Problem:    FunC files are not recognized.
Solution:   Recognize FunC files. (Amaan Qureshi, closes vim/vim#11949)

91deac4539

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-02-07 10:29:37 +01:00
dundargoc
adae075fcf
ci: remove unnecessary variables and functions (#22150) 2023-02-07 09:27:51 +01:00
zeertzjq
1391385ba9
vim-patch:9.0.1290: CTRL-N and -P on cmdline don't trigger CmdlineChanged (#22151)
Problem:    CTRL-N and -P on cmdline don't trigger CmdlineChanged.
Solution:   Jump to cmdline_changed instead of cmdline_not_changed.
            (closes vim/vim#11956)

af9e28a5b8

Cherry-pick Test_Cmdline() change from patch 9.0.1039.
2023-02-07 07:54:33 +08:00
dundargoc
3170e05d57
build: don't build libnvim when running the CI (#22149)
It shouldn't be sneakily run alongside the nvim build. If it's to
be used it should be done in a separate step.
2023-02-06 23:42:03 +01:00
dundargoc
aa04efcf57
ci: remove unhelpful helper functions for make (#22148) 2023-02-06 23:14:41 +01:00
Christian Clason
e1f03c481a
feat(spell): also source spell/LANG.lua when setting spelllang (#22111)
Problem: only Vimscript files are sourced when setting spelling language
Solution: also source Lua files after sourcing Vimscript files

Closes #22110
2023-02-06 10:01:38 +01:00
Amaan Qureshi
1675f0e270
vim-patch:9.0.1282: Ron files are not recognized (#22132)
Problem:    Ron files are not recognized.
Solution:   Recognize Ron files. (Amaan Qureshi, closes vim/vim#11948)

c8ef30bc2e
2023-02-06 10:01:17 +01:00
Mateusz Majewski
6c39edaa7e
fix(health): iterate using ipairs correctly (#22119)
In a few places ipairs was used to iterate over elements of the array.
However, the first return value of ipairs was erronously used, which is
not the value, but rather the index. This would result in errors, for
instance when trying to retrieve a field from the value.
2023-02-06 12:24:00 +08:00
Lewis Russell
228684d2fb
fix(decoration): don't show signcolumn for non-sign_text extmark (#22135)
Fixes: #22127
2023-02-05 23:49:43 +00:00
Lewis Russell
7963a160e9
Merge pull request #21548 from figsoda/transform-capture
feat(treesitter): allow capture text to be transformed
2023-02-05 21:31:30 +00:00
Christian Clason
23e34fe534
vim-patch:9.0.1281: Cadence files are not recognized (#22130)
Problem:    Cadence files are not recognized.
Solution:   Recognize Cadence files. (Janez Podhostnik, closes vim/vim#11951)

cb626a4692

Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
2023-02-05 17:59:18 +01:00
figsoda
4c66f5ff97 feat(treesitter): respect metadata[id].range for offset! 2023-02-04 21:15:03 -05:00
figsoda
e1d5ad1cb8 feat(treesitter): add metadata option for get_node_text 2023-02-04 21:15:03 -05:00
figsoda
bb8845340b feat(treesitter): allow capture text to be transformed
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2023-02-04 21:04:45 -05:00
zeertzjq
5c4b503d3c
vim-patch:9.0.1279: display shows lines scrolled down erroneously (#22126)
Problem:    Display shows lines scrolled down erroneously. (Yishai Lerner)
Solution:   Do not change "wl_lnum" at index zero. (closes vim/vim#11938)

61fdbfa1e3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-05 09:37:12 +08:00
Christian Clason
4b9bb3a184
vim-patch:9.0.1278: go.work.sum files are not recognized (#22121)
Problem:    go.work.sum files are not recognized.
Solution:   Recognize go.work.sum files as the gosum filetype. (Amaan Qureshi,
            closes vim/vim#11940)

4ad8ae8465

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-02-04 16:05:45 +01:00
Lewis Russell
9a5678463c
fix(treesitter): fix most diagnostics 2023-02-04 14:58:38 +00:00
zeertzjq
69bb145cea
refactor(exit): pass error message to preserve_exit() (#22097)
Problem:
1. Some calls to preserve_exit() don't put a message in IObuff, so the
   IObuff printed by preserve_exit() contains unrelated information.
2. If a TUI client runs out of memory or receives a deadly signal, the
   error message is shown on alternate screen and cannot be easily seen
   because the TUI exits alternate screen soon afterwards.

Solution:
Pass error message to preserve_exit() and exit alternate screen before
printing it.

Note that this doesn't fix the problem that server error messages cannot
be easily seen on exit. This is tracked in #21608 and #21843.
2023-02-04 20:14:31 +08:00
zeertzjq
90333b24c3
vim-patch:9.0.1277: cursor may move with autocmd in Visual mode (#22116)
Problem:    Cursor may move with autocmd in Visual mode.
Solution:   Restore "VIsual_active" before calling check_cursor().
            (closes vim/vim#11939)

49f0524fb5
2023-02-04 19:35:31 +08:00
dundargoc
964ae205a5
build: unbreak building neovim with multi-config generators (#22104)
file(GENERATE) has surprising behavior as it doesn't allow different
file contents for configurations with the same file name. This results
in an error when building neovim with a multi-config generator. Use a
workaround for now where we set the build type for multi-config
generators to "Unknown".
2023-02-03 10:53:57 +01:00
Christian Clason
144279ef30
vim-patch:be4e01637e71 (#22103)
Update runtime files.

be4e01637e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-03 09:18:18 +01:00
dundargoc
f9826e1dff
build: stop relying on CMAKE_BUILD_TYPE to determine the build type (#22051)
Any logic involving CMAKE_BUILD_TYPE is automatically broken as it won't
work with multi-config generators. The only exception is if we
explicitly check whether the current generator is single-config as well.
Instead, use generator expressions or cmake variables that allows to set
options for certain build types only such as
INTERPROCEDURAL_OPTIMIZATION_<CONFIG>.

Opt to generate all headers with optimization level O2 with no debug
information for all build types as that is the simplest way to make it
behave the same for all generators.
2023-02-03 00:00:15 +01:00
dundargoc
ebd2372f92
refactor: use flexible arrays instead of the length-of-one trick (#22072)
The "length-of-one" trick, where the last element of a struct is an
array of size 1, but extra size is allocated when calling malloc where
it uses more than 1 element in the array, cause problems with some
compilers. Some compilers set _FORTIFY_SOURCE=2 by default which
incorrectly considers it as an overflow. More information:
https://github.com/neovim/neovim/issues/223#issuecomment-1413828554

Using flexible array members allows us to to properly convey to the
compiler that its size may be larger than 1. This also enables us to
remove lengthy workarounds that are unreliable, as they depend on
CMAKE_BUILD_TYPE which isn't defined for multi-config generators.

Closes: https://github.com/neovim/neovim/issues/223
2023-02-02 23:56:25 +01:00
bfredl
0ea4156464
Merge pull request #22098 from tmccombs/sockopen-docs
docs: clarify "pipe" mode for sockconnect
2023-02-02 19:09:02 +01:00
Christian Clason
c05b3c3bbd
vim-patch:9.0.1274: FIRRTL files are not recognized (#22102)
Problem:    FIRRTL files are not recognized.
Solution:   Add a pattern for FIRRTL files. (Amaan Qureshi, closes vim/vim#11931)

685bf83b73

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-02-02 17:26:22 +01:00
zeertzjq
d3355ad01c
fix(tui): detach/attach on suspend/resume (#22040)
Problem:
When a TUI client is suspended it still receives UI events from the
server, and has to process these accumulated events when it is resumed.
With mulitple TUI clients this is a bigger problem, considering the
following steps:
1. A TUI client is attached.
2. CTRL-Z is pressed and the first client is suspended.
3. Another TUI client is attached.
4. CTRL-Z is pressed and a "suspend" event is sent to both clients. The
   second client is suspended, while the first client isn't able to
   process the event because it has already been suspended.
5. The first client is resumed. It processes the accumulated "suspend"
   event and suspends immediately.

Solution:
Make a TUI client detach on suspend and re-attach on resume.
2023-02-02 22:42:15 +08:00
bfredl
cbf9199d65
Merge pull request #21331 from LiadOz/LiadOz/prompt-insert-extmark
fix(extmarks): adjust extmarks when inserting prompt prefix
2023-02-02 15:23:09 +01:00
bfredl
405f0a8c3f build: update release data 2023-02-02 14:37:44 +01:00
Lewis Russell
b02eeb6a72
fix(lua): mark some eval functions that can run in API-fast 2023-02-02 13:21:44 +00:00