Commit Graph

29040 Commits

Author SHA1 Message Date
zeertzjq
9765efb40f
test(ui/messages_spec): unskip msg_puts_printf test on Unix CI (#27941)
It no longer fails on Unix CI.
2024-03-20 08:02:50 +08:00
zeertzjq
37db3d97ea
vim-patch:ec21bafc135a (#27939)
runtime(vim): Update base-syntax, disallow '.' at start of menu item names (vim/vim#14232)

Disallow '.' at the start of a menu item name.

This is the menu path separator character and should be escaped with a
'\' in this case.

Partially fixes vim/vim#14230.  "popup" is still incorrectly matched as the Ex
command.

ec21bafc13

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-20 07:04:31 +08:00
Christian Clason
4694ce6877
vim-patch:9.1.0188: filetype: no support for Vento files (#27935)
Problem:  Vento files are not recognized.
Solution: Recognize *.vto files as filetype "vento" (wrapperup)

Vento is a templating engine https://vento.js.org/

closes: vim/vim#14229

9f26e5a9bc

Co-authored-by: wrapperup <wrapperup4@gmail.com>
2024-03-20 05:31:44 +08:00
Christian Clason
e39d9636af build(deps): bump vimdoc parser to v2.5.1 2024-03-19 20:44:05 +01:00
Lewis Russell
597d4c63bd refactor(treesitter): reorder functions 2024-03-19 18:40:08 +00:00
Lewis Russell
aca6c93002 refactor(treesitter): simplify argument checks for userdata 2024-03-19 16:16:54 +00:00
Lewis Russell
aca2048bcd refactor(treesitter): redesign query iterating
Problem:

  `TSNode:_rawquery()` is complicated, has known issues and the Lua and
  C code is awkwardly coupled (see logic with `active`).

Solution:

  - Add `TSQueryCursor` and `TSQueryMatch` bindings.
  - Replace `TSNode:_rawquery()` with `TSQueryCursor:next_capture()` and `TSQueryCursor:next_match()`
  - Do more stuff in Lua
  - API for `Query:iter_captures()` and `Query:iter_matches()` remains the same.
  - `treesitter.c` no longer contains any logic related to predicates.
  - Add `match_limit` option to `iter_matches()`. Default is still 256.
2024-03-19 14:24:59 +00:00
zeertzjq
16a416cb3c
fix(terminal): don't pass incomplete UTF-8 sequence to libvterm (#27922) 2024-03-19 16:56:51 +08:00
Christian Clason
c30ebb17f6 fix(treesitter): document more standard highlight groups
Problem: Not all standard treesitter groups are documented.

Solution: Document them all (without relying on fallback); add default
link for new `*.builtin` groups to `Special` and `@keyword.type` to
`Structure`. Remove `@markup.environment.*` which only made sense for
LaTeX.
2024-03-19 09:41:16 +01:00
Christian Clason
5e875ae8d0 feat(treesitter): update Markdown parsers and queries to v0.2.1 2024-03-19 09:41:16 +01:00
Christian Clason
ff6092b4ee feat(treesitter): update Bash parser and queries to v0.21.0 2024-03-19 09:41:16 +01:00
Christian Clason
8a3385dde7 feat(treesitter): update Python parser and queries to v0.21.0 2024-03-19 09:41:16 +01:00
Christian Clason
1384bebd5a feat(treesitter): update query parser to v0.2.0 2024-03-19 09:41:16 +01:00
Christian Clason
987dff6713 feat(treesitter): update Vimdoc parser and queries to v2.4.0 2024-03-19 09:41:16 +01:00
Christian Clason
20dcbaaaf8 feat(treesitter): update Vim parser and queries to v0.4.0 2024-03-19 09:41:16 +01:00
Christian Clason
aca4ad430b feat(treesitter): update Lua parser and queries to v0.1.0 2024-03-19 09:41:16 +01:00
Christian Clason
8dda630ae9 feat(treesitter): update C parser and queries to v0.21.0 2024-03-19 09:41:16 +01:00
Christian Clason
ac99a0810e build(deps): bump tree-sitter to v0.22.2
release notes:
* https://github.com/tree-sitter/tree-sitter/releases/tag/v0.22.0
* https://github.com/tree-sitter/tree-sitter/releases/tag/v0.22.1
* https://github.com/tree-sitter/tree-sitter/releases/tag/v0.22.2
2024-03-19 09:41:16 +01:00
dundargoc
187ae67735 build: introduce variable DEPS_IGNORE_SHA for skipping dependency hash check
This will reduce friction as developers no longer need to provide a hash
when testing out different commits.

To skip the hash check, set `DEPS_IGNORE_SHA` to `TRUE` in
`cmake.deps/CMakeLists.txt`.
2024-03-19 08:52:03 +01:00
zeertzjq
d744876723
test(terminal/cursor_spec): unskip tests that pass on Windows (#27924)
Also:
- Make indent of test cases consistent.
- Unskip TUI rapid resize test with ASAN as reflow is now disabled.
2024-03-19 15:42:55 +08:00
zeertzjq
400ef8aaa0
test(terminal/buffer_spec): fix incorrect tests (#27923)
The first describe() block enters terminal mode in before_each(), so
feed_command() at the start of a test case writes it to the terminal
instead of executing it.
2024-03-19 12:44:14 +08:00
zeertzjq
79af4e7e73
vim-patch:78c189837ae6 (#27920)
runtime(doc): Recover some missed commas and periods in starting.txt

Also:

- Insert some missing words;
- Strive for consistency with capitalisation of words;
- Improve shell alias examples.

The gvim words were left alone for now, but they deserve to
be treated like proper names, GVim or GUI Vim, unless these
refer to executable filenames (on *nix systems).

closes: vim/vim#14194

78c189837a

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-03-19 06:55:30 +08:00
zeertzjq
b5e3df37a4
vim-patch:9530fe4f3a69 (#27919)
runtime(vim): Update base-syntax, improve :highlight command (vim/vim#14228)

Improve :highlight command highlighting

- Use the same highlight groups for "default link" with and without
  bang.
- Match some common line-continuation use.
- Match :hi clear variants.
- Highlight color-name values.

Resync vim.vim and generator/vim.vim.base.

9530fe4f3a

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-19 06:38:30 +08:00
Christian Clason
5c9033024f
vim-patch:9.1.0187: filetype: no support for Dafny files (#27918)
Problem:  Dafny files are not recognized.
Solution: Recognize *.dfy files as filetype "dafny" (zeertzjq).

Ref: https://dafny.org/
Ref: https://github.com/mlr-msft/vim-loves-dafny

closes: vim/vim#14226

4e334d0443

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-03-18 22:47:51 +01:00
Christian Clason
920ef1fd71 vim-patch:ef21bcaab145
runtime(rust): Respect no_plugin_maps and no_rust_maps globals (vim/vim#14221)

ef21bcaab1

Co-authored-by: MyyPo <110892040+MyyPo@users.noreply.github.com>
2024-03-18 22:01:33 +01:00
zeertzjq
e3bd04f2af
fix(pager): handle consecutive newlines properly (#27913) 2024-03-18 22:25:55 +08:00
zeertzjq
5de0482d1a
test(lsp): fix flaky basic_finish test (#27899)
Problem:
As mentioned in #23002 on_setup and on_init are run concurrently.
However, in basic_finish tests on_setup must attach the client before
on_init finishes.  The other basic_finish test isn't flaky because it
makes an RPC request in on_init.

Solution:
Don't use on_setup in basic_finish tests.
2024-03-18 19:49:31 +08:00
En-En
e34c23b701
fix(tutor): set a value for ":syntax iskeyword" (#27833)
Problem: "NOTE"s, inline Vim script code, and links ending in digits may not be
highlighted correctly within the :Tutor.

Solution: set an explicit value for ":syntax iskeyword" that includes digits. Do
it after ":syntax include"s, so the included syntax/sh.vim doesn't mess with the
value.

Increase screen test width so all text within the conclusion section is visible.

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2024-03-18 11:19:20 +00:00
zeertzjq
66945e11b3
refactor(messages): remove condition that is always true (#27909)
After #25470 the `s` pointer is advanced before calling store_sb_text()
when a newline character is found, and store_sb_text() sets `sb_str` to
`s`, so it's not possible for `s == sb_str + 1` and `*sb_str == '\n'` to
be satisfied at the same time.
2024-03-18 19:01:01 +08:00
Dominic Racine
a1bab03945
docs(build): update rhel/fedora build prerequisite (#27875) 2024-03-18 10:03:44 +01:00
Christian Clason
f0bd895995 vim-patch:3d46de703cf6
runtime(go): `goPackageComment` highlighting too broad

Previously this would highlight any comment before a line starting
`package`, for example

    var (
      // This comment would be highlighted as a goPackageComment
      packages []string
    )

The package clause is only valid when followed by a space[1], so include
this restriction

This is upstreaming a change from `go-vim`[2]

[1] https://go.dev/ref/spec#Package_clause
[2] d1c36cc417

3d46de703c

Co-authored-by: Matthew Hughes <matthewhughes934@gmail.com>
2024-03-18 15:49:08 +08:00
zeertzjq
9d315fb8b7
vim-patch:9.1.0186: cursor pos wrong on mouse click after eol with 'rl', 've' and conceal (#27903)
Problem:  Wrong cursor position when clicking after end of line with
          'rightleft', 'virtualedit' and conceal.
Solution: Set values in ScreenCols[] also with SLF_RIGHTLEFT.  Also fix
          off-by-one cursor position with 'colorcolumn' (zeertzjq).

closes: vim/vim#14218

deb2204bff
2024-03-18 10:35:41 +08:00
zeertzjq
eabf9de1dc
fix(messages): allow more prompt in headless mode with UI (#27905)
Problem:  More prompt is not shown in headless mode even if there is a
          UI attached.
Solution: Don't skip more prompt when there is a UI active.
2024-03-18 10:34:27 +08:00
Lewis Russell
3b29b39e6d fix(treesitter): revert to using iter_captures in highlighter
Fixes #27895
2024-03-17 20:37:15 +00:00
Takuya Tokuda
77a9f3395b
fix(lsp): create codelens request parameters for each buffer (#27699) 2024-03-17 21:04:59 +01:00
zeertzjq
08986bb597
test: combining TermCursorNC with CursorLine/CursorColumn (#27898) 2024-03-17 18:09:29 +08:00
zeertzjq
091eb4c8c7
fix(mouse): click after eol with conceal and virtual text (#27897)
Problem:  Wrong cursor position when clicking after end of line with
          'virtualedit', conceal and virtual text.
Solution: Always fill linebuf_vcol[] for the columns to clear.
2024-03-17 17:54:18 +08:00
zeertzjq
54db75e995
refactor(drawline): integrate terminal hl with eol loop (#27893)
There is no test for using 'cursorline' in Normal mode in a terminal
buffer, so add a test and fix 'cursorcolumn' remaining when entering
Terminal mode.

Also move synIDattr() tests to ui/highlight_spec.lua.
2024-03-17 17:24:03 +08:00
zeertzjq
c52dfb6e84
fix(normal): don't check conceal when pressing 'r' (#27892)
Problem:  Cursor line is unconcealed when pressing 'r' in Normal mode
          when 'concealcursor' contains 'n' but not 'i'.
Solution: Don't check conceal when pressing 'r' in Normal mode.

Vim doesn't have this problem because it doesn't call redrawWinline() in
conceal_check_cursor_line() and instead sets a global variable.
2024-03-17 09:44:10 +08:00
zeertzjq
d114dbe9f7
vim-patch:9.1.0184: Cursor pos wrong when clicking with conceal and wrap (#27890)
Problem:  Cursor position wrong when clicking with conceal and wrap.
Solution: Use the virtual column of the last char for ScreenCols[] in
          boguscols.  Remove use of MAXCOL in ScreenCols[].  Rename
          third argument of wlv_screen_line() to "clear_end" as that's
          clearer what it does (zeertzjq).

related: 14192
closes: vim/vim#14200

d0c1b7723f

Rename win_put_linebuf() to wlv_put_linebuf().
2024-03-17 07:26:39 +08:00
zeertzjq
34b57508a7
fix(drawline): check filler_todo in place of removed draw_state (#27889)
The only place it matters is the conceal wcol check, but it can avoid
unnecessary computations at other places.
2024-03-17 05:43:14 +08:00
Lewis Russell
14e4b6bbd8 refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
dundargoc
924a7ef8bb ci: don't assign reviewers for "api" and "ui" labels
The labels as they're currently defined are too broad to meaningfully
add specific reviewers for them.
2024-03-16 15:11:26 +01:00
dundargoc
bf24298fea ci: simplify concurrency string
`github.ref` is now defined for both pull requests and pushes, meaning
that it can be used to simplify the concurrency group.
`cancel-in-progress` is set to true only if the trigger is a pull
request, as we don't want master runs to cancel each other out.
2024-03-16 15:00:09 +01:00
dundargoc
5da0d513b9 ci: update clang version to 18
This fixes the false TSAN errors in CI.
2024-03-16 14:40:39 +01:00
Caleb Marshall
542c910a1d fix(lsp): add missing LSP semantic token highlight links
Added the following LSP semantic token types to be linked to highlight
groups by default:

* @lsp.type.event
* @lsp.type.keyword
* @lsp.type.modifier
* @lsp.type.number
* @lsp.type.operator
* @lsp.type.regexp
* @lsp.type.string
2024-03-16 20:37:56 +08:00
zeertzjq
ee89ba1d75
vim-patch:9.1.0182: Can define function with invalid name inside 'formatexpr' (#27883)
Problem:  Can define function with invalid name inside 'formatexpr'.
Solution: Use goto instead of checking for did_emsg later.
          (zeertzjq)

closes: vim/vim#14209

6a04bf5ee5
2024-03-16 17:26:14 +08:00
zeertzjq
c0daea3afd
vim-patch:9.1.0183: Wrong display or screenpos() result when toggling diff mode (#27882)
Problem:  Wrong display or screenpos() result when toggling diff mode.
Solution: Reset w_skipcol when disabling 'wrap'.  Reset w_leftcol when
          enabling 'wrap' (zeertzjq).

fixes: vim/vim#14210
closes: vim/vim#14211

9e7f1fc2f1
2024-03-16 17:10:20 +08:00
zeertzjq
ead3a1bd7a
vim-patch:8.2.3782: Vim9: no error if a function shadows a script variable (#27881)
Problem:    Vim9: no error if a function shadows a script variable.
Solution:   Check the function doesn't shadow a variable. (closes vim/vim#9310)

052ff291d7

Omit EVAL_VAR_NO_FUNC: Vim9 script only.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-03-16 17:05:59 +08:00
zeertzjq
848e64322a
vim-patch:989faa4fce65 (#27880)
runtime(doc): make :h tag-! more consistent (vim/vim#14208)

- Use "on" and "off" for 'winfixbuf' option values.
- Retab the table.

989faa4fce
2024-03-16 16:38:40 +08:00