Commit Graph

27596 Commits

Author SHA1 Message Date
LW
448907f65d
feat(lsp)!: vim.lsp.inlay_hint.get(), enable(), is_enabled() #25512
refactor!: `vim.lsp.inlay_hint()` -> `vim.lsp.inlay_hint.enable()`

Problem:
The LSP specification allows inlay hints to include tooltips, clickable
label parts, and code actions; but Neovim provides no API to query for
these.

Solution:
Add minimal viable extension point from which plugins can query for
inlay hints in a range, in order to build functionality on top of.

Possible Next Steps
---

- Add `virt_text_idx` field to `vim.fn.getmousepos()` return value, for
  usage in mappings of `<LeftMouse>`, `<C-LeftMouse>`, etc
2023-11-12 04:54:27 -08:00
zeertzjq
ad3568a701
vim-patch:9.0.2101: CI: test_termdebug may still fail (#26003)
Problem:  CI: test_termdebug may still fail
Solution: use term_wait() to make it more robust

closes: vim/vim#13529

fdbadea4b6

Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
2023-11-12 18:18:28 +08:00
Christian Clason
c6b317dd13 vim-patch:2c133f6c1a16
runtime(lynx): Update for Lynx 2.8.9 (vim/vim#13510)

2c133f6c1a

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-11-12 10:53:57 +01:00
zeertzjq
9ecb43b637
fix(float): apply 'winblend' to title/footer highlight (#25999) 2023-11-12 09:23:34 +08:00
zeertzjq
b331302442
vim-patch:9358b8d99349 (#25998)
runtime(vim): Improve :let-heredoc syntax highlighting (vim/vim#12923)

"trim" and "eval" are allowed in any order and whitespace is not
required after "=<<".

9358b8d993

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-11-12 08:26:56 +08:00
zeertzjq
145d9ed0fc
vim-patch:9.0.2100: CI: test_termdebug fails (#25997)
Problem:  CI: test_termdebug fails
Solution: only test for a changed winlayout, if the window
          width actually changed

Also, include an unrelated comment (which doesn't warrant its own patch
number)

305127f9f2

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-12 08:18:40 +08:00
ObserverOfTime
c23dd7c9ef
vim-patch:9.0.2098: No filetype support for xcompose files (#25983)
Problem:  No filetype support for xcompose files
Solution: Add filetype detection

closes: vim/vim#13508

4f9074b96c
2023-11-12 07:51:25 +08:00
zeertzjq
2494009885
vim-patch:1b08d2cd0789 (#25993)
runtime(doc): clarify when formatoptions applies

closes: vim/vim#13503

1b08d2cd07

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-12 07:49:57 +08:00
Christian Clason
84688ec372 vim-patch:9.0.2097: No support for cypher files
Problem:  No support for cypher files
Solution: Add cypher filetype detection

Cypher query language support to work with (mostly) graph databases.

Already existing lsp support in Neovim's nvim-lspconfig:
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cypher_ls

closes: vim/vim#13516

8f0fe20ff1

Co-authored-by: Gerrit Meier <meistermeier@gmail.com>
2023-11-12 00:22:28 +01:00
dundargoc
592e4472da fix(PVS/V564): the '|' operator is applied to bool type value 2023-11-11 23:58:50 +01:00
dundargoc
128e194f64 fix(PVS/V1001): variable is assigned but is not used 2023-11-11 17:06:52 +01:00
Christian Clason
be83cd73b2 vim-patch:5994329667a6
runtime(i3config): Update for i3 4.23 (vim/vim#13522)

5994329667

Co-authored-by: Ivan Grimaldi <grimaldi.ivan@gmail.com>
Co-authored-by: Ivan Grimaldi <grimaldi.ivam@gmail.com>
2023-11-11 15:11:49 +01:00
dundargoc
b2ca768196 ci: skip api-doc workflow on draft PRs
Checking the documentation generation is mostly useful towards the end
of a pull request like with the lintcommit workflow.
2023-11-11 13:50:53 +01:00
dundargoc
8e58d37f2e refactor: remove redundant casts 2023-11-11 13:31:17 +01:00
dundargoc
c4ad15ae32 fix(PVS/V009): add top-level message 2023-11-11 12:06:26 +01:00
zeertzjq
6c3e170e56
fix(highlight): apply 'winblend' to float border (#25981) 2023-11-11 15:12:58 +08:00
zeertzjq
fdaf6bc557
fix(context): don't leak memory on multiple invalid objects (#25979) 2023-11-11 13:10:26 +08:00
zeertzjq
e9b9a86cd5
fix(context): don't crash on invalid arg to nvim_get_context (#25977)
Note: The crash happens in the second test case when using uninitialized
memory, and therefore doesn't happen with ASAN.
2023-11-11 10:21:14 +08:00
mortezadadgar
d1b2a5cf5f
fix(completion): make sure the buffer name is valid (#25975)
Problem:
crash from
  set complete+=f
  open a empty buffer
  C-N

Solution:
make sure the buffer name is valid.

regression from ae4ca4edf8
2023-11-11 06:41:10 +08:00
dundargoc
4e33ef747c test: skip failing test on freebsd
The watch_file test started failing on bsd after
3ca967387c.
2023-11-10 21:10:15 +01:00
dundargoc
e112081daf docs: update contributing 2023-11-10 17:57:53 +01:00
dundargoc
3294d65416
PVS fixes
* build(PVS): exclude mpack and klib as they are external dependencies

* build(PVS): suppress warning V601

See https://pvs-studio.com/en/docs/warnings/v601/

* fix(PVS/V009): add top-level message

* fix(PVS/V547): expression 'p != NULL' is always true

* fix(PVS/V547): expression '* termpp == NULL' is always false
2023-11-10 17:48:45 +01:00
Christian Clason
430b8da01d build(deps): bump tree-sitter-markdown to v0.1.7 2023-11-10 16:56:10 +01:00
Christian Clason
0a82fa9989 build(deps): bump luajit to HEAD - 69bbbf773 2023-11-10 15:33:18 +01:00
bfredl
06d37becca
Merge pull request #25954 from bfredl/noxmalloc
refactor(drawline): avoid xmalloc/xfree cycles on each screenline
2023-11-10 12:26:51 +01:00
zeertzjq
98bb1d66b1
ci: remove UBSAN_OPTIONS environment variable (#25963)
Because it overrides log_path from ASAN_OPTIONS.

Ref https://github.com/google/sanitizers/issues/1675
2023-11-10 15:47:34 +08:00
zeertzjq
d5a85d737a
fix(f_wait): flush UI before blocking (#25962) 2023-11-10 15:24:36 +08:00
zeertzjq
bf5cf8ae82
vim-patch:8.2.4078: terminal test for current directory not used on FreeBSD (#25961)
Problem:    Terminal test for current directory not used on FreeBSD.
Solution:   Make it work on FreeBSD. (Ozaki Kiichi, closes vim/vim#9516) Add
            TermWait() inside Run_shell_in_terminal() as a generic solution.

ced2b38a56

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-11-10 14:20:32 +08:00
Omar El Halabi
9af03bcd47
fix(options): do not change inccommand during preview (#25462) 2023-11-09 22:20:26 -06:00
zeertzjq
cd63a9addd
refactor: change some xstrndup() and xstrnsave() to xmemdupz() (#25959)
When the given length is exactly the number of bytes to copy, xmemdupz()
makes the intention clearer.
2023-11-10 08:39:21 +08:00
bfredl
74581ec7eb refactor(drawline): avoid xmalloc/xfree cycles on each screenline 2023-11-09 21:55:21 +01:00
Christian Clason
ae8ca79920 vim-patch:d56f15caf602
runtime(wget): Update for Wget2 2.1.0 (vim/vim#13497)

d56f15caf6

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-11-09 19:17:11 +01:00
zeertzjq
267c346e2c
Merge pull request #25951 from zeertzjq/vim-8.2.4140
vim-patch:8.2.{4140,4820,4825,4861,4932}
2023-11-09 21:53:34 +08:00
zeertzjq
04d299c170 vim-patch:8.2.4932: not easy to filter the output of maplist()
Problem:    Not easy to filter the output of maplist().
Solution:   Add mode_bits to the dictionary. (Ernie Rael, closes vim/vim#10356)

d8f5f76621

Co-authored-by: Ernie Rael <errael@raelity.com>
2023-11-09 21:34:04 +08:00
zeertzjq
f748a73a35 vim-patch:8.2.4861: it is not easy to restore saved mappings
Problem:    It is not easy to restore saved mappings.
Solution:   Make mapset() accept a dict argument. (Ernie Rael, closes vim/vim#10295)

51d04d16f2

Co-authored-by: Ernie Rael <errael@raelity.com>
2023-11-09 21:34:04 +08:00
zeertzjq
d4dbfb092b vim-patch:8.2.4825: can only get a list of mappings
Problem:    Can only get a list of mappings.
Solution:   Add the optional {abbr} argument. (Ernie Rael, closes vim/vim#10277)
            Rename to maplist().  Rename test file.

09661203ec

Co-authored-by: Ernie Rael <errael@raelity.com>
2023-11-09 21:34:04 +08:00
zeertzjq
2dfcd5a22b vim-patch:8.2.4820: not simple programmatic way to find a specific mapping
Problem:    Not simple programmatic way to find a specific mapping.
Solution:   Add getmappings(). (Ernie Rael, closes vim/vim#10273)

659c240cf7

Co-authored-by: Ernie Rael <errael@raelity.com>
2023-11-09 21:34:04 +08:00
zeertzjq
a4b80c71ea vim-patch:8.2.4140: maparg() does not indicate the type of script
Problem:    maparg() does not indicate the type of script where it was defined.
Solution:   Add "scriptversion".

a9528b39a6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-11-09 21:34:02 +08:00
zeertzjq
610f50ddaf
vim-patch:20a94f44b3cd (#25946)
runtime(doc): fix grammar in termdebug doc, remove trailing spaces (vim/vim#13505)

20a94f44b3
2023-11-09 15:46:14 +08:00
zeertzjq
43b0e2752c
refactor(api): simplify nvim_set_keymap shortname check (#25945) 2023-11-09 12:28:43 +08:00
zeertzjq
77bb69d7b0
vim-patch:7fbbd7fdc6df (#25944)
runtime(termdebug):  handle buffer-local mappings properly

closes: vim/vim#13475

7fbbd7fdc6

Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
2023-11-09 08:38:25 +08:00
zeertzjq
04187d1cb5
Merge pull request #25942 from zeertzjq/vim-9.0.1791
vim-patch:9.0.{1791,1808,1809,1811},ca48202b6f46
2023-11-09 07:38:05 +08:00
zeertzjq
89d785e530 vim-patch:ca48202b6f46
runtime(termdebug): improve window handling, shorten var types

closes vim/vim#13474

ca48202b6f

Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
2023-11-09 07:24:31 +08:00
zeertzjq
7b921c5501 vim-patch:9.0.1811: still some issues with term_debug test
Problem:  still some issues with term_debug test
Solution: Use WaitForAssert()

closes: vim/vim#12936

85c3a5bc26

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-11-09 07:05:21 +08:00
zeertzjq
4d36892191 vim-patch:9.0.1809: termdebug test flayk
Problem:  termdebug test flayk
Solution: wait slightly longer

6c93c94929

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-09 07:05:21 +08:00
zeertzjq
c9e7e94fcc vim-patch:9.0.1808: termdebug: Typo in termdebug test
Problem:  termdebug: Typo in termdebug test
Solution: fix the typos

f2534434c9

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-09 07:05:21 +08:00
zeertzjq
8d3dbf2746 vim-patch:9.0.1791: No tests for the termdebug plugin
Problem:  No tests for the termdebug plugin
Solution: Add some simple tests for the termdebug plugin

closes: vim/vim#12927

58f39d89a8

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-11-09 07:05:21 +08:00
330-127
ed464ba487
docs: list NVIM_APPNAME as env on manpage (#25935) 2023-11-09 07:04:44 +08:00
zeertzjq
f7b2ea59a6
vim-patch:9.0.2095: statusline may look different than expected (#25941)
Problem:  statusline may look different than expected
Solution: do not check for highlighting of stl and stlnc characters

statusline fillchar may be different than expected

If the highlighting group for the statusline for the current window
|hl-StatusLine| or the non-current window |hl-StatusLineNC| are cleared
(or do not differ from each other), than Vim will use the hard-coded
fallback values '^' (for the non-current windows) or '=' (for the
current window).  I believe this was done, to make sure the statusline
will always be visible and be distinguishable from the rest of the
window.

However, this may be unexpected, if a user explicitly defined those
fillchar characters just to notice that those values are then not used
by Vim.

So, let's assume users know what they are doing and just always return
the configured stl and stlnc values.  And if they want the statusline to
be non-distinguishable from the rest of the window space, so be it.  It
is their responsibility and Vim shall not know better what to use.

fixes: vim/vim#13366
closes: vim/vim#13488

6a650bf696

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-09 06:34:34 +08:00
Gregory Anders
3128cff6b1
fix(clipboard): increase OSC 52 wait timeout (#25936)
When pasting with OSC 52 some terminals show a prompt to the user asking
for permission to read from the system clipboard. When this prompt
appears, 1s is not long enough to wait.

Increase the timeout to 10s and show a message to the user indicating
how to interrupt the wait after 1s.
2023-11-08 12:42:47 -06:00