diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-08-09 11:06:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-09 11:06:13 +0200 |
commit | c43c745a14dced87a23227d7be4f1c33d4455193 (patch) | |
tree | 0cd5cf1cbbfa20be7fffbad696ba5ee97181847e /src | |
parent | 8afdc1f3867a620c8235b3d3964b019b94657190 (diff) | |
download | rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.tar.gz rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.tar.bz2 rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.zip |
fix(lua): improve annotations for stricter luals diagnostics (#24609)
Problem: luals returns stricter diagnostics with bundled luarc.json
Solution: Improve some function and type annotations:
* use recognized uv.* types
* disable diagnostic for global `vim` in shared.lua
* docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type)
* add type alias for lpeg pattern
* fix return annotation for `vim.secure.trust`
* rename local Range object in vim.version (shadows `Range` in vim.treesitter)
* fix some "missing fields" warnings
* add missing required fields for test functions in eval.lua
* rename lsp meta files for consistency
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 90859b0a1a..d48a69f3d8 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -2898,6 +2898,9 @@ M.funcs = { signature = 'foldtextresult({lnum})', }, foreground = { + args = 0, + params = {}, + signature = '', lua = false, }, fullcommand = { @@ -11326,10 +11329,21 @@ M.funcs = { signature = 'termopen({cmd} [, {opts}])', }, test_garbagecollect_now = { + args = 0, + desc = [=[ + Like |garbagecollect()|, but executed right away. This must + only be called directly to avoid any structure to exist + internally, and |v:testing| must have been set before calling + any function. + ]=], + params = {}, + signature = 'test_garbagecollect_now()', lua = false, }, test_write_list_log = { args = 1, + params = { { 'fname' } }, + signature = '', lua = false, }, timer_info = { |