Commit Graph

17821 Commits

Author SHA1 Message Date
James McCoy
d399a853a3
Exclude .github/ and CI files from exported archives
These are only relevant for GitHub, not published tarballs.
2021-05-05 08:59:12 -04:00
James McCoy
26f5b979ec
ci(gha): Add weekly Coverity scans
[skip ci]
2021-05-05 08:54:03 -04:00
James McCoy
0ee52fba31
ci(gha/ci): Use clang-12 for TSAN 2021-05-02 22:24:28 -04:00
James McCoy
14c692bc82
ci(gha/release): Bump to ubuntu-18.04
Per https://wiki.ubuntu.com/Releases, 16.04 is no longer under standard
support.  Switch to the next LTS, 18.04, for the next couple years.
2021-05-02 16:27:37 -04:00
Michael Lingelbach
cfaf666ac9
Merge pull request #14462 from kabouzeid/feature/formatting_seq_sync
[LSP] Support for sequential formatting with multiple clients
2021-05-02 12:52:27 -07:00
Karim Abou Zeid
bcf03affbd Increase default LSP sync timeout to 1000ms 2021-05-02 17:08:57 +02:00
Karim Abou Zeid
d923f38882 Add client.request_sync doc 2021-05-02 16:24:58 +02:00
Karim Abou Zeid
f0f3fddcdd Synchronous formatting methods notify the user on timeout and interrupted 2021-05-02 16:16:49 +02:00
Karim Abou Zeid
dc9c6ea219 Support multiple range formatting clients 2021-05-02 15:37:31 +02:00
Karim Abou Zeid
54368736d0 doc clarification 2021-05-02 15:23:13 +02:00
statiolake
b227cedf82
signs: fix overflow during adjustment on Windows (#14472)
On Windows, `new_lnum + MAXLNUM` causes overflow and as a result the
line number of that sign becomes invalid negative number. This occurs
when the `set signcolumn=yes`, in other words `signcolumn` is not `auto`
and the sign column is less than 2 columns.

The related change was made in the commit
f2ed7605da. Originally the above addition
is only executed if `amount != MAXLNUM`, so reintroducing this check
fixes the bug and will hardly produces a new bug.

Fixes https://github.com/neovim/neovim/issues/14460
2021-05-02 00:35:52 +02:00
Karim Abou Zeid
48a59f8f4f Add formatting_seq_sync, change formatting and formatting_sync 2021-05-01 21:12:40 +02:00
francisco souza
993ca90c9b
lsp: fix regression in jump_to_location() (#14446)
This fixes a regression that was introduced in [1] by accidentally leaving out a line.

1: https://github.com/neovim/neovim/pull/12262
2021-05-01 19:28:21 +02:00
Julian Berman
ef81999f4e
fix: make nvim_win_get_number() return win number (#14470)
Closes https://github.com/neovim/neovim/issues/14467
2021-05-01 16:57:05 +02:00
TJ DeVries
27da5511a0
docs: Treesitter (#13260)
* doc & fixes: Generate treesitter docs

* fixup to treesitter-core

* docs(treesitter): fix docs for most functions

Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2021-05-01 08:19:48 -04:00
Shadman
ca6107cfbc
doc: update vim.cmd() (#14450) 2021-05-01 13:09:05 +02:00
Björn Linse
9d4250d43d
Merge pull request #14380 from bfredl/virtcol
decorations: right_align and win_col
2021-05-01 12:39:15 +02:00
Björn Linse
0865f1238f decorations: right_align and win_col 2021-05-01 11:48:04 +02:00
Michael Lingelbach
0150cc4160
Merge pull request #14463 from mfussenegger/decoded-result-false
lsp: Allow decoded.result to be `false`
2021-04-30 11:37:47 -07:00
Mathias Fussenegger
69d4143e7b lsp: Allow decoded.result to be false
Some servers might respond to `workspace/executeCommand` requests with a
boolean result and that could be `false`.

A `false` result should be allowed and not trigger the `on_error`
handler:

    -- Invalid server message
    on_error(client_errors.INVALID_SERVER_MESSAGE, decoded)

Concrete example where this occurred is with eclipse.jdt.ls:

    vim.lsp.buf_request(
      0,
      'workspace/executeCommand',
      {
        command = 'java.project.isTestFile',
        arguments = { vim.uri_from_bufnr(0), },
      },
      function(err, _, resp)
        print(vim.inspect(err), vim.inspect(resp))
      end
    )
2021-04-30 20:17:56 +02:00
Björn Linse
388a834a07
Merge pull request #14361 from bfredl/synenable
[WIP] startup: do "syntax enable" instead of "syntax on" after init.vim
2021-04-30 18:07:32 +02:00
Björn Linse
b0a1d1eb64 startup: do "syntax enable" instead of "syntax on"
"syntax on" overwrites existing highlight groups, while "syntax enable"
just sets missing groups. This change prevents user defined highlights in
init.vim/lua to get overwritten. The manual recommends "syntax enable" for
new configurations anyway, "on" command was probably used as it is the
implicit default.
2021-04-30 16:48:12 +02:00
James McCoy
59eae3b38f
Merge pull request #14459 from jamessan/pvs-script
fix(pvscheck): Switch URL to pvs-studio.com
2021-04-29 20:05:39 -04:00
James McCoy
794a287846
fix(pvscheck): Switch URL to pvs-studio.com
[skip ci]
2021-04-29 20:04:29 -04:00
James McCoy
fbe18d9ca4
Merge pull request #14448 from jamessan/nightly-ci-permissions
Update permissions for vim-patches workflow
2021-04-27 07:22:28 -04:00
James McCoy
0ab1f9ff3f
ci(gha/vim-patches): Create PR against branch running the workflow
Avoids hard-coding branch names.

[skip ci]
2021-04-26 23:45:40 -04:00
James McCoy
2601296c3f
ci(gha): Rename nightly workflow to vim-patches
[skip ci]
2021-04-26 23:45:40 -04:00
James McCoy
3047a909a2
ci(gha/nightly): Enable "contents: write" permissions to setup PR
[skip ci]
2021-04-26 23:45:36 -04:00
Björn Linse
ecf075eb29
Merge pull request #14416 from bfredl/floatorder
ui_compositior: handle overlapping displayed floats in the same tick
2021-04-26 22:11:35 +02:00
Björn Linse
eeb1099bc4 ui_compositior: handle multiple displayed floats in the same tick
problem: the order of non-focuesed float opened before focused float is wrong (sunjon)
solution: check curwin and correct the order (bfredl)
2021-04-26 12:59:51 +02:00
Thomas Vigouroux
bb7d3790bf
Merge pull request #14435 from michaelb/doc_missing_nvim_open_term
doc : fixing missing @return in nvim_open_term doc
2021-04-24 14:03:35 +02:00
Michael Bleuez
684b4ae736 doc : fixing missing @return in nvim_open_term doc 2021-04-24 12:47:52 +02:00
Michael Lingelbach
11728988dc
Merge pull request #14429 from ckipp01/force
[LSP] - Don't automatically force shutdown on second restart.
2021-04-23 14:52:13 -07:00
Gabriel Sanches
8885ea7f24
lsp: make tagstack smarter motion-wise (#12262)
This commit prevents two things regarding the tagstack and jumping to
locations:

  - Pushing the same item twice in a row

  - Pushing an item where the destination is the same as the source

Both prevent having to press CTRL-T additional times just to pop items
that don't make the cursor move.
2021-04-23 14:50:35 -07:00
Michael Lingelbach
d650c654a8
Merge pull request #14432 from mjlbach/revert_14428
Revert "lsp: fix blocking in closing of clients"
2021-04-23 12:49:40 -07:00
Michael Lingelbach
4eb29e079a Revert "lsp: fix blocking in closing of clients"
This reverts commit 2e6c09838f.

* Fixes #14428
* This commit caused neovim to close while open handles to the uv timer
  to kill active language servers were still open
2021-04-23 12:17:00 -07:00
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
ckipp01
2a77d9d8a4 Don't automatically force shutdown on second restart.
This is maybe a bit of a niche case, but I hit on this often as I'm
developing a server, and therefore continually restarting it to get the
latest changes of the server. Previously, I could only do this once
since if you send in a request to restart/shut down the server, it will
register it as a `tried_graceful_shutdown = true` meaning that the next
restart would force it to be killed instead of another graceful exit.

Instead, this changes the name a bit and now it will only mark
`graceful_shutdown_failed = true` _if_ it actually fails to gracefully
shutdown. This change allows for a user to restart multiple times in a
situation like mine where nothing is going wrong, but I just want to
restart continually as I'm developing without having to close and
reopen.
2021-04-23 14:26:33 +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