Commit Graph

30608 Commits

Author SHA1 Message Date
bfredl
5f95f1249f
Merge pull request #30014 from bfredl/neoemoji
support emojis with ZWJ and variant selectors
2024-08-30 12:58:48 +02:00
bfredl
cfdf68a7ac feat(mbyte): support extended grapheme clusters including more emoji
Use the grapheme break algorithm from utf8proc to support grapheme
clusters from recent unicode versions.

Handle variant selector VS16 turning some codepoints into double-width
emoji. This means we need to use ptr2cells rather than char2cells when
possible.
2024-08-30 11:49:09 +02:00
Christian Clason
4353996d0f vim-patch:87c01d9: runtime(hollywood): update syn highlight for If-Then statements and For-In-Loops
Improving syntax highlighting by allowing numbers, - and a $ as suffix
in user constants and by allowing hwConstants in If-Then statements

closes: vim/vim#15059

87c01d9561

Co-authored-by: Tom Crecelius <holly@net-eclipse.net>
2024-08-30 00:35:05 +02:00
Evgeni Chasnovski
862679c70f
fix(highlight): update PmenuSel for colored completion items #30183
Problem: completion items can now have dedicated highlighting (through
  `hl_group` and `kind_hlgroup` fields). Both of the fields combine
  their highlight attributes with the underlying `PmenuXxx` group.

  As default color scheme `Pmenu` and `PmenuSel` are intentionally
  almost inverted versions of one another, the added highlighting will
  be unreadable in one of them if done only through foreground (which is
  the most convenient way for users and being able to do so is arguably
  the biggest benefit of actually combining added highlighting).

Solution: adjust `PmenuSel` to utilize `attr=reverse`. This works
  because `fg`/`bg` are first combined and only then reversed. This
  results in a colored background for items with `hl_group` and
  `kind_hlgroup` using text highlighting.

  This also results in the same background for regular selected item,
  while intentionally changing foreground from `Nvim{Light,Dark}Grey3`
  to (essentially) `Nvim{Light,Dark}Grey2`. This both provides better
  contrast ratio and does not need realigning of the whole block.
2024-08-29 12:08:30 -07:00
bfredl
9a3c8f64a7
Merge pull request #26950 from bfredl/s390x_fix
fix issues with s390x CI on master (xdiff and others)
2024-08-29 18:52:23 +02:00
Riley Bruins
59baa5e8a1
fix(tohtml): apply sp color if present #30110
Problem:
Things like underlines are always given a default foreground highlight
regardless of the value of `sp`.

Solution:
Check for `sp` first, and apply that color to the text decoration color if it
exists.

Limitations:
If there is no value of `sp`, vim applies a text decoration color that matches
the foreground of the text. This is still not implemented (and seems like a much
more complex problem): in TOhtml, the underline will still be given a default
foreground highlight.
2024-08-29 09:36:33 -07:00
bfredl
176bfea135 fix(build): issues with s390x CI
Does not fix everything, but at least let's test run to finish before
timeout
2024-08-29 15:15:50 +02:00
zeertzjq
7588ff2d89
fix(man): check if buffer is valid before restoring 'tagfunc' (#30180) 2024-08-29 11:53:48 +00:00
glepnir
6c2186a998
docs(eval): fix wrong return type of getcharsearch() (#30176) 2024-08-29 18:02:23 +08:00
zeertzjq
0346666f71
vim-patch:9.1.0699: "dvgo" is not always an inclusive motion (#30173)
Problem:  "dvgo" is not always an inclusive motion
          (Iain King-Speir)
Solution: initialize the inclusive flag to false

fixes: vim/vim#15580
closes: vim/vim#15582

f8702aeb8f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-29 06:24:40 +08:00
dundargoc
cd05a72fec
docs: misc (#29719)
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Lauri Heiskanen <lauri.heiskanen@nimble.fi>
Co-authored-by: Piotr Doroszewski <5605596+Doroszewski@users.noreply.github.com>
Co-authored-by: Tobiasz Laskowski <tobil4sk@outlook.com>
Co-authored-by: ariel-lindemann <41641978+ariel-lindemann@users.noreply.github.com>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-08-29 06:11:32 +08:00
dundargoc
3085c9d9da revert: "Makefile: use pattern rules for build/.deps (#10366)"
This reverts commit 7f6ff829aa.

The given reasoning and usecase is unsatisfactory. While it is true that
it allows to run `make build/bin/nvim`, it can easily be recreated with
`ninja -C build bin/nvim` which does the exact same thing. This minor
convenience is not worth adding the extra code given how rare this
usecase should be.
2024-08-28 12:37:29 +02:00
Christian Clason
3a61f05dd2 vim-patch:8556e23: runtime(java): Provide support for syntax preview features
Introduce a new API variable "g:java_syntax_previews" whose
value must be a list of syntax preview feature numbers.

Enumerate the currently supported numbers in a table at the
end of the documentation entry for "ft-java-syntax".

Also, disable the recognition of String Templates.  Despite
the withdrawal of this preview feature in its proposed form
from the upcoming JDK 23 release and the fact that the JDK
22 release is coming to EOL this September, an earlier
iteration of this preview feature was included in JDK 21
(LTS) whose EOL is projected to fall due in late 2028 and,
therefore, retain the current implementation.

Define "g:java_syntax_previews" and include number 430 in
its list to enable the recognition of String Templates:
------------------------------------------------------------
	let g:java_syntax_previews = [430]
------------------------------------------------------------

References:
https://openjdk.org/jeps/430 (Preview)
https://openjdk.org/jeps/459 (Second Preview)
https://openjdk.org/jeps/465 (Third Preview)
https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html

closes: vim/vim#15579

8556e23ee9

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-08-28 11:22:23 +02:00
Eisuke Kawashima
3bcd5624be
fix(regexp): fix typo in E888 error message (#30161)
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-08-28 10:37:27 +08:00
Maria José Solano
dad55f5e76
feat(lsp): export diagnostic conversion functions (#30064) 2024-08-27 13:16:33 -05:00
Riley Bruins
f8e1ebd6f6 fix(treesitter): escape things like " in omnifunc results 2024-08-27 09:27:47 +02:00
Maria José Solano
d9ccd828b0
fix(lsp): return call hierarchy item, not the index (#30145) 2024-08-26 17:37:36 +02:00
Maria José Solano
0e394f136f
fix(lsp): log when receiving markup messages (#30065) 2024-08-26 17:35:43 +02:00
Mathias Fußenegger
983953858e
fix(lsp): fix isIncomplete condition in completion trigger (#30130)
Follow up to https://github.com/neovim/neovim/pull/30028#discussion_r1726539370
2024-08-26 17:34:54 +02:00
Lewis Russell
688b961d13 feat(treesitter): add support for wasm parsers
Problem: Installing treesitter parser is hard (harder than
climbing to heaven).

Solution: Add optional support for wasm parsers with `wasmtime`.

Notes:

* Needs to be enabled by setting `ENABLE_WASMTIME` for tree-sitter and
  Neovim. Build with
  `make CMAKE_EXTRA_FLAGS=-DENABLE_WASMTIME=ON
  DEPS_CMAKE_FLAGS=-DENABLE_WASMTIME=ON`
* Adds optional Rust (obviously) and C11 dependencies.
* Wasmtime comes with a lot of features that can negatively affect
  Neovim performance due to library and symbol table size. Make sure to
  build with minimal features and full LTO.
* To reduce re-compilation times, install `sccache` and build with
  `RUSTC_WRAPPER=<path/to/sccache> make ...`
2024-08-26 16:44:03 +02:00
Christian Clason
664de5ea97 build(deps): bump tree-sitter to v0.23.0 2024-08-26 16:14:36 +02:00
zeertzjq
c0a8abf18e
vim-patch:88a6dd0: runtime(doc): fix typo (#30140)
closes: vim/vim#15572

88a6dd036a

Co-authored-by: glepnir <glephunter@gmail.com>
2024-08-26 08:10:29 +08:00
JonnyKong
b8135a76b7 fix(docs): wrong return value annotation for nvim_buf_get_extmarks 2024-08-25 08:36:00 +01:00
zeertzjq
cf44121f7f
vim-patch:9.1.0694: matchparen is slow on a long line (#30134)
Problem:  The matchparen plugin is slow on a long line.
Solution: Don't use a regexp to get char at and before cursor.
          (zeertzjq)

Example:

```vim
  call setline(1, repeat(' foobar', 100000))
  runtime plugin/matchparen.vim
  normal! $hhhhhhhh
```

closes: vim/vim#15568

81e7513c86
2024-08-25 06:07:43 +08:00
Christian Clason
84f1c5e072 build(deps): bump luajit to HEAD - f725e44cd 2024-08-24 17:58:20 +02:00
zeertzjq
91ce0c3ddd
vim-patch:9.1.0692: Wrong patlen value in ex_substitute() (#30131)
Problem:  Wrong patlen value in ex_substitute() (after 9.1.0426).
Solution: Compute patlen after finding end separator.
          (zeertzjq)

Add a more explicit test.  The test already passes as the only case
where a overlarge patlen value matters was fixed by patch 9.1.0689.

closes: vim/vim#15565

d1c8d2de4b
2024-08-24 10:19:24 +00:00
zeertzjq
bb4b6b427c
vim-patch:9.1.0690: cannot set special highlight kind in popupmenu (#30128)
Problem:  cannot set special highlight kind in popupmenu
Solution: add kind_hlgroup item to complete function
          (glepnir)

closes: vim/vim#15561

38f99a1f0d

Co-authored-by: glepnir <glephunter@gmail.com>
2024-08-24 08:38:05 +08:00
zeertzjq
2c6222c56b
Merge pull request #30127 from zeertzjq/vim-7884cc7
vim-patch: update Vim syntax
2024-08-24 08:12:51 +08:00
zeertzjq
8010d1c0ed vim-patch:7866d54: runtime(vim): Update base-syntax, match :loadkeymap after colon and bar
Match :loadkeymap after Ex colons and bars.

Don't generate :loadkeymap as it is matched with a custom syntax group.

closes: vim/vim#15554

7866d54ecc

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-08-24 07:41:28 +08:00
zeertzjq
8f9669a27c vim-patch:7884cc7: runtime(vim): Update base-syntax, improve :let-heredoc highlighting
The end marker is not required to match the indent of :let when "trim"
is specified, it may also appear without leading whitespace as normal.

closes: vim/vim#15564

7884cc7418

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-08-24 07:39:56 +08:00
zeertzjq
6af9ca4926
vim-patch:95e9078: runtime(vim): Improve heredoc handling for all embedded scripts (#30121)
* Improve heredoc handling
  - Support "trim" for all the embedded scripts.
  - Check the indent of "trim" for "let" and all the embedded scripts.
* Update missing part of vim.vim.base in the commit
  d164f2a521f8e52e587727657fb1c19e9a25f32a.
* Update gen_syntax_vim.vim to catch up with 9.1.0685's source code.

closes: vim/vim#15542

95e90781a4

Co-authored-by: Ken Takata <kentkt@csc.jp>
2024-08-23 09:56:29 +08:00
Christian Clason
3b32869ced vim-patch:2750b83: runtime(java): Make the bundled &foldtext function optional
- Obtain and pass through translated messages with this
  function.
- If "g:java_foldtext_show_first_or_second_line" is defined,
  assign this function to &foldtext.

closes: vim/vim#15549

2750b83fa1

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-08-22 23:45:48 +02:00
Christian Clason
8db8793503 vim-patch:c75dad0: runtime(netrw): Change line on mx if command output exists
closes: vim/vim#15550

c75dad0177

Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
2024-08-22 23:45:48 +02:00
Christian Clason
916237d9b5 vim-patch:38cfa2b: runtime(netrw): Fix mf-selected entry highlighting
closes: vim/vim#15551

38cfa2b662

Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
2024-08-22 23:45:48 +02:00
Christian Clason
8c405d9b34 vim-patch:0e9fd77: runtime(htmlangular): add html syntax highlighting
fixes: vim/vim#15459
closes: vim/vim#15552

0e9fd7755d

Co-authored-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
2024-08-22 23:45:48 +02:00
glepnir
1f5bcc7c4e
feat(lsp): completion opts support custom item conversion (#30060)
Problem: Some items of completion results include function signatures that can
cause the pum to be very long when a function has many params, because pum
scales with the longest word/abbr.

Solution: add custom covert function that can customise abbr to remove params.
2024-08-22 21:42:27 +02:00
glepnir
e48179f31e
fix(lsp): suppress completion request if completion is active (#30028)
Problem: the autotrigger mechanism could fire completion requests despite
completion already being active from another completion mechanism or manual
trigger

Solution: add a condition to avoid an additional request.
2024-08-22 09:51:44 +02:00
zeertzjq
3bd7492a69
vim-patch:bc29ea6: runtime(zip): simplify condition to detect MS-Windows (#30115)
related: vim/vim#15519

bc29ea6286

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-22 05:58:22 +08:00
zeertzjq
362389eb15
vim-patch:9.1.0683: mode() returns wrong value with <Cmd> mapping (#30109)
Problem:  mode() returns wrong value with <Cmd> mapping
Solution: Change decision priority of VIsual_active and move
          visual mode a bit further down (kuuote)

closes: vim/vim#15533

0fd1cb1b1f

Co-authored-by: kuuote <znmxodq1@gmail.com>
2024-08-22 05:30:21 +08:00
Christian Clason
4e5607eb37 build(deps): bump luajit to HEAD - c68711cc8 2024-08-21 12:57:18 +02:00
Christian Clason
a691858326 vim-patch:5f5f283: runtime(pandoc): escape quotes in &errorformat for pandoc
closes: vim/vim#15535

5f5f2832f5

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-08-21 09:14:17 +02:00
Christian Clason
78e48cd9b5 vim-patch:d55e698: runtime(pandoc): refine pandoc compiler settings
closes: vim/vim#15529

d55e698fa0

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-08-21 09:14:17 +02:00
zeertzjq
6f7bb02e7f
vim-patch:9.1.0686: zip-plugin has problems with special characters (#30108)
Problem:  zip-plugin has problems with special characters
          (user202729)
Solution: escape '*?[\' on Unix and handle those chars
          a bit differently on MS-Windows, add a test, check
          before overwriting files

runtime(zip): small fixes for zip plugin

This does the following:
- verify the unzip plugin is executable when loading the autoload plugin
- handle extracting file names with '[*?\' in its name correctly by
  escaping those characters for the unzip command (and handle those
  characters a bit differently on MS-Windows, since the quoting is different)
- verify, that the extract plugin is not overwriting a file (could cause
  a hang, because unzip asking for confirmation)
- add a test zip file which contains those special file names

fixes: vim/vim#15505
closes: vim/vim#15519

7790ea0c68

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-20 23:35:27 +00:00
zeertzjq
a9e11168f5
Merge pull request #30095 from zeertzjq/vim-175a87c
vim-patch: update :keeppatterns doc
2024-08-21 07:20:59 +08:00
zeertzjq
9f49529627 vim-patch:e44e644: runtime(doc): fix grammar in :h :keeppatterns
- It's clear that :s and :& are Ex commands, so remove "command" along
  with the duplicate "the".
- Use "or" instead of "and" following "without".

closes: vim/vim#15527

e44e64492c
2024-08-21 07:03:55 +08:00
zeertzjq
9639552572 vim-patch:3840d2f: runtime(doc): remove trailing whitespace in cmdline.txt
3840d2feaf

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-21 07:02:23 +08:00
zeertzjq
abd1b1ff42 vim-patch:175a87c: runtime(doc): more clarification for the :keeppatterns needed
175a87c7f1

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-21 07:02:23 +08:00
Christian Clason
41859c2d8c build(deps): bump luajit to HEAD - 304da39cc 2024-08-20 19:53:35 +02:00
atusy
fe5ae88b20
fix(lsp): update request name to capability map #30098
Add items based on specifications (<https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentClientCapabilities>)

- textDocument/documentColor
- textDocument/inlineValue
- textDocument/linkedEditingRange
- textDocument/moniker
- textDocument/onTypeFormatting
- textDocument/selectionRange
2024-08-20 06:37:03 -07:00
Rosen Stoyanov
8faa369791
docs(gen_help_html): wrap headings for narrow viewport #29903
Problem:
The headings and help tags overlap when browsing the docs in neovim.io/doc/user/ from a mobile phone.

Solution:
Apply the correct CSS rules so that the headings and help tags wrap
nicely below one another.
2024-08-20 05:56:37 -07:00