Commit Graph

19409 Commits

Author SHA1 Message Date
Björn Linse
9dd371bb2e feat(lua): document support of packages with v:lua syntax
this already worked in 0.5 but was not properly documented or tested
2021-10-23 18:24:00 +02:00
Björn Linse
fa4b24072e
Merge pull request #16029 from bfredl/multiline
feat(decorations): support more than one virt_lines block
2021-10-23 16:54:49 +02:00
Björn Linse
8d7816cf27 feat(decorations): support more than one virt_lines block 2021-10-23 14:17:09 +02:00
Björn Linse
8ade2f5b04 refactor(decorations): mark decorations directly on the marktree
This allows to more quickly skip though regions which has non-decorative
marks when redrawing. This might seem like a gratuitous
micro-optimization in isolation.

But!

Soon decorations are gonna crop into other hot inner-loop paths,
including the plines.c code for calculating the horizontal and
vertical space of text. Then we want to quickly skip over regions with
"only" overlaying decorations (which do not affect text size)
2021-10-23 11:11:00 +02:00
Folke Lemaitre
cb15055c29
fix(lsp): cleanup progress messages for the correct client (#16110) 2021-10-21 09:36:27 -07:00
Michael Lingelbach
80456cf836
feat(lsp): add exit_timeout flag (#16070)
* This flag allows customizing the time before sending kill -15 to the
  server. If set to false, neovim exits immediately after sending
  request('shutdown'). Otherwise, polls until all servers have shutdown,
  and then kills remaining servers via kill -15 at exit_timeout
  duration. Defaults to 500 ms.
2021-10-21 09:36:01 -07:00
Christian Clason
eaa03b7181
vim-patch:8.2.3550: completion() does not work properly (#16112)
* vim-patch:8.2.3550: completion() does not work properly

Problem:    completion() does not work properly.
Solution:   Set xp_line and add WILD_HOME_REPLACE. (Shougo Matsushita,
            closes vim/vim#9016)
ae38a9db77

Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2021-10-21 17:46:24 +02:00
Dundar Göc
e59c0009a7 vim-patch:8.1.2396: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
e38eab22c1
2021-10-21 12:07:15 +02:00
Dundar Göc
8000f6d566 vim-patch:8.1.2395: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
0d6f5d9740
2021-10-21 12:07:14 +02:00
Dundar Göc
daf670dde6 vim-patch:8.1.2394: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
63d9e730f7
2021-10-21 12:07:14 +02:00
Dundar Göc
ce441b8b13 vim-patch:8.1.2392: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
6e0ce171e1
2021-10-21 12:07:14 +02:00
Dundar Göc
df27579f54 vim-patch:8.1.2388: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
4ba37b5833
2021-10-21 12:07:14 +02:00
Dundar Göc
1d54153ee0 vim-patch:8.1.2387: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
2ab2e8608f
2021-10-21 12:07:14 +02:00
Dundar Göc
050130ce12 vim-patch:8.1.2380: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
306139005c
2021-10-21 12:07:14 +02:00
Dundar Göc
f677ba4dab vim-patch:8.1.2379: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
217e1b8359
2021-10-21 12:07:14 +02:00
Dundar Göc
122c0dfb5d vim-patch:8.1.2378: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
5d18efecfd
2021-10-21 12:07:14 +02:00
Dundar Göc
d5894ada70 vim-patch:8.1.2368: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
c667da5185
2021-10-21 12:07:14 +02:00
Matthieu Coudron
d0f10a7add
Merge pull request #14794 from BK1603/gdbserver_fix
functionaltest: fix running tests under gdbserver
2021-10-20 21:27:40 +02:00
dundargoc
81717d2461
vim-patch:8.1.2243: typos in comments (#16104)
Problem:    Typos in comments.
Solution:   Fix the typos. (Dominique Pelle, closes vim/vim#5160)  Also adjust
            formatting a bit.
32aa10203b
2021-10-20 12:19:14 -07:00
Michael Lingelbach
c5525f265b
fix(lsp): avoid duplicates in client attached buffers (#16099)
closes https://github.com/neovim/neovim/issues/16058

* add client.attached_buffers
* only update client.attached_buffers in on_attach
* use table instead of list for attached_buffers to avoid duplication
2021-10-20 09:33:09 -07:00
Mathias Fußenegger
dc6c9fe442
fix(lsp): adjust legacy show diagnostic functions to use correct scope (#16106)
* `where` was renamed to `scope`
2021-10-20 08:27:55 -07:00
Björn Linse
f421718d8d
Merge pull request #16086 from bfredl/termpipe_input
feat(nvim_open_term): support input callback in lua
2021-10-20 14:27:28 +02:00
Björn Linse
9e41e82481 feat(nvim_open_term): support input callback in lua 2021-10-20 13:07:43 +02:00
Jakub Łuczyński
035d82e0d3
build: update cmake min version to 3.10 #16065
* build(cmake): update cmake min version to 3.10
* ci: test cmake minimum required version
* build(cmake): remove some legacy includes
  * Since version 3.5 cmake_parse_arguments is implemented natively.
2021-10-19 19:19:33 -07:00
Gregory Anders
427bac6877
fix(diagnostic): allow floats to be focusable (#16093)
Setting focus_id allows the float to be focused by calling the function
a second time (a feature of open_floating_preview).
2021-10-19 16:29:52 -06:00
Gregory Anders
a2994c82e3
fix(diagnostic): handle diagnostics placed past the end of line (#16095) 2021-10-19 16:27:49 -06:00
Björn Linse
208d259e83
Merge pull request #15767 from lewis6991/lua_var_index
feat(lua): allow passing handles to `vim.b/w/t`
2021-10-19 22:21:31 +02:00
Gregory Anders
dfef90a518
fix(gen_vimdoc.py): spacing around inline elements #16092
The spacing fix drew attention to a couple of places that were using
incorrect formatting such as the key listing for `nvim_open_win`, so
those were fixed too.
2021-10-19 12:55:22 -07:00
Lewis Russell
6c5e7bde9a feat(lua): allow passing handles to vim.b/w/t
vim.bo can target a specific buffer by indexing with a number, e.g:
`vim.bo[2].filetype` can get/set the filetype for buffer 2. This change
replicates that behaviour for the variable namespace.
2021-10-19 19:47:33 +01:00
Gregory Anders
064411ea7f
refactor(diagnostic)!: replace 'show_*' functions with 'open_float' (#16057)
'show_line_diagnostics()' and 'show_position_diagnostics()' are
almost identical; they differ only in the fact that the latter also
accepts a column to form a full position, rather than just a line. This
is not enough to justify two separate interfaces for this common
functionality.

Renaming this to simply 'show_diagnostics()' is one step forward, but
that is also not a good name as the '_diagnostics()' suffix is
redundant. However, we cannot name it simply 'show()' since that
function already exists with entirely different semantics.

Instead, combine these two into a single 'open_float()' function that
handles all of the cases of showing diagnostics in a floating window.
Also add a "float" key to 'vim.diagnostic.config()' to provide global
values of configuration options that can be overridden ephemerally.
This makes the float API consistent with the rest of the diagnostic API.

BREAKING CHANGE
2021-10-19 11:45:51 -06:00
sim
aa4f0879e3
feat(lsp): set codelens virtual text hl_mode to combine (#16048)
It looks a bit off with the extmark going over the cursorline.

(With hl_mode combine it keeps the background of the cursorline under the codelens virtualtext)
2021-10-19 18:41:57 +02:00
zeertzjq
308fd88d0d
vim-patch:8.2.3537: wrong mode() during 'operatorfunc' #16087
Problem:    mode() does not return the right value in 'operatorfunc'.
Solution:   Reset finish_op while calling 'operatorfunc'.
75c30e96cf
2021-10-19 07:39:25 -07:00
zeertzjq
bdd180b5d2
docs: clarify chdir/CWD behaviors #16083 2021-10-19 07:37:11 -07:00
Famiu Haque
da7a4684df
fix(api/nvim_eval_statusline): allow maxwidth=0 #16080
Allows disabling statusline truncation by allowing maxwidth to be
set to 0 in `nvim_eval_statusline`.
2021-10-19 07:35:44 -07:00
William Chargin
9fb0f12357
feat(man.vim): convert spaces to underscores #16068
PostgreSQL ships with man pages for SQL statements like `CREATE TABLE`,
which are provided with underscores as `man 7 CREATE_TABLE`. This patch
updates `man#open_page` (as used by `:Man`) such that visually selecting
the words `CREATE TABLE` in SQL code and pressing `K` properly opens the
desired man page.

Writing `:Man CREATE TABLE` still does not work, since `CREATE` is
interpreted as a section name. (Similarly, `:Man CREATE TABLE AS` fails
because there are too many arguments to `:Man`.) But this is okay,
because if you're typing it anyway then you can just enter underscores
and also tab-completion properly suggests `:Man CREATE_TABLE(7)`.

This is a bit bespoke, but my box has over 9000 man pages (as reported
by `man -k '' | wc -l`), and not one of them has a space in the man page
name, whereas the Postgres manuals do exist and are actually useful.

Test Plan:
On a machine with Postgres manual pages, running

    nvim -u NORC +'exe "norm iCREATE TABLE foo(x int);" | norm 0veeK'

should open the appropriate man page.

wchargin-branch: man-spaces-to-underscores
2021-10-19 07:24:43 -07:00
Justin M. Keyes
aac15cf4ad
Merge #16000 refactor: uncrustify 2021-10-19 06:51:42 -07:00
Dundar Göc
6059784770 refactor: remove space after star 2021-10-19 15:20:33 +02:00
Dundar Göc
38dd53c525 refactor: make commas trail in enums 2021-10-19 15:20:33 +02:00
Dundar Göc
f98b8d2d44 refactor: enable formatting for files under lib 2021-10-19 15:20:33 +02:00
github-actions[bot]
29b718d04c
docs: regenerate (#15986)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-10-19 06:03:20 -07:00
James McCoy
4219cfcb90
Merge pull request #16084 from dundargoc/ci/commitlint/checkout-branch-directly
ci(commitlint): use action to checkout to pr branch directly
2021-10-19 07:30:09 -04:00
Dundar Göc
9039aa24b6 ci(commitlint): use action to checkout to pr branch directly 2021-10-19 09:58:30 +02:00
Famiu Haque
9086938f7b
feat(api): evaluate statusline string #16020
Adds API function `nvim_eval_statusline` to allow evaluating a
statusline string and obtaining information regarding it.

Closes https://github.com/neovim/neovim/issues/15849
2021-10-18 12:44:17 -07:00
Josa Gesell
e7ea54a3df
feat(lsp): use vim.ui.select() in codelenses (#16004)
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2021-10-18 11:52:22 -07:00
hrsh7th
bd2f61c6c4
fix(lsp): fix cursor row after textEdits (#16038) 2021-10-18 11:49:33 -07:00
Gregory Anders
bcc9ba51fa
fix(lsp): persist diagnostic config for clients
Persist configuration settings set with `vim.lsp.with` and
`vim.lsp.diagnostic.on_publish_diagnostics` by setting the config for
the namespace associated with the client.
2021-10-18 10:01:41 -06:00
Jakub Łuczyński
6b0a2e6996 build(install): rescan GLOB files on rebuild 2021-10-18 11:44:15 +02:00
James McCoy
389a898586
Merge pull request #16034 from rcowsill/ci/labeler/no-checkout
ci(labeler): Remove checkout steps
2021-10-17 21:18:27 -04:00
dundargoc
e62cac5be1
refactor: convert to doxygen-style comments #16013 2021-10-17 17:55:27 -07:00
dundargoc
aff444659e
fix(PVS/V1028): prevent possible overflow #16023
Full warning: "Possible overflow. Consider casting operands, not the
result."

https://pvs-studio.com/en/docs/warnings/v1028/
2021-10-17 17:11:23 -07:00