Commit Graph

18434 Commits

Author SHA1 Message Date
Gregory Anders
d7382475b3 Fix line length clint error 2021-07-12 12:17:44 -06:00
Gregory Anders
35e13df3c8 Rename stdin to stdin_mode
stdin is a macro in Windows builds.
2021-07-12 12:17:44 -06:00
Gregory Anders
eb7f24b4ae feat(job): add parameter to close stdin
Some programs behave differently when they detect that stdin is being
piped. This can be problematic when these programs are used with the job
control API where stdin is attached, but not typically used. It is
possible to run the job using a PTY which circumvents this problem, but
that includes a lot of overhead when simply closing the stdin pipe would
suffice.

To enable this behavior, add a new parameter to the jobstart options
dict called "stdin" with two valid values: "pipe" (the default)
implements the existing behavior of opening a channel for stdin and
"null" which disconnects stdin (or, if you prefer, connects it to
/dev/null). This is extensible so that other modes can be added in the
future.
2021-07-12 15:17:10 +02:00
Michael Lingelbach
eece0735fe
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-07-11 11:34:26 -07:00
ansimita
e5b75d41db
chore(clang): Fix 'Array subscript is undefined' #15057 2021-07-11 07:59:23 -07:00
Shadman
22b5381396
fixup(clipboard): Fix error not properly handled #14984
fixes #14967
2021-07-11 06:19:54 -07:00
Mathias Fussenegger
c21a6972a0 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-07-11 11:22:35 +02:00
Mathias Fussenegger
256570a7a6 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-07-11 10:57:00 +02:00
Daniel Steinberg
79fe9dedcf
window.c: address Coverity failure #14996
Check that `wip2` does not point to the same address as `wip`, to address the
Coverity test failure from PR #14884.

Based on the `if` clauses, `free_wininfo(wip2, ...)` is only called when
`wip2->wi_win == NULL` and `wip->wi_win == wp`. I think `wip2` would only point
to the same address as `wip` in scenarios where `wp` were `NULL`, which can be
assumed otherwise based on the earlier code.
2021-07-10 21:32:37 -07:00
Daniel Steinberg
936f3a4ddc
test/memory_usage_spec: skip on MacOS #15043
Memory compression could complicate the measurements.
2021-07-10 20:15:38 -07:00
Mathias Fußenegger
7c61d9c3bf
fix(lsp): Add separator between codelens in virttext (#15049)
Before:

  Lens1Lens2

After:

  Lens1 | Lens2

Fixes https://github.com/neovim/neovim/issues/15048
2021-07-10 21:35:38 +02:00
Oliver Marriott
0b64d5ecd1
fix(lsp): correctly check for windows in lsp logger (#14954) 2021-07-10 11:11:33 -07:00
Matthieu Coudron
3de7017d9d
Merge pull request #15047 from teto/flake-tests
flake update
2021-07-10 18:37:07 +02:00
Matthieu Coudron
389cbe63bf chore: add log hander to gen_vimdoc
so it actually dumps output.
Plus a description of what it does in the argparser.
2021-07-10 17:55:45 +02:00
Matthieu Coudron
de909bf48b chore(flake): update inputs
Updated inputs so no need to add tree-sitter ourselves anymore.

Added checks:
- for pylint/shlint
- distinguish the devolpment shell from the ASAN build (closure for ASAN
  version is smaller). While in the devShell, functionaltests would fail
because bin/nvim could not load
outputs/out/share/nvim/syntax/syntax.vim
So we touch the file.
2021-07-10 17:52:15 +02:00
Mathias Fussenegger
e43dbfdd05 feat(lsp): Make line diagnostics display prettier
Adds indentation that matches the number prefix to ensure diagnostic
messages spawning multiple lines align.

Before:

    Diagnostics:
    1. • Variable not in scope: red :: t0 -> t
    • Perhaps you meant one of these:
        ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
        ‘pred’ (imported from Prelude)
    2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
    • Perhaps you meant ‘replaceDoubleColon’ (line 32)

After:

    Diagnostics:
    1. • Variable not in scope: red :: t0 -> t
       • Perhaps you meant one of these:
           ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
           ‘pred’ (imported from Prelude)
    2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
       • Perhaps you meant ‘replaceDoubleColon’ (line 32)
2021-07-09 20:36:08 +02:00
Björn Linse
37af69285a
Merge pull request #15036 from vigoux/decurbuf-2
refactor(undo): don't assume curbuf in u_compute_hash
2021-07-09 18:52:26 +02:00
Thomas Vigouroux
ff53c5585f
refactor(undo): don't assume curbuf in u_compute_hash 2021-07-09 15:36:07 +02:00
Thomas Vigouroux
191d3e6af7
Merge pull request #15035 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-07-09 14:40:19 +02:00
marvim
832e1708c2 docs: regenerate 2021-07-09 10:39:24 +00:00
Folke Lemaitre
9132b76da6
fix(lsp): support duplicate params in signature help (#15032) 2021-07-09 03:38:29 -07:00
Björn Linse
1c41689287
Merge pull request #12971 from vigoux/decurbuf
Decrease reliance on curbuf in BUFEMPTY and `undo.c`
2021-07-09 10:15:18 +02:00
James McCoy
27118c6eb3
Merge pull request #14908 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-07-08 22:50:18 -04:00
Thomas Vigouroux
9c93e6461c
refactor(undo): remove last occurence of save_curbuf 2021-07-08 23:08:42 +02:00
Thomas Vigouroux
b35fefc57f
refactor: remove all mentions to curbuf_lock 2021-07-08 23:08:27 +02:00
comicfans
9c7e04eb3b
build(cmake): skip download if target file exists #14844) 2021-07-08 11:16:13 -07:00
dundargoc
980d50d90e
vim-patch:8.2.3125: variables are set but not used #15028
Problem:    Variables are set but not used.
Solution:   Move the declarations to the block where they are used.
            (closes vim/vim#8527)
09f688c33a
2021-07-08 11:04:46 -07:00
dundargoc
4339f528db
vim-patch:8.2.3089: garbage collection has useless code #15027
Problem:    Garbage collection has useless code.
Solution:   Bail out when aborting. (closes vim/vim#8504)
20cc528320
2021-07-08 11:03:33 -07:00
marvim
6b313d68d0 docs: regenerate 2021-07-08 15:42:31 +00:00
Folke Lemaitre
03d15d9e09
fix(lsp): restore diagnostics extmarks that were moved to the last edit line (#15023) 2021-07-08 08:40:41 -07:00
Folke Lemaitre
af263711a3
feat(lsp): highlight active parameter in signature help (#15018) 2021-07-07 23:04:35 -07:00
cbarrete
f2205b83c5
doc: "--remote" is not supported #14936
There are plans to support the --remote-xx stuff (or something like it): #1750 #8326
But we don't need this doc meanwhile.
2021-07-07 19:04:49 -07:00
cbarrete
bd7a0b46a9
doc: remove mentions of compile-time flags #14935
Nvim always compiles everything in so those are useless at best and
confusing at worst.
2021-07-07 18:51:40 -07:00
dundargoc
4547137aaf
chore: use codespell to spell check #15016 2021-07-07 15:28:44 -07:00
dundargoc
e2bc7e321b
clang/'Dead initialization': don't assign unused value to variable "string" #15015 2021-07-07 14:25:27 -07:00
Folke Lemaitre
77b33e4b9f
fix(lsp): restore diagnostics extmarks on buffer changes (#15011) 2021-07-07 22:31:39 +02:00
dundargoc
0fd3f9130d
clang/'Dead nested assignment': don't assign unused value to precision #15012 2021-07-07 13:17:03 -07:00
Christian Clason
3de777d259
chore(deps): bump LibLUV to 1.40.0-0 (#14997)
Adds several threading, async, and gc fixes and allows building with older gcc (4.x). Minimum required version remains 1.30.1.
2021-07-07 08:24:08 +02:00
Thomas Vigouroux
f8ed13c0dc
style(undo): remove unnecessary comment 2021-07-06 19:52:26 +02:00
Thomas Vigouroux
e5804d46fd
fix(qf): use correct buffer field 2021-07-06 19:51:59 +02:00
Thomas Vigouroux
7970631fa0
buffer: move BUFEMPTY to a function 2021-07-06 19:12:15 +02:00
Thomas Vigouroux
763c852812
undo: reduce reliance on curbuf 2021-07-06 19:08:32 +02:00
Thomas Vigouroux
55a2c513aa
buffer: don't rely on curbuf in BUFEMPTY 2021-07-06 19:07:11 +02:00
dundargoc
df33f30e88
clang/'Dead assignment': ignore warning #15000
This assignment is informative/documenting though technically unnecessary.
https://github.com/neovim/neovim/pull/11900#discussion_r381860165 .
2021-07-05 18:59:27 -07:00
Lewis Russell
a6cdfa27d5
chore(deps): bump LibLUV to 1.34.1 and lua-compat-53 to 0.9 (#14985)
This bumps the bundled LibLUV to 1.34.1 in order to make the newly introduced `uv.fs_mkstemp` available in the official builds. (The minimum required version remains at 1.30.1.)

The bump of lua-compat-53 to 0.9 is needed to build with the updated LibLUV.
2021-07-05 14:30:50 +02:00
Michael Lingelbach
f515baedc1
Merge pull request #14989 from folke/lsp_convert_input_markdown
fix(lsp): prevent double <text> for cached plaintext markup
2021-07-04 20:06:37 -07:00
Folke Lemaitre
910967e5af
fix(lsp): prevent double <text> for cached plaintext markup 2021-07-05 00:39:46 +02:00
Björn Linse
c6226bd6c9
Merge pull request #14391 from lewis6991/signs
signs: Change b_signcols_max -> b_signcols_valid
2021-07-04 23:16:49 +02:00
Lewis Russell
65b0918c24 signs: Change b_signcols_max -> b_signcols_valid
b_signcols_max isn't used to store the max value, it is use to
invalidate b_signcols.
2021-07-04 21:50:27 +01:00
Jan Edmund Lazo
18bfcfe77f
Merge pull request #14981 from janlazo/vim-8.2.3081
vim-patch:8.2.{3081,3082,3085,3087,3088,3093,3094,3097,3098}
2021-07-04 11:00:48 -04:00