From e1db0e35e4d5859b96e6aff882df62d6c714b569 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 15 Mar 2023 23:30:14 +0000 Subject: feat(api): add filetype option nvim_get_option_value - Also adjust the expr-mapping behaviour so normal commands and text changes are allowed in internal dummy buffers. --- src/nvim/api/keysets.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/api/keysets.lua') diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua index 30dcef6127..2c7532bd27 100644 --- a/src/nvim/api/keysets.lua +++ b/src/nvim/api/keysets.lua @@ -102,6 +102,7 @@ return { "scope"; "win"; "buf"; + "filetype"; }}; { 'highlight', { "bold"; -- cgit From c0fe6c040e19ef9102a8507ffcbd88b83186326a Mon Sep 17 00:00:00 2001 From: Null Chilly <56817415+nullchilly@users.noreply.github.com> Date: Thu, 23 Mar 2023 16:31:39 +0700 Subject: feat(api): add nvim_get_hl (#22693) Problem: no way of getting all highlight group definitions in a namespace. Solution: add `nvim_get_hl()`, deprecate `nvim_get_hl_by_name()` and `nvim_get_hl_by_id()`. --- src/nvim/api/keysets.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/api/keysets.lua') diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua index 2c7532bd27..b2b327d73e 100644 --- a/src/nvim/api/keysets.lua +++ b/src/nvim/api/keysets.lua @@ -145,6 +145,11 @@ return { "altfont"; "nocombine"; }}; + { 'get_highlight', { + "id"; + "name"; + "link"; + }}; -- Autocmds { 'clear_autocmds', { "buffer"; -- cgit From fe9cbcb3a5c82932ecfb8f49d07e98a1fc2b31e5 Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Sat, 25 Mar 2023 18:58:48 +0200 Subject: feat(api): nvim_exec2(), deprecate nvim_exec() #19032 Problem: The signature of nvim_exec() is not extensible per ":help api-contract". Solution: Introduce nvim_exec2() and deprecate nvim_exec(). --- src/nvim/api/keysets.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/api/keysets.lua') diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua index b2b327d73e..ce29001787 100644 --- a/src/nvim/api/keysets.lua +++ b/src/nvim/api/keysets.lua @@ -232,4 +232,7 @@ return { { 'echo_opts', { "verbose"; }}; + { 'exec_opts', { + "output"; + }}; } -- cgit From f0ac91c58b42ed4f38dea7352d89fd39a88142f4 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sat, 1 Apr 2023 14:58:52 +0200 Subject: feat(api): evaluate 'statuscolumn' with nvim_eval_statusline() --- src/nvim/api/keysets.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/api/keysets.lua') diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua index ce29001787..26e87bccec 100644 --- a/src/nvim/api/keysets.lua +++ b/src/nvim/api/keysets.lua @@ -97,6 +97,7 @@ return { "highlights"; "use_winbar"; "use_tabline"; + "use_statuscol"; }}; { 'option', { "scope"; -- cgit From 25dfed6e0148771cdb659df8c616df3860583c47 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Thu, 6 Apr 2023 03:33:57 +0200 Subject: feat(api): set statuscolumn line number in nvim_eval_statusline() Having the user set `v:lnum` before calling `nvim_eval_statusline()` is unnecesarily fragile. Redraws inbetween setting `v:lnum` and the `nvim_eval_statusline()` call will overwrite `v:lnum`. --- src/nvim/api/keysets.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/api/keysets.lua') diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua index 26e87bccec..01f5a8b860 100644 --- a/src/nvim/api/keysets.lua +++ b/src/nvim/api/keysets.lua @@ -97,7 +97,7 @@ return { "highlights"; "use_winbar"; "use_tabline"; - "use_statuscol"; + "use_statuscol_lnum"; }}; { 'option', { "scope"; -- cgit From efb0896f21e03f64e3a14e7c09994e81956f47b9 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 3 Apr 2023 15:21:24 +0200 Subject: refactor(api): make typed dicts appear as types in the source code problem: can we have Serde? solution: we have Serde at home This by itself is just a change of notation, that could be quickly merged to avoid messy merge conflicts, but upcoming changes are planned: - keysets no longer need to be defined in one single file. `keysets.h` is just the initial automatic conversion of the previous `keysets.lua`. keysets just used in a single api/{scope}.h can be moved to that file, later on. - Typed dicts will have more specific types than Object. this will enable most of the existing manual typechecking boilerplate to be eliminated. We will need some annotation for missing value, i e a boolean will need to be represented as a TriState (none/false/true) in some cases. - Eventually: optional parameters in form of a `Dict opts` final parameter will get added in some form to metadata. this will require a discussion/desicion about type forward compatibility. --- src/nvim/api/keysets.lua | 239 ----------------------------------------------- 1 file changed, 239 deletions(-) delete mode 100644 src/nvim/api/keysets.lua (limited to 'src/nvim/api/keysets.lua') diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua deleted file mode 100644 index 01f5a8b860..0000000000 --- a/src/nvim/api/keysets.lua +++ /dev/null @@ -1,239 +0,0 @@ -return { - { 'context', { - "types"; - }}; - { 'set_decoration_provider', { - "on_start"; - "on_buf"; - "on_win"; - "on_line"; - "on_end"; - "_on_hl_def"; - "_on_spell_nav"; - }}; - { 'set_extmark', { - "id"; - "end_line"; - "end_row"; - "end_col"; - "hl_group"; - "virt_text"; - "virt_text_pos"; - "virt_text_win_col"; - "virt_text_hide"; - "hl_eol"; - "hl_mode"; - "ephemeral"; - "priority"; - "right_gravity"; - "end_right_gravity"; - "virt_lines"; - "virt_lines_above"; - "virt_lines_leftcol"; - "strict"; - "sign_text"; - "sign_hl_group"; - "number_hl_group"; - "line_hl_group"; - "cursorline_hl_group"; - "conceal"; - "spell"; - "ui_watched"; - }}; - { 'keymap', { - "noremap"; - "nowait"; - "silent"; - "script"; - "expr"; - "unique"; - "callback"; - "desc"; - "replace_keycodes"; - }}; - { 'get_commands', { - "builtin"; - }}; - { 'user_command', { - "addr"; - "bang"; - "bar"; - "complete"; - "count"; - "desc"; - "force"; - "keepscript"; - "nargs"; - "preview"; - "range"; - "register"; - }}; - { 'float_config', { - "row"; - "col"; - "width"; - "height"; - "anchor"; - "relative"; - "win"; - "bufpos"; - "external"; - "focusable"; - "zindex"; - "border"; - "title"; - "title_pos"; - "style"; - "noautocmd"; - }}; - { 'runtime', { - "is_lua"; - "do_source"; - }}; - { 'eval_statusline', { - "winid"; - "maxwidth"; - "fillchar"; - "highlights"; - "use_winbar"; - "use_tabline"; - "use_statuscol_lnum"; - }}; - { 'option', { - "scope"; - "win"; - "buf"; - "filetype"; - }}; - { 'highlight', { - "bold"; - "standout"; - "strikethrough"; - "underline"; - "undercurl"; - "underdouble"; - "underdotted"; - "underdashed"; - "italic"; - "reverse"; - "altfont"; - "nocombine"; - "default"; - "cterm"; - "foreground"; "fg"; - "background"; "bg"; - "ctermfg"; - "ctermbg"; - "special"; "sp"; - "link"; - "global_link"; - "fallback"; - "blend"; - "fg_indexed"; - "bg_indexed"; - }}; - { 'highlight_cterm', { - "bold"; - "standout"; - "strikethrough"; - "underline"; - "undercurl"; - "underdouble"; - "underdotted"; - "underdashed"; - "italic"; - "reverse"; - "altfont"; - "nocombine"; - }}; - { 'get_highlight', { - "id"; - "name"; - "link"; - }}; - -- Autocmds - { 'clear_autocmds', { - "buffer"; - "event"; - "group"; - "pattern"; - }}; - { 'create_autocmd', { - "buffer"; - "callback"; - "command"; - "desc"; - "group"; - "nested"; - "once"; - "pattern"; - }}; - { 'exec_autocmds', { - "buffer"; - "group"; - "modeline"; - "pattern"; - "data"; - }}; - { 'get_autocmds', { - "event"; - "group"; - "pattern"; - "buffer"; - }}; - { 'create_augroup', { - "clear"; - }}; - { 'cmd', { - "cmd"; - "range"; - "count"; - "reg"; - "bang"; - "args"; - "magic"; - "mods"; - "nargs"; - "addr"; - "nextcmd"; - }}; - { 'cmd_magic', { - "file"; - "bar"; - }}; - { 'cmd_mods', { - "silent"; - "emsg_silent"; - "unsilent"; - "filter"; - "sandbox"; - "noautocmd"; - "browse"; - "confirm"; - "hide"; - "horizontal"; - "keepalt"; - "keepjumps"; - "keepmarks"; - "keeppatterns"; - "lockmarks"; - "noswapfile"; - "tab"; - "verbose"; - "vertical"; - "split"; - }}; - { 'cmd_mods_filter', { - "pattern"; - "force"; - }}; - { 'cmd_opts', { - "output"; - }}; - { 'echo_opts', { - "verbose"; - }}; - { 'exec_opts', { - "output"; - }}; -} -- cgit