aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-02-02 19:02:58 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-02-02 19:02:58 +0000
commitb255fa570d8b041e4c81e3454d51e06100c2fa4f (patch)
treed3b246b467500ca48067ed4a45d2fa53966cd9f1
parenteeccad2ff1ae8892fe9e06d733a7b07a166eecb0 (diff)
parent0bd07bea095a8000cffa4f379c1fa53e009c1143 (diff)
downloadrneovim-20230125_mix.tar.gz
rneovim-20230125_mix.tar.bz2
rneovim-20230125_mix.zip
Merge branch 'aucmd_textputpost' into 20230125_mix20230125_mix
-rw-r--r--.github/workflows/ci.yml11
-rwxr-xr-x.github/workflows/env.sh13
-rw-r--r--.github/workflows/news.yml7
-rw-r--r--CMakeLists.txt23
-rw-r--r--CONTRIBUTING.md5
-rw-r--r--Makefile4
-rw-r--r--ci/common/build.sh10
-rw-r--r--cmake.config/config.h.in2
-rw-r--r--cmake.deps/CMakeLists.txt8
-rw-r--r--cmake.deps/cmake/BuildLibvterm.cmake31
-rw-r--r--cmake.deps/cmake/BuildLuarocks.cmake2
-rw-r--r--cmake.deps/cmake/Libvterm-tbl2inc_c.cmake163
-rw-r--r--cmake.deps/cmake/LibvtermCMakeLists.txt58
-rw-r--r--cmake/FindLIBVTERM.cmake10
-rw-r--r--cmake/FindUNIBILIUM.cmake12
-rw-r--r--cmake/Findlibvterm.cmake20
-rw-r--r--cmake/Findunibilium.cmake27
-rw-r--r--cmake/RunTests.cmake10
-rw-r--r--runtime/doc/api.txt2
-rw-r--r--runtime/doc/builtin.txt15
-rw-r--r--runtime/doc/repeat.txt4
-rw-r--r--runtime/doc/starting.txt8
-rw-r--r--runtime/doc/treesitter.txt1
-rw-r--r--runtime/lua/man.lua16
-rw-r--r--runtime/lua/nvim/health.lua11
-rw-r--r--runtime/lua/vim/_init_packages.lua9
-rw-r--r--runtime/lua/vim/filetype.lua6
-rw-r--r--runtime/lua/vim/treesitter/language.lua12
-rw-r--r--runtime/nvim.appdata.xml3
-rwxr-xr-xscripts/bump_deps.lua2
-rwxr-xr-xsrc/nvim/CMakeLists.txt59
-rw-r--r--src/nvim/api/autocmd.c2
-rw-r--r--src/nvim/auevents.lua1
-rw-r--r--src/nvim/buffer_defs.h1
-rw-r--r--src/nvim/cmdexpand.c19
-rw-r--r--src/nvim/drawline.c13
-rw-r--r--src/nvim/edit.c2
-rw-r--r--src/nvim/eval.lua68
-rw-r--r--src/nvim/eval/funcs.c55
-rw-r--r--src/nvim/eval/typval.c80
-rw-r--r--src/nvim/eval/userfunc.c9
-rw-r--r--src/nvim/eval/vars.c2
-rw-r--r--src/nvim/file_search.c2
-rw-r--r--src/nvim/fileio.c178
-rw-r--r--src/nvim/getchar.c12
-rw-r--r--src/nvim/highlight.c10
-rw-r--r--src/nvim/highlight_defs.h4
-rw-r--r--src/nvim/highlight_group.c9
-rw-r--r--src/nvim/lua/executor.c70
-rw-r--r--src/nvim/main.c21
-rw-r--r--src/nvim/marktree.c2
-rw-r--r--src/nvim/memline.c5
-rw-r--r--src/nvim/message.c2
-rw-r--r--src/nvim/normal.c4
-rw-r--r--src/nvim/ops.c52
-rw-r--r--src/nvim/option.c972
-rw-r--r--src/nvim/optionstr.c308
-rw-r--r--src/nvim/os/fs.c6
-rw-r--r--src/nvim/path.c2
-rw-r--r--src/nvim/regexp_bt.c2
-rw-r--r--src/nvim/regexp_nfa.c2
-rw-r--r--src/nvim/runtime.c244
-rw-r--r--src/nvim/screen.c11
-rw-r--r--src/nvim/search.c7
-rw-r--r--src/nvim/sign.c2
-rw-r--r--src/nvim/sign_defs.h6
-rw-r--r--src/nvim/spell.c2
-rw-r--r--src/nvim/spellfile.c2
-rw-r--r--src/nvim/spellsuggest.c2
-rw-r--r--src/nvim/syntax.c2
-rw-r--r--src/nvim/tag.c228
-rwxr-xr-xsrc/nvim/testdir/runnvim.sh3
-rw-r--r--src/nvim/testdir/test_edit.vim15
-rw-r--r--src/nvim/testdir/test_filetype.vim9
-rw-r--r--src/nvim/testdir/test_fold.vim58
-rw-r--r--src/nvim/testdir/test_gf.vim25
-rw-r--r--src/nvim/testdir/test_normal.vim46
-rw-r--r--src/nvim/testdir/test_packadd.vim84
-rw-r--r--src/nvim/testdir/test_search_stat.vim23
-rw-r--r--src/nvim/testdir/test_taglist.vim4
-rw-r--r--src/nvim/testdir/test_virtualedit.vim13
-rw-r--r--src/nvim/testdir/test_visual.vim11
-rw-r--r--src/nvim/testing.c49
-rw-r--r--src/nvim/textformat.c32
-rw-r--r--src/nvim/tui/input.c16
-rw-r--r--src/nvim/tui/input.h8
-rw-r--r--src/nvim/tui/tui.c5
-rw-r--r--src/nvim/ui_client.c29
-rw-r--r--src/nvim/undo.c8
-rw-r--r--src/nvim/usercmd.c1
-rw-r--r--src/nvim/version.c46
-rw-r--r--src/nvim/vim.h1
-rw-r--r--src/nvim/window.c30
-rw-r--r--test/busted_runner.lua1
-rw-r--r--test/cmakeconfig/paths.lua.in1
-rw-r--r--test/functional/api/extmark_spec.lua8
-rw-r--r--test/functional/api/highlight_spec.lua6
-rw-r--r--test/functional/core/startup_spec.lua7
-rw-r--r--test/functional/fixtures/fake-lsp-server.lua12
-rw-r--r--test/functional/lua/runtime_spec.lua6
-rw-r--r--test/functional/plugin/lsp/helpers.lua9
-rw-r--r--test/functional/plugin/lsp_spec.lua8
-rw-r--r--test/functional/plugin/man_spec.lua6
-rw-r--r--test/functional/terminal/tui_spec.lua6
-rw-r--r--test/functional/treesitter/language_spec.lua5
-rw-r--r--test/functional/ui/statuscolumn_spec.lua21
-rw-r--r--test/functional/vimscript/exepath_spec.lua43
-rw-r--r--test/unit/eval/typval_spec.lua5
-rw-r--r--test/unit/helpers.lua5
-rw-r--r--test/unit/tui_spec.lua2
110 files changed, 2006 insertions, 1646 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b158d966e1..83ee4f0358 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -128,7 +128,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup common environment variables
- run: ./.github/workflows/env.sh lint
+ run: ./.github/workflows/env.sh lintc
- name: Install apt packages
run: |
@@ -141,14 +141,17 @@ jobs:
libtree-sitter-dev \
libunibilium-dev \
libuv1-dev \
- libvterm-dev \
lua-busted \
lua-filesystem \
lua-inspect \
lua-lpeg \
- lua-luv-dev \
lua-nvim \
luajit
+ # libvterm-dev \
+ # lua-luv-dev
+
+ # Remove comments from packages once we start using these external
+ # dependencies. See env.sh for more context.
- uses: ./.github/actions/cache
@@ -156,7 +159,7 @@ jobs:
run: ./ci/before_script.sh
- name: Build nvim
- run: ./ci/run_tests.sh build_nvim
+ run: make
- if: "!cancelled()"
name: Determine if run should be aborted
diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh
index d93552fed3..42a355da44 100755
--- a/.github/workflows/env.sh
+++ b/.github/workflows/env.sh
@@ -26,7 +26,6 @@ BUILD_FLAGS="CMAKE_FLAGS=-DCI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_
case "$FLAVOR" in
asan)
- BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
cat <<EOF >> "$GITHUB_ENV"
CLANG_SANITIZER=ASAN_UBSAN
ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan:intercept_tls_get_addr=0
@@ -44,13 +43,15 @@ EOF
BUILD_UCHAR=1
EOF
;;
- lint)
+ lintc)
# Re-enable once system deps are available
# BUILD_FLAGS="$BUILD_FLAGS -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1"
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUV=ON"
- cat <<EOF >> "$GITHUB_ENV"
-USE_BUNDLED=OFF
-EOF
+
+ # Ideally all dependencies should external for this job, but some
+ # dependencies don't have the required version available. We use the
+ # bundled versions for these with the hopes of being able to remove them
+ # later on.
+ DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON"
;;
functionaltest-lua)
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml
index 46ac0ec02d..11807e9b42 100644
--- a/.github/workflows/news.yml
+++ b/.github/workflows/news.yml
@@ -22,9 +22,10 @@ jobs:
{
echo "
Pull request includes a new feature or a breaking change, but
- news.txt hasn't been updated yet. news.txt is our primary way of
- communicating changes to users so it's important to keep it up to
- date."
+ news.txt hasn't been updated yet. This is just a reminder
+ that news.txt may need to be updated. You can ignore this CI
+ failure if you think the change won't be of interest to
+ users."
exit 1
}
fi
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 493c212996..9c0d999ab8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,11 @@ set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+find_program(CCACHE_PRG ccache)
+if(CCACHE_PRG)
+ set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CCACHE_PRG})
+endif()
+
# Prefer our bundled versions of dependencies.
if(DEFINED ENV{DEPS_BUILD_DIR})
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
@@ -112,11 +117,6 @@ endif()
message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
set_default_buildtype()
-if(CMAKE_BUILD_TYPE MATCHES Debug)
- set(DEBUG 1)
-else()
- set(DEBUG 0)
-endif()
# If not in a git repo (e.g., a tarball) these tokens define the complete
# version string, else they are combined with the result of `git describe`.
@@ -370,7 +370,7 @@ endif()
if(BUSTED_PRG)
get_target_property(TEST_INCLUDE_DIRS main_lib INTERFACE_INCLUDE_DIRECTORIES)
- set(UNITTEST_PREREQS nvim-test)
+ set(UNITTEST_PREREQS nvim)
set(FUNCTIONALTEST_PREREQS nvim printenv-test printargs-test shell-test pwsh-test streams-test tty-test ${GENERATED_HELP_TAGS})
set(BENCHMARK_PREREQS nvim tty-test)
@@ -380,6 +380,7 @@ if(BUSTED_PRG)
COMMAND ${CMAKE_COMMAND}
-DBUSTED_PRG=${BUSTED_PRG}
-DLUA_PRG=${LUA_PRG}
+ -DNVIM_PRG=$<TARGET_FILE:nvim>
-DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE}
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
@@ -394,17 +395,9 @@ if(BUSTED_PRG)
message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}")
endif()
- if(LUA_HAS_FFI)
- set(TEST_LIBNVIM_PATH $<TARGET_FILE:nvim-test>)
- else()
- set(TEST_LIBNVIM_PATH "")
- endif()
configure_file(
${CMAKE_SOURCE_DIR}/test/cmakeconfig/paths.lua.in
- ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua.gen)
- file(GENERATE
- OUTPUT ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua
- INPUT ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua.gen)
+ ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua)
add_custom_target(functionaltest
COMMAND ${CMAKE_COMMAND}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ce0f2ace05..f1c7ca1cb3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -42,6 +42,11 @@ Developer guidelines
make distclean
make # Nvim build system uses ninja automatically, if available.
```
+- Install `ccache` for faster rebuilds of Nvim. Nvim will use it automatically
+ if it's found. To disable caching use:
+ ```
+ CCACHE_DISABLE=true make
+ ```
Pull requests (PRs)
---------------------
diff --git a/Makefile b/Makefile
index 1ba2431ba2..be1eef92de 100644
--- a/Makefile
+++ b/Makefile
@@ -132,7 +132,7 @@ functionaltest-lua: | nvim
FORMAT=formatc formatlua format
LINT=lintlua lintsh lintc check-single-includes lintcommit lint
TEST=functionaltest unittest
-generated-sources benchmark $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
+generated-sources benchmark uninstall $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
$(CMAKE_PRG) --build build --target $@
test: $(TEST)
@@ -173,4 +173,4 @@ $(DEPS_BUILD_DIR)/%: phony_force
$(BUILD_TOOL) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
endif
-.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark $(FORMAT) $(LINT) $(TEST)
+.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark uninstall $(FORMAT) $(LINT) $(TEST)
diff --git a/ci/common/build.sh b/ci/common/build.sh
index e30d0337b5..95972aab13 100644
--- a/ci/common/build.sh
+++ b/ci/common/build.sh
@@ -16,8 +16,7 @@ build_make() {
}
build_deps() {
- if test "${FUNCTIONALTEST}" = "functionaltest-lua" \
- || test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then
+ if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON"
fi
@@ -66,13 +65,6 @@ build_nvim() {
if ! top_make libnvim ; then
exit 1
fi
-
- if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
- echo "Building nvim-test."
- if ! top_make nvim-test ; then
- exit 1
- fi
- fi
fi
# Invoke nvim to trigger *San early.
diff --git a/cmake.config/config.h.in b/cmake.config/config.h.in
index c8377bf45c..4669e42c0f 100644
--- a/cmake.config/config.h.in
+++ b/cmake.config/config.h.in
@@ -1,8 +1,6 @@
#ifndef AUTO_CONFIG_H
#define AUTO_CONFIG_H
-#cmakedefine DEBUG
-
#cmakedefine SIZEOF_INT @SIZEOF_INT@
#cmakedefine SIZEOF_INTMAX_T @SIZEOF_INTMAX_T@
#cmakedefine SIZEOF_INT32_T @SIZEOF_INT32_T@
diff --git a/cmake.deps/CMakeLists.txt b/cmake.deps/CMakeLists.txt
index a7e71ffc92..90ae91463d 100644
--- a/cmake.deps/CMakeLists.txt
+++ b/cmake.deps/CMakeLists.txt
@@ -153,8 +153,8 @@ set(LUA_SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333)
set(LUAROCKS_URL https://github.com/luarocks/luarocks/archive/v3.8.0.tar.gz)
set(LUAROCKS_SHA256 ab6612ca9ab87c6984871d2712d05525775e8b50172701a0a1cabddf76de2be7)
-set(UNIBILIUM_URL https://github.com/neovim/unibilium/archive/92d929f.tar.gz)
-set(UNIBILIUM_SHA256 29815283c654277ef77a3adcc8840db79ddbb20a0f0b0c8f648bd8cd49a02e4b)
+set(UNIBILIUM_URL https://github.com/neovim/unibilium/archive/d72c3598e7ac5d1ebf86ee268b8b4ed95c0fa628.tar.gz)
+set(UNIBILIUM_SHA256 9c4747c862ab5e3076dcf8fa8f0ea7a6b50f20ec5905618b9536655596797487)
set(LIBTERMKEY_URL https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz)
set(LIBTERMKEY_SHA256 6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600)
@@ -194,8 +194,8 @@ set(TREESITTER_LUA_SHA256 930d0370dc15b66389869355c8e14305b9ba7aafd36edbfdb468c8
set(TREESITTER_VIM_URL https://github.com/vigoux/tree-sitter-viml/archive/55ff1b080c09edeced9b748cf4c16d0b49d17fb9.tar.gz)
set(TREESITTER_VIM_SHA256 1b1cd39e33c8fb02fa7fe3977e844883c2a8508a7edd621f2d21e39a9aee