Commit Graph

15760 Commits

Author SHA1 Message Date
Hirokazu Hata
78d58eaf61
lsp: remove buffer version on buffer_detach (#12029)
When we save the buffer, the buffer is detached and attached again.
So the client also needs to remove the buffer version once.
2020-04-25 14:58:35 +02:00
Marvim the Paranoid Android
c9f4cac3c9
version.c: update [ci skip] (#12084) 2020-04-24 23:33:15 +02:00
Matthieu Coudron
4d8b66e497 helpers: fix FIXED_TEMP_ARRAY
...was using wrong macro argument.
2020-04-24 20:33:14 +02:00
Matthieu Coudron
6da348f220 lint: fix linting issues 2020-04-24 20:33:11 +02:00
Matthieu Coudron
7d2879694e extmark: introduce extmark_splice_cols
to ease up notations.
2020-04-24 20:32:20 +02:00
Matthieu Coudron
d20142a31f folds: decrease reliance on global 'curwin'
TODO in a future commit:
- remains 2 instances of changed_lines that dont take into account
buffer
2020-04-24 20:28:44 +02:00
Thore Weilbier
deb4566cab
lsp: callback for references now opens qf (#12171)
In contrast to other callbacks for LSP requests like
`textDocument/documentSymbols`, does the one for references not open the
quickfix window after the quickfix list was filled. This left the user
in a situation he don't know what or if something had happen.

Related to: neovim/neovim#12170
2020-04-23 13:36:19 +02:00
Thomas Vigouroux
6c9a5743a0
treesitter: check for integer overflow (#12135)
Sometimes treesitter calls for an invalid column within a line, checking
that the column is actually valid and forcing the value avoids an
integer overflow and an infinite sequence of invalid reads.

Fixes #12131
2020-04-22 18:54:56 +02:00
James McCoy
fdedaa7226
Merge pull request #12081 from xylix/bash-version-check 2020-04-21 22:35:31 -04:00
Rob Pilling
978a6bcaf2 vim-patch:8.1.2225: the "last used" info of a buffer is under used
Problem:    The "last used" info of a buffer is under used.
Solution:   Add "lastused" to getbufinfo(). List buffers sorted by last-used
            field. (Andi Massimino, closes vim/vim#4722)
52410575be
2020-04-21 21:40:22 +01:00
erw7
6854680579
terminal: Fix mouse coordinates issue (#12158)
Offsets of window were not taken into account when sending mouse
coordinates to the terminal. Therefore, when nu or rnu is set, the mouse
coordinates sent to the terminal were not correct. Change it to send the
correct coordinates by subtract window offset from col.
2020-04-21 15:44:39 +02:00
Hirokazu Hata
633322a020
lsp: do not assert even if the code does not exist in ErrorCodes (#11981)
There is ErrorCodes in the LSP specification, but in ResponseError.code
it is not used and the actual type is number.
Some language servers response original error cods and this is valid spec.
So we shouldn't assert even if the code does not exist in ErrorCodes.

ref: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#responseMessage
2020-04-21 15:42:48 +02:00
Khangal
0c637898f9
lsp: textDocument/definition can return Location or Location[] (#12014)
* https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition

Co-authored-by: Khangal Jargalsaikhan <khangal.j@irbis.sg>
2020-04-21 15:16:58 +02:00
Hirokazu Hata
2a5d766581
doc: fix vim.lsp.stop_all_clients doc (#12055) 2020-04-21 14:51:51 +02:00
James McCoy
e58a03a68e
Merge pull request #12108 from mcepl/luv-1.18.0-compat 2020-04-21 08:00:42 -04:00
Matěj Cepl
e8dd2c986c
Test on actual libuv version number, not on existence of symbol.
uv_stream_get_write_queue_size isn't a define, it's a
function. It seems like this would always be shadowing the
actual function name.
2020-04-21 11:03:13 +02:00
Matěj Cepl
770a0ac2df
Make neovim building even with libuv 1.18.0
(found for example on openSUSE/Leap 15.*)
2020-04-21 10:14:07 +02:00
Matthieu Coudron
9678fe4cfb
Merge pull request #11989 from Weypare/textEdit
LSP/completion: add textEdit support
2020-04-20 21:31:19 +02:00
Andrey Avramenko
49045b173e test: add docs for get_completion_word test 2020-04-20 20:20:14 +03:00
Andrey Avramenko
a0d2bfeeb5 test: add get_completion_word test for text_doc...
...ument_completion_list_to_complete_items
2020-04-20 18:35:54 +03:00
erw7
8745247cba
tui: Don't call uv_write without output (#12146)
Fixes #11653, #11990. Check for cursor visibility to toggle uv_write call.
2020-04-20 14:50:44 +02:00
Andrey Avramenko
e6cfc1b158 LSP/completion: Add completion text helper function 2020-04-20 14:09:13 +03:00
Hirokazu Hata
adec9fb444
lsp: export convert_signature_help_to_markdown_lines (#11950)
This function is also useful for users to create their own `textDocument/signatureHelp` callback function.
2020-04-19 23:40:54 +02:00
Rob Pilling
9d59f066cb vim-patch:8.0.1651: cannot filter :ls output for terminal buffers
Problem:    Cannot filter :ls output for terminal buffers.
Solution:   Add flags for terminal buffers. (Marcin Szamotulski, closes vim/vim#2751)
0751f51a5b
2020-04-19 20:18:41 +01:00
Rob Pilling
ec2d45a851 vim-patch:7.4.1988
Problem:    When updating viminfo with file marks there is no time order.
Solution:   Remember the time when a buffer was last used, store marks for
            the most recently used buffers.
ab9c89b68d

As this is a viminfo fix, most of this is irrelevant - the patch has
just been brought across for the creation and updating of buffer's
`b_last_used` properties.
2020-04-19 20:18:41 +01:00
Matthieu Coudron
ca02db1f9f
Merge pull request #12047 from erw7/fix-resolve-on-windows
Change resolve() to resolve symbolic links on Windows
Neovim worked the same way as vim for shortcuts, but didn't handle symbolic links and junction cases. This PR implements the same behavior for symbolic links and junctions as for vim.
2020-04-19 14:11:01 +02:00
Tristan Konolige
bf0f745861
lua: allow deepcopy of functions (#12136) 2020-04-19 01:04:37 +02:00
Hirokazu Hata
c5466ba6ef
lsp: replace the event that closes the signature help preview window from InsertCharPre to CursolMovedI (#11954)
In the case of InsertCharPre, it is inconvenient because the signature help is displayed
when backspaced in insert mode, so change it to CursolMovedI.
2020-04-18 19:04:47 +02:00
Ghjuvan Lacambre
7d4451c657
LSP: fix breakage when severity isn't specified (#12027)
Before this commit, the LSP client would throw errors when messages
without severity would be sent by the server. We make severity default
to `Error` as a kludge before proper heuristics to discover the severity
of a message are found.
2020-04-18 18:21:08 +02:00
Matthieu Coudron
9ac5bc4b0b
Merge pull request #12141 from vigoux/treesitter_fix
[RFC] Update treesitter runtime
Get rid of our utf8proc dependency

Note that we unconditionnally escape treesitter queries, might need to be revisited.
2020-04-18 16:05:16 +02:00
Thomas Vigouroux
e10f9151dc treesitter: remove utf8proc dependency 2020-04-18 09:21:03 +02:00
Thomas Vigouroux
1fb44ba835 treesitter: escape backslashes in queries
Treesitter changed their decoders and apparently thus causing this
change.

This decoder change happened on
ee9a3c0ebb218990cf391ed987be7f2448c54a73.
2020-04-18 09:20:13 +02:00
Thomas Vigouroux
727040c953 treesitter: update vendor code
Update treesitter vendor code to commit
35f82ce301951315e08de3b7e44a18c9170b28b8
2020-04-18 09:19:21 +02:00
Matthieu Coudron
e5da4fd557
Merge pull request #12145 from janlazo/vim-8.2.0584
vim-patch:8.2.{584,589}
2020-04-18 04:09:32 +02:00
Jan Edmund Lazo
b3d669b40b
vim-patch:8.2.0589: .bsd file type not recognized
Problem:    .bsd file type not recognized.
Solution:   Recognize .bsd as BSDL. (Daniel Kho, closes vim/vim#5945)
0fc1288aef
2020-04-17 21:14:26 -04:00
Jan Edmund Lazo
6f7141dd76
vim-patch:8.2.0584: viminfo file uses obsolete function file_readable()
Problem:    Viminfo file uses obsolete function file_readable().
Solution:   Use filereadable(). (closes vim/vim#5934)
c5f33db888
2020-04-17 19:04:23 -04:00
Matthieu Coudron
fb4c7a53cf
folds: decrease reliance on global "curwin" (#12132)
Pass the window in which to create/delete folds instead of using the
global "curwin" (current window).
Preliminary work for a fold API.

TODO: I kept changed_lines prototype unchanged. This should be updated
when a fold API sees the light.
2020-04-16 21:29:04 +02:00
Micah Halter
a5818204b1
doc:Fix incorrect nvim config paths in documentation (#12134)
Updates  remaining  ~/.vim with ~/.config/nvim
2020-04-16 20:49:05 +02:00
George Zhao
51b4fc4778
lsp: provide a default for missing reference kind (#12127)
Fix #12122

>Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/util.lua:560: Expected lua string

Some lsp server(e.g. https://github.com/bash-lsp/bash-language-server) not have kind in reference, reference["kind"] is nil
2020-04-16 18:30:03 +02:00
erw7
e8269a3ab5
win,runtime: Fix problem when win32yank was a symbolic link in WSL [skip ci] (#12124)
On some versions of Windows, WSL is unable to execute symbolic links to
Windows executables (microsoft/WSL#3999). As a workaround for that problem
this changes to use resolve() on WSL if win32yank was a symbolic link.

fixes #12113.
2020-04-15 14:54:23 +02:00
James McCoy
e11e93d139
Merge pull request #12005 from erw7/fix-screen-vsplit
Closes #11998
2020-04-15 08:06:59 -04:00
James McCoy
979b7c0a73
Merge pull request #12121 from janlazo/vim-8.2.0575 2020-04-15 07:56:42 -04:00
Jan Edmund Lazo
5f7384bf42
vim-patch:8.2.0575: :digraph! not tested
Problem:    :digraph! not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#5925)
e3242346cf
2020-04-13 20:04:51 -04:00
Doug Richardson
05fd647770
Suppress Microsoft copyright banner. (#12114) 2020-04-14 00:42:50 +02:00
Doug Richardson
bf58c00071
Use libnvim as OUTPUT_NAME for libnvim (#12119)
libnvim's OUTPUT_NAME was nvim, which caused the cmake Ninja generator
to generate two build rules for the library, which produced a warning
about incorrect builds.
2020-04-14 00:41:45 +02:00
Thomas Churchman
b3a66faf66
TUI: support setting cursor color in tmux (#12100) 2020-04-14 00:07:30 +02:00
Matthieu Coudron
93b2cb7a38
Merge pull request #11997 from janlazo/vim-8.1.2389
[RDY]vim-patch:8.1.{1745,2147,2280,2282,},8.2.{41,134,365,366,381,387,389,397,398,406,415,457,464,473,474,507,544,549}
2020-04-13 22:49:00 +02:00
Jan Edmund Lazo
cf223e7d78
vim-patch:8.2.0549: user systemd files not recognized
Problem:    User systemd files not recognized.
Solution:   Add filetype patterns. (Kevin Locke, closes vim/vim#5914)
3b922f1138
2020-04-13 12:00:34 -04:00
Jan Edmund Lazo
bdf629775b
vim-patch:8.2.0544: memory leak in search test
Problem:    Memory leak in search test.
Solution:   Free msgbuf. (Dominique Pelle, closes vim/vim#5912)
880e4d9117
2020-04-13 12:00:34 -04:00
Jan Edmund Lazo
5726272559
vim-patch:8.2.0507: getbufvar() may get the wrong dictionary
Problem:    Getbufvar() may get the wrong dictionary. (David le Blanc)
Solution:   Check for empty name. (closes vim/vim#5878)
5259275347
2020-04-13 12:00:34 -04:00