Commit Graph

19114 Commits

Author SHA1 Message Date
zeertzjq
7ba11e06c0
vim-patch:8.2.3466: completion submode not indicated for virtual replace (#15886)
Problem:    Completion submode not indicated for virtual replace.
Solution:   Add submode to "Rv". (closes vim/vim#8945)
cc8cd44533
2021-10-03 15:04:51 -04:00
zeertzjq
04b59ebd85
vim-patch:8.2.3465: cannot detect insert scroll mode (#15885)
Problem:    Cannot detect insert scroll mode.
Solution:   Add "scroll" to complete_info(). (closes vim/vim#8943)
27fef59dd1
2021-10-03 14:53:58 -04:00
Björn Linse
3beea1fe1b
Merge pull request #15516 from bfredl/keyset
refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
2021-10-03 14:31:53 +02:00
Christian Clason
9fe704f88e
vim-patch:8.2.3464: nginx files are not recognized (#15883)
Problem:    nginx files are not recognized.
Solution:   Add several file patterns. (Chris Aumann, closes vim/vim#8922)
8b8c0ed657
2021-10-03 13:40:59 +02:00
Björn Linse
32565922ef refactor(api): handle option dicts properly
Do not copy a lot of lua strings (dict keys) to just strequal() them
Just compare them directly to a dedicated hash function.

feat(generators): HASHY McHASHFACE
2021-10-03 10:46:57 +02:00
Gregory Anders
23d13aa4cc
Merge pull request #15786 from gpanders/diagnostic-signs-unique-severity 2021-10-02 21:01:40 -06:00
Gregory Anders
0f554ef6f8 refactor(diagnostics): always make 'set' go through 'show'
Always make calls to `vim.diagnostic.set` call `vim.diagnostic.show`.
This creates an easier to reason about code path and is also less
surprising when users wish to override override `vim.diagnostic.show`
with custom behavior and `vim.diagnostic.set` is called with empty
diagnostics.

Functionally, the end result is the same: when `show` is called with an
empty diagnostics list, it just calls `hide` and then returns, which is
exactly what `reset` does right now.
2021-10-02 20:37:09 -06:00
Gregory Anders
1124439954 docs(diagnostic): add blurb on how to replace builtin handlers 2021-10-02 20:37:09 -06:00
Gregory Anders
c319c800cf test(diagnostic): add test case for signs 2021-10-02 20:37:09 -06:00
Sean Dewar
0c06da1f0a
fix(nvim_open_win): crash if autocmds delete buffer/window #15549
win_set_buf can trigger autocmds if noautocmd=false. If they close the window,
code afterwards will dereference the freed win_T* wp pointer.

This interaction became possible after commit 1def3d1542.

The reason deleting curbuf crashes, and not the buf passed to
`nvim_open_win`, is because the float initially edits curbuf (`win_init`)
until it's later set to edit buf (windows from `:new` and `:split <buf>`
behave similiarly: approx. `:split`, then `:buffer <buf>`).

`do_buffer` closes windows when their edited buffer is deleted (unless
it's the only window; N/A for floats), so the float closes when curbuf
is deleted, so we need to check `win_valid` after `win_set_buf` too.

Closes #15548
2021-10-02 19:10:59 -07:00
dundargoc
ad1c42a97d
vim-patch:8.2.3460: some type casts are not needed #15868
Problem:    Some type casts are not needed.
Solution:   Remove unnecessary type casts. (closes vim/vim#8934)
dfa5e464d4
2021-10-02 18:04:21 -07:00
zeertzjq
4449297d12
docs(lsp): clarify parameters of some util functions (#15851)
`pad_left` and `pad_right` are unused
List used keys of `opts` in `make_floating_popup_options`
2021-10-02 17:55:54 -07:00
zeertzjq
b3e815094b
fix(float)!: always anchor to corner of window including border #15832
N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the
window (including border). This line may also need change in this case (change
0 to -1):

This is most consistent and easiest to reason about, especially with GUIs whose
border do not need to have width/height of 1/1 in cell units.

Fix #15789
2021-10-02 17:36:24 -07:00
Justin M. Keyes
c5e8c39102
Merge #15803 fix(lsp_spec): tests depend on previous session 2021-10-02 16:50:20 -07:00
dundargoc
8c74c895b3
refactor: format with uncrustify #15872
* refactor: format with uncrustify
* refactor: fix function parameter comments
2021-10-02 14:41:50 -07:00
kylo252
09307e64df
fix(docs): uncrustify.cfg location #15817 2021-10-02 14:32:18 -07:00
dundargoc
ac973d5532
docs: remove obsolete text on language #15875 2021-10-02 14:30:13 -07:00
erw7
c4857b695f
fix(input): resolve isolated (non-ALT/META) mappings #13109
Problem:
Since 2f06413dfb #13042, "ESC+c" sequence is treated as "ESC c"
instead of "M-c" (ALT/META+c) when not mapped, aka "fallthrough"
behavior. But "isolated" (non-ALT/META) mappings to ESC and c were not
resolved. This behavior is especially confusing for the TUI.

Solution:
Resolve isolated ESC, c mappings when there is no M-c mapping.
Change ins_char_typebuf() to escape CSI, K_SPECIAL.

fixes #13086
fixes #15869
2021-10-02 14:27:37 -07:00
Björn Linse
79fb9ed080
Merge pull request #15867 from bfredl/starpack
fix(runtime): add compressed {&packpath}/start/*/pack/*[/after] representation to &rtp

by suggestion by at-tpope

Summary:

We can add XDG_DATA_DIR/nvim/site/pack/*/start/* (et al) as an unexpanded wildchar to &rtp which keeps it both short and explicit and still supporting globpath(&rtp, ...).

ref #15101
2021-10-02 17:47:55 +02:00
Justin M. Keyes
069d1de184 fix(lsp_spec): tests depended on previous session
- fix tests which accidentally depended on previous session
2021-10-02 08:26:57 -07:00
Justin M. Keyes
c74a706869 fix(release.sh): ignore failed "rm" 2021-10-02 08:26:57 -07:00
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
Björn Linse
9df7e022b4 fix(runtime): add packages as "/pack/*/start/*" patterns to &rtp
This makes `globpath(&rtp, ...)` work again for start packages
2021-10-02 16:45:19 +02: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