Commit Graph

19161 Commits

Author SHA1 Message Date
Dundar Göc
b98383a250 fixup! vim-patch:8.1.2379: using old C style comments 2021-10-17 12:04:06 +02:00
Dundar Göc
4476d4ef17 fixup! vim-patch:8.1.2388: using old C style comments 2021-10-16 17:53:03 +02:00
Dundar Göc
88ef0d3de4 fixup! vim-patch:8.1.2379: using old C style comments 2021-10-16 17:50:51 +02:00
Dundar Göc
46749faac4 fixup! vim-patch:8.1.2396: using old C style comments 2021-10-16 17:35:37 +02:00
Dundar Göc
0c7d7fb45d vim-patch:8.1.2379: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
217e1b8359
2021-10-06 11:50:10 +02:00
Dundar Göc
3b3e2244db vim-patch:8.1.2388: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
4ba37b5833
2021-10-06 11:50:10 +02:00
Dundar Göc
86f32dfcdd vim-patch:8.1.2368: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
c667da5185
2021-10-06 11:50:10 +02:00
Dundar Göc
b4acae2c4a vim-patch:8.1.2392: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
6e0ce171e1
2021-10-06 11:50:10 +02:00
Dundar Göc
41d3b98deb vim-patch:8.1.2394: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
63d9e730f7
2021-10-06 11:50:10 +02:00
Dundar Göc
e8f87f15d7 vim-patch:8.1.2395: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
0d6f5d9740
2021-10-06 11:50:10 +02:00
Dundar Göc
d6c789a571 vim-patch:8.1.2396: using old C style comments
Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
e38eab22c1
2021-10-06 11:49:42 +02:00
Javier Lopez
acd5e831b6
fix(checkhealth): mitigate issues with duplicate healthchecks #15919
* fix(runtime/health): mitigate issues with duplicate healthchecks
  Previously if a healthcheck was found as Lua and Vim it was executed
  both times.
  This new implementations prefers Lua, therefore if two are found It only
  runs the Lua one, this way a plugin can mantain both implementations the
  Lua one with the method `check()` and the autoload function `#check()`
  (for none HEAD nvim versions).
  **Note: This will require plugins to use `check()` as the function name,
  since the autoload function that wraps the lua implementation won't be
  called**
* docs(health): use spaces and don't overuse backtics

followup to #15259
2021-10-05 15:37:39 -07:00
Jan Edmund Lazo
6a930a9dc4
vim-patch:8.2.0155: MinGW warnings; tests without +float #15908
Problem:    Warnings from MinGW compiler. (John Marriott) Json test fails when
            building without +float feature.
Solution:   Init variables. Fix Json parsing. Skip a few tests that require
            the +float feature.
a5d5953d59

Omit vim9 changes.
vim9 internal implementation is N/A,
similar to the `vimscript-*` features.

N/A patches for version.c:

vim-patch:8.1.0737: compiler warning for uninitialized variable

Problem:    Compiler warning for uninitialized variable.
Solution:   Add initialization. (John Marriott)
e519dfd713

vim-patch:8.1.1385: signed/unsigned compiler warning

Problem:    Signed/unsigned compiler warning.
Solution:   Use STRLEN() instead of strlen().
71de720c2c

vim-patch:8.2.0165: Coverity warning for using NULL pointer

Problem:    Coverity warning for using NULL pointer.
Solution:   Add missing "else".
5b18c248d3

vim-patch:8.2.0166: Coverity warning for using uninitialized variable

Problem:    Coverity warning for using uninitialized variable.
Solution:   Check for failure.
07da94b0f0

vim-patch:8.2.0167: Coverity warning for ignoring return value

Problem:    Coverity warning for ignoring return value.
Solution:   Check the return value and jump if failed.
58ceca5cae

"src/testdir/test_vim9*.vim" files are N/A
because vim9 code is currently unsupported.

vim-patch:8.2.0168: Coverity warning for assigning NULL to an option

Problem:    Coverity warning for assigning NULL to an option.
Solution:   Use empty string instead of NULL.
97a2af39cd

vim-patch:8.2.0169: Coverity warning for dead code

Problem:    Coverity warning for dead code.
Solution:   Check if inside try-finally.
8cbd6dfc0c

vim-patch:8.2.0170: Coverity warning for ignoring return value

Problem:    Coverity warning for ignoring return value.
Solution:   Check the return value and return if failed.
a6d536829a

vim-patch:8.2.0172: Coverity warning for not restoring character

Problem:    Coverity warning for not restoring character.
Solution:   Restore the character also in case of failure.
4549ece47c

vim-patch:8.2.0254: compiler warning for checking size_t to be negative

Problem:    Compiler warning for checking size_t to be negative.
Solution:   Only check for zero. (Zoltan Arpadffy)
ae8d2de3a9

vim-patch:8.2.0326: compiler warning for using uninitialized variable

Problem:    Compiler warning for using uninitialized variable. (Yegappan
            Lakshmanan)
Solution:   Do not jump to failed but return.
d5aec0ced1

vim-patch:8.2.3387: compiler warning for non-static function

Problem:    Compiler warning for non-static function.
Solution:   Make the function static. (Dominique Pellé, closes vim/vim#8816)
de05ae7158
2021-10-05 10:58:06 -07:00
github-actions[bot]
59edd377d3
docs: regenerate #15545 2021-10-05 10:48:48 -07:00
Justin M. Keyes
dd7812ec66 fix(docs): add win_config.c 2021-10-05 09:56:22 -07:00
Justin M. Keyes
38ef66f4c1 fix(docs): duplicate tag, wrong formatting
Fixes build error:
    cd /usr/home/build/neovim/build/runtime && /usr/local/bin/cmake -E remove doc/* && /usr/local/bin/cmake -E copy_directory /usr/home/build/neovim/runtime/doc doc && /usr/home/build/neovim/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ ++t\ doc -c quit
    Error detected while processing command line:
    E154: Duplicate tag "vim.register_keystroke_callback()" in file doc/lua.txt
2021-10-05 09:45:25 -07:00
Javier Lopez
49fdc62114
feat(api): named marks set, get, delete #15346
Adds the following API functions.

- nvim_buf_set_mark(buf, name, line, col)
  * Set marks in a buffer.
- nvim_buf_del_mark(buf, name)
  * Delete a mark that belongs to buffer.
- nvim_del_mark(name)
  * Delete a global mark.
- nvim_get_mark(name)
  * Get a global mark.

Tests:

- Adds test to all the new api functions, and adds more for the existing
  nvim_buf_get_mark.
    * Tests include failure cases.

Documentation:

- Adds documentation for all the new functions, and improves the
  existing fucntion docs.
2021-10-05 08:49:20 -07:00
Michael Lingelbach
912a6e5a9c
feat(lsp): improve json deserialization performance (#15854)
* Add optional second table argument to vim.json.decode which takes
  a table 'luanil' which can include the 'object' and/or 'array' keys. These
  options use luanil when converting NULL in json objects and arrays
  respectively. The default behavior matches the original lua-cjson.
* Remove recursive_convert_NIL function from rpc.lua, use
  vim.json.decode with luanil = { object = true } instead. This removes a hotpath
  in the json deserialization pipeline by dropping keys with json NULL
  values throughout the deserialized table.
2021-10-05 08:37:20 -07:00
Christian Clason
f6c0a37b02
build(deps)!: use libuv 1.42.0 upstream for WIN32 (#15889)
Switch libuv from https://github.com/neovim/libuv fork to upstream for WIN32.
Upstream at 1.42.0 is now used for all platforms.

BREAKING CHANGE: removes Windows 7 support
BREAKING CHANGE: removes support for mouse and alternate buffers in TUI for
Windows 8 and 8.1
2021-10-05 17:23:42 +02:00
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