Commit Graph

17784 Commits

Author SHA1 Message Date
Marco Hinz
be494023d8
lsp: check if config is nil 2021-04-23 20:56:44 +02:00
Marco Hinz
4de404a681
lsp: sort diagnostics by severity (#14372)
Allow to sort diagnostics (and thus signs and virtual text) by severity, so that
the most important message is shown first.

    vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
      vim.lsp.diagnostic.on_publish_diagnostics, {
        severity_sort = true,
      }
    )

Fixes https://github.com/neovim/neovim/issues/13929
2021-04-23 20:09:56 +02:00
Jan Edmund Lazo
bb33727922
vim-patch:8.2.2776: :mksession uses current value of 'splitbelow' and 'splitright' (#14398)
Problem:    :mksession uses current value of 'splitbelow' and 'splitright'
            even though "options" is not in 'sessionoptions'. (Maxim Kim)
Solution:   Save and restore the values, instead of setting to the current
            value. (closes vim/vim#8119)
0995c81f2f

Patch v8.2.1682 is not ported.
Replace "goto fail;" with "return FAIL;".
2021-04-22 08:14:42 -04:00
Shadman
8402865cba
lua: make vim.cmd an alias of vim.api.nvim_exec() (#14401)
Previously vim.cmd was an alias of nvim_command().

From now on it is an alias of nvim_exec().
2021-04-22 13:02:02 +02:00
Jan Edmund Lazo
4570d04b16
Merge pull request #14411 from seandewar/vim-8.2.1588
vim-patch:8.2.1588 - port `prompt_getprompt()`
2021-04-21 21:23:04 -04:00
Marco Hinz
c37eaf5746
Merge pull request #14417 from jamessan/ci-update
GHA updates
2021-04-21 23:49:54 +02:00
Sean Dewar
ff198bb78a
fix(oldtest): fix assert_match() for :buffers t
Previous pattern could cause test to fail if ":buffers t" reported
"1 second ago".
2021-04-21 14:55:04 +01:00
Sean Dewar
65f35e0c7d
vim-patch:8.2.1588: cannot read back the prompt of a prompt buffer
Problem:    Cannot read back the prompt of a prompt buffer.
Solution:   Add prompt_getprompt(). (Ben Jackson, closes vim/vim#6851)
077cc7aa0e

Updated prompt_getprompt() doc to cb80aa2d53
and removed mention of method syntax usage (not supported by Nvim).
2021-04-21 14:55:04 +01:00
Sean Dewar
805eb81ccd
oldtest: port test_prompt_buffer.vim
Included from before v8.2.1588. Required for v8.2.1588.
Many tests use stuff like term_sendkeys() which is N/A, so are skipped.
2021-04-21 14:54:51 +01:00
Sean Dewar
60870d1531
eval: port tv_get_buf_from_arg()
Cherry-picked from v8.2.1562, but uses Nvim's tv_check_str_or_nr().
Required for v8.2.1588.

It isn't used for f_bufnr() to avoid a double error message if the first
argument isn't a number or string similiar to what's seen in Vim.
2021-04-21 11:29:47 +01:00
Shadman
01493e7990
api: fix nvim_exec() silencing behaviour (#14413)
Previously nvim_exec would silent output no matter whether output
is true or false.
Now output is only silent and captured when output is true.
2021-04-21 10:41:37 +02:00
Shadman
d7f9e58e40
gitignore: add vim patches (#14412) 2021-04-21 09:29:16 +02:00
James McCoy
62df537543
ci(gha/release): Enable "contents: write" permission to publish release 2021-04-21 00:32:38 -04:00
James McCoy
491708c989
ci(gha/win): Specify valid directory for DEPS_BUILD_DIR 2021-04-21 00:14:51 -04:00
James McCoy
9a01833d90
ci(gha): Simplify clang installation 2021-04-21 00:14:51 -04:00
James McCoy
74f8196935
ci(gha): Update to clang-12 2021-04-21 00:14:43 -04:00
Jan Edmund Lazo
02909d150e
win/package: update wintools.zip (#14408)
This does not have 7za.exe and tidy.exe.

Ref: https://github.com/neovim/neovim/issues/14078
2021-04-20 15:54:22 +02:00
Jan Edmund Lazo
7bf62ab022
win/package: remove cat,tidy (#14402)
Neovim should not bundle external tools
that are not needed in the runtime environment.

cat.exe is meant for tests only.
Install a mingw/msys2/busybox environment which bundle cat.exe.
tidy.exe was never used in tests and is not required in Neovim runtime.
busybox and tidy.exe can be installed via scoop.

Ref: https://github.com/neovim/neovim/issues/14078
2021-04-20 01:02:42 -04:00
Michael Lingelbach
26bd5a58df
Merge pull request #14180 from oberblastmeister/lsp_exit_perf
fix slow closing of lsp clients when exiting vim
2021-04-19 17:35:58 -07:00
Brian Shu
2e6c09838f lsp: fix blocking in closing of clients 2021-04-19 20:04:08 -04:00
erw7
66f9dd3c6e
README.md: remove part of Install from source (#14368)
The entry "To skip bundled (third-parth/*) dependencies:" contains
inappropriate content.

- Lack of description of lua-luv-dev.
- Lack of description of libtree-sitter-dev.
- Contains libutf8proc-dev, which is no longer needed.
- The package libvterm-dev is out of date and probably unusable.

Therefore, it is not possible to build according to this description.
Also, there are only descriptions for Debian and Ubuntu. For these reasons,
this item will be deleted.
2021-04-18 17:31:43 +02:00
Matthieu Coudron
e343437bb6
Merge pull request #12323 from da-x/orphaned-signs
Handle 'orphaned signs' on line deletion for signcolumn >= 2
2021-04-18 17:12:41 +02:00
Jan Edmund Lazo
a129887c00
vim-patch:8.2.2773: PSL filetype not recognized (#14389)
Problem:    PSL filetype not recognized.
Solution:   Add a filetype pattern. (Daniel Kho, closes vim/vim#8117)
112a006417
2021-04-17 22:41:51 -04:00
Björn Linse
63b64ebab0
Merge pull request #14385 from chentau/extmark_delete
Extmarks: remove `curbuf->deleted_bytes2` from `op_delete`
2021-04-17 09:25:44 +02:00
Dan Aloni
5b8575fa0d test_signs.vim: adjust for sign removal on line deletion 2021-04-17 10:11:17 +03:00
Dan Aloni
f2ed7605da Handle 'orphaned signs' on line deletion for signcolumn >= 2 2021-04-17 10:11:17 +03:00
Björn Linse
7de75f0993
Merge pull request #14365 from chentau/extmark_delbytes_move
Extmarks: flush curbuf->deleted_bytes2 after calling do_move
2021-04-17 08:58:00 +02:00
chentau
e32eaf6538 extmarks: remove curbuf->deleted_bytes2 from op_delete 2021-04-16 23:42:53 -07:00
Björn Linse
a6504ec339
Merge pull request #13684 from pohzipohzi/input
doc: add description for cancelreturn option in input()
2021-04-16 09:47:45 +02:00
Jan Edmund Lazo
fe808f02f6
Merge pull request #14355 from janlazo/vim-8.1.2313
vim-patch:8.1.2313,8.2.{2046,2769}
2021-04-15 21:55:56 -04:00
Jan Edmund Lazo
d8e7fbe193
Merge pull request #14367 from janlazo/vim-8.2.2046
vim-patch:8.2.{265,2761,2764}
2021-04-15 21:54:04 -04:00
Jan Edmund Lazo
97288e73c2
vim-patch:8.2.2764: memory leak when default function argument is allocated
Problem:    Memory leak when default function argument is allocated.
Solution:   Free the expression result.
b47bed2f7a
2021-04-15 18:30:04 -04:00
Jan Edmund Lazo
7d3f31c064
vim-patch:8.2.2761: using "syn include" does not work properly
Problem:    Using "syn include" does not work properly.
Solution:   Don't add current_syn_inc_tag to topgrp. (Jaehwang Jerry Jung,
            closes vim/vim#8104)
2e240bd428

Cherry-pick AssertHighlightGroups from patch v8.2.2068.
2021-04-15 18:30:04 -04:00
Jan Edmund Lazo
eb93399d70
vim-patch:8.2.0265: "eval" after "if 0" doesn't check for following command
Problem:    "eval" after "if 0" doesn't check for following command.
Solution:   Add "eval" to list of commands that check for a following command.
            (closes vim/vim#5640)
a76b31542e
2021-04-15 18:30:03 -04:00
Jan Edmund Lazo
b34dc4c458
ex_cmds: port :eval
Cherry-picked from patch v8.1.1807.
Required for patch v8.2.2761.
2021-04-15 18:30:03 -04:00
Jan Edmund Lazo
011cfc538c
vim-patch:8.2.2769: Modula-3 config files are not recognized
Problem:    Modula-3 config files are not recognized.
Solution:   Add filetype patterns. (Doug Kearns)
6bc00699c5
2021-04-15 18:08:55 -04:00
Jan Edmund Lazo
b8c3bb6790
vim-patch:8.1.2313: debugging where a delay comes from is not easy
Problem:    Debugging where a delay comes from is not easy.
Solution:   Use different values when calling ui_delay().
eda1da0c9a
2021-04-15 18:06:51 -04:00
Jan Edmund Lazo
94b10d25da
vim-patch:8.2.2046: some test failures don't give a clear error
Problem:    Some test failures don't give a clear error.
Solution:   Use assert_match() and assert_fails() instead of assert_true().
            (Ken Takata, closes vim/vim#7368)
5dc4e2f883
2021-04-15 18:06:35 -04:00
Michael Lingelbach
b8c0fac762
Merge pull request #14370 from oberblastmeister/lsp_buf_request_sync
refactor lsp_buf_request_sync to also have an async method
2021-04-15 13:32:07 -07:00
Brian Shu
ef5314ce59 lsp: add lsp.buf_request_all for invoking asynchronous callbacks
fixed nil issue

changed poll to 10

changed wording

added docs to once

comma

english
2021-04-15 12:54:59 -04:00
chentau
5a36d413fb flush curbuf->deleted_bytes2 after calling do_move 2021-04-14 21:47:21 -07:00
Thomas Vigouroux
d19348923e
Merge pull request #14364 from mhinz/gitignore-vim-src
gitignore: handle case where .vim-src is a symlink
2021-04-15 05:22:21 +02:00
Raymond W. Ko
e915ec47f3
tests/functional: delete temp file created during test run (#14363) 2021-04-14 20:42:34 -04:00
Björn Linse
3b01e37d09
Merge pull request #14358 from bfredl/decodeco
decoration: Clean up duplicate Decoration attributes + bonus hl_eol flag
2021-04-15 01:12:36 +02:00
Michael Lingelbach
9471b15936
Merge pull request #14366 from mfussenegger/text-document-version-zero
lsp: Accept text document edits with version zero
2021-04-14 13:01:08 -07:00
Mathias Fussenegger
046991e4d5 lsp: Remove vim.NIL handling from apply_text_document_edit
The rpc layer normalizes `vim.NIL` to `nil`, so the scenario tested
should never happen.
2021-04-14 21:42:03 +02:00
Mathias Fussenegger
b67f689e4c lsp: Accept text document edits with version zero
There were a couple of reports of "Buffer X newer than edits" problems.
We first assumed that it is incorrect for a server to send 0 as a
version - and stated that they should send a `null` instead, given that
in the specification the `textDocument` of a `TextDocumentEdit` is a
`OptionalVersionedTextDocumentIdentifier`.

But it turns out that this was a change in 3.16, and in 3.15 and earlier
versions of the specification it was a `VersionedTextDocumentIdentifier`
and language servers didn't have a better option than sending `0` if
they don't keep track of the version numbers.

So this changes the version check to always accept `0` values.

See

- https://github.com/neovim/neovim/issues/12970
- https://github.com/neovim/neovim/issues/14256
- https://github.com/haskell/haskell-language-server/pull/1727
2021-04-14 21:29:32 +02:00
Aru Sahni
d9c7adc64c
doc: prefer "python -m pip" (#14353)
The current guidance for install Python packages is to use

    python -m pip install <package_name>

Instead of

    pip install <package_name>

This ensures that one is using the version of pip that is tied to the
environment's interpreter (and, thusly, its packages).  This has [been
endorsed by a core
maintainer](https://snarky.ca/why-you-should-use-python-m-pip/) as
being the recommended way to invoke pip.

As there currently are a few places where the old invocation was used,
attempt to bring them in line.

Fixes #14234
2021-04-14 20:48:13 +02:00
Sean Dewar
6ab4c8f955
doc: port prompt-buffer section (#14342)
[skip ci]

Changes from original include:
- "See |terminal-window|" -> "See |terminal|".
- Remove mention of using CTRL-W window commands in insert mode.
- Converted usage example to use the Nvim job and channel API.
- Removed logging from usage example, as ch_logfile() has no direct Nvim
  counterpart.
- Fixed some small grammar/spelling mistakes.
2021-04-14 20:39:37 +02:00
Marco Hinz
57220e7cc3
gitignore: handle case where .vim-src is a symlink
I build Vim and Nvim from source and have both repos cloned locally. To prevent
vim-patch.sh from downloading the Vim source once again to /.vim-src/, I usually
use a symlink pointing to the already existing Vim repo.

The pattern "/.vim-src" works for both, a directory or a symlink.
2021-04-14 20:14:54 +02:00