Commit Graph

24168 Commits

Author SHA1 Message Date
Jon Huhn
ea8b828901 fix(tests): initialize Screen.colors in API highlight tests 2022-12-10 15:59:21 -06:00
zeertzjq
224473546c
fix(api): set correct curbuf when temporarily changing curwin (#21371)
This is the same code change as 6c87bbb4e4
2022-12-10 20:13:40 +08:00
fsouza
6d37d8cb17
fix(lsp): ignore null responses for semanticTokens request (#21364)
The spec indicates that the response may be `null`, but it doesn't
really say what a `null` response means. Since neovim raises an error if
the response is `null`, I figured that ignoring it would be the safest
bet.

Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2022-12-10 12:16:33 +01:00
James McCoy
f96fb23de6
Merge pull request #21363 from jamessan/fuse-vim-patches
fix(vim-patches): ensure libfuse is installed
2022-12-09 19:49:36 -05:00
zeertzjq
7faf8a45e8
fix(events): skip WinScrolled for newly-created float windows (#21333)
Unlike split windows, creating a new floating window does not cause
other windows to resize, so it doesn't make much sense to trigger
WinScrolled or WinResized when creating a new floating window.
2022-12-10 06:50:03 +08:00
Mathias Fußenegger
8b84a10db7
fix(lsp): fix get_active_clients bufnr parameter (#21366)
Follow up to https://github.com/neovim/neovim/pull/21337
2022-12-09 22:02:04 +01:00
Mathias Fußenegger
49df92da94
fix(lsp): correct some type annotations (#21365) 2022-12-09 19:18:31 +01:00
James McCoy
2ecb401f8b
fix(vim-patches): ensure libfuse is installed 2022-12-09 09:56:56 -05:00
zeertzjq
3cf0131c5c
vim-patch:9.0.1038: function name does not match what it is used for (#21359)
Problem:    Function name does not match what it is used for.
Solution:   Include the modifier in the name. (closes vim/vim#11679)

ffa4e9b43a
2022-12-09 20:09:03 +08:00
jdrouhard
5e6a288ce7
fix(lsp): followup fixes for semantic tokens support (#21357)
1. The algorithm for applying edits was slightly incorrect. It needs to
   preserve the original token list as the edits are applied instead of
   mutating it as it iterates. From the spec:

   Semantic token edits behave conceptually like text edits on
   documents: if an edit description consists of n edits all n edits are
   based on the same state Sm of the number array. They will move the
   number array from state Sm to Sm+1.

2. Schedule the semantic token engine start() call in the
   client._on_attach() function so that users who schedule_wrap() their
   config.on_attach() functions (like nvim-lspconfig does) can still
   disable semantic tokens by deleting the semanticTokensProvider from
   their server capabilities.
2022-12-09 11:54:09 +01:00
zeertzjq
b5edea6553
vim-patch:9.0.0238: Shift-Tab shows matches on cmdline when 'wildmenu' is off (#21355)
Problem:    Shift-Tab shows matches on cmdline when 'wildmenu' is off.
Solution:   Only show matches when 'wildmode' contains "list". (closes vim/vim#10951)

300175fd7f

Code change has already been ported.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-09 11:31:02 +08:00
zeertzjq
f69d531d84
test: convert another test in test_matchadd_conceal.vim to Lua (#21353) 2022-12-09 10:37:53 +08:00
zeertzjq
0483ee8254
vim-patch:8.2.4387: command line completion doesn't always work properly (#21352)
Problem:    Command line completion doesn't always work properly.
Solution:   Adjust triggering after a "|".  Add more tests. (Yegappan
            Lakshmanan, closes vim/vim#9779)

e3846cf1eb

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-09 09:45:45 +08:00
zeertzjq
ae5980ec79
Merge pull request #21350 from zeertzjq/vim-8.2.4366
vim-patch:8.2.{4366,4376}: cmdline completion tests
2022-12-09 08:18:07 +08:00
zeertzjq
98dc445767 vim-patch:8.2.4376: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#9771)

9773db6f9b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-09 07:52:50 +08:00
zeertzjq
41282259ba vim-patch:8.2.4366: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#9760)

4d03d87000

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-09 07:52:50 +08:00
zeertzjq
8b3412636a
test(old): change $TMPDIR from Xtest-tmpdir to X-test-tmpdir (#21346)
I've noticed a patch 8.2.4376 that uses more Xtest directories.
Change $TMPDIR to X-test-tmpdir to avoid more future divergence.
2022-12-09 07:51:37 +08:00
zeertzjq
d82096edf8
Merge pull request #21348 from zeertzjq/vim-9.0.1036
vim-patch:9.0.1036: undo misbehaves when writing from an insert mode mapping
2022-12-09 07:24:09 +08:00
zeertzjq
95044991e6 test(undo_spec): add more tests for writing in Insert mode 2022-12-09 07:00:27 +08:00
zeertzjq
70d6c335b1 vim-patch:9.0.1036: undo misbehaves when writing from an insert mode mapping
Problem:    Undo misbehaves when writing from an insert mode mapping.
Solution:   Sync undo when writing. (closes vim/vim#11674)

3f8f827723

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-09 06:55:15 +08:00
Dave Lage
ea39fc2cad
docs: dark/light color/accessibilty pass for generated html docs #21345 2022-12-08 14:00:18 -08:00
Enan Ajmain
1e2cc68889
fix(chansend): sending lines to terminal in reverse order on Windows #19315
Problem: `chansend()` on Windows sends lines in reverse order.
Cause: Using \n instead of \r\n for newlines on Windows.
Solution: on Windows, use CRLF newline characters.

Fixes #18501
2022-12-08 12:55:50 -08:00
zeertzjq
9b2c790344
Merge pull request #21338 from zeertzjq/vim-9.0.1030
vim-patch:9.0.{1030,1032}: using freed memory with the cmdline popup menu
2022-12-09 02:40:50 +08:00
zeertzjq
95c655fedc vim-patch:9.0.1032: test fails when terminal feature is missing
Problem:    Test fails when terminal feature is missing.
Solution:   Use CheckRunVimInTerminal.

b9603f6498

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-09 02:16:57 +08:00
zeertzjq
4d22424d9e vim-patch:9.0.1030: using freed memory with the cmdline popup menu
Problem:    Using freed memory with the cmdline popup menu.
Solution:   Clear the popup menu when clearing the matches. (closes vim/vim#11677)

038e6d20e6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-09 02:16:57 +08:00
Gregory Anders
9b14ad5fd9
Merge pull request #21100 from jdrouhard/lsp_semantic_tokens
LSP: semantic tokens support
2022-12-08 10:55:09 -07:00
John Drouhard
9f035559de feat(lsp): initial support for semantic token highlighting
* credit to @smolck and @theHamsta for their contributions in laying the
  groundwork for this feature and for their work on some of the helper
  utility functions and tests
2022-12-08 11:31:56 -06:00
John Drouhard
5e0c74cd82 refactor(test): create an lsp-specific helpers.lua file
* move the code for creating fake rpc servers there
2022-12-08 11:31:56 -06:00
Gregory Anders
42009ac7df
feat(treesitter): add 'lang' option to show_tree() (#21341)
This is necessary for now to support filetypes that use a parser with a
different name (e.g. the "terraform" filetype uses the "hcl" parser).
2022-12-08 09:51:46 -07:00
Gregory Anders
d44699800c
feat(treesitter): add vim.treesitter.show_tree() (#21322)
Add a "show_tree" function to view a textual representation of the
nodes in a language tree in a window. Moving the cursor in the
window highlights the corresponding text in the source buffer, and
moving the cursor in the source buffer highlights the corresponding
nodes in the window.
2022-12-08 09:22:57 -07:00
Christian Clason
3576776903
vim-patch:86b4816766d9 (#21314)
Update runtime files

86b4816766

vim-patch:9.0.1029: autoload directory missing from distribution

Problem:    Autoload directory missing from distribution.
Solution:   Add the autoload/zig directory to the list of distributed files.

84dbf855fb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-08 16:33:38 +01:00
zeertzjq
7b9ad45178
vim-patch:8.2.1634: loop to handle keys for the command line is too long (#21340)
Problem:    Loop to handle keys for the command line is too long.
Solution:   Move a few more parts to separate functions. (Yegappan Lakshmanan,
            closes vim/vim#6895)

9c929713b7
2022-12-08 22:52:25 +08:00
Raphael
50ffb8d7f4
refactor(lsp): remove deprecated vim.lsp.buf_get_clients calls (#21337) 2022-12-08 13:28:28 +01:00
zeertzjq
e2c5b21e18
test(lsp): call clear() before willSave tests (#21336)
Otherwise these two tests cannot run alone and may fail on CI.
2022-12-08 19:22:40 +08:00
zeertzjq
4f64aef29f
vim-patch:8.2.3564: invalid memory access when scrolling without valid screen (#21335)
vim-patch:8.2.3564: invalid memory access when scrolling without valid screen

Problem:    Invalid memory access when scrolling without a valid screen.
Solution:   Do not set VALID_BOTLINE in w_valid.

777e7c21b7

Remove -Z flag when using RunVim().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-08 18:58:06 +08:00
dundargoc
a27ed57ad0
docs(lua): add guide to using Lua in Neovim (#21137)
Add introductory guide explaining how to use Lua in Neovim:
where to put Lua files, how to set variables and options, how
to create mappings, autocommands, and user commands.

Adapted with kind permission from 
https://github.com/nanotee/nvim-lua-guide
2022-12-08 11:21:42 +01:00
Mathias Fußenegger
54305443b9
feat(lsp): support willSave & willSaveWaitUntil capability (#21315)
`willSaveWaitUntil` allows servers to respond with text edits before
saving a document. That is used by some language servers to format a
document or apply quick fixes like removing unused imports.
2022-12-08 10:55:01 +01:00
zeertzjq
a505c1acc3
vim-patch:9.0.1026: type of w_last_topfill is wrong (#21332)
Problem:    type of w_last_topfill is wrong.
Solution:   Use "int" instead of "linenr_T". (closes vim/vim#11670)

2e613453ee
2022-12-08 07:39:56 +08:00
zeertzjq
f92aab5f70
vim-patch:9.0.1025: WinScrolled is not triggered when filler lines change (#21325)
Problem:    WinScrolled is not triggered when filler lines change.
Solution:   Add "topfill" to the values that WinScrolled triggers on.
            (closes vim/vim#11668)

3fc84dc2c7

Cherry-pick StopVimInTerminal() from patch 9.0.1010.
2022-12-07 18:34:39 +08:00
Gregory Anders
f8aa2a0dea
docs(treesitter): use full function names in tags (#21321) 2022-12-07 09:27:41 +01:00
zeertzjq
0caae2376e
Merge pull request #21324 from zeertzjq/vim-8.2.1768
vim-patch:8.2.1768,0e6adf8a29d5,fa3b72348d88
2022-12-07 14:51:36 +08:00
zeertzjq
214c9ed1e2 vim-patch:fa3b72348d88
Update runtime files

fa3b72348d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-07 14:25:58 +08:00
zeertzjq
c61af03cd2 vim-patch:0e6adf8a29d5
Update runtime files

0e6adf8a29

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-07 14:25:58 +08:00
zeertzjq
7dfd466437 vim-patch:8.2.1768: cannot use the help menu from a terminal window
Problem:    Cannot use the help menu from a terminal window.
Solution:   Add ":tlnoremenu" commands. (Yee Cheng Chin, closes vim/vim#7023)

b45cd36bd9

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-07 14:25:57 +08:00
zeertzjq
ed23cd3e50
fix(float): fix crash with bufpos and non-existent window (#21319) 2022-12-07 11:36:34 +08:00
zeertzjq
eab71e7875
test: add more tests for float window bufpos (#21318) 2022-12-07 10:18:12 +08:00
zeertzjq
ad244a865b
fix(events): save v:event for cmdline autocommands separately (#21316) 2022-12-07 08:57:29 +08:00
Jack Rowlingson
a069e88b4e
docs(lua): correct vim.spell.check example (#21311) 2022-12-06 16:44:43 +00:00
dundargoc
73ddb6daf9
ci(news): fetch full history (#21312)
We seem to need the parent commit of the earliest PR commit in order to
perform common git functionality to check which files were changed.
2022-12-06 17:38:24 +01:00
zeertzjq
9628348a6a
vim-patch:9.0.1017: test for srand() fails on MS-Windows (#21308)
Problem:    Test for srand() fails on MS-Windows.
Solution:   Do not expect the same result a second time.

9dacdb1d56

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 17:41:57 +08:00