Commit Graph

26011 Commits

Author SHA1 Message Date
dundargoc
c40872acbd
build: remove duplicate include directories in --version output
Having the same directory listed multiple times makes the --version
output needlessly complicated to visualize. This deduplication will only
work for cmake version 3.15 and above, which should be the majority of
neovim builds by now. For older cmake versions we default to the
previous behavior of listing duplicate include directories.
2023-05-18 16:27:05 +02:00
Lewis Russell
ef64e225f6
fix(treesitter): allow foldexpr without highlights (#23672)
Ref nvim-treesitter/nvim-treesitter#4748
2023-05-18 10:52:01 +01:00
zeertzjq
c9f47fca8b
fix(messages): ensure msg_grid is at top at more prompt (#23584) 2023-05-17 21:06:27 +08:00
bfredl
67176c3f20
Merge pull request #15534 from bfredl/monomap
refactor(map): avoid duplicated khash_t implementations for values and support sets
2023-05-17 13:00:32 +02:00
Lewis Russell
189fb62032
feat(treesitter): improved logging (#23638)
- Add bindings to Treesitter ts_parser_set_logger and ts_parser_logger
- Add logfile with path STDPATH('log')/treesitter.c
- Rework existing LanguageTree loggin to use logfile
- Begin implementing log levels for vim.g.__ts_debug
2023-05-17 11:42:18 +01:00
bfredl
e2fdd53d8c refactor(map): avoid duplicated khash_t types for values
This reduces the total number of khash_t instantiations from 22 to 8.

Make the khash internal functions take the size of values as a runtime
parameter. This is abstracted with typesafe Map containers which
are still specialized for both key, value type.

Introduce `Set(key)` type for when there is no value.

Refactor shada.c to use Map/Set instead of khash directly.
This requires `map_ref` operation to be more flexible.
Return pointers to both key and value, plus an indicator for new_item.
As a bonus, `map_key` is now redundant.

Instead of Map(cstr_t, FileMarks), use a pointer map as the FileMarks struct is
humongous.

Make `event_strings` actually work like an intern pool instead of wtf it
was doing before.
2023-05-17 12:26:21 +02:00
Lewis Russell
6b19170d44
fix(treesitter): correctly calculate bytes for text sources (#23655)
Fixes #20419
2023-05-16 16:41:47 +01:00
ii14
d36dd2bae8
refactor: use xstrl{cpy,cat} on IObuff (#23648)
Replace usage of STR{CPY,CAT} with xstrl{cpy,cat} when using on IObuff

Co-authored-by: ii14 <ii14@users.noreply.github.com>
2023-05-16 11:33:03 +08:00
zeertzjq
66b7f62542
vim-patch:8.2.2858: test fails because of changed error message (#23647)
Problem:    Test fails because of changed error message.
Solution:   Adjust the expected error message.

6b02b38ed0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-16 10:00:40 +08:00
luukvbaal
5887ecab6d
vim-patch:9.0.1561: display wrong when moving cursor to above the top line (#23644)
Problem:    Display wrong when moving cursor to above the top line and
            'smoothscroll' is set.
Solution:   Call adjust_skipcol() in more places and make it work better.
            (Luuk van Baal, closes vim/vim#12395)

798fa76dbf
2023-05-16 07:56:06 +08:00
ii14
bd247d835f
ci: remove redundant asan and ubsan options
We now have default options for ASAN and UBSAN (#23259)
2023-05-15 23:21:04 +02:00
Christian Clason
8e3124493c
Merge pull request #23606 from clason/bump-tree-sitter-lua
fix(treesitter): update parser and queries
2023-05-15 19:46:47 +02:00
bfredl
88a202a010
Merge pull request #23259 from ii14/build/ubsan_default_options
build: add asan and ubsan default options
2023-05-15 17:24:00 +02:00
ii14
4cc69f45b4 build: add ubsan default options
Use print_stacktrace=1 for UBSAN by default.
2023-05-15 16:50:58 +02:00
Christian Clason
9ff59517cb fix(treesitter): update c queries 2023-05-15 14:13:42 +02:00
Christian Clason
c97de026e3 fix(treesitter): update vimdoc and vimscript queries 2023-05-15 14:13:31 +02:00
Christian Clason
0dbed7132b build(deps): update lua parser and queries 2023-05-15 14:13:31 +02:00
Christian Clason
33687f5e87
build(deps): bump libuv to HEAD - 30fc896cc (#23636) 2023-05-15 11:22:34 +02:00
Christian Clason
c11986ed1a
vim-patch:b7398fe41c9e (#23627)
Update runtime files

b7398fe41c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-15 09:38:32 +02:00
zeertzjq
189e21ae50
vim-patch:9.0.1554: code for handling 'switchbuf' is repeated (#23632)
Problem:    Code for handling 'switchbuf' is repeated.
Solution:   Add a function to handle 'switchbuf'. (Yegappan Lakshmanan,
            closes vim/vim#12397)

e42c27d9e8

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-15 08:13:33 +08:00
zeertzjq
4a0005aee9
vim-patch:9.0.1555: setcharsearch() does not clear last searched char properly (#23631)
Problem:    setcharsearch() does not clear last searched char properly.
Solution:   Do not accept lastc_bytelen smaller than one. (closes vim/vim#12398)

e5d91ba1de
2023-05-15 08:04:23 +08:00
dundargoc
e71c7898ca
ci: trigger tests when pushing
This will allow contributors to test changes in their own fork when
pushing without needing to make a pull request. This can be useful when
wanting to test out an idea before initiating a review process.

Make the following assumptions when defining concurrency:
- Pull request will work the same.
- Pushes to the neovim repo will work the same: each unique commit will
  trigger a test run that won't cancel each other.
- Pushes to forks will cancel older CI runs on the same branch, similar
  to how pull requests work.

This will create duplicate CI runs when doing a pull request, one in the
neovim repo for the pull request event and one in the fork for the push
event. This is an acceptable trade as the runs in the fork doesn't count
towards the CI limit of neovim. Contributors are also free to disable
these actions in their own fork if they wish.
2023-05-15 00:08:57 +02:00
dundargoc
ecd6d679a0
test: skip flaky test on Windows 2023-05-14 14:29:18 +02:00
zeertzjq
0124b02490
docs(if_pyth): make it work with Python 3 instead of Python 2 (#23620) 2023-05-14 19:18:49 +08:00
Christian Clason
a9a2751f65
ci: bump uncrustify to 0.77.1 2023-05-14 13:08:18 +02:00
luukvbaal
edfa8d6f2f
vim-patch:9.0.1551: position of marker for 'smoothscroll' not computed correctly (#23617)
Problem:    Position of marker for 'smoothscroll' not computed correctly.
Solution:   Take 'list' and other options into account. (Luuk van Baal,
            closes vim/vim#12393)

24b62ec825
2023-05-14 06:03:03 +08:00
dundargoc
08991b0782
docs: small fixes
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: HiPhish <hiphish@posteo.de>
Co-authored-by: Julio B <julio.bacel@gmail.com>
Co-authored-by: T727 <74924917+T-727@users.noreply.github.com>
Co-authored-by: camoz <camoz@users.noreply.github.com>
Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
2023-05-13 21:33:22 +02:00
Christian Clason
1f33b2b1e8
build(deps): bump tree-sitter to HEAD - 91e4d9401 (#23616) 2023-05-13 19:50:42 +02:00
zeertzjq
79d5f06f79
Merge pull request #23612 from zeertzjq/vim-9.0.0064
vim-patch:9.0.{0064,0218,0249,0490,0492,0598}: cmdwin fixes
2023-05-13 23:08:01 +08:00
zeertzjq
cd9ca700e5 vim-patch:9.0.0598: using negative array index with negative width window
Problem:    Using negative array index with negative width window.
Solution:   Make sure the window width does not become negative.

8279af514c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
2de3362ce3 vim-patch:9.0.0492: cmdwin test fails on MS-Windows
Problem:    Cmdwin test fails on MS-Windows.
Solution:   Skip test on MS-Windows.

312af65d1a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
7eea6b12f9 vim-patch:9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Problem:    Using freed memory with cmdwin and BufEnter autocmd.
Solution:   Make sure pointer to b_p_iminsert is still valid.

1c3dd8ddcb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
f80cf0f84f vim-patch:9.0.0249: no test for what 9.0.0234 fixes
Problem:    No test for what 9.0.0234 fixes.
Solution:   Add a test. (issue vim/vim#10950)

3a7ad904d2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
4111530806 vim-patch:9.0.0218: reading before the start of the line
Problem:    Reading before the start of the line.
Solution:   When displaying "$" check the column is not negative.

e98c88c44c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:59 +08:00
zeertzjq
c8dc34795b vim-patch:9.0.0064: confusing error when using "q:" in command line window
Problem:    Confusing error when using "q:" in command line window.
Solution:   Check for the situation and give a better error message.
            (closes vim/vim#10756)

c963ec31a0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-13 22:45:57 +08:00
Christian Clason
6f29c68928
vim-patch:9.0.1549: USD filetype is not recognized (#23608)
Problem:    USD filetype is not recognized.
Solution:   Add patterns for USD filetype. (Colin Kennedy, closes vim/vim#12370)

b848ce6b7e

Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
2023-05-13 15:00:08 +02:00
Christian Clason
32dc484ec9
fix(treesitter): support subfiletypes in get_lang (#23605) 2023-05-13 13:29:11 +02:00
dundargoc
1086016477
build: cmake cleanup
- Simplify error checking when using execute_process.
- Set BUILD_SHARED_LIBS to OFF when building dependencies.
  This is normally not needed, but msgpack interprets an unset
  BUILD_SHARED_LIBS to build a shared library, which is the opposite of
  the cmake behavior.
- Move function check_lua_module to Util.cmake.
- Remove unnecessary code.
- Make variable naming more consistent
2023-05-13 12:12:29 +02:00
Christian Clason
ed8c44f767
ci(deps): update bump_deps script (#23604)
* consistent capitalization (lower-case) of dependency names
* add bundled tree-sitter parsers
2023-05-13 11:44:56 +02:00
Raphael
512a90520e
refactor(lsp): mark server_ready function as deprecated (#23520) 2023-05-13 11:27:05 +02:00
zeertzjq
6a273af105
refactor: remove typval.h from most header files (#23601)
Because typval_defs.h is enough for most of them.
2023-05-13 10:40:53 +08:00
zeertzjq
f76e1ac92e
vim-patch:9.0.1546: some commands for opening a file don't use 'switchbuf' (#23600)
Problem:    Some commands for opening a file don't use 'switchbuf'.
Solution:   Use 'switchbuf' for more commands. (Yegappan Lakshmanan,
            closes vim/vim#12383, closes vim/vim#12381)

54be5fb382

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-13 08:40:06 +08:00
luukvbaal
a6d63591f1
vim-patch:9.0.1545: text not scrolled when cursor moved with "g0" and "h" (#23599)
Problem:    Text not scrolled when cursor moved with "g0" and "h".
Solution:   Adjust w_skipcol when needed. (Luuk van Baal, closes vim/vim#12387)

8667a5678f
2023-05-13 08:15:01 +08:00
dundargoc
2835b0daad
build: bump uncrustify to version 0.77 2023-05-12 09:51:36 +02:00
luukvbaal
5825d2f6ca
test(scroll_opt): fix typo in porting oldtest (#23593) 2023-05-12 08:17:38 +08:00
zeertzjq
d6e898b44f
Merge pull request #23558 from luukvbaal/smoothscroll
vim-patch:9.0.{1530,1533,1542,1543}
2023-05-12 07:24:13 +08:00
Luuk van Baal
6f41eaa2b5 vim-patch:9.0.1543: display errors when making topline shorter
Problem:    Display errors when making topline shorter and 'smoothscroll' is
            set.
Solution:   Reset w_skipcol when the topline becomes shorter than its current
            value. (Luuk van Baal, closes vim/vim#12367)

5d01f86d99
2023-05-11 20:57:36 +02:00
Luuk van Baal
15c684b358 vim-patch:9.0.1542: line not fully displayed if it doesn't fit in the screen
Problem:    Line not fully displayed if it doesn't fit in the screen.
Solution:   Do not reset s_skipcol if not needed. (Luuk van Baal,
            closes vim/vim#12376)

6c018680be
2023-05-11 20:57:31 +02:00
dundargoc
30a0299bc6
build: make dependency URL variables non-cached (#23577)
Cmake won't rebuild with the new URL when bumping dependency version.
This is because the old URL is still cached, and won't be removed
automatically. The workaround for using non-cached variables, but also
let users specify an alternative URL is to only set the defined
variables in deps.txt if the corresponding variable hasn't already been
set by the user from the command line.

Also apply the CMAKE_CONFIFGURE_DEPENDS property to deps.txt, as we want
cmake to rebuild when changing this file.
2023-05-11 20:17:15 +02:00
Lewis Russell
e124672ce9
fix(treesitter): reset cursor max_start_depth 2023-05-11 12:08:33 +01:00