Commit Graph

19662 Commits

Author SHA1 Message Date
Gregory Anders
931f499d9a
test(sign): add test for culhl option 2021-12-08 21:47:59 -05:00
James McCoy
e9051d965e
vim-patch:partial 6304be625ce4
Update runtime files.
6304be625c

Remaining changes left out of 03d250eb45
2021-12-08 21:47:59 -05:00
James McCoy
5fda23c307
vim-patch:8.2.3748: giving an error for an empty sign argument breaks a plugin
Problem:    Giving an error for an empty sign argument breaks a plugin.
Solution:   Do not give an error.
e5710a02cb
2021-12-08 21:47:58 -05:00
James McCoy
4453d4c9f1
vim-patch:8.2.3747: cannot remove highlight from an existing sign
Problem:    Cannot remove highlight from an existing sign. (James McCoy)
Solution:   Only reject empty argument for a new sign.
0bac5fc5e1
2021-12-08 21:47:58 -05:00
James McCoy
d0b3efb7db
vim-patch:8.2.3743: ":sign" can add a highlight group without a name
Problem:    ":sign" can add a highlight group without a name.
Solution:   Give an error if the group name is missing. (closes vim/vim#9280)
5e18ccc60b
2021-12-08 21:47:58 -05:00
James McCoy
e8f9262125
vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'
Problem:    Cannot adjust sign highlighting for 'cursorline'.
Solution:   Add CursorLineSign and CursorLineFold highlight groups.
            (Gregory Anders, closes vim/vim#9201)
e413ea04b7
2021-12-08 21:47:58 -05:00
James McCoy
2cd815c0af
Merge pull request #16418 from zeertzjq/terminal-coladvance
fix(terminal): use coladvance() to calculate buffer cursor position
2021-12-08 21:17:18 -05:00
Gregory Anders
be84529190
refactor(diagnostic): remove bufnr parameter from open_float (#16579)
The overwhelming majority of use cases for `open_float` are to view
diagnostics from the current buffer in a floating window. Thus, most use
cases will just `0` or `nil` as the first argument, which makes the
argument effectively useless and wasteful.

In the cause of optimizing for the primary use case, make the `bufnr`
parameter an optional parameter in the options table. This still allows
using an alternative buffer for those that wish to do so, but makes the
"primary" use case much easier.

The old signature is preserved for backward compatibility, though it can
likely be fully deprecated at some point.
2021-12-08 18:44:31 -07:00
Gregory Anders
c096561041
docs(lsp): fix resolve_capabilities docstring (#16577) 2021-12-08 11:01:07 -07:00
dundargoc
e5f691baef
docs: update missing help sections from main help page (#16573)
Also replace non-existent help section remote.txt to remote_plugins.txt
2021-12-08 09:56:11 -07:00
ii14
db4bc32c4a
fix: check for interrupt in nvim_echo, write_msg and nlua_print (#16537)
Fixes `q` in more pager, where `:highlight` can be quit out of with a
single `q` keystroke, while in `:lua print(vim.inspect(vim))` it just
scrolls down a page.
2021-12-08 09:43:58 -07:00
dundargoc
5b117bbc75
ci: install doxygen with conda instead of apt (#16517)
This provides a newer version of Doxygen (1.9.0 or later)
that fixes a bug in the documentation generator.

Closes #16498
2021-12-08 09:28:25 -07:00
dundargoc
c4d70dae80
refactor(diagnostic): add warning to deprecated functions (#16536) 2021-12-08 08:47:19 -07:00
Gregory Anders
cf32053d60
fix(api): allow nvim_buf_set_extmark to accept end_row key (#16548)
nvim_buf_get_extmark uses "end_row" rather than "end_line" in its
'details' dict, which means callers must modify the key names if they
want to re-use the information. Change the parameter name in
nvim_buf_set_extmark to "end_row" and use "end_line" as an alias
to make this more consistent.
2021-12-08 08:44:48 -07:00
Jan Edmund Lazo
5abd7c2c14
Merge pull request #16421 from seandewar/vim-8.1.0035
vim-patch:8.1.{35,42,64},8.2.{1781,1783,1976,2014,3671}
2021-12-07 21:17:12 -05:00
zeertzjq
2784a5d3d2 fix(terminal): use coladvance() to calculate buffer cursor position 2021-12-08 08:11:27 +08:00
Björn Linse
be768be6b7
Merge pull request #16556 from zeertzjq/hl-change-update
fix(highlight): always update window highlight if highlight changed
2021-12-07 18:41:17 +01:00
Björn Linse
ddf48193e6
Merge pull request #16559 from zeertzjq/filler-end-row
fix(screen): do not draw filler lines post eof if already at last row
2021-12-07 18:36:58 +01:00
Gregory Anders
a2db756206
refactor(lsp): remove usage of deprecated function (#16539) 2021-12-07 10:25:21 -07:00
Anshuman Medhi
f99f3d9052
feat(lsp): use vim.ui.select for selecting lsp client (#16531) 2021-12-07 18:09:43 +01:00
zeertzjq
b326bf5f41 fix(screen): do not draw filler lines post eof if already at last row 2021-12-07 23:19:56 +08:00
zeertzjq
23dcef9269 fix(highlight): always update window highlight if highlight changed 2021-12-07 20:48:39 +08:00
Sean Dewar
361f548437
vim-patch:8.2.3671: restarting Insert mode in prompt buffer too often
Problem:    Restarting Insert mode in prompt buffer too often when a callback
            switches windows and comes back. (Sean Dewar)
Solution:   Do not set "restart_edit" when already in Insert mode.
34c20ff85b

As Test_prompt_switch_windows is skipped, implement it in prompt_buffer_spec.

Replace the 50ms term_wait calls with poke_eventloop (test seems to work anyway
without them, so maybe they're not required?)

The new test does include a duplicate screen test that may generate a "screen
test succeeded immediately" warning, but this is done to match the Vim test.
2021-12-07 11:34:28 +00:00
Sean Dewar
0f792b284f
test(prompt_buffer_spec): include changes from v8.1.1984
I already ported v8.1.1984 previously, but hadn't updated prompt_buffer_spec to
match test_prompt_buffer (which we have but due to Vim features such as
term_sendkeys it's mostly skipped).

Required for v8.2.3671.
2021-12-07 11:34:28 +00:00
Sean Dewar
d6258a9bad
vim-patch:8.2.2014: using CTRL-O in a prompt buffer moves cursor to start
Problem:    Using CTRL-O in a prompt buffer moves cursor to start of the line.
Solution:   Do not move the cursor when restarting edit. (closes vim/vim#7330)
ee8b787bcd

Test_prompt_editing is skipped, so edit the Lua test in prompt_buffer_spec.
2021-12-07 11:34:27 +00:00
Sean Dewar
c2d0a1041e
vim-patch:8.2.1976: cannot backspace in prompt buffer after using cursor-left
Problem:    Cannot backspace in prompt buffer after using cursor-left. (Maxim
            Kim)
Solution:   Ignore "arrow_used" in a prompt buffer. (closes vim/vim#7281)
6f6244855f

cmdchar_todo wasn't adapted properly for Nvim's state system, which caused it to
be a dead store and such was removed in #11900.

Re-introduce cmdchar_todo properly.
2021-12-07 11:34:27 +00:00
Sean Dewar
a128b64e73
vim-patch:8.2.1783: try-catch test fails
Problem:    Try-catch test fails.
Solution:   Don't call win_enter(), only call enterering_window().
bdf931c25b

v8.2.1781 caused Test_reload_in_try_catch() from v8.2.0004 to fail in Vim, but
it has not been ported yet.
2021-12-07 11:34:27 +00:00
Sean Dewar
38cd91de5f
vim-patch:8.2.1781: writing to prompt buffer interferes with insert mode
Problem:    Writing to prompt buffer interferes with insert mode.
Solution:   Use win_enter() instead of just setting "curwin". (Ben Jackson,
            closes vim/vim#7035)
4537bcc889

Vim test will be skipped, so add a Lua test.
The problem boils down to the use of aucmd_restbuf in a callback, so just test
that (via nvim_buf_set_lines).
2021-12-07 11:34:27 +00:00
Sean Dewar
1fffccc5d6
vim-patch:8.1.0064: typing CTRL-W in a prompt buffer shows mode "-- --"
Problem:    Typing CTRL-W in a prompt buffer shows mode "-- --".
Solution:   Set restart_edit to 'A' and check for it.
942b4541a2

Nvim already checked for 'i' in showmode(), so this bug was fixed with <C-W>
(though this patch now changes <C-W> to use 'A').

However, the missing changes I ported for v8.1.0036 use 'A' when a callback
leaves the window in insert mode and edit gets restarted, so this bug was
possible there.

Modify showmode() restart_edit condition to match v8.2.1978:
957cf67d50
2021-12-07 11:34:26 +00:00
Sean Dewar
b9ab4c1dea
vim-patch:8.1.0042: if omni completion opens a window Insert mode is stopped
Problem:    If omni completion opens a window Insert mode is stopped.
            (Hirohito Higashi)
Solution:   Only set stop_insert_mode in a prompt buffer window.
f98b845dd1

popupmenu_spec.lua fails without this.
2021-12-07 11:34:26 +00:00
Sean Dewar
d6ea0741c9
fix(prompt): add missing changes from v8.1.0036
v8.1.0036 is already marked as ported, but missed out changes that depended on v8.1.0035.
2021-12-07 11:34:26 +00:00
Sean Dewar
28134f4e78
vim-patch:8.1.0035: not easy to switch between prompt buffer and other windows
Problem:    Not easy to switch between prompt buffer and other windows.
Solution:   Accept CTRL-W commands in Insert mode.  Start and stop Insert mode
            as one would expect.
6d41c78e35

Cherry-pick channel.txt change from:
d2f3a8b878

b_prompt_insert was already ported.
2021-12-07 11:34:24 +00:00
Jan Edmund Lazo
afaad8b54e
Merge pull request #16194 from seandewar/vim-8.1.1925
vim-patch:7.4.1777,8.1.{1925,1995,2011,2012,2013,2166},8.2.{0532,0871,1168,1241,3576}
2021-12-07 01:14:21 -05:00
Jan Edmund Lazo
bf9e8a9df9
Merge pull request #16546 from zeertzjq/vim-8.1.1797
vim-patch:8.1.{1797,1798}: the vgetorpeek() function is too long
2021-12-07 00:15:04 -05:00
Jan Edmund Lazo
18d81a6724
Merge pull request #16107 from zeertzjq/vim-8.1.1542
vim-patch:8.1.1542,8.2.3549: an OptionSet autocommand does not get enough info
2021-12-06 22:35:05 -05:00
Volodymyr Kot
67d3c98dac
vim-patch:8.1.2104: the normal.c file is too big (#16389)
Problem:    The normal.c file is too big.
Solution:   Move do_pending_operator() to ops.c. (Yegappan Lakshmanan,
            closes vim/vim#4999).
792cf5e1be
2021-12-06 21:45:30 -05:00
zeertzjq
afdd9c19aa
refactor: fix indent in decode.c (#16543) 2021-12-06 21:23:52 -05:00
zeertzjq
296eb7203c vim-patch:8.1.1798: warning for unused variable in tiny version
Problem:    Warning for unused variable in tiny version. (Tony Mechelynck)
Solution:   Move inside #ifdef.  Reformat code.
eda35f7127
2021-12-07 06:47:33 +08:00
zeertzjq
95a5912158 vim-patch:8.1.1797: the vgetorpeek() function is too long
Problem:    The vgetorpeek() function is too long.
Solution:   Split off the part that handles mappings, with fix.
edd680f364
2021-12-07 06:47:33 +08:00
Christian Clason
0a3826646f
vim-patch:4700398e384f (#16538)
Update runtime files
4700398e38

partial skip:
doc/sign.txt
doc/various.txt
doc/motion.txt
2021-12-06 13:55:38 +01:00
Jan Edmund Lazo
523f03b506
lint (#16526) 2021-12-05 23:33:22 -05:00
Gregory Anders
4306b395de
refactor: format diagnostic.lua (#16540) 2021-12-05 19:42:31 -07:00
Matthew Toohey
62f0157853
fix(diagnostic): escape special chars in file names (#16527)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2021-12-05 19:39:00 -07:00
dundargoc
24f9463dd0
refactor: remove unused runtime lua functions (#16535) 2021-12-05 19:11:20 +01:00
Anshuman Medhi
9b65a7e064
docs(lsp): re-add client.requests documentation (#16530)
Closes #16528

Added in this PR: d1c470957b (diff-6b5f3071d65558aab177912061ac6a2f5312660655a449276c83697686f28e72R627)

Removed by regeneration in this PR: 2d340a3746 (diff-6b5f3071d65558aab177912061ac6a2f5312660655a449276c83697686f28e72L631)
2021-12-05 14:04:53 +01:00
Gregory Anders
1e6eeca9d1
Merge pull request #15996 from gpanders/nvim_get_option_value
feat(api): add nvim_{get,set}_option_value
2021-12-04 14:30:27 -07:00
Dmytro Meleshko
222ef0c00d
feat(lsp,diagnostic): open folds in jump-related functions (#16520) 2021-12-04 22:14:38 +01:00
Gregory Anders
71ac00ccb5 feat(api): add nvim_get_option_value 2021-12-04 14:04:23 -07:00
Gregory Anders
7b910a1716 chore: bump API version 2021-12-04 14:04:23 -07:00
James McCoy
8dcf45c824
Merge pull request #16518 from dundargoc/ci/use-latest-versions
ci: use tag v2 when using checkout action
2021-12-04 12:50:55 -05:00