aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
Commit message (Collapse)AuthorAge
...
| * | vim-patch:9.0.1686: undotree() only works for the current buffer (#24665)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: undotree() only works for the current buffer Solution: Add an optional "buffer number" parameter to undotree(). If omitted, use the current buffer for backwards compatibility. closes: vim/vim#4001 closes: vim/vim#12292 https://github.com/vim/vim/commit/5fee11114975b7405b7ccd3ee8758e54bf559760 Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
| * | feat(treesitter): add injection language fallback (#24659)Christian Clason2023-08-11
| |/ | | | | | | | | | | | | | | | | | | | | | | * feat(treesitter): add injection language fallback Problem: injection languages are often specified via aliases (e.g., filetype or in upper case), requiring custom directives. Solution: include lookup logic (try as parser name, then filetype, then lowercase) in LanguageTree itself and remove `#inject-language` directive. Co-authored-by: Lewis Russell <me@lewisr.dev>
| * vim-patch:9.0.1683: Updated runtime files (#24638)zeertzjq2023-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: vim/vim#12612 closes: vim/vim#12729 closes: vim/vim#12702 closes: vim/vim#12688 closes: vim/vim#12668 closes: vim/vim#12631 closes: vim/vim#12573 Already ported but wasn't marked: vim-patch:ad34abee2583 https://github.com/vim/vim/commit/6efb1980336ff324e9c57a4e282530b952fca816 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
| * vim-patch:81b8bf5b4a33zeertzjq2023-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the vimscript code for restoring cursor position Using xxd(1) to filter and edit binary files causes the input files to have dual nature, so to speak, which effectively makes restoring the cursor position broken. Fix that by ignoring the "xxd" file type in the code that restores the cursor position. Interactive rebasing in git causes files to be edited in vim, which, similarly to commit messages, are rarely the same as the last one edited. Thus, also add "gitrebase" to the list of file types for which the cursor position isn't restored. While there, refactor the code a bit to possibly save a few CPU cycles and to keep the line lengths in check, and use the long form of the commands and variables, to make the code slightly more consistent and more understandable to newcomers. Update the relevant comments in the code and the associated parts of the documentation, to keep them in sync with the updated code. Remove some redundant trailing whitespace as well, as spotted. https://github.com/vim/vim/commit/81b8bf5b4a33552c610dc2ea743ac2698a16aef7 Co-authored-by: Dragan Simic' via vim_dev <vim_dev@googlegroups.com>
| * vim-patch:6a500661a9cbzeertzjq2023-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the vimscript code in ":h hex-editing" Save and restore the view position before and after saving the buffer, respectively, to keep the current view of the xxd(1)'s hex dump unchanged after doing ":w", which previously caused the window to scroll back to the very beginning of the buffer. I believe it's needless to say how annoying and counterproductive that was. Get rid of the "Press ENTER or type command to continue" message, which was previously displayed after opening larger binary files. The use of "silent" and "redraw" commands is tailored specifically to avoid screen flickering, e.g. when doing ":w", which is caused by the buffer being filtered by an external command. Increase the number of octets per line, produced by xxd(1), from the default value of 16 to 32. This puts bigger chunks of the hex dump on the screen and makes the whole thing much more usable. While there, reformat the code to make it more readable, and use the long form of the commands and variables to make the code slightly more consistent and more understandable to newcomers. https://github.com/vim/vim/commit/6a500661a9cb7b57093cf1095aa67e9c4aabc709 Co-authored-by: Dragan Simic' via vim_dev <vim_dev@googlegroups.com>
| * feat(defaults): treat "•" as a list item prefix #24623Justin M. Keyes2023-08-09
| | | | | | | | | | | | | | | | Problem: Nvim docs use "•" as a list item prefix but `gw{motion}` doesn't format such lists by default. Solution: Change the 'comments' option to include "fb:•" by default.
| * fix(iter): make pipeline termination conditions consistent (#24614)Gregory Anders2023-08-09
| | | | | | | | | | | | | | | | If an iterator pipeline stage returns nil as its first return value, the other return values are ignored and it is treated as if that stage returned only nil (the semantics of returning nil are different between different stages). This is consistent with how for loops work in Lua more generally, where the for loop breaks when the first return value from the function iterator is nil (see :h for-in for details).
| * vim-patch:0401933a5be3Christian Clason2023-08-09
| | | | | | | | | | | | | | | | | | | | Fix alignment in filetype.txt (vim/vim#12618) There are three spaces because the "<" is concealed. https://github.com/vim/vim/commit/0401933a5be3b72e12427cdaf8b7ff2694690d02 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:c2bd205254c8Christian Clason2023-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | Change "the" to "then" under ':help bufload()' (vim/vim#12662) https://github.com/vim/vim/commit/c2bd205254c89ecf46e08965f53d7991315d9c98 N/A commits: vim-patch:64dea84bb05a (we have our own manpager at home) vim-patch:958e15bb1c7d (we have our own editorconfig syntax file) vim-patch:c41b3c9f95ac (we don't have defaults.vim) Co-authored-by: Daniel Steinberg <dstein64@users.noreply.github.com>
| * fix(lua): improve annotations for stricter luals diagnostics (#24609)Christian Clason2023-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: luals returns stricter diagnostics with bundled luarc.json Solution: Improve some function and type annotations: * use recognized uv.* types * disable diagnostic for global `vim` in shared.lua * docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type) * add type alias for lpeg pattern * fix return annotation for `vim.secure.trust` * rename local Range object in vim.version (shadows `Range` in vim.treesitter) * fix some "missing fields" warnings * add missing required fields for test functions in eval.lua * rename lsp meta files for consistency
| * docs(builtin): fix some missing lines (#24615)Sean Dewar2023-08-08
| | | | | | | | | | | | These two functions seem to have previously had their docs start on the same line as the signature, which I guess contributed to the lines being lost (though I checked all other such functions from before again and these were the only two).
| * fix(filetype): add typing and dry (#24573)Lewis Russell2023-08-08
| |
| * docs: Bram farewell #24589Computer23402023-08-08
| | | | | | ref #24579
| * fix(lua): vim.fs typing (#24608)Lewis Russell2023-08-08
| |
| * docs(lsp): fix references to protocol.constants #24578Maria José Solano2023-08-07
| |
| * Merge pull request #24524 from bfredl/typed_keysbfredl2023-08-07
| |\ | | | | | | refactor(api): use typed keysets
| | * feat(lua): specific error messages for type checking `opts` paramsbfredl2023-08-07
| | |
| * | docs(options): fix mistakes (#24568)zeertzjq2023-08-05
| | |
| * | docs(options): take ownership of options.txt (#24528)Lewis Russell2023-08-04
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * docs(options): take ownership of options.txt - `src/nvim/options.lua` is now the source of truth - generate runtime/lua/vim/_meta/options.lua * fixup! zeer comments * fixup! zeer comments (2) * fixup! re-enable luacheck * fixup! regen
| * fix(lsp): do not assume client capability exists in watchfiles check (#24550)Sean Dewar2023-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #23689 assumes `client.config.capabilities.workspace.didChangeWatchedFiles` exists when checking `dynamicRegistration`, but thats's true only if it was passed to `vim.lsp.start{_client}`. This caused #23806 (still an issue in v0.9.1; needs manual backport), but #23681 fixed it by defaulting `config.capabilities` to `make_client_capabilities` if not passed to `vim.lsp.start{_client}`. However, the bug resurfaces on HEAD if you provide a non-nil `capabilities` to `vim.lsp.start{_client}` with missing fields (e.g: not made via `make_client_capabilities`). From what I see, the spec says such missing fields should be interpreted as an absence of the capability (including those indicated by missing sub-fields): https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientCapabilities Also, suggest `vim.empty_dict()` for an empty dict in `:h vim.lsp.start_client()` (`{[vim.type_idx]=vim.types.dictionary}` no longer works anyway, probably since the cjson switch).
| * docs: luaref cleanup #24541Justin M. Keyes2023-08-03
| | | | | | | | - drop "luaref-" prefix in favor of "lua-" or nothing, where possible. - remove redundant "luaref--lang…" and "luaref-api…" tags.
| * docs: remove "#" comment char in @returnJustin M. Keyes2023-08-03
| | | | | | | | | | | | | | Everything after a "#" char is a "description" comment, i.e. luals won't treat it as a type, name, etc. But "#" should not be present in the generated docs (such as :help docs). https://github.com/LuaLS/lua-language-server/wiki/Annotations#return
| * docs: miscJustin M. Keyes2023-08-03
| | | | | | | | Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
| * docs(builtin): fix alignment of comments in code blocks (#24529)zeertzjq2023-08-02
| |
| * docs: drop "Can also be used as a method" #24508Justin M. Keyes2023-08-01
| | | | | | | | | | | | | | | | Now that we "own" builtin.txt, we cant remove the repetitive mention of Vimscript's UFCS syntax. It's noisy to mention this for each function, and it's also not a Vimscript feature that should be encouraged. Also change the builtin.txt heading to "NVIM REFERENCE MANUAL", which indicates when a help file is Nvim-owned.
| * fix(loader): cache path ambiguity #24491Tyler Miller2023-08-01
| | | | | | | | | | | | | | | | | | | | | | Problem: cache paths are derived by replacing each reserved/filesystem- path-sensitive char with a `%` char in the original path. With this method, two different files at two different paths (each containing `%` chars) can erroneously resolve to the very same cache path in certain edge-cases. Solution: derive cache paths by url-encoding the original (path) instead using `vim.uri_encode()` with `"rfc2396"`. Increment `Loader.VERSION` to denote this change.
| * Merge #24504 feat(lsp): protocol.MethodsJustin M. Keyes2023-08-01
| |\
| | * feat(gen_lsp.lua): sort by name, handle failure #24504Justin M. Keyes2023-08-01
| | |
| | * feat(gen_lsp.lua): protocol.Methods #24504mathew2023-08-01
| | |
| * | feat(lua-types): types for vim.api.* (#24523)Lewis Russell2023-08-01
| |/
| * docs(builtin): right align tags (#24522)Lewis Russell2023-08-01
| |
| * docs(builtin): fix and annotate language blocks (#24506)Lewis Russell2023-08-01
| |
| * docs(lua): vim.str_utf_{start,end,pos} #24424altermo2023-07-29
| | | | | | Closes #24422
| * feat(docs): generate builtin.txt (#24493)Lewis Russell2023-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - eval.lua is now the source of truth. - Formatting is much more consistent. - Fixed Lua type generation for polymorphic functions (get(), etc). - Removed "Overview" section from builtin.txt - Can generate this if we really want it. - Moved functions from sign.txt and testing.txt into builtin.txt. - Removed the *timer* *timers* tags since libuv timers via vim.uv should be preferred. - Removed the temp-file-name tag from tempname() - Moved lueval() from lua.txt to builtin.txt. * Fix indent * fixup! * fixup! fixup! * fixup! better tag formatting * fixup: revert changes no longer needed * fixup! CI --------- Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * feat(api): allow win_hide to close cmdwin or non-previous windowsSean Dewar2023-07-26
| | | | | | | | | | | | | | This aligns its behaviour better with `nvim_win_close`. Note that `:hide` is actually incapable of closing the cmdwin, unlike `:close` and `:quit`, so this is a bit of a difference in behaviour.
| * feat(api): allow open_win/win_set_buf in the cmdwin in some casesSean Dewar2023-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: As discussed on Matrix, there was some interest in having `nvim_open_win` again be able to open floats in the cmdwin (e.g: displaying a hover doc related to what's in the cmdwin). After #23228, this was disallowed. Solution: Allow `nvim_open_win` in the cmdwin as long as `!enter` and `buffer != curbuf` (the former can cause all sorts of issues, and the latter can crash Nvim after closing cmdwin). Also allow `nvim_win_set_buf` in a similar fashion. Note that we're not *entirely* sure if this is 100% safe (cmdwin is a global-state-using-main-loop-calling beast), but this seems to work OK..? Also: - Check the buffer argument of `nvim_open_win` earlier, and abort if it's invalid (it used to still open a window in this case). - Untranslate `e_cmdwin` errors in the API (other errors in the API are not translated: although not detailed in the API contract yet, errors are supposed to be stable).
| * vim-patch:9.0.1335: no test for bad use of spaces in help files (#24483)zeertzjq2023-07-25
| | | | | | | | | | | | | | | | | | | | | | | | Problem: No test for bad use of spaces in help files. Solution: Add checks for use of spaces in help files. Ignore intentional spaces. (Hirohito Higashi, closes vim/vim#11952) https://github.com/vim/vim/commit/d950984489e50b12d87c85f0cce1d672c880aa23 Cherry-pick changes from patch 9.0.1604. Co-authored-by: h-east <h.east.727@gmail.com> Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * docs: remove trailing spaces #24455ii142023-07-25
| |
| * docs(vim_diff): fixed inconsistent autocmds behavior #24453ii142023-07-24
| |
| * docs(lua): add missing word in docs for vim.empty_dict (#24401)Gnik2023-07-22
| |
| * docs(lsp): clean up LSP event documentation #24413Chris AtLee2023-07-21
| | | | | | Alphabetize LSP events, and make formatting consistent.
| * docs: also change "vimL" and "viml" to "Vimscript" (#24414)zeertzjq2023-07-21
| |
| * feat(lsp): implement textDocument/diagnostic (#24128)Chris AtLee2023-07-20
| |
| * docs(lua): clarify fs.find() documentation #24394futsuuu2023-07-19
| |
| * docs(lua): more improvements (#24387)Lewis Russell2023-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * refactor(lua2dox): overhaul (#24386)Lewis Russell2023-07-18
| |
| * Merge pull request #24363 from lewis6991/docs/luatypesLewis Russell2023-07-17
| |\ | | | | | | docs(lua): move some function docs to lua files
| | * fix: doc errorsLewis Russell2023-07-17
| | |
| | * docs(lua): change *lua-foo* -> *vim.foo*Lewis Russell2023-07-17
| | |
| | * docs(lua): move function docs to lua filesLewis Russell2023-07-17
| | |