Commit Graph

19092 Commits

Author SHA1 Message Date
dundargoc
9c268263b1
refactor: format with uncrustify #15842
* refactor: format with uncrustify
* refactor: convert function comments to doxygen
2021-10-02 07:59:41 -07:00
dundargoc
898f91f0f3
refactor: convert char_u to char #15824 2021-10-02 06:53:48 -07:00
zeertzjq
a3b5b4a31e
feat(vim-patch.sh): better detection of remote name #15846 2021-10-02 06:15:01 -07:00
Michael Lingelbach
724ffe7095
feat(diagnostics): add vim.diagnostic.get_namespaces (#15866)
Many vim.diagnostic functions expect the user to pass in a namespace id.

This PR allows the user to list active diagnostic namespaces:

```lua
:lua print(vim.inspect(vim.diagnostic.get_namespaces()))

{
  [7] = {
    name = "vim.lsp.client-1",
    opts = {},
    sign_group = "vim.diagnostic.vim.lsp.client-1"
  }
}
```
2021-10-01 22:50:28 -07:00
Gregory Anders
36408146ad
docs(diagnostics): add "priority" option to signs table (#15860)
This feature was added in #15785, but the docs for
vim.diagnostic.config() weren't updated.
2021-10-01 19:07:55 -06:00
James McCoy
dc4670038e
Merge pull request #15864 from jamessan/gitattributes
fix: include ci/ in exported tarball
2021-10-01 19:55:01 -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
James McCoy
a940952fe2
Merge pull request #15861 from dundargoc/refactor/xdiff
refactor: update path to xdiff in comments
2021-10-01 17:53:27 -04:00
James McCoy
1efbd4980f
Merge pull request #15862 from dundargoc/refactor/xdiff-pvs
refactor: remove PVS comment on top of files
2021-10-01 17:52:50 -04:00
James McCoy
d9b3e41a63
Merge pull request #15863 from dundargoc/docs/contributing/commit-message
docs: update preferred commit message style for the static analyzer PRs
2021-10-01 17:52:13 -04:00
Dundar Göc
38b0306591 docs: update preferred commit message style for the static analyzer PRs 2021-10-01 21:22:32 +02:00
Dundar Göc
3134ef3d9f refactor: remove PVS comment on top of files
The xdiff directory is excluded from the PVS report so the comment isn't
required.
2021-10-01 21:08:53 +02:00
Dundar Göc
19ab0f22cc refactor: update path to xdiff in comments 2021-10-01 21:07:02 +02:00
Björn Linse
9337fff8aa
Merge pull request #15852 from bfredl/afteragain
fix(runtime): fix ordering of "after" packages
2021-09-30 22:32:02 +02:00
Björn Linse
251ce9ddd1 fix(runtime): fix ordering of "after" packages
they must come after ordinary runtime dirs which are not "after"
2021-09-30 22:03:18 +02:00
dundargoc
7152353ade
ci: add type and scope from PR title as labels #15850
This only works if the label exists in the first place of course.
2021-09-30 08:08:36 -07:00
Jan Edmund Lazo
270cc1d70f
Merge pull request #14937 from dstein64/vim-8.1.2304
vim-patch:8.1.2304,8.1.2309,8.1.2319,8.1.2321
2021-09-29 20:59:53 -04:00
dundargoc
d90fb1c0bf
Refactor/uncrustify (#15790)
* refactor: format with uncrustify

* fixup(dundar): fix functions comments

* fixup(dundar): remove space between variable and ++/--

* fixup(dundar): better workaround for macro attributes

This is done to be able to better use uncrustify rules for macros

* fixup(justin): make preprocessors follow neovim style guide
2021-09-29 19:48:50 +02:00
Daniel Steinberg
88442c2fa6 docs: add 'plus one' to correct getmousepos docs
This change was applied to Vim as part of 90df4b9.
90df4b9d42
2021-09-29 11:13:49 -04:00
Daniel Steinberg
096309037b chore: remove empty line
This update was part of vim-patch:4c29502.
4c295027a4
The other parts of that patch were applied to Neovim in ad6bb38.
2021-09-29 11:13:49 -04:00
Daniel Steinberg
ae97f25e9d test: add a test for getmousepos() 2021-09-29 11:13:49 -04:00
Daniel Steinberg
c423ee584a vim-patch:8.1.2321: cannot select all text with the mouse
Problem: Cannot select all text with the mouse. (John Marriott)
Solution: Move limiting the mouse column to f_getmousepos().
          (closes https://github.com/vim/vim/issues/5242)
0a5aa7b28a
2021-09-29 11:13:49 -04:00
Daniel Steinberg
037ec8f208 vim-patch:8.1.2319: compiler warning for int size
Problem: Compiler warning for int size.
Solution: Add typecast. (Mike Williams)
07a63d8633
2021-09-29 11:13:49 -04:00
Daniel Steinberg
95bf86c2bf vim-patch:8.1.2309: compiler warning for argument type
Problem: Compiler warning for argument type.
Solution: Use linenr_T and cast to varnumber_T. (John Marriott)
abe12a1a4f
2021-09-29 11:13:49 -04:00
Daniel Steinberg
3b9e75b366 vim-patch:8.1.2304: cannot get the mouse position when getting a mouse click
Problem:    Cannot get the mouse position when getting a mouse click.
Solution:   Add getmousepos().
db3a205147
2021-09-29 11:13:49 -04:00
Mathias Fußenegger
ec4731d982
feat(lsp): add codeAction/resolve support (#15818)
Closes https://github.com/neovim/neovim/issues/15339 and https://github.com/neovim/neovim/issues/15828
2021-09-28 14:04:01 -07:00
Björn Linse
3507d58dfb
Merge pull request #15812 from bfredl/taba
fix(runtime): make a copy of runtime_search_path when iterating
2021-09-28 19:12:39 +02:00
Mathias Fußenegger
19a77cd5a7
feat(lsp): add client command support to codelens (#15820)
Also adds a check against the server capabilities to fix
https://github.com/neovim/neovim/issues/15183
2021-09-28 09:19:19 -07:00
Mathias Fußenegger
ff18a8bcc4
refactor(lsp): remove json encode/decode wrappers (#15826) 2021-09-28 09:13:44 -07:00
Mathias Fußenegger
9ca7b6b71a
fix(ui): s/format_entry/format_item to match docs (#15819)
Follow up to https://github.com/neovim/neovim/pull/15771
2021-09-27 16:12:03 -07:00
Mathias Fußenegger
63fde086d9
feat(ui): add vim.ui.select and use in code actions (#15771)
Continuation of https://github.com/neovim/neovim/pull/15202

A plugin like telescope could override it with a fancy implementation
and then users would get the telescope-ui within each plugin that
utilizes the vim.ui.select function.

There are some plugins which override the `textDocument/codeAction`
handler solely to provide a different UI. With custom client commands and
soon codeAction resolve support, it becomes more difficult to implement
the handler right - so having a dedicated way to override the picking
function will be useful.
2021-09-27 21:57:28 +02:00
Björn Linse
a0ec8597e3 fix(runtime): make a copy of runtime_search_path when iterating
This is to prevent concurrent modification, just like save_rtp
in the vim 8 implementation
2021-09-27 21:17:53 +02:00
dundargoc
6736ee8be5
chore: remove unused script finddeclarations.pl #15814 2021-09-27 09:02:42 -07:00
Michael Lingelbach
96614f84ab
fix(lsp): avoid serializing boolean as key (#15810)
In vim.lsp.buf.references, the key vim.type_idx (which evaluates to a
boolean) was set to equal vim.types.dictionary. This resulted in a
boolean key in json which is not allowed by the json spec, and which
lua-cjson fails to serialize.
2021-09-27 00:32:30 -07:00
Michael Lingelbach
bec7f47cee
docs: document dependencies in MAINTAIN.md #15801
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2021-09-26 17:24:20 -07:00
Gregory Anders
187e3a3b7e
refactor(diagnostic): use sign priority for severity_sort #15785
Rather than relying on the order in which signs are placed to dictate
the order in which they are displayed, explicitly set the priority of
the sign according to the severity of the diagnostic and the value of
severity_sort. If severity_sort is false or unset then all signs use the
same priority.
2021-09-26 16:02:18 -07:00
Michael Lingelbach
cb51a1b615
docs: add lua-cjson to third-party licenses #15800 2021-09-26 14:57:57 -07:00
Mathias Fußenegger
73280a7987
feat(lsp): allow subset of CodeActionContext as arg to code_action methods (#15793)
This makes it easier to filter the code actions. For example:

    vim.lsp.buf.code_action { only = 'refactor' }
2021-09-26 23:40:28 +02:00
Michael Lingelbach
c217766f7c
feat(lsp): use cjson for lsp rpc (#15759) 2021-09-26 22:53:04 +02:00
Michael Lingelbach
68c65b7732
Merge pull request #14871 from mjlbach/feature/lua-cjson-embedded
feat(lua): expose lua-cjson as vim.json
2021-09-26 12:23:46 -07:00
dundargoc
3246bf5f4e
ci(lintcommit.lua): replace third-party commitlint #15747 2021-09-26 12:13:59 -07:00
Michael Lingelbach
9c31f3b026 test: add tests for vim.json 2021-09-26 11:52:17 -07:00
Björn Linse
9686c21237
Merge pull request #15797 from smolck/ui-stuff
fix(ui_bridge): set bridge width and height on attach
2021-09-26 20:16:39 +02:00
smolck
08ee03cb16
fix(ui_bridge): set bridge width and height on attach 2021-09-26 11:00:40 -05:00
erw7
44145847dc
fix(tui): remove obsolete $NVIM detection #15791
Initially, we planned to set the NVIM environment variable to detect that
neovim is running in the neovim built-in terminal. At the time this code
was written, there was no way for a parent to set environment variables
for a program running in an embedded terminal. Later it was implemented in
 #12937, but the code to set the NVIM was not added. #11390 now uses ConPTY
instead of winpty when possible, so it is no longer necessary to force the
use of win32con even when running inside an embedded terminal. Therefore,
we now do not need this code.
2021-09-26 08:27:18 -07:00
Björn Linse
d4fa1649fb
Merge pull request #15351 from bfredl/virt_line
feat(screen): virtual lines
2021-09-26 16:56:19 +02:00
dundargoc
c273eb3100
refactor: replace sprintf with snprintf #15794 2021-09-26 07:53:51 -07:00
Björn Linse
68d6ff8802
Merge pull request #15721 from bfredl/electricboogalo
fix(runtime): some ordering issues (and start work on cache mechanism)
2021-09-26 16:20:23 +02:00
Björn Linse
ac3288d556 fix(runtime): ordering of loading packages with user config
site packages must be sourced before user config

NOTE: we only consider dirs exactly matching "after" to be an AFTER dir.
vim8 considers all dirs like "foo/bar_after", "Xafter" etc, as an
"after" dir in SOME codepaths not not in ALL codepaths.
2021-09-26 15:44:40 +02:00
Björn Linse
392c658d4d feat(decorations): support virtual lines (for now: only one block at a time) 2021-09-26 12:19:54 +02:00