aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
Commit message (Collapse)AuthorAge
...
* docs: gather @notes items into one sectionJustin M. Keyes2023-07-08
| | | | related: 21eacbfef399
* docs: "Return (multiple)" headingJustin M. Keyes2023-07-08
| | | | | | | | | | | Problem: Lua functions that return multiple results are declared by using multiple `@return` docstring directives. But the generated docs don't make it obvious what this represents. Solution: - Generate a "Return (multiple)" heading for multiple-value functions. - Fix `@note` directives randomly placed after `@return`.
* docs: MAINTAIN.md, nvim_get_markJustin M. Keyes2023-07-08
|
* fix(api): disallow some more functions during textlockSean Dewar2023-07-05
| | | | | | | | | | | | | | | | | | Problem: nvim_buf_set_text(), nvim_open_term() and termopen() all change buffer text, which is forbidden during textlock. Additionally, nvim_open_term() and termopen() may be used to convert the cmdwin buffer into a terminal buffer, which is weird. Solution: Allow nvim_buf_set_text() and nvim_open_term() in the cmdwin, but disallow nvim_open_term() from converting the cmdwin buffer into a terminal buffer. termopen() is not allowed in the cmdwin (as it always operates on curbuf), so just check text_locked(). Also happens to improve the error in #21055: nvim_buf_set_text() was callable during textlock, but happened to check textlock indirectly via u_save(); however, this caused the error to be overwritten by an unhelpful "Failed to save undo information" message when msg_list == NULL (e.g: an `<expr>` mapping invoked outside of do_cmdline()).
* fix(api): use text_locked() to check textlockSean Dewar2023-07-05
| | | | | | | | | | | | | | | Problem: some API functions that check textlock (usually those that can change curwin or curbuf) can break the cmdwin. Solution: make FUNC_API_CHECK_TEXTLOCK call text_locked() instead, which already checks for textlock, cmdwin and `<expr>` status. Add FUNC_API_TEXTLOCK_ALLOW_CMDWIN to allow such functions to be usable in the cmdwin if they can work properly there; the opt-in nature of this attribute should hopefully help mitigate future bugs. Also fix a regression in #22634 that made functions checking textlock usable in `<expr>` mappings, and rename FUNC_API_CHECK_TEXTLOCK to FUNC_API_TEXTLOCK.
* docs: fix misparsed headings (#24162)Christian Clason2023-06-26
| | | | | | Problem: vimdoc parser requires space between column heading and `~`. Solution: Add space to docs (and mention it). Also edit `luaref.txt` headings for consistency.
* fix(docs): too much whitespace around <pre> blocks #24151Justin M. Keyes2023-06-25
| | | | | | | | | | | | | Problem: In the generated docs HTML there is too much whitespace before/after `<pre>` blocks. - In the old layout (fixed-width), all text in `.old-help-para` is formatted as `white-space:pre`. - In the new layout, when `<pre>` is at the end of a `<div>`, the margins of both are redundant, causing too much space. Solution: - In the old layout, always remove `<pre>` margin. - In the new layout, disable `<pre>` margin if it is the last child.
* docs: autocmds, miscJustin M. Keyes2023-06-25
|
* feat(extmarks): support hl_mode "combine" for inline virt_text (#24099)zeertzjq2023-06-22
|
* test: spellcheck :help (vimdoc) files #24109Justin M. Keyes2023-06-22
| | | | | | | Enforce consistent terminology (defined in `gen_help_html.lua:spell_dict`) for common misspellings. This does not spellcheck English in general (perhaps a future TODO, though it may be noisy).
* docs #24061Justin M. Keyes2023-06-19
| | | | | | | | | | | | | | - nvim requires rpc responses in reverse order. https://github.com/neovim/neovim/issues/19932 - NVIM_APPNAME: UIs normally should NOT set this. ref #23520 fix #24050 fix #23660 fix #23353 fix #23337 fix #22213 fix #19161 fix #18088 fix #20693
* fix(docs): the runtimepath is not the runtime pathbfredl2023-06-19
|
* docs #22363Justin M. Keyes2023-06-19
| | | | | | | | | Co-authored by: zeertzjq <zeertzjq@outlook.com> Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com> Co-authored by: nobe4 <nobe4@users.noreply.github.com> - docs: mention --luadev-mod to run with lua runtime files When changing a lua file in the ./runtime folder, a new contributor might expect changes to be applied to the built Neovim binary.
* docs: various clarifications (#23999)zeertzjq2023-06-12
| | | | | Close #18907 Close #20314 Close #23749
* test: more tests for nvim_{set,del}_keymap with abbreviation (#23970)zeertzjq2023-06-10
|
* feat(api): support abbreviations in nvim_set_keymapbfredl2023-06-09
| | | | closes #19198
* docs: small fixes (#23619)dundargoc2023-06-02
| | | | | | Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Gustavo Ferreira <gustavo.ferreira@imaginecurve.com> Co-authored-by: Kai Moschcau <mail@kmoschcau.de> Co-authored-by: Lampros <hauahx@gmail.com>
* test(extmarks): add test for virt_text_hide with 'smoothscroll' (#23791)zeertzjq2023-05-28
|
* docs: update api.txt and add inline virtual text to news.txttom-anders2023-05-22
|
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* docs: small fixesdundargoc2023-05-13
| | | | | | | | | Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: HiPhish <hiphish@posteo.de> Co-authored-by: Julio B <julio.bacel@gmail.com> Co-authored-by: T727 <74924917+T-727@users.noreply.github.com> Co-authored-by: camoz <camoz@users.noreply.github.com> Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
* test(scroll_opt): fix typo in porting oldtest (#23593)luukvbaal2023-05-12
|
* docs: fix erroneous nvim_buf_set_extmark example (#23404)luukvbaal2023-04-30
|
* docs(api): document nvim_buf_add_highlight vs nvim_buf_set_extmark (#23310)JP2023-04-30
|
* fix: disallow removing extmarks in on_lines callbacks (#23219)Lewis Russell2023-04-27
| | | | | | | | | | fix(extmarks): disallow removing extmarks in on_lines callbacks decor_redraw_start (which runs before decor_providers_invoke_lines) gets references for the extmarks on a specific line. If these extmarks are deleted in on_lines callbacks then this results in a heap-use-after-free error. Fixes #22801
* Merge pull request #22865 from MunifTanjim/issue-20370bfredl2023-04-10
|\ | | | | fix(api): do not re-apply win_config.style when missing
| * fix(api): do not re-apply win_config.style when missingMunif Tanjim2023-04-10
| |
* | feat(api): set statuscolumn line number in nvim_eval_statusline()Luuk van Baal2023-04-07
| | | | | | | | | | | | 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`.
* | refactor: rename local API alias from a to apiLewis Russell2023-04-05
| | | | | | | | | | | | | | | | Problem: Codebase inconsistently binds vim.api onto a or api. Solution: Use api everywhere. a as an identifier is too short to have at the module level.
* | feat(api): evaluate 'statuscolumn' with nvim_eval_statusline()Luuk van Baal2023-04-05
|/
* Merge pull request #22778 from luukvbaal/getextbfredl2023-04-02
|\ | | | | feat(extmarks): extend nvim_buf_get_extmarks()
| * feat(extmarks): extend nvim_buf_get_extmarks()Luuk van Baal2023-04-01
| | | | | | | | | | | | | | Problem: Can not get all extmarks in a buffer. Properties are missing from the details array. Solution: Allow getting all extmarks in a buffer by supplying a -1 "ns_id". Add missing properties to the details array.
* | fix(api): return both link and attributes with nvim_get_hl (#22824)Sindre T. Strøm2023-03-31
| | | | | | | | | | Problem: No way to get the actual highlight attributes for a linked group through |nvim_get_hl()| (not the attributes from the link target). Solution: Return the actual attributes as well as the link target name.
* | fix(api): Use local LastSet structure in nvim_get_option_info (#22741)Michal Liszcz2023-03-29
|/ | | | | | | | | | fix(api): use local LastSet structure in nvim_get_option_info * nvim_get_option_info is deprecated. It is always using the global LastSet information as reported in #15232. * nvim_get_option_info2 is added. The new function additionally accepts an 'opts' table {scope, buf, win} allowing to specify the option scope and query local options from another buffer or window.
* feat(api): nvim_exec2(), deprecate nvim_exec() #19032Evgeni Chasnovski2023-03-25
| | | | | | | Problem: The signature of nvim_exec() is not extensible per ":help api-contract". Solution: Introduce nvim_exec2() and deprecate nvim_exec().
* feat(api): add nvim_get_hl (#22693)Null Chilly2023-03-23
| | | | | 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()`.
* feat: add `vim.filetype.get_option()`Lewis Russell2023-03-20
|
* feat(api): add filetype option nvim_get_option_valueLewis Russell2023-03-20
| | | | | - Also adjust the expr-mapping behaviour so normal commands and text changes are allowed in internal dummy buffers.
* docs(api): link to nvim_set_hl_ns from nvim_set_hl (#22678)ii142023-03-16
|
* docs(html): render @see items as a list #22675Justin M. Keyes2023-03-15
| | | | | | | | | | | Needed for "flow" HTML layout. Flow layout before: See also: https://github.com/kikito/inspect.lua https://github.com/mpeterv/vinspect Flow layout after: See also: - https://github.com/kikito/inspect.lua - https://github.com/mpeterv/vinspect
* docs: add missing highlight groups for floatsEvgeni Chasnovski2023-03-09
|
* fix(buffer_updates): save and restore current window cursor (#16732)zeertzjq2023-03-09
| | | | | | | | When a buffer update callback is called, textlock is active so buffer text cannot be changed, but cursor can still be moved. This can cause problems when the buffer update is in the middle of an operator, like the one mentioned in #16729. The solution is to save cursor position and restore it afterwards, like how cursor is saved and restored when evaluating an <expr> mapping.
* docs: naming conventions, guidelinesJustin M. Keyes2023-02-22
| | | | close #21063
* docs: fix typos (#22353)zeertzjq2023-02-22
|
* docs(api): tweak data arg for nvim_create_autocmd (#22008)Lewis Russell2023-01-27
| | | Fixes #21964
* docs: builtin TUI is no longer channel 0 (#21794)zeertzjq2023-01-15
|
* feat(float): open float relative to mouse #21531Sebastian Lyng Johansen2023-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No easy way to position a LSP hover window relative to mouse. Solution: Introduce another option to the `relative` key in `nvim_open_win()`. With this PR it should be possible to override the handler and do something similar to this https://github.com/neovim/neovim/pull/19481#issuecomment-1193248674 to have hover information displayed from the mouse. Test case: ```lua local util = require('vim.lsp.util') local function make_position_param(window, offset_encoding) window = window or 0 local buf = vim.api.nvim_win_get_buf(window) local row, col local mouse = vim.fn.getmousepos() row = mouse.line col = mouse.column offset_encoding = offset_encoding or util._get_offset_encoding(buf) row = row - 1 local line = vim.api.nvim_buf_get_lines(buf, row, row + 1, true)[1] if not line then return { line = 0, character = 0 } end if #line < col then return { line = 0, character = 0 } end col = util._str_utfindex_enc(line, col, offset_encoding) return { line = row, character = col } end local make_params = function(window, offset_encoding) window = window or 0 local buf = vim.api.nvim_win_get_buf(window) offset_encoding = offset_encoding or util._get_offset_encoding(buf) return { textDocument = util.make_text_document_params(buf), position = make_position_param(window, offset_encoding), } end local hover_timer = nil vim.o.mousemoveevent = true vim.keymap.set({ '', 'i' }, '<MouseMove>', function() if hover_timer then hover_timer:close() end hover_timer = vim.defer_fn(function() hover_timer = nil local params = make_params() vim.lsp.buf_request( 0, 'textDocument/hover', params, vim.lsp.with(vim.lsp.handlers.hover, { silent = true, focusable = false, relative = 'mouse', }) ) end, 500) return '<MouseMove>' end, { expr = true }) ```
* fix(ui): set stc to empty in floatwin with minimal style (#21720)Raphael2023-01-10
| | | fix(ui): set stc to emtpy in floatwin with minimal style
* docs: fix typos (#21427)dundargoc2023-01-04
| | | | | | Co-authored-by: Gustavo Sampaio <gbritosampaio@gmail.com> Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com> Co-authored-by: Tomas Nemec <nemi@skaut.cz>
* docs(api): fix treesitter parsing errorsChristian Clason2023-01-01
|