Commit Graph

19142 Commits

Author SHA1 Message Date
Christian Clason
3b531d50a8
docs(contrib): recommend nvim --clean #15917 2021-10-05 08:01:09 -07:00
Christian Clason
f6a9f0bfca
fix(vim-patch): add missing nginx runtime files (#15916)
Followup to incomplete runtime update https://github.com/neovim/neovim/pull/15911
2021-10-05 15:19:16 +02:00
zeertzjq
17f7c83f29
docs(intro.txt): change vimhelp.appspot.com to vimhelp.org (#15915)
Ref 6c1e1570b1 (diff-644ad027e3580bc940a6b7b4aaf1869bae267f7ff30e359e523d5de70e317106)
2021-10-05 06:49:15 -06:00
Christian Clason
0c2a7aa5f7
vim-patch:6e649224926b (#15911)
Update runtime files
6e64922492
2021-10-05 14:12:16 +02:00
Javier Lopez
0a7a215aa6
fix(healthcheck): update builtins to the new convention #15914
Adjust some builtin healthchecks to use Lua, after #15259
2021-10-05 05:05:33 -07:00
dundargoc
6d8cafed40
ci: exclude lua-cjson from PVS report #15859 2021-10-05 05:02:49 -07:00
Christian Clason
a2734efdc2
vim-patch:8.2.3473: some tcl files are not recognized #15912
Problem:    Some files with tcl syntax are not recognized.
Solution:   Add a few file patterns. (Doug Kearns)
78aa5ffe31
2021-10-05 04:21:52 -07:00
Matthieu Coudron
93a7571fab
Merge pull request #15259 from muniter/muniter/checkhealth-from-lua
feat(checkhealth): support Lua healthchecks
2021-10-05 11:27:07 +02:00
zeertzjq
655e489e90
docs(develop.txt): nvim_open_win is now in win_config.c (#15909) 2021-10-04 20:10:07 -06:00
Javier López
8b43b07333 feat(ex_checkhealth): provide function for command line completion
Move away from providing completion with ExpandRTDir to ExpandGeneric
providing the function get_healthcheck_name which caches the results for
the current command line prompt.

It does the almost the same thing the Vim function 'get_healthcheck'
implemented in 'runtime/autoload/health.vim' does.
2021-10-04 16:51:54 -05:00
Björn Linse
b60e6448eb
Merge pull request #15813 from bfredl/neomouse
fix(mouse): correct dragged position in composed layout
2021-10-04 23:08:39 +02:00
Javier López
8f2a8b50da docs(runtime/health): update with new lua support
- describe how the lua support works
- explain new behavior of :checkhealth *
- fixed formatting to use tab instead of spaces
2021-10-04 14:28:54 -05:00
Javier López
c65f956015 test(runtime/health): cover lua healthchecks
- Add tests for lua healthchecks (failure, success and submodules).
- Reword some of the test naming for improved logs readability.
- Modify render test to accomodate the changes of the health autoload function.
- Add test for :checkhealth completion of Lua healtchecks.
2021-10-04 14:28:54 -05:00
Javier López
9249dcdda1 feat(runtime/health): support lua healthchecks
- Refactor health.vim to discover lua healthcheck in the runtime
  directories lua/**/health{/init}.lua
- Support healthchecks for lua submodules e.g :checkhealth vim.lsp and
  also support wildcard "*" at the end for all submodules
  :checkhealth vim*
- Refactor health.vim to use variable scope instead of output capturing
- Create health.lua module to wrap report functions and future
  extensibility.
- Move away from searching just in the runtimepath, use
  `nvim_get_runtime_file` due to #15632

Example:
Plugin linter in rtp can declare it's checkhealts in lua module
`lua/linter/health{/init}.lua` that returns a table with a method
"check" that when executed calls the report functions provided by the
builtin lua module require("health").

The plugin also has a submodule `/lua/linter/providers` in which it
defines `/lua/linter/providers/health{/init}.lua`

This plugin healthcheck can now be run by the ex command:
  `:checkhealth linter linter.providers`

Also calling all submodules can be done by:
  `:checkhealth linter*

And "linter" and "linter.provider" would be discovered when:
  `:checkhealth`
2021-10-04 14:28:54 -05:00
Aditya Kurdunkar
83fa8956c3
docs: fix typo 2021-10-04 13:09:32 -06:00
Björn Linse
810da1a702 fix(mouse): correct dragged position in composed layout 2021-10-04 21:00:42 +02:00
Björn Linse
253a012469
Merge pull request #15901 from bfredl/apiorg
refactor(api): re-organanize public and private API functions
2021-10-04 20:06:41 +02:00
Björn Linse
22e4a2a286 refactor(api): move window config related functions to own file 2021-10-04 19:23:00 +02:00
dundargoc
c4d581deae
refactor: inline unnecessary macros #15890 2021-10-04 08:35:18 -07:00
Gregory Anders
c7a63f35db
feat(startup): load builtin plugins with --clean #15893
Closes #15605
2021-10-04 07:01:49 -07:00
dundargoc
44f7b46199
refactor: remove redundant char casts #15888 2021-10-04 06:40:43 -07:00
Björn Linse
b4c54ffa22
Merge pull request #15894 from gpanders/hardcode-diagnostic-highlights
refactor: define diagnostic highlights in syntax.c
2021-10-04 10:52:05 +02:00
Gregory Anders
088026205f refactor: define diagnostic highlights in syntax.c 2021-10-03 20:06:06 -06:00
Justin M. Keyes
8a9f292991
Merge #15218 from gpanders/split-trimempty
feat(lua): add "noempty" param to vim.split()
2021-10-03 17:33:12 -07:00
dundargoc
a0bf28cd54
vim-patch:8.2.3469: some files with json syntax are not recognized (#15891)
Problem:    Some files with json syntax are not recognized.
Solution:   Add a few file patterns. (Emiliano Ruiz Carletti, closes vim/vim#8947)
50c5689342
2021-10-03 16:50:51 -06:00
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
310d53e5d0 refactor(api): make export of functions opt-in, not opt-out 2021-10-03 16:14:47 +02: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