aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* refactor(lsp): add type annotation for lsp.Client.server_capabilities (#24925)Jongwook Choi2023-08-31
| | | | | | | | | | | | | | The class `lsp.Client` has a public member `server_capabilities`, which is assumed to be non-nil once initialized, as documented in `:help vim.lsp.client`. Due to the possibility that it may be nil before initialization, `lsp.Client` was not having a proper lua type annotations on the field `server_capabilities`. Instead of having a nil `server_capabilities` until initialized in the RPC response callback, we can have an initial value of empty table. This CHANGES the behavior of the `server_capabilities` field in a way that it is no longer `nil` until initialization. Note that, as already documented, `server_capabilities` should never be nil when it is once initialized and thus ready to be used in user configs.
* fix(lsp): only disable inlay hints / diagnostics if no other clients are ↵Chris AtLee2023-08-31
| | | | | | | | | | | | | | | | | | | connected (#24535) This fixes the issue where the LspNotify handlers for inlay_hint / diagnostics would end up refreshing all attached clients. The handler would call util._refresh, which called vim.lsp.buf_request, which calls the method on all attached clients. Now util._refresh takes an optional client_id parameter, which is used to specify a specific client to update. This commit also fixes util._refresh's handling of the `only_visible` flag. Previously if `only_visible` was false, two requests would be made to the server: one for the visible region, and one for the entire file. Co-authored-by: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
* vim-patch:9.0.1820: Rexx files may not be recognised (#24956)zeertzjq2023-08-31
| | | | | | | | | | | Problem: Rexx files may not be recognised Solution: Add shebang detection and improve disambiguation of *.cls files closes: vim/vim#12951 https://github.com/vim/vim/commit/e06afb7860805537ccd69966bc03169852c9b378 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1797: Vimball/Visual Basic filetype detection conflict (#24947)zeertzjq2023-08-31
| | | | | | | | | | | | | Problem: Vimball/Visual Basic filetype detection conflict Solution: runtime(vb): Improve Vimball and Visual Basic detection logic Only run Vimball Archiver's BufEnter autocommand on Vimball archives. Fixes vim/vim#2694. closes: vim/vim#12899 https://github.com/vim/vim/commit/f97f6bbf56408c0c97b4ddbe81fba858d7455b0d Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1807: runtime: crystal scripts not recognised (#24949)zeertzjq2023-08-31
| | | | | | | | | | Problem: runtime: crystal scripts not recognised Solution: Filetype detect Crystal scripts by shebang line closes: vim/vim#12935 https://github.com/vim/vim/commit/9b73902dbe6f7940326bcd8dbc89d010d85d69c5 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.1803: runtime(filetype): Add norg language detection (#24948)zeertzjq2023-08-31
| | | | | | | | | runtime(filetype): Add norg markup language detection closes: vim/vim#12913 https://github.com/vim/vim/commit/03e44a1d70e914504e6151fe88ad1e574cbf0a59 Co-authored-by: NTBBloodbath <bloodbathalchemist@protonmail.com>
* fix(builtin): fix incorrect optional fields for fn.sign_defineJongwook Choi2023-08-30
| | | | The field `icon` is not a mandatory field.
* fix(treesitter): update folds only once on InsertLeaveJaehwang Jung2023-08-29
| | | | | | | | | | Problem: With treesitter fold, InsertLeave can be slow, because a single session of insert mode may schedule multiple fold updates in on_bytes and on_changedtree. Solution: Don't create duplicate autocmds.
* feat(builtin): improve typesLewis Russell2023-08-27
|
* fix(types): add some return/parameter type annotations (#24867)Maria José Solano2023-08-27
| | | | | * fix(types): add some return/parameter type annotations * fix(types): narrow stdpath parameter further
* fix(treesitter): validate window before updating preview highlightsMaria José Solano2023-08-27
|
* feat(highlight): add `FloatFooter` highlight groupEvgeni Chasnovski2023-08-26
| | | | | | Problem: No clear separation of floating title and footer highlighting. Solution: Add new `FloatFooter` highlight group.
* feat(float): implement footerEvgeni Chasnovski2023-08-26
| | | | | | | | Problem: Now way to show text at the bottom part of floating window border (a.k.a. "footer"). Solution: Allows `footer` and `footer_pos` config fields similar to `title` and `title_pos`.
* docs(msgpack_rpc): add "msgpack-rpc" client typeAlisue2023-08-26
|
* docs: various clarifications (#24876)zeertzjq2023-08-26
|
* feat(treesitter): add a query editor (#24703)Maria José Solano2023-08-25
|
* fix(filetype): return on_detect function when matching by file contentsGregory Anders2023-08-24
|
* fix(filetype): call on_detect before setting buffer filetypeGregory Anders2023-08-24
| | | | | | | | | | | | The on_detect functions returned by filetype.lua set buffer local variables which are often used by filetype plugins. For example, the on_detect function for shell buffers sets variables such as b:is_bash or b:is_sh, which are used by the sh ftplugin. When called after setting the buffer's filetype, these variables cannot be used by the ftplugin (because they are not yet defined). Instead, call on_detect before setting the buffer filetype so that any buffer variables set by on_detect can be used in the ftplugin.
* docs(builtin): small fixes (#24861)Sean Dewar2023-08-24
| | | | Also make gen_eval_files.lua render vimdoc helpExamples properly if the line begins with the `>` marker.
* feat(treesitter): add 'injection.self' and 'injection.parent'Amaan Qureshi2023-08-24
| | | | Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
* vim-patch:9.0.1773: cannot distinguish Forth and Fortran *.f files (#24841)zeertzjq2023-08-23
| | | | | | | | | | | | | | | | Problem: cannot distinguish Forth and Fortran *.f files Solution: Add Filetype detection Code Also add *.4th as a Forth filetype closes: vim/vim#12251 https://github.com/vim/vim/commit/19a3bc3addf9b4aa8150a01b11b4249c67d15d3b Don't remove filetype files from Vim patches: - filetype.vim, script.vim, ft.vim usually contain useful changes - script.vim and ft.vim don't even have their paths spelled correctly Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* fix(types): add more annotations to eval.luaLewis Russell2023-08-23
|
* vim-patch:9.0.0837: append() reports failure when not appending anythingzeertzjq2023-08-22
| | | | | | | | | Problem: append() reports failure when not appending anything. Solution: Only report failure when appending something. (closes vim/vim#11498) https://github.com/vim/vim/commit/cd9c8d400c1eb9cbb4ff6a33be02f91a30ab13b2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:e46a44050562zeertzjq2023-08-21
| | | | | | | | Runtime file updates https://github.com/vim/vim/commit/e46a4405056276b4cbdacee76b11f85c8ea1830b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:589edb340454zeertzjq2023-08-21
| | | | | | | | Updte runtime files https://github.com/vim/vim/commit/589edb340454e7f1b19358f129287a636d53d0e1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2053: SafeStateAgain not triggered if callback uses feedkeys()zeertzjq2023-08-21
| | | | | | | | | | | | Problem: SafeStateAgain not triggered if callback uses feedkeys(). Solution: Check for safe state in the input loop. Make log messages easier to find. Add 'S' flag to state(). https://github.com/vim/vim/commit/d103ee78432f9036d243b18dd5aac1263d3b7dc9 Include misc1.c change from patch 8.1.2062. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2047: cannot check the current statezeertzjq2023-08-21
| | | | | | | | | Problem: Cannot check the current state. Solution: Add the state() function. https://github.com/vim/vim/commit/0e57dd859ecb1e8a3b91509d2f4343e839340eb8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1768: Runtime: no support for bicep filesChristian Clason2023-08-21
| | | | | | | | | | | Problem: Runtime: no support for bicep files Solution: Add filetype support for bicepparam closes: vim/vim#12784 https://github.com/vim/vim/commit/2d0988ef93c6e8e59381c9cd123efbc2cd1faf92 Co-authored-by: Scott McKendry <scott.c.mckendry@gmail.com>
* vim-patch:9.0.1766: Runtime: Missing QML supportChristian Clason2023-08-21
| | | | | | | | | | | Problem: Runtime: Missing QML support Solution: Add QML support to Vim closes: vim/vim#12810 https://github.com/vim/vim/commit/bedc69f9d67b117ab05aa735c701cd3899d1ae2d Co-authored-by: ChaseKnowlden <haroldknowlden@gmail.com>
* vim-patch:9.0.1774: no support for custom cmdline completion (#24808)zeertzjq2023-08-21
| | | | | | | | | | | | | | | Problem: no support for custom cmdline completion Solution: Add new vimscript functions Add the following two functions: - getcmdcompltype() returns custom and customlist functions - getcompletion() supports both custom and customlist closes: vim/vim#12228 https://github.com/vim/vim/commit/92997dda789ad8061841128cbc99b15ec0374411 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* vim-patch:9.0.1515: reverse() does not work for a Stringzeertzjq2023-08-19
| | | | | | | | | | | | | | | | | | | Problem: reverse() does not work for a String. Solution: Implement reverse() for a String. (Yegappan Lakshmanan, closes vim/vim#12179) https://github.com/vim/vim/commit/03ff1c2dde7f15eca5c9baa6dafbda9b49bedc3b vim-patch:9.0.1738: Duplicate code to reverse a string Problem: Duplicate code to reverse a string Solution: Move reverse_text() to strings.c and remove string_reverse(). closes: vim/vim#12847 https://github.com/vim/vim/commit/4dd266cb66d901cf5324f09405cfea3f004bd29f Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.1728: missing winid argument for virtcol() (#24770)zeertzjq2023-08-18
| | | | | | | | | | | | | Problem: missing winid argument for virtcol() Solution: Add a {winid} argument to virtcol() Other functions col(), charcol() and virtcol2col() support a {winid} argument, so it makes sense for virtcol() to also support than. Also add test for virtcol2col() with 'showbreak' and {winid}. closes: vim/vim#12633 https://github.com/vim/vim/commit/825cf813fa0fddf085fcbd3194781e875320ff63
* docs(builtin): fix some missing lines (#24759)Sean Dewar2023-08-17
| | | | Some things got chopped off in the PR that removed method syntax examples. These were all that I found.
* vim-patch:8.2.4455: accepting one and zero for second sort() argument is strangezeertzjq2023-08-17
| | | | | | | | | Problem: Accepting one and zero for the second sort() argument is strange. Solution: Disallow using one and zero in Vim9 script. https://github.com/vim/vim/commit/2007dd49f5cb36f944cab1cfbceb0f864e625f74 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:partial:8.2.3849: functions implementing reduce and map are too longzeertzjq2023-08-17
| | | | | | | | | | | | Problem: Functions implementing reduce and map are too long. Solution: Use a function for each type of value. Add a few more test cases and add to the help. (Yegappan Lakshmanan, closes vim/vim#9370) https://github.com/vim/vim/commit/389b72196e6aaeafe3f907c73d271f2c6b931140 Partial port as this doesn't include handling for non-materialized List. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:8.2.3848: cannot use reduce() for a stringzeertzjq2023-08-17
| | | | | | | | | | | Problem: Cannot use reduce() for a string. Solution: Make reduce() work with a string. (Naruhiko Nishino, closes vim/vim#9366) https://github.com/vim/vim/commit/0ccb5842f5fb103763d106c7aa364d758343c35a Omit tv_get_first_char() as it doesn't really save much code. Co-authored-by: rbtnn <naru123456789@gmail.com>
* vim-patch:8.2.3818: cannot filter or map characters in a stringzeertzjq2023-08-17
| | | | | | | | | | Problem: Cannot filter or map characters in a string. Solution: Make filter() and map() work on a string. (Naruhiko Nishino, closes vim/vim#9327) https://github.com/vim/vim/commit/c479ce032f5d4d14bab9e479acbf42d758879893 Co-authored-by: rbtnn <naru123456789@gmail.com>
* vim-patch:1b884a005398zeertzjq2023-08-17
| | | | | | | | Update runtime files. https://github.com/vim/vim/commit/1b884a0053982335f644eec6c71027706bf3c522 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.1969: Vim9: map() may change the list or dict item typezeertzjq2023-08-17
| | | | | | | | | Problem: Vim9: map() may change the list or dict item type. Solution: Add mapnew(). https://github.com/vim/vim/commit/ea696852e7abcdebaf7f17a7f23dc90df1f5e2ed Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(diagnostic): filter diagnostics by specific severities (#24736)Michael Strobel2023-08-16
| | | Allow users to filter diagnostics by specifying severities
* feat(diagnostic): provide more control over virtual text display (#24724)Gregory Anders2023-08-16
| | | | | | Allow users to pass virtual text options to nvim_buf_set_extmark through the "virtual_text" table in vim.diagnostic.config(). Fixes: https://github.com/neovim/neovim/issues/16545
* docs(lua): add missing fields to treesitter/_metaPham Huy Hoang2023-08-16
| | | | | | | | According to `:h TSNode` docs, there's also `TSNode:sexpr()` and `TSNode:has_error()` that is part of `TSNode` class, but this wasn't documented in `treesitter/_meta.lua`. Adding missing fields in so the types is similar to `:h TSNode`
* vim-patch:9.0.1717: virtcol2col returns last byte of a multi-byte char (#24729)zeertzjq2023-08-16
| | | | | | | | | | | Problem: virtcol2col returns last byte of a multi-byte char Solution: Make it return the first byte for a multi-byte char closes: vim/vim#12786 closes: vim/vim#12799 https://github.com/vim/vim/commit/b209b86e6636a16088ccacdac98213416c065bf2 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.1704: Cannot use positional arguments for printf() (#24719)zeertzjq2023-08-15
| | | | | | | | | | Problem: Cannot use positional arguments for printf() Solution: Support positional arguments in string formatting closes: vim/vim#12140 https://github.com/vim/vim/commit/0c6181fec4c362eb9682d5af583341eb20cb1af5 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
* fix(treesitter)!: remove deprecated legacy injection formatChristian Clason2023-08-14
|
* Merge #15440 close 'shell' :terminal automaticallyJustin M. Keyes2023-08-13
|\
| * Use Lua autocommand and make TermClose autocommand globalGregory Anders2023-08-10
| |
* | fix(treesitter): logger memory leakLewis Russell2023-08-13
| |
* | feat(treesitter)!: incremental injection parsingLewis Russell2023-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Treesitter highlighting is slow for large files with lots of injections. Solution: Only parse injections we are going to render during a redraw cycle. --- - `LanguageTree:parse()` will no longer parse injections by default and now requires an explicit range argument to be passed. - `TSHighlighter` now parses injections incrementally during on_win callbacks for the line range being rendered. - Plugins which require certain injections to be parsed must run `parser:parse({ start_row, end_row })` before using the tree.
* | vim-patch:9.0.1688: cannot store custom data in quickfix list (#24673)zeertzjq2023-08-12
| | | | | | | | | | | | | | | | | | | | Problem: cannot store custom data in quickfix list Solution: add `user_data` field for the quickfix list closes: vim/vim#11818 https://github.com/vim/vim/commit/ca6ac99077d2e6d020a34267aa5e0fbc4d23dc38 Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>