Commit Graph

18450 Commits

Author SHA1 Message Date
James McCoy
1e1fd71fea
Merge pull request #16208 from neovim/backport-16207-to-release-0.5
[Backport release-0.5] ci(release): delete nightly/stable tag so release recreates it
2021-11-02 07:37:44 -04:00
James McCoy
606ace0fbe ci(release): delete nightly/stable tag so release recreates it
Even though the releaes itself gets deleted, if the tag is not, then
creating a new release just re-uses the same tag, even though we're
using “--target <sha>”.

[skip ci]

(cherry picked from commit 14716e4619)
2021-11-02 11:37:28 +00:00
James McCoy
b69ceaa2e8
Merge pull request #16193 from neovim/backport-16191-to-release-0.5
ci(win): only remove choco's cpack.exe if it exists
2021-11-01 06:39:11 -04:00
James McCoy
3ad07553e2
fix(ci): use correct check for path-existence 2021-10-31 20:00:14 -04:00
James McCoy
64ec1f5b02 ci(win): only remove choco's cpack.exe if it exists
(cherry picked from commit ec0f4fab48)
2021-10-31 15:31:10 +00:00
James McCoy
b60293b76d
Merge pull request #16183 from neovim/backport-16180-to-release-0.5
[Backport release-0.5] Refactor release workflow to use gh instead of a third-party action
2021-10-30 16:53:24 -04:00
James McCoy
e86f95eb10 ci: make sure choco cpack does not interfere with CMake cpack
[skip ci]

(cherry picked from commit c84b86fe3d)
2021-10-30 20:52:30 +00:00
James McCoy
f65c52d235 ci(release): do not fail if stable/nightly release doesn't exist
[skip ci]

(cherry picked from commit c819ce1fd4)
2021-10-30 20:52:30 +00:00
James McCoy
2e77847896 ci(release): re-publish "stable" release for versioned releases
[skip ci]

(cherry picked from commit eede587b06)
2021-10-30 20:52:30 +00:00
James McCoy
5ba88321a6 ci(release): use gh cli instead of 3rd-party actions
Closes #15709

[skip ci]

(cherry picked from commit 0ce800753e)
2021-10-30 20:52:30 +00:00
Justin M. Keyes
d8ccee30b0
fix(jobwait): always drain process event queues #15970
Problem:
jobwait() returns early if the job was stopped, but the job might have
pending callbacks on its event queue which are required to complete its
teardown. State such as term->closed might not be updated yet (by the
pending callbacks), so codepaths such as :bdelete think the job is still
running.

Solution:
Always flush the job's event queue before returning from jobwait().

ref #15349

Co-authored-by: Gregory Anders <greg@gpanders.com>
2021-10-08 17:02:37 -07:00
Justin M. Keyes
b5276b36d4
Merge #15879 backports 2021-10-05 04:26:08 -07:00
Michael Lingelbach
3f20d8bb09 chore(lsp): fix formatting in vim.lsp.log (#15596) 2021-10-02 17:18:22 -07:00
Michael Lingelbach
9eed756cad feat(lsp): add warning message for large log size 2021-10-02 17:18:11 -07:00
Justin M. Keyes
5908d88a3e fix(lsp_spec): tests depended on previous session
backport #15803

- fix tests which accidentally depended on previous session
2021-10-02 16:53:14 -07:00
James McCoy
71950115eb
Merge pull request #15865 from jamessan/gitattributes
fix: include ci/ in exported tarball
2021-10-01 19:55:47 -04:00
James McCoy
d6f03aaafd
fix: include ci/ in exported tarball
src/nvim/testdir/runnvim.sh re-uses the test suite code from ci/ to
cleanup the output of legacy tests.

Closes #15856

[skip ci]
2021-10-01 19:53:27 -04:00
Justin M. Keyes
14ff19bc36
ci: remove "labeler" job in release-0.5 branch #15804
Its config and labels are out of date and we don't need it on the
release-0.5. branch anyway.
2021-09-26 16:06:57 -07:00
Justin M. Keyes
7b822ea72b
Merge #15796 release: Nvim 0.5.1 2021-09-26 15:45:12 -07:00
Justin M. Keyes
a3a56cf60c version bump 2021-09-26 15:15:30 -07:00
Justin M. Keyes
0159e4daae NVIM v0.5.1
BREAKING CHANGES:
d83df7f7b5 feat(lua)!: register_keystroke_callback => on_key
cd8f6c5fb7 feat(lsp)!: change handler signature #15504

FEATURES:
915dda3f96 feat(jobstart): add parameter to close stdin

FIXES:
f8e0011534 #15732 fix(inccommand): ignore trailing commands only for *previewed* command
2132c063af backport: fix(windowing): positioning of relative floats
51d6b26729 #15495 backport: tests(lua/on_yank): assert conditions that fail correctly
f7002337c0 #15482 backport: fix(lua): verify buffer in highlight.on_yank
6bda2f56eb #15454 backport: fix(window.c): win_close from other tabpage
be58ba250e #15372 backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds
d0e9a11e39 backport: refactor(sign): include longer sign column option
5c42376c15 backport: fix(sign): reset auto sign column with minimum in float win minimal style
41f761130e backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
cf62554e5a #15111 backport: fix(:source): copy curbuf lines to memory before sourcing
6436100b6e #14809 backport: fix(:source, nvim_exec): handle Vimscript line continuations
917f306666 #15043 backport: test/memory_usage_spec: skip on MacOS
a9cca1b050 #14984 backport: fixup(clipboard): Fix error not properly handled
ae89330ec0 #14982 backport: fix(vim.opt): vimL map string values not trimmed
2229e99ef9 #14962 backport: fixup(clipboard): Use case matching
b6b12ea7c3 #15489 fix(man.vim): filetype=man is too eager
6f965f41df build: use RelWithDebInfo build for nightlies, Release for releases
f027c5e1e4 build: update appdata.xml version in release commit
8336488ce1 test(treesitter): skip all parsers tests if parsers aren't installed
008b83f5a2 Rename stdin to stdin_mode (fixes Windows build)

FIXES (LSP):
132053c1d2 #15523 backport: fix(lsp): resolve bufnr in buf_is_attached
a265201307 backport: fix(lsp): Ensure human readable errors are printed
33000bd9cf backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
9f73b7c214 #14954 backport: fix(lsp): correctly check for windows in lsp logger
eaa1c47377 #15023 backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line
989ccb8222 #15011 backport: fix(lsp): restore diagnostics extmarks on buffer changes
2ae4c96d91 backport: fix(lsp): prevent double <text> for cached plaintext markup
7b0ae589f0 feat(lsp): allow root_dir to be nil (#15430) (Mathias Fußenegger)
8ec5bc9126 lsp(start_client): Allow passing custom workspaceFolders to the LSP (#15132) (sim)
959cf5e53c fix(lsp): check if buffer is valid in changetracking (#15505) (Jose Alvarez)
dc15b3a92c fix(lsp): avoid ipairs on non-sequential tables (#15059) (Michael Lingelbach)
18375c6df6 feat(lsp): improve vim.lsp.util.apply_text_edits (#15561) (hrsh7th)
7b1315fe61 feat(lsp): improve logging (#15636) (Michael Lingelbach)
2021-09-26 15:15:30 -07:00
Justin M. Keyes
c9e4f86b75 fix(release.sh): ignore failed "rm" 2021-09-26 15:15:30 -07:00
Justin M. Keyes
14cdaca6a8 fix(lsp): fix handler signature, tests
- not necessary on master: got lost in the vim.lsp.diagnostic => vim.diagnostic migration
- fix tests which accidentally depended on previous session
- ref #15504
2021-09-26 15:15:03 -07:00
Mathias Fußenegger
7b0ae589f0 feat(lsp): allow root_dir to be nil (#15430)
According to the protocol definition `rootPath`, `rootUri` and
`workspaceFolders` are allowed to be null.

Some language servers utilize this to provide "single file" support.
If all three are null, they don't attempt to index a directory but
instead only provide capabilities for a single file.
2021-09-26 11:28:28 -07:00
sim
8ec5bc9126 lsp(start_client): Allow passing custom workspaceFolders to the LSP (#15132)
Some language servers *cough*rust-analyzer*cough* need an empty/custom
workspaceFolders for certain usecases. For example, rust-analyzer
needs an empty workspaceFolders table for standalone file support
(See https://github.com/rust-analyzer/rust-analyzer/pull/8955).

This can also be useful for other languages that need to commonly
open a certain directory (like flutter or lua), which would help
prevent spinning up a new language server altogether.

In case no workspaceFolders are passed, we fallback to what we had
before.
2021-09-26 11:28:28 -07:00
Jose Alvarez
959cf5e53c fix(lsp): check if buffer is valid in changetracking (#15505) 2021-09-26 11:28:28 -07:00
Michael Lingelbach
dc15b3a92c fix(lsp): avoid ipairs on non-sequential tables (#15059)
ipairs terminates on the first nil index when iterating over table keys:

for i,k in ipairs( {[1] = 'test', [3] = 'test'} ) do
  print(i, k)
end

prints:
1 test

Instead, use pairs which continues iterating over the entire table:

for i,k in pairs( {[1] = 'test', [3] = 'test'} ) do
  print(i, k)
end

prints:
1 test
3 test
2021-09-26 11:28:28 -07:00
hrsh7th
18375c6df6 feat(lsp): improve vim.lsp.util.apply_text_edits (#15561)
- Fix the cursor position after applying TextEdits
- Support reversed range of TextEdit
- Invoke nvim_buf_set_text one by one
2021-09-26 11:28:28 -07:00
Michael Lingelbach
7b1315fe61 feat(lsp): improve logging (#15636)
* Simplify rpc encode/decode messages to rpc.send/rcp.receive
* Make missing handlers message throw a warning
* Clean up formatting style in log
* Move all non-RPC loop messages to trace instead of debug
* Add format func option to log to allow newlines in per log entry
2021-09-26 11:28:28 -07:00
Mathias Fußenegger
27bac13be6 fix(lsp): update lsp-handler signature in call_hierarchy (#15738)
This fixes the handler signature and also prevents n+1 requests firing
if there are multiple clients.

(The first `prepareCallHierarchy` handler is called once per client,
each invocation used `buf_request` to make more requests using *all*
clients)
2021-09-26 10:25:17 -07:00
Mathias Fußenegger
d26d489e2e fix(lsp): adapt codelens resolve to handler signature change (#15578)
Follow up to https://github.com/neovim/neovim/pull/15504
2021-09-26 10:25:17 -07:00
Jose Alvarez
a6eab6e25e fix(lsp): update workspace/applyEdit handler signature (#15573) 2021-09-26 10:25:17 -07:00
Michael Lingelbach
cd8f6c5fb7 feat(lsp)!: change handler signature #15504 2021-09-26 10:25:17 -07:00
Justin M. Keyes
f8e0011534
fix(inccommand): ignore trailing commands only for *previewed* command #15732
Since the `State` is global, other scripts are unexpectedly affected during the
'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in
order to ignore trailing '|'-separated commands only for the command invoking
the preview.

fix #8796, update #7494

Co-authored-by: itchyny <itchyny@hatena.ne.jp>
2021-09-20 08:42:18 -07:00
Justin M. Keyes
7d67bd5865
Merge #15677 release-0.5: backports 2021-09-16 12:00:13 -07:00
andrew-pa
2132c063af
backport: fix(windowing): positioning of relative floats
Fix relative floating windows so that they open in the correct position
relative to each other. Also make sure that their positions are correct
immediately after creation without a redraw.
2021-09-16 15:00:31 +01:00
Jose Alvarez
132053c1d2
backport: fix(lsp): resolve bufnr in buf_is_attached (#15523) 2021-09-16 14:53:45 +01:00
notomo
51d6b26729
backport: tests(lua/on_yank): assert conditions that fail correctly #15495
The test added in 274a3504a7
does not fail if the code changes are reverted.
2021-09-16 14:46:52 +01:00
notomo
f7002337c0
backport: fix(lua): verify buffer in highlight.on_yank (#15482)
Resolve an issue with deferred clearing of highlight failing if the
buffer is deleted before the timeout by checking whether the
buffer is valid first.
2021-09-16 14:46:27 +01:00
notomo
6bda2f56eb
backport: fix(window.c): win_close from other tabpage #15454
Fix #15313
2021-09-16 14:44:59 +01:00
gmntroll
be58ba250e
backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds #15372
Logic got swapped in 7574918dc7.
We didn't notice it since v:termresponse isn't really used yet. #6279
2021-09-16 14:43:36 +01:00
Sirisak Lueangsaksri
d0e9a11e39
backport: refactor(sign): include longer sign column option 2021-09-16 14:42:22 +01:00
Sirisak Lueangsaksri
5c42376c15
backport: fix(sign): reset auto sign column with minimum in float win minimal style 2021-09-16 14:42:06 +01:00
Björn Linse
41f761130e
backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
fixes #15212
2021-09-16 14:40:32 +01:00
Mathias Fussenegger
a265201307
backport: fix(lsp): Ensure human readable errors are printed
`return err_message(tostring(err))` caused errors to be printed as
`table: 0x123456789` instead of showing the error code and error
message.

This also removes some `if err` blocks that never got called because at
the end of `handlers.lua` all the handlers are wrapped with logic that
adds generic error handling.
2021-09-16 14:37:20 +01:00
Mathias Fussenegger
33000bd9cf
backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
Relates to https://github.com/neovim/neovim/issues/15050

Users should get some indication if there was an error or an empty
result.
2021-09-16 14:36:49 +01:00
Oliver Marriott
9f73b7c214
backport: fix(lsp): correctly check for windows in lsp logger (#14954) 2021-09-16 14:31:49 +01:00
Folke Lemaitre
eaa1c47377
backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line (#15023) 2021-09-16 14:26:05 +01:00
Justin M. Keyes
942b16adf7
Merge #15671 backport: :source and nvim_exec fixes 2021-09-15 06:10:48 -07:00
Sean Dewar
cf62554e5a
backport: fix(:source): copy curbuf lines to memory before sourcing #15111
It's possible for weirdness to happen if curbuf is modified while
sourcing from it via :source (with no arguments). For example:

- Deleting lines from or wiping curbuf can cause internal error E315 to
  be thrown from ml_get.
- Changing the curbuf to another buffer while sourcing can cause lines
  from the new curbuf to then be sourced instead.
2021-09-15 13:34:59 +01:00