Commit Graph

25083 Commits

Author SHA1 Message Date
Eriks Muhins
160a019ffa feat(man.lua): support spaces in manpage names
Problem:
:Man command errors if given more than two arguments. Thus, it is
impossible to open man pages that contain spaces in their names.

Solution:
Adjust :Man so that it tries variants with spaces and underscores, and
uses the first found.
2023-03-07 15:19:24 +01:00
zeertzjq
7a462c10d5
Merge pull request #22558 from zeertzjq/vim-8.2.3969 2023-03-07 21:23:40 +08:00
dundargoc
1637bcce7b
build!: make libintl a required dependency
Libintl being an optional dependency is not by design, but a workaround
as it didn't use work on all platforms. That should be fixed by now.
2023-03-07 09:39:08 +01:00
Jaehwang Jung
706bcab75e
docs(lsp): change type annotations from number → integer (#22510) 2023-03-07 07:17:52 +01:00
zeertzjq
08d0f99ae1 vim-patch:partial:944697ae196
Update runtime files

944697ae19

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-07 11:41:35 +08:00
zeertzjq
2882b1543a vim-patch:8.2.3969: value of MAXCOL not available in Vim script
Problem:    Value of MAXCOL not available in Vim script.
Solution:   Add v:maxcol. (Naohiro Ono, closes vim/vim#9451)

56200eed62

The variable is always 2147483647, but introducing it makes functions
easier to document.

Co-authored-by: naohiro ono <obcat@icloud.com>
2023-03-07 11:33:23 +08:00
zeertzjq
7a44231832
docs(gitignore): correct oldtest path 2023-03-07 11:16:55 +08:00
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00
luukvbaal
bf4eada2c8
fix(column): issues with 'statuscolumn' width (#22542)
Problem:    'statuscolumn' width can be incorrect when toggling 'number'
            or setting 'statuscolumn'.
Solution:   Make sure the width is reset and re-estimated when
            'statuscolumn' and 'number' are set. (When 'relativenumber'
            is set this already happens because it always changes
            "nrwidth_line_count".)
2023-03-07 08:45:08 +08:00
bfredl
39096f48f0
Merge pull request #13834 from bfredl/omnilua
omnifunc for builtin lua
2023-03-07 00:28:53 +01:00
Björn Linse
79571b92ce feat(lua): omnifunc for builting lua interpreter
also make implicit submodules "uri" and "_inspector" work with completion

this is needed for `:lua=vim.uri_<tab>` wildmenu completion
to work even before uri or _inspector functions are used.
2023-03-06 23:12:21 +01:00
dundargoc
6aa5346b04
build: enable unit testing on release builds (#22554)
Unittests not working on release builds can lead to confusing
situations, such as contributors wondering why their tests aren't
working if they forgot they've built with a release build. This only
increased the Release executable size by 8 kB on my personal machine,
which is an acceptable tradeoff.
2023-03-06 22:36:04 +01:00
swarn
1cc23e1109
feat(lsp)!: add rule-based sem token highlighting (#22022)
feat(lsp)!: change semantic token highlighting

Change the default highlights used, and add more highlights per token.

Add an LspTokenUpdate event and a highlight_token function.

:Inspect now shows any highlights applied by token highlighting rules,
default or user-defined.

BREAKING CHANGE: change the default highlight groups used by semantic
token highlighting.
2023-03-06 19:03:13 +01:00
Lewis Russell
98f2df931a
fix(diff): add NULL check 2023-03-06 16:10:04 +00:00
Justin M. Keyes
6969d3d749
Merge #22325 vim.version semver parser 2023-03-06 10:04:13 -05:00
Justin M. Keyes
74ffebf8ec fix(vim.version): incorrect version.cmp()
Problem:
If major<major but minor>minor, cmp_version_core returns 1

Solution:
- Fix logic in cmp_version_core
- Delete most eq()/gt()/lt() tests, they are redundant.
2023-03-06 15:36:25 +01:00
Justin M. Keyes
e31e49a8e3 refactor(vim.version): cleanup
- version.cmp(): assert valid version
- add test for loading vim.version (the other tests use shared.lua in
  the test runner)
- reduce test scopes, reword test descriptions
2023-03-06 14:51:56 +01:00
Kelly Lin
0e7196438d feat(lua): add semver api 2023-03-06 13:45:59 +01:00
Lewis Russell
f9a46391ab
refactor(treesitter): simplify some range functions 2023-03-06 10:57:14 +00:00
zeertzjq
b0620ffe5a
vim-patch:9.0.1386: options test fails with some window width (#22548)
Problem:    Options test fails with some window width.
Solution:   Adjust what text the test checks with. (closes vim/vim#12111)

30585e03a7
2023-03-06 16:45:57 +08:00
zeertzjq
e389b18902
vim-patch:9.0.1385: g'Esc is considered an error (#22544)
Problem:    g'Esc is considered an error.
Solution:   Make g'Esc silently abandon the command. (closes vim/vim#12110)

f86dea8119
2023-03-06 07:52:11 +08:00
Justin M. Keyes
533d671271
docs: module-level docstrings (@defgroup) #22498
Problem:
gen_vimdoc.py / lua2dox.lua does not support @defgroup or \defgroup
except for "api-foo" modules.

Solution:
Modify `gen_vimdoc.py` to look for section names based on `helptag_fmt`.

TODO:
- Support @module ?
  https://github.com/LuaLS/lua-language-server/wiki/Annotations#module
2023-03-05 15:15:29 -08:00
bfredl
1b49841969
Merge pull request #22539 from dundargoc/build/luv
build: remove workaround for incorrectly packaged libluv
2023-03-06 00:05:42 +01:00
dundargoc
da0c66bcdd build: remove workaround for incorrectly packaged libluv
This removes a workaround for incorrectly packaged libluv in
90e44ecf11 as it should not be needed
anymore.
2023-03-05 21:13:28 +01:00
Biswapriyo Nath
ca3bc56a3b
build: silence git describe error output
This change will silence the warning from git describe command when the project
is built using source tarball. The warning is
fatal: not a git repository: 'neovim/.git'
2023-03-05 18:50:25 +01:00
dundargoc
5dcf544f8a
build: fix USE_EXISTING_SRC_DIR option
Since 0007aa50bd the build unsets all URL
variable immediately when USE_EXISTING_SRC_DIR is TRUE, which is
correct. However, this causes the function BuildTSParser to break down
as cmake functions aren't traditionally equipped to deal with empty
variables. Using cmake_parse_arguments fixes this issue.
2023-03-05 18:45:34 +01:00
dundargoc
f636619d9e
Merge pull request #22486 from dundargoc/ci/cache 2023-03-05 16:25:37 +01:00
dundargoc
f4d83ac1e2
build: consistently use the provided option paths
We provide options such as "DEPS_BIN_DIR" for the user to set, but only
sometimes use them. This makes binaries and other files to be spread out
if the user defines a custom DEPS_BIN_DIR location.
2023-03-05 15:21:46 +01:00
Biswapriyo Nath
0775858703
build: fix unknown pragma warning with mingw (#22533)
This checks MSVC toolchain with _MSC_VER macro before adding
pragma warning directive. It is specific to MSVC and shows
compiler warning with mingw gcc as following:

main.c:187: warning: ignoring '#pragma warning ' [-Wunknown-pragmas]
  187 | # pragma warning(suppress : 4996)
2023-03-05 21:52:32 +08:00
dundargoc
2ddb50fa1b ci: skip core dump check
The core dump check interferes with CI as it interprets any file with
"core" in it to be a core dump, which is incorrect.
2023-03-05 14:52:05 +01:00
dundargoc
d877aa32f2 ci: remove core dump checking from test.yml
There is already a superior core dump check in test/helpers.lua, which
makes this obsolete.
2023-03-05 14:52:05 +01:00
dundargoc
98876db155 ci: use the same deps directory location for all jobs
Having separate directory location causes failures to be inconsistent
and ultimately confusing. A common problem is a file with a particular
name is searched for the entire repository, which gives different
results if the dependency directory is inside the neovim directory or
outside of it.
2023-03-05 14:52:05 +01:00
dundargoc
ba38f35d3e
test: don't search entire repo for files
Searching the entire repo for a directory named "contrib" causes failure
if there happens to be another subdirectory with the name "contrib".
Instead, point directly to the correct contrib directory.
2023-03-05 11:21:37 +01:00
zeertzjq
836733dad8
Merge pull request #22532 from zeertzjq/vim-9.0.0736
vim-patch:9.0.{0736,0749,0770,0870}: quickfix listing does not handle very long messages
2023-03-05 17:30:04 +08:00
zeertzjq
e0bbe8ccf8 vim-patch:9.0.0870: get E967 when using text property in quickfix window
Problem:    Get E967 when using text property in quickfix window. (Sergey
            Vlasov)
Solution:   Do not add an extra NUL and compute the text length correctly.
            (closes vim/vim#11513)

2f7bfe66a1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-05 17:05:33 +08:00
zeertzjq
749fe2c383 vim-patch:9.0.0770: quickfix commands may keep memory allocated
Problem:    Quickfix commands may keep memory allocated.
Solution:   Free memory when it's a bit much. (Yegappan Lakshmanan,
            closes vim/vim#11379)

d8cd6f7427

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-05 17:04:43 +08:00
zeertzjq
1adad44b7c vim-patch:9.0.0749: alloc/free of buffer for each quickfix entry is inefficient
Problem:    Alloc/free of buffer for each quickfix entry is inefficient.
Solution:   Use a shared grow array. (Yegappan Lakshmanan, closes vim/vim#11365)

975a665d48

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-05 17:02:24 +08:00
zeertzjq
1cfe83c2a2 vim-patch:9.0.0736: quickfix listing does not handle very long messages
Problem:    Quickfix listing does not handle very long messages.
Solution:   Use a growarray instead of a fixed size buffer. (Yegappan
            Lakshmanan, closes vim/vim#11357)

f8412c9d7c

Override Test_very_long_error_line() with a rewrite that doesn't use
deferred delete and string interpolation.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-05 16:51:22 +08:00
Mathias Fußenegger
ed05d38d9f
fix(lsp): don't monitor files if workspace_folders is nil (#22531)
Fixes:

    Error SERVER_REQUEST_HANDLER_ERROR: "...di/dev/neovim/neovim/runtime/lua/vim/lsp/_watchfiles.lua
    :200: bad argument #1 to 'ipairs' (table expected, got nil)"

Language servers can be started without root_dir or workspace_folders.
2023-03-05 08:42:15 +01:00
Jon Huhn
ac69ba5fa0
feat(lsp): implement workspace/didChangeWatchedFiles (#22405) 2023-03-05 07:52:27 +01:00
zeertzjq
419819b624
vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)
Problem:    CTRL-X on 2**64 subtracts two. (James McCoy)
Solution:   Correct computation for large number. (closes vim/vim#12103)

5fb78c3fa5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-05 09:18:42 +08:00
zeertzjq
b44b8e7687
test(old): make getting an unused PID work (#22529) 2023-03-05 08:34:58 +08:00
zeertzjq
089f962d6a
vim-patch:9.0.1378: illegal memory access when using virtual editing (#22527)
Problem:    Illegal memory access when using virtual editing.
Solution:   Make sure "startspaces" is not negative.

c99cbf8f28

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-05 08:08:04 +08:00
zeertzjq
39842be8cd
fix(extmarks): don't leak memory on error (#22507) 2023-03-05 07:09:28 +08:00
dundargoc
7100a80253
build: show build type specific compiler flags when using --version
The build type specific flags are defined in the variables
CMAKE_C_FLAGS_<CONFIG>, where <CONFIG> can be DEBUG, RELEASE,
RELWITHDEBINFO and MINSIZEREL.
2023-03-04 20:04:01 +01:00
dundargoc
3683d6b7a8
ci: move configuring cmake to the build part of the CI
If the configuration fails then lints shouldn't be run, as most lint
steps depends on a successful configuration.
2023-03-04 17:55:42 +01:00
Jaehwang Jung
59542504b4
docs(highlight): fix type annotations (#22272) 2023-03-04 17:47:30 +01:00
Christian Clason
46c4cbced5
build(deps): bump msgpack-c to v6.0.0 (#22522)
* Remove C++ requirement if test is disabled
* Change CMake package name of C library to msgpack-c
* Unified all C package, library, cmake, tarball name become msgpack-c.
2023-03-04 17:26:24 +01:00
bfredl
bc26f23e5a
Merge pull request #22415 from bfredl/log_debug
refactor(log): reduce compile time LOG_LEVEL granularity
2023-03-04 17:18:32 +01:00
bfredl
2ba224e152 refactor(log): reduce compile time LOG_LEVEL granularity 2023-03-04 15:26:17 +01:00