Commit Graph

20300 Commits

Author SHA1 Message Date
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
Claes Nästén
05f9f63f24 fix: don't use cfsetspeed, use i and o variants
cfsetspeed is not available on SunOS, use cfsetispeed and cfsetospeed
instead.
2021-12-07 09:56:25 +01:00
Claes Nästén
435dd04bdb fix: don't include pty.h on SunOS 2021-12-07 09:56:02 +01: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
Claes Nästén
8f1fdbc54a fix: add STRNLEN compatability macro
Older SunOS systems come without strnlen, add STRNLEN macro in line with
the other str* compat macros.
2021-12-06 17:34:26 +01: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
Claes Nästén
8fdf1b265d fix: define NAME_MAX from _XOPEN_NAME_MAX
On SunOS NAME_MAX is not defined, _XOPEN_NAME_MAX is so fall back to
defining NAME_MAX from _XOPEN_NAME_MAX.
2021-12-06 09:19:24 +01:00
Claes Nästén
b8ae43dd24 fix: skip libutil on SunOS
libutil is not available on Solaris variants, even on Solaris 11 where
forkpty is available.
2021-12-06 08:18:02 +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
Dundar Göc
c5af86b9b9 ci: remove "brew upgrade" from macos jobs
Packages are automatically upgraded on install. This will avoid
upgrading unrelated packages, cutting the macos job time to about a
half.
2021-12-04 23:44:52 +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
Dundar Göc
8cd1fa8945 ci: use tag v2 when using checkout action
Using v2 automatically fetches the latest minor patch for v2, meaning
free bug fixes without needing to manually update the tag version.
2021-12-04 13:24:46 +01:00
Björn Linse
76af219e3e
Merge pull request #16411 from dundargoc/refactor/upgrade-uncrustify
refactor: upgrade uncrustify config version to 0.74.0
2021-12-04 12:31:42 +01:00
Christian Clason
2ccf6567b7
vim-patch:8.2.3730: "/etc/Muttrc.d/README" gets filetype muttrc (#16515)
Problem:    "/etc/Muttrc.d/README" gets filetype muttrc.
Solution:   Move the Muttrc.d pattern down, add exception for *.rc files.
800b01b0c8
2021-12-04 12:26:37 +01:00
Christian Clason
419e0d117d
vim-patch:8.2.3729: no support for squirrels (#16513)
Problem:    No support for squirrels. (closes vim/vim#9259)
Solution:   Recognize nuts.
6f42cb6e51
2021-12-03 19:51:30 +01:00
Christian Clason
e225397bcb
vim-patch:8.2.3726: README file in a config directory gets wrong filetype (#16507)
Problem:    README file in a config directory gets wrong filetype.
Solution:   Match README before patterns that match everything in a directory.
c903695be5
2021-12-03 13:19:17 +01:00
James McCoy
4e352ecc42
Merge pull request #16489 from zeertzjq/patch-1
[skip ci]
2021-12-02 10:33:42 -05:00
James McCoy
cef21e5592
Merge pull request #16408 from jamessan/rm-legacy-test 2021-12-02 10:31:40 -05:00
Michael Lingelbach
254c22afc3
fix(diagnostic): clamp diagnostics on negative line numbers (#16496)
Closes https://github.com/neovim/neovim/issues/16492

Despite having logic for setting the maximum diagnostic line
number to at minimum 0, previously the conditional statement only
checked if lnum and end_lnum were greater than the line count.

Fix: also check if lnum and end_lnum are less than 0.
2021-12-02 06:38:44 -08:00
zeertzjq
0f82deb2c5
docs(CONTRIBUTING.md): use gh instead of hub; correct uncrustify link 2021-12-02 08:28:05 +08:00
Gregory Anders
73b35ef10f
chore: add default luarc.json for Lua development (#16487)
The Sumneko Lua language server has matured quite a bit and many
Neovim developers use it while working on Neovim. Having a default
configuration for Neovim development is a nice convenience (and
dovetails well with the auto-generated compile_command.json for C
development).

The file is shipped under `contrib` and users can make use of it by
symlinking to `.luarc.json` in the project root.
2021-12-01 12:09:50 -07:00
Gregory Anders
99f6260f84 fix(diagnostic): set effective buffer number for DiagnosticChanged autocmd (#16474)
This enables use of <abuf> in autocommand handlers for
DiagnosticChanged.
2021-12-01 07:27:17 -07:00
James McCoy
195aec453a
chore: remove legacy/059_utf8_spell_checking.vim
The legacy test was converted to a new style Vim test in
8b81218300.
2021-11-30 23:00:48 -05:00
James McCoy
d3585e0ec5
Merge pull request #16478 from jamessan/fragile-server-notifications-test
test(api): mark "notify cancels stale events on channel close" fragile
2021-11-30 22:39:14 -05:00