refactor(vimscript)!: drop ctxget(), ctxpush(), etc #40724

Problem:
This functions are most likely never used in the wild.
- They are redundant with `nvim_get_context` + `nvim_load_context`.
- The "context" concept was never fully developed and hasn't gained
  traction.

Solution:
Drop these vimscript aliases, they are just extra cruft.
This commit is contained in:
Justin M. Keyes
2026-07-13 17:57:13 -04:00
committed by GitHub
parent 06ded1330c
commit eb94149a29
11 changed files with 17 additions and 771 deletions

View File

@@ -1333,45 +1333,6 @@ function vim.fn.cosh(expr) end
--- @return integer
function vim.fn.count(comp, expr, ic, start) end
--- Returns a |Dictionary| representing the |context| at {index}
--- from the top of the |context-stack| (see |context-dict|).
--- If {index} is not given, it is assumed to be 0 (i.e.: top).
---
--- @param index? integer
--- @return table
function vim.fn.ctxget(index) end
--- Pops and restores the |context| at the top of the
--- |context-stack|.
---
--- @return any
function vim.fn.ctxpop() end
--- Pushes the current editor state (|context|) on the
--- |context-stack|.
--- If {types} is given and is a |List| of |String|s, it specifies
--- which |context-types| to include in the pushed context.
--- Otherwise, all context types are included.
---
--- @param types? string[]
--- @return any
function vim.fn.ctxpush(types) end
--- Sets the |context| at {index} from the top of the
--- |context-stack| to that represented by {context}.
--- {context} is a Dictionary with context data (|context-dict|).
--- If {index} is not given, it is assumed to be 0 (i.e.: top).
---
--- @param context table
--- @param index? integer
--- @return integer
function vim.fn.ctxset(context, index) end
--- Returns the size of the |context-stack|.
---
--- @return any
function vim.fn.ctxsize() end
--- @param lnum integer|string
--- @param col? integer
--- @param off? integer