From 2f5e7cbac49ed2fde571c5bf85619afec624f8e8 Mon Sep 17 00:00:00 2001 From: glepnir Date: Thu, 5 Dec 2024 17:49:39 +0800 Subject: vim-patch:9.1.0905: Missing information in CompleteDone event (#31455) Problem: Missing information in CompleteDone event Solution: add complete_word and complete_type to v:event dict (glepnir) closes: vim/vim#16153 https://github.com/vim/vim/commit/1c5a120a701fcf558617c4e70b5a447778f0e51d --- src/nvim/vvars.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/vvars.lua') diff --git a/src/nvim/vvars.lua b/src/nvim/vvars.lua index 5fc014a50c..f1b8c22bdd 100644 --- a/src/nvim/vvars.lua +++ b/src/nvim/vvars.lua @@ -208,6 +208,8 @@ M.vars = { changing window (or tab) on |DirChanged|. status Job status or exit code, -1 means "unknown". |TermClose| reason Reason for completion being done. |CompleteDone| + complete_word The word that was selected, empty if abandoned complete. + complete_type See |complete_info_mode| ]=], }, exception = { -- cgit From 4889935a7a0e188d6fb247cbc3b3bb0c5b0ed731 Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Tue, 10 Dec 2024 01:27:39 +0100 Subject: docs(vvars): adjust lua types for vim.v variables #31510 - classes for v:event and v:completed_item - add remaining unknown types --- src/nvim/vvars.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/nvim/vvars.lua') diff --git a/src/nvim/vvars.lua b/src/nvim/vvars.lua index f1b8c22bdd..e705c02e83 100644 --- a/src/nvim/vvars.lua +++ b/src/nvim/vvars.lua @@ -10,6 +10,7 @@ M.vars = { ]=], }, char = { + type = 'string', desc = [=[ Argument for evaluating 'formatexpr' and used for the typed character when using in an abbreviation |:map-|. @@ -63,6 +64,7 @@ M.vars = { ]=], }, completed_item = { + type = 'vim.v.completed_item', desc = [=[ Dictionary containing the |complete-items| for the most recently completed word after |CompleteDone|. Empty if the @@ -94,6 +96,7 @@ M.vars = { ]=], }, ctype = { + type = 'string', desc = [=[ The current locale setting for characters of the runtime environment. This allows Vim scripts to be aware of the @@ -158,6 +161,7 @@ M.vars = { ]=], }, event = { + type = 'vim.v.event', desc = [=[ Dictionary of event data for the current |autocommand|. Valid only during the event lifetime; storing or passing v:event is @@ -238,6 +242,7 @@ M.vars = { ]=], }, exiting = { + type = 'integer?', desc = [=[ Exit code, or |v:null| before invoking the |VimLeavePre| and |VimLeave| autocmds. See |:q|, |:x| and |:cquit|. @@ -470,6 +475,7 @@ M.vars = { ]=], }, msgpack_types = { + type = 'table', desc = [=[ Dictionary containing msgpack types used by |msgpackparse()| and |msgpackdump()|. All types inside dictionary are fixed @@ -635,6 +641,7 @@ M.vars = { ]=], }, scrollstart = { + type = 'string', desc = [=[ String describing the script or function that caused the screen to scroll up. It's only set when it is empty, thus the @@ -798,11 +805,13 @@ M.vars = { ]=], }, testing = { + type = 'integer', desc = [=[ Must be set before using `test_garbagecollect_now()`. ]=], }, this_session = { + type = 'string', desc = [=[ Full filename of the last loaded or saved session file. Empty when no session file has been saved. See |:mksession|. @@ -810,6 +819,7 @@ M.vars = { ]=], }, throwpoint = { + type = 'string', desc = [=[ The point where the exception most recently caught and not finished was thrown. Not set when commands are typed. See -- cgit From d5308637bf1aac2b97fccf73a0ffdef304eaa1d6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 3 Jan 2025 20:12:15 +0800 Subject: vim-patch:9.1.0984: exception handling can be improved Problem: exception handling can be improved Solution: add v:stacktrace and getstacktrace() closes: vim/vim#16360 https://github.com/vim/vim/commit/663d18d6102f40d14e36096ec590445e61026ed6 Co-authored-by: ichizok Co-authored-by: Naruhiko Nishino --- src/nvim/vvars.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/nvim/vvars.lua') diff --git a/src/nvim/vvars.lua b/src/nvim/vvars.lua index e705c02e83..056e281c0b 100644 --- a/src/nvim/vvars.lua +++ b/src/nvim/vvars.lua @@ -220,7 +220,8 @@ M.vars = { type = 'string', desc = [=[ The value of the exception most recently caught and not - finished. See also |v:throwpoint| and |throw-variables|. + finished. See also |v:stacktrace|, |v:throwpoint|, and + |throw-variables|. Example: >vim try throw "oops" @@ -701,6 +702,15 @@ M.vars = { < ]=], }, + stacktrace = { + type = 'table[]', + desc = [=[ + The stack trace of the exception most recently caught and + not finished. Refer to |getstacktrace()| for the structure of + stack trace. See also |v:exception|, |v:throwpoint|, and + |throw-variables|. + ]=], + }, statusmsg = { type = 'string', desc = [=[ @@ -823,7 +833,7 @@ M.vars = { desc = [=[ The point where the exception most recently caught and not finished was thrown. Not set when commands are typed. See - also |v:exception| and |throw-variables|. + also |v:exception|, |v:stacktrace|, and |throw-variables|. Example: >vim try throw "oops" -- cgit