aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
| | * refactor(api): use hl id directly in nvim_buf_set_extmarkglepnir2024-01-20
| | |
| * | fix(eval): properly support checking v:lua function in exists() (#27124)Raphael2024-01-22
| | |
| * | feat(vim.version): add `vim.version.le` and `vim.version.ge`Jongwook Choi2024-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Problem: One cannot easily write something like, for example: `version_current >= {0, 10, 0}`; writing like `not vim.version.lt(version_current, {0, 10, 0})` is verbose. - Solution: add {`le`,`ge`} in addition to {`lt`,`gt`}. - Also improve typing on the operator methods: allow `string` as well. - Update the example in `vim.version.range()` docs: `ge` in place of `gt` better matches the semantics of `range:has`.
| * | vim-patch:27a4632af675Christian Clason2024-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(filetype): detect *.ck files as Chuck filetype (vim/vim#13888) closes vim/vim#13886 https://github.com/vim/vim/commit/27a4632af675345f9d3b4f3d66a63756835df8cc Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | fix(lsp): clean up duplicate and unused meta type annotationsJongwook Choi2024-01-20
| | |
| * | fix(vim.deprecate): show deprecation warning in devel versions as wellJongwook Choi2024-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: On devel(nightly) versions, deprecation warnings for hard-deprecated features are not being displayed. E.g., - to be removed in: 0.11 - hard-deprecation since 0.10 - soft-deprecation since 0.9 then 0.10-nightly (0.10.0-dev) versions as well as 0.10.0 (stable) should display the deprecation warning message. Solution: Improve the code and logic on `vim.deprecate()`, and improve test cases with mocked `vim.version()`.
| * | refactor(lua): refactored globaltermo2024-01-19
| | |
| * | Merge pull request #27061 from luukvbaal/extmarkbfredl2024-01-19
| |\ \ | | |/ | |/| fix(extmarks): do not remove invalid marks from decor upon deletion
| | * docs(extmarks): add undocumented "details" array fieldsLuuk van Baal2024-01-18
| | |
| * | fix(treesitter): validate language alias for injectionsChristian Clason2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Parsed language annotations can be random garbage so `nvim_get_runtime_file` throws an error. Solution: Validate that `alias` is a valid language name before trying to find a parser for it.
| * | docs(vim.iter): correct `bool` to `boolean` (#27018)notomo2024-01-18
| | |
| * | docs: various #25289Justin M. Keyes2024-01-18
| | | | | | | | | | | | | | | | | | Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com> Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
| * | vim-patch:9.1.0039: too vague errors for 'listchars'/'fillchars' (#27070)zeertzjq2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too vague errors for 'listchars'/'fillchars' Solution: Include the field name in error message. (zeertzjq) related: #27050 closes: vim/vim#13877 https://github.com/vim/vim/commit/6a8d2e1634f8f0d7463a2786dbcbe0f38dd287a7 Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
| * | fix(lua): return after assert returns assert message (#27064)altermo2024-01-17
| | |
| * | feat: add __call typing for vim.inspect()Lewis Russell2024-01-17
| |/
| * docs: various fixes (#26929)dundargoc2024-01-17
| | | | | | | | Co-authored-by: Patrick Bollinger <owner@pjbollinger.com> Co-authored-by: vilo1839 <139687192+vilo1839@users.noreply.github.com>
| * refactor(lsp): deprecate `vim.lsp.util.lookup_section`Jongwook Choi2024-01-16
| | | | | | | | | | | | | | | | This function is used only in the `workspace/configuration` handler, and does not warrant a public API because of its confusing return types. The only caller `vim.lsp.handlers["workspace.configuration"]` is also refactored to use `vim.tbl_get()` instead.
| * vim-patch:9.1.0013: Modula2 filetype support lacking (#27020)Sean Dewar2024-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Modula2 filetype support lacking Solution: Improve the Modula-2 runtime support, add additional modula2 dialects, add compiler plugin, update syntax highlighting, include syntax tests, update Makefiles (Doug Kearns) closes: vim/vim#6796 closes: vim/vim#8115 https://github.com/vim/vim/commit/68a89470693c7687d4e736ca056c05de632e3ac7 - Luaify the detection script: - Split the `(*!m2foo*)` and `(*!m2foo+bar*)` detection into two Lua patterns, as Lua capture groups cannot be used with `?` and friends (as they only work on character classes). - Use `vim.api.nvim_buf_call()` (ew) to call `modula2#SetDialect()` to ensure `b:modula2` is set for the given bufnr. - Skip the syntax screendump tests. (A shame as they test some of the detection from `(*!m2foo+bar*)` tags, but I tested this locally and it seems to work) - Port the synmenu.vim changes from Vim9 script. (Also tested this locally) - (And also add the missing comma for `b:browsefilter` from earlier.) Co-authored-by: Doug Kearns <dougkearns@gmail.com>
| * docs(column): 'statuscolumn' redraw interaction with 'relativenumber'Luuk van Baal2024-01-16
| |
| * fix(diagnostic): typingLewis Russell2024-01-16
| |
| * docs(builtin): remove signatures of undocumented functions (#27039)zeertzjq2024-01-16
| | | | | | | | | | | | Having an empty signature causes an empty line in generated docs, so remove it. Also change ">" to ">vim" in foreach() docs.
| * vim-patch:partial:9.1.0027: Vim is missing a foreach() func (#27037)zeertzjq2024-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim is missing a foreach() func Solution: Implement foreach({expr1}, {expr2}) function, which applies {expr2} for each item in {expr1} without changing it (Ernie Rael) closes: vim/vim#12166 https://github.com/vim/vim/commit/e79e2077607e8f829ba823308c91104a795736ba Partial port as this doesn't handle non-materialized range() lists. vim-patch:c92b8bed1fa6 runtime(help): delete duplicate help tag E741 (vim/vim#13861) https://github.com/vim/vim/commit/c92b8bed1fa632569c8358feb3b72dd6a0844ef7 Co-authored-by: Ernie Rael <errael@raelity.com>
| * vim-patch:9.1.0009: Cannot easily get the list of matches (#27028)zeertzjq2024-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot easily get the list of matches Solution: Add the matchstrlist() and matchbufline() Vim script functions (Yegappan Lakshmanan) closes: vim/vim#13766 Omit CHECK_LIST_MATERIALIZE(): it populates a List with numbers only, and there is a check for strings below. https://github.com/vim/vim/commit/f93b1c881a99fa847a1bafa71877d7e16f18e6ef vim-patch:eb3475df0d92 runtime(doc): Replace non-breaking space with normal space (vim/vim#13868) https://github.com/vim/vim/commit/eb3475df0d927a178789cf8e7fc4983932e1cdbe Co-authored-by: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
| * feat(terminal): respond to OSC background and foreground request (#17197)Daniel Steinberg2024-01-15
| | | | | | | | | | | | | | | | | | | | | | | | The motivation for this update is Issue #15365, where background=light is not properly set for Nvim running from an Nvim :terminal. This can be encountered when e.g., opening a terminal to make git commits, which opens EDITOR=nvim in the nested terminal. Under the implementation of this commit, the OSC response always indicates a black or white foreground/background. While this may not reflect the actual foreground/background color, it permits 'background' to be retained for a nested Nvim instance running in the terminal emulator. The behaviour matches Vim.
| * docs(vvars): fix wrong lua types in vim.v variablesJongwook Choi2024-01-15
| | | | | | | | | | | | | | | | - cmdarg: string[] -> string - shell_error: string -> int - stderr: string -> int - Add types for: cmdbang, errors, exception, false, true
| * docs: add lua typing for `vim.NIL`Jongwook Choi2024-01-15
| |
| * docs(builtin): overload functions with union return typesaltermo2024-01-14
| |
| * docs: auto-generate docs for `vim.lpeg` and `vim.re`Jongwook Choi2024-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add section `VIM.LPEG` and `VIM.RE` to docs/lua.txt. - Add `_meta/re.lua` which adds luadoc and type annotations, for the vendored `vim.re` package. - Fix minor style issues on `_meta/lpeg.lua` luadoc for better vimdocs generation. - Fix a bug on `gen_vimdoc` where non-helptags in verbatim code blocks were parsed as helptags, affecting code examples on `vim.lpeg.Cf`, etc. - Also move the `vim.regex` section below so that it can be located closer to `vim.lpeg` and `vim.re`.
| * fix(lsp): fix incorrect typing and doc for `vim.lsp.rpc`Jongwook Choi2024-01-14
| | | | | | | | | | | | | | | | | | | | | | | | Typings introduced in #26032 and #26552 have a few conflicts, so we merge and clean them up. We also fix some incorrect type annotation in the `vim.lsp.rpc` package. See the associated PR for more details. Summary: - vim.rpc.Dispatchers -> vim.lsp.rpc.Dispatchers - vim.lsp.rpc.Error -> lsp.ResponseError - Revise docs
| * docs(builtin): fix mapset() signature (#27008)zeertzjq2024-01-14
| |
| * fix(doc): improve doc generation of types using lpegLewis Russell2024-01-11
| | | | | | | | Added a lpeg grammar for LuaCATS and use it in lua2dox.lua
| * feat(vim.iter): add Iter:flatten (#26786)JD2024-01-10
| | | | | | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
| * feat(terminal): trigger TermRequest autocommand events (#22159)Ghjuvan Lacambre2024-01-09
| | | | | | | | | | | | | | | | | | | | This commit implements a new TermRequest autocommand event and has Neovim emit this event when children of terminal buffers emit an OSC or DCS sequence libvterm does not handle. The TermRequest autocommand event has additional data in the v:termrequest variable. Co-authored-by: Gregory Anders <greg@gpanders.com>
| * fix(docs): make lines not overflow in vim docsJongwook Choi2024-01-09
| | | | | | | | | | | | | | | | | | Problem: Some lines in the generated vim doc are overflowing, not correctly wrapped at 78 characters. This happens when docs body contains several consecutive 'inline' elements generated by doxygen. Solution: Take into account the current column offset of the last line, and prepend some padding before doc_wrap().
| * docs(treesitter): improve 'no parser' error message for InspectTreeJongwook Choi2024-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Improve error messages for `:InspectTree`, when no parsers are available for the current buffer and filetype. We can show more informative and helpful error message for users (e.g., which lang was searched for): ``` ... No parser available for the given buffer: +... no parser for 'custom_ft' language, see :help treesitter-parsers ``` Also improve the relevant docs for *treesitter-parsers*.
| * fix(defaults): use augroup for default autocommands (#26933)Gregory Anders2024-01-06
| |
| * vim-patch:9.1.0010: Keymap completion is not available (#26888)zeertzjq2024-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Keymap completion is not available Solution: Add keymap completion (Doug Kearns) Add keymap completion to the 'keymap' option, user commands and builtin completion functions. closes: vim/vim#13692 https://github.com/vim/vim/commit/81642d9d6ff5cd6a90a012b1b98632ce51eeb1a8 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
| * Merge pull request #26791 from wookayin/gendocLewis Russell2024-01-04
| |\ | | | | | | refactor(gen_vimdoc): general refactoring on vimdoc generation
| | * refactor(gen_vimdoc): generate function doc from metadata, not from xmlJongwook Choi2024-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: For function definitions to be included in the vimdoc (formatted) and to be exported as mpack data (unformatted), we had two internal representations of the same function/API metadata in duplicate; one is FunctionDoc (which was previously a dict), and the other is doxygen XML DOM from which vimdoc (functions sections) was generated. Solution: We should have a single path and unified data representation (i.e. FunctionDoc) that contains all the metadata and information about function APIs, from which both of mpack export and vimdoc are generated. I.e., vimdocs are no longer generated directly from doxygen XML nodes, but generated via: (XML DOM Nodes) ------------> FunctionDoc ------> mpack (unformatted) Recursive Internal | Formatting Metadata +---> vimdoc (formatted) This refactoring eliminates the hacky and ugly use of `fmt_vimhelp` in `fmt_node_as_vimhelp()` and all other helper functions! This way, `fmt_node_as_vimhelp()` can simplified as it no longer needs to handle generating of function docs, which needs to be done only in the topmost level of recursion.
| | * fix(docs): clean up non-docstring comments for vimdoc genJongwook Choi2024-01-02
| | | | | | | | | | | | | | | These non-docstring comments can be included into doxygen's brief description and then appear in the succeeding function documentation.
| * | refactor(column): define and use maximum 'statuscolumn' widthLuuk van Baal2024-01-04
| | | | | | | | | | | | | | | Problem: The maximum 'statuscolumn' width and grow behavior is undocumented. Solution: Define, use and document the maximum 'statuscolumn' width and grow behavior.
| * | fix(decorations): validate botline for on_winJaehwang Jung2024-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Many decoration providers (treesitter injection highlighting, semantic token highlighting, inlay hint) rely on the correctness of the `botline` argument of `on_win` callback. However, `botline` can be smaller than the actual line number of the last displayed line if some lines are folded. In such cases, some decorations will be missing in the lines not covered by `botline`. Solution: Validate `botline` when invoking `on_win`. NOTE: It seems that the old code was deliberately avoiding this presumably due to performance reasons. However, I haven't experienced noticeable lag after this change, and I believe the cost of botline computation would be much smaller than the cost of decoration providers.
| * | feat(lua): add noref to deepcopyLewis Russell2024-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently `deepcopy` hashes every single tables it copies so it can be reused. For tables of mostly unique items that are non recursive, this hashing is unnecessarily expensive Solution: Port the `noref` argument from Vimscripts `deepcopy()`. The below benchmark demonstrates the results for two extreme cases of tables of different sizes. One table that uses the same table lots of times and one with all unique tables. | test | `noref=false` (ms) | `noref=true` (ms) | | -------------------- | ------------------ | ----------------- | | unique tables (50) | 6.59 | 2.62 | | shared tables (50) | 3.24 | 6.40 | | unique tables (2000) | 23381.48 | 2884.53 | | shared tables (2000) | 3505.54 | 14038.80 | The results are basically the inverse of each other where `noref` is much more performance on tables with unique fields, and `not noref` is more performant on tables that reuse fields.
| * | docs(lsp): add supports_method to vim.lsp.client docs (#26852)Mathias Fußenegger2024-01-02
| |/
| * docs(glob): add glob module (#26853)Mathias Fußenegger2024-01-02
| |
| * vim-patch:10b4f75d4c03 (#26846)zeertzjq2024-01-02
| | | | | | | | | | | | | | | | | | | | | | runtime(dist/ft): improve filetype detection for *.v (V/Verilog/Coq) Patch provided by Dan Alt closes: vim/vim#13793 https://github.com/vim/vim/commit/10b4f75d4c03c1cd4f579be5fdc812ba41b72fef Co-authored-by: Christian Brabandt <cb@256bit.org>
| * refactor(lsp): fix remaining luals warnings in lsp.rpcMathias Fussenegger2024-01-02
| |
| * feat(lsp): support connect via named pipes/unix domain sockets (#26032)TheLeoP2024-01-02
| | | | | | | | | | Closes https://github.com/neovim/neovim/issues/26031 Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
| * feature(diagnostic): add `vim.diagnostic.count()` (#26807)Evgeni Chasnovski2024-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | feat(diagnostic): add `vim.diagnostic.count()` Problem: Getting diagnostic count based on the output of `vim.diagnostic.get()` might become costly as number of diagnostic entries grows. This is because it returns a copy of diagnostic cache entries (so as to not allow users to change them in place). Getting information about diagnostic count is frequently used in statusline, so it is important to be as fast as reasonbly possible. Solution: Add `vim.diagnostic.count()` which computes severity counts without making copies.
| * refactor(health): refactor provider healthchecksGregory Anders2024-01-01
| | | | | | | | | | | | * Prefer pure Lua functions over vim.fn * Split up provider healthchecks into separate modules to help manage complexity