aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
Commit message (Collapse)AuthorAge
...
| * | Merge pull request #22832 from clason/bump-LuvChristian Clason2023-04-01
| |\ \ | | | | | | | | | | | | build(deps): bump luv to HEAD docs(luvref): update to version bump
| | * | docs(luvref): update to version bumpChristian Clason2023-04-01
| | | |
| * | | feat: allow function passed to defaulttable to take an argument (#22839)Gregory Anders2023-04-01
| | | | | | | | | | | | | | | | Pass the value of the key being accessed to the create function, to allow users to dynamically generate default values.
| * | | docs(treesitter): add query injectionsChristian Clason2023-04-01
| | | |
| * | | refactor(treesitter)!: rename help parser to vimdocChristian Clason2023-04-01
| | | |
| * | | fix(tests): adapt treesitter/highlight_spec priority testChristian Clason2023-04-01
| | | | | | | | | | | | | | | | | | | | Still relied on the old `@Foo`->`Foo` capture to highlight mechanism; use capture with default highlight instead.
| * | | refactor(loader): cache hash informationLewis Russell2023-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever we run fs_stat() on a path, save this information in the loader so it can be re-used. - Loader.loadfile: Remove arguments `hash` as it is no longer needed. - Loader.loader: Use _G.loadstring instead of Loader.load This allows plugins to wrap loadstring to inspection and profiling - factor out read file logic
| * | | 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.
| * | feat(diagnostic): add support for tagsLewis Russell2023-03-30
| | | | | | | | | | | | | | | | | | The LSP spec supports two tags that can be added to diagnostics: unnecessary and deprecated. Extend vim.diagnostic to be able to handle these.
| * | Merge pull request #22791 from lewis6991/refactor/loadermiscLewis Russell2023-03-30
| |\ \ | | | | | | | | refactor(loader): changes
| | * | feat(vim.fs): improve normalizeLewis Russell2023-03-26
| | |/ | | | | | | | | | | | | | | | - Add options argument with an option to expand env vars - Resolve '//' -> '/' - Use in vim.loader
| * | feat: add `vim.treesitter.language.get_filetypes()` (#22643)Lewis Russell2023-03-30
| | |
| * | 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(lua): add `vim.loader`Folke Lemaitre2023-03-26
| | | | | | feat: new faster lua loader using byte-compilation
| * 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().
| * docs: more details about vim.region (#21116)Jakub Łuczyński2023-03-25
| |
| * feat(treesitter)!: deprecate top level indexes to modules (#22761)Lewis Russell2023-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following top level Treesitter functions have been moved: - vim.treesitter.inspect_language() -> vim.treesitter.language.inspect() - vim.treesitter.get_query_files() -> vim.treesitter.query.get_files() - vim.treesitter.set_query() -> vim.treesitter.query.set() - vim.treesitter.query.set_query() -> vim.treesitter.query.set() - vim.treesitter.get_query() -> vim.treesitter.query.get() - vim.treesitter.query.get_query() -> vim.treesitter.query.get() - vim.treesitter.parse_query() -> vim.treesitter.query.parse() - vim.treesitter.query.parse_query() -> vim.treesitter.query.parse() - vim.treesitter.add_predicate() -> vim.treesitter.query.add_predicate() - vim.treesitter.add_directive() -> vim.treesitter.query.add_directive() - vim.treesitter.list_predicates() -> vim.treesitter.query.list_predicates() - vim.treesitter.list_directives() -> vim.treesitter.query.list_directives() - vim.treesitter.query.get_range() -> vim.treesitter.get_range() - vim.treesitter.query.get_node_text() -> vim.treesitter.get_node_text()
| * 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()`.
| * refactor(vim.gsplit): remove "keepsep"Justin M. Keyes2023-03-22
| | | | | | | | string.gmatch() is superior, use that instead.
| * feat(vim.gsplit): gain features of vim.splitJustin M. Keyes2023-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - vim.split has more features than vim.gsplit. - Cannot inspect the "separator" segments of vim.split or vim.gsplit. Solution: - Move common implementation from vim.split into vim.gsplit. - TODO: deprecate vim.split in favor of vim.totable(vim.gsplit())? - Introduce `keepsep` parameter. Related: 84f66909e4008a57da947f1640bfc24da5e41a72
| * Merge pull request #22743 from bfredl/luaequalsbfredl2023-03-22
| |\ | | | | | | feat(lua): allow `:=expr` as a shorter version of `:lua =expr`
| | * feat(lua): allow `:=expr` as a shorter version of `:lua =expr`bfredl2023-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing behavior of := and :[range]= are unchanged. `|` is still allowed with this usage. However, :=p and similar are changed in a way which could be construed as a breaking change. Allowing |ex-flags| for := in the first place was a mistake as any form of := DOES NOT MOVE THE CURSOR. So it would print one line number and then print a completely different line contents after that.
| * | docs: fix g:terminal_color_x terminal colors #22746Evgeni Chasnovski2023-03-21
| |/ | | | | | | | | Based on this source code: https://github.com/neovim/neovim/blob/e789d652974226ce3a763e3052a7c3d9898d875e/src/nvim/terminal.c#L271 it only respects `vim.g.terminal_color_{i}` for i from 0 to 15 inclusive.
| * feat(vim.version): more coercion with strict=falseJustin M. Keyes2023-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "tmux 3.2a" (output from "tmux -V") is not parsed easily. Solution: With `strict=false`, discard everything before the first digit. - rename Semver => Version - rename vim.version.version() => vim.version._version() - rename matches() => has() - remove `opts` from cmp()
| * 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.
| * fix(shell): on Windows :make does not echo #22728Enan Ajmain2023-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: On Windows, :make does not display the output of the program it runs. The cause is the default 'shellpipe'. On Linux, nvim uses `tee` to redirect the output to both stdout and the error file. In Windows, for both cmd.exe and powershell, the output is only redirected to the error file. Solution: - On Windows, change the 'shellpipe' default to "2>&1| tee". - Nvim includes `tee` in its Windows package. - Document recommended defaults for powershell. Fixes #12910
| * fix(treesitter): InspectTree does not respect 'splitright' #22692Yochem van Rosmalen2023-03-17
| | | | | | | | | | | | | | | | | | | | Problem: vim.treesitter.inspect_tree() and :InspectTree does not respect 'splitright'. Solution: - Change the default `command` from `topleft 60vnew` to `60vnew`. - Change :InspectTree to respect command mods (`:vertical`, count, etc.). Closes #22656
| * docs(api): link to nvim_set_hl_ns from nvim_set_hl (#22678)ii142023-03-16
| |
| * fix(lua): vim.deprecate() shows ":help deprecated" #22677Justin M. Keyes2023-03-15
| | | | | | | | | | | | | | | | | | | | | | Problem: vim.deprecate() shows ":help deprecated" for third-party plugins. ":help deprecated" only describes deprecations in Nvim, and is unrelated to any 3rd party deprecations. Solution: If `plugin` is specified, don't show ":help deprecated". fix #22235
| * 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(lsp): opt-out of default LSP "gq" #22615Zoltán Reegn2023-03-14
| | | | | | close #22611
| * docs(help): consistent headers for local additionsChristian Clason2023-03-13
| |
| * Merge pull request #22627 from nullchilly/highlight-cleanupChristian Clason2023-03-13
| |\ | | | | | | refactor!: remove deprecated functions
| | * docs: add removed features in news.txtnullchilly2023-03-12
| | |
| * | feat(options)!: deprecate paste, remove pastetoggle (#22647)ii142023-03-13
| | | | | | | | | | | | | | | we cannot remove 'paste'. It is very common in plugins and configs. 'pastetoggle' can and should be removed though, it's a total waste of everyone's time because it generates bug reports and doesn't work well, and is useless because bracketed-paste works better.
| * | refactor!: rename vim.pretty_print => vim.printJustin M. Keyes2023-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The function name `vim.pretty_print`: 1. is verbose, which partially defeats its purpose as sugar 2. does not draw from existing precedent or any sort of convention (except external projects like penlight or python?), which reduces discoverability, and degrades signaling about best practices. Solution: - Rename to `vim.print`. - Change the behavior so that 1. strings are printed without quotes 2. each arg is printed on its own line 3. tables are indented with 2 instead of 4 spaces - Example: :lua ='a', 'b', 42, {a=3} a b 42 { a = 3 } Comparison of alternatives: - `vim.print`: - pro: consistent with Lua's `print()` - pro: aligns with potential `nvim_print` API function which will replace nvim_echo, nvim_notify, etc. - con: behaves differently than Lua's `print()`, slightly misleading? - `vim.echo`: - pro: `:echo` has similar "pretty print" behavior. - con: inconsistent with Lua idioms. - `vim.p`: - pro: very short, fits with `vim.o`, etc. - con: not as discoverable as "echo" - con: less opportunity for `local p = vim.p` because of potential shadowing.
| * | feat(ui): add scroll_delta to win_viewport event #19270Matthias Deiml2023-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scroll_delta contains how much the top line of a window moved since the last time win_viewport was emitted. It is expected to be used to implement smooth scrolling. For this purpose it only counts "virtual" or "displayed" so folds should count as one line. Because of this it adds extra information that cannot be computed from the topline parameter. Fixes #19227
| * | Merge pull request #22613 from lewis6991/feat/tsqueryutilLewis Russell2023-03-11
| |\ \
| | * | refactor(treesitter): add Range type aliase for Range4|Range6Lewis Russell2023-03-11
| | | |
| | * | feat(treesitter)!: consolidate query util functionsLewis Russell2023-03-10
| | | | | | | | | | | | | | | | | | | | | | | | - And address more type errors. - Removed the `concat` option from `get_node_text` since it was applied inconsistently and made typing awkward.
| * | | docs(lsp): more precise type annotations (#22621)Jaehwang Jung2023-03-11
| | |/ | |/|
| * | vim-patch:9.0.0244: cannot easily get the list of sourced scripts (#22596)Michal Liszcz2023-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot easily get the list of sourced scripts. Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan, closes vim/vim#10957) https://github.com/vim/vim/commit/f768c3d19c518822d89dec4cc3947ddeea249316 Cherry-pick usr_41.txt change from a later runtime update. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:9.0.1397: highlight for popupmenu kind and extra cannot be set ↵zeertzjq2023-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#22619) Problem: Highlight for popupmenu kind and extra cannot be set. Solution: Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel highlight groups and use them. (Gianmaria Bajo, closes vim/vim#12114) https://github.com/vim/vim/commit/6a7c7749204b256e779c245b1e999bf852ad7b64 Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
| * | feat!(treesitter): do not return changes from LanguageTree:parse() Lewis Russell2023-03-10
| |/ | | | | | | | | | | | | | | | | Never return the changes an only notify them using the `on_changedtree` callback. It is not guaranteed for a plugin that it'll be the first one to call `tree:parse()` and thus get the changes. Closes #19915
| * docs(lsp): type annotation for lsp.client (#22509)Jaehwang Jung2023-03-09
| | | | | | | | | | | | * Also fix newly found type mismatch. * Note that it generates new warnings about using @private client methods. A proper fix would be to revamp the lsp client documentation altogether.
| * refactor(treesitter): use byte ranges from treesitter (#22589)Lewis Russell2023-03-09
| |
| * feat(lsp): overwrite omnifunc/tagfunc set by ftplugin #22267Michal Liszcz2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some built-in ftplugins set omnifunc/tagfunc/formatexpr which causes lsp.lua:set_defaults() to skip setup of defaults for those filetypes. For example the C++ ftplugin has: omnifunc=ccomplete#Complete Last set from /usr/share/nvim/runtime/ftplugin/c.vim line 30 so the changes done in #95c65a6b221fe6e1cf91e8322e7d7571dc511a71 will always be skipped for C++ files. Solution: Overwrite omnifunc/tagfunc/formatexpr options that were set by stock ftplugin. Fixes #21001
| * feat: try to recover from missing tempdir #22573Justin M. Keyes2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If vim_tempdir mysteriously goes missing (typically by "antivirus" on Windows), any plugins using tempname() will be broken for the rest of the session. #1432 #9833 https://groups.google.com/g/vim_use/c/ef55jNm5czI Steps: mkdir foo TMPDIR=./foo nvim :echo tempname() !rm -r foo :echo tempname() tempname() still uses the foo path even though it was deleted. Solution: - Don't assume that vim_tempdir exists. - If it goes missing once, retry vim_mktempdir and log (silently) an error. - If it goes missing again, retry vim_mktempdir and show an error. Rejected in Vim for performance reasons: https://groups.google.com/g/vim_use/c/qgRob9SWDv8/m/FAOFVVcDTv0J https://groups.google.com/g/vim_dev/c/cogp-Vye4oo/m/d_SVFXBbnnoJ But, logging shows that `vim_gettempdir` is not called frequently. Fixes #1432 Fixes #9833 Fixes #11250 Related: stdpath("run") f50135a32e11c535e1dc3a8e9460c5b4e640ee86
| * docs: add missing highlight groups for floatsEvgeni Chasnovski2023-03-09
| |