aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
| * fix(lsp): use correct method for prepareTypehierarchyLewis Russell2024-10-24
| | | | | | | | Regression from #30902
| * fix(lsp): set tagstack on jump via goto methodsMathias Fussenegger2024-10-24
| | | | | | | | | | Follow up to https://github.com/neovim/neovim/pull/30877 Fixes https://github.com/neovim/neovim/issues/30926
| * fix(lsp.buf): use correct offset_encoding for all requestsLewis Russell2024-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `lsp.buf_request` send the same params to all servers and many calls to this pass PositionalParams which depends on the clients offset_encoding. This can result with incorrect params being sent to a server. Solution: `lsp.buf_request` `params` argument can now be passed as a function which takes the client as the first argument. This is used in lsp/buf.lua to construct correct params for each client request.
| * fix(lsp.protocal): improve typing of constantsLewis Russell2024-10-24
| |
| * refactor(lsp.buf): remove buf_request wrapperLewis Russell2024-10-24
| |
| * refactor(lsp.buf): use alias for vim.lspLewis Russell2024-10-24
| |
| * fix(lsp): handle mixed encoding in tagfunc paramsMathias Fussenegger2024-10-24
| | | | | | | | Relates to https://github.com/neovim/neovim/issues/30034
| * feat(stdlib): overload vim.str_byteindex, vim.str_utfindex #30735Tristan Knight2024-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: There are several limitations to vim.str_byteindex, vim.str_utfindex: 1. They throw given out-of-range indexes. An invalid (often user/lsp-provided) index doesn't feel exceptional and should be handled by the caller. `:help dev-error-patterns` suggests that `retval, errmsg` is the preferred way to handle this kind of failure. 2. They cannot accept an encoding. So LSP needs wrapper functions. #25272 3. The current signatures are not extensible. * Calling: The function currently uses a fairly opaque boolean value to indicate to identify the encoding. * Returns: The fact it can throw requires wrapping in pcall. 4. The current name doesn't follow suggestions in `:h dev-naming` and I think `get` would be suitable. SOLUTION: - Because these are performance-sensitive, don't introduce `opts`. - Introduce an "overload" that accepts `encoding:string` and `strict_indexing:bool` params. ```lua local col = vim.str_utfindex(line, encoding, [index, [no_out_of_range]]) ``` Support the old versions by dispatching on the type of argument 2, and deprecate that form. ```lua vim.str_utfindex(line) -- (utf-32 length, utf-16 length), deprecated vim.str_utfindex(line, index) -- (utf-32 index, utf-16 index), deprecated vim.str_utfindex(line, 'utf-16') -- utf-16 length vim.str_utfindex(line, 'utf-16', index) -- utf-16 index vim.str_utfindex(line, 'utf-16', math.huge) -- error: index out of range vim.str_utfindex(line, 'utf-16', math.huge, false) -- utf-16 length ```
| * docs: miscdundargoc2024-10-23
| | | | | | | | | | | | | | Co-authored-by: David Pedersen <limero@me.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Leo Schlosser <Leo.Schlosser@Student.HTW-Berlin.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * fix(defaults): error messages UX for unimpaired mappings #30884Maria José Solano2024-10-23
| |
| * vim-patch:9.1.0809: filetype: petalinux config files not recognizedChristian Clason2024-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: petalinux config files not recognized Solution: detect 'project-spec/*.conf' files as bitbake filetype (Wu, Zhenyu) References: https://www.amd.com/en/products/software/adaptive-socs-and-fpgas/embedded-software/petalinux-sdk.html closes: vim/vim#15926 https://github.com/vim/vim/commit/626b6ab48682b211c22ede5a6e63513c85f93e58 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
| * fix(lsp): support multiple clients in typehierarchyLewis Russell2024-10-22
| |
| * docs(options): remove description for hidden options #30903Famiu Haque2024-10-22
| | | | | | | | | | | | | | | | | | Problem: Hidden options are documented despite being no-ops. Solution: Remove docs for hidden options. Move tags for options that we plan to restore, to ":help nvim-missing". Move tags for permanently removed options, to ":help nvim-removed".
| * vim-patch:9.1.0796: filetype: libtool files are not recognizedChristian Clason2024-10-22
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: libtool files are not recognized Solution: detect '*.{lo,la,lai}' as sh filetype (Wu, Zhenyu) closes: vim/vim#15751 https://github.com/vim/vim/commit/bfe568d8c49662c3a3485834066c0a4c32ded56b Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
| * vim-patch:9.1.0795: filetype: Vivado memory info file are not recognizedChristian Clason2024-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Vivado memory info file are not recognized Solution: detect '*.mmi' memory info file as xml filetype (Wu, Zhenyu) References: https://docs.amd.com/r/en-US/ug1580-updatemem/MMI-File-Syntax closes: vim/vim#15906 https://github.com/vim/vim/commit/0887e62bce3f46c20d2fa5f8ece1ca001e44ce63 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
| * fix(meta): do not use hyphens in param namesLewis Russell2024-10-21
| | | | | | | | Fixes #30882
| * feat(vim.validate): improve fast form and deprecate spec formLewis Russell2024-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `vim.validate()` takes two forms when it only needs one. Solution: - Teach the fast form all the features of the spec form. - Deprecate the spec form. - General optimizations for both forms. - Add a `message` argument which can be used alongside or in place of the `optional` argument.
| * refactor: rename vim.highlight => vim.hlJustin M. Keyes2024-10-21
| | | | | | | | | | | | | | | | | | | | | | | | Problem: - `vim.highlight` module does not follow `:help dev-name-common`, which documents the name for "highlight" as "hl". - Shorter names are usually preferred. Solution: Rename `vim.highlight` to `vim.hl`. This is not a breaking change until 2.0 (or maybe never).
| * fix(lua): vim.deprecate does not support major>0Justin M. Keyes2024-10-21
| |
| * feat(deprecations): vim._defer_deprecated_module()Justin M. Keyes2024-10-21
| |
| * feat(lsp)!: support multiple clients in goto methods (#30877)Mathias Fußenegger2024-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to: - https://github.com/neovim/neovim/issues/30034 - https://github.com/neovim/neovim/issues/17712 - https://github.com/neovim/neovim/issues/16363 Closes: - https://github.com/neovim/neovim/issues/26936 (but only provides bufnr and method) - https://github.com/neovim/neovim/issues/22318 Might fix: https://github.com/neovim/neovim/issues/30737
| * feat(float): allow enabling mouse for non-focusable window (#30844)zeertzjq2024-10-20
| | | | | | | | Problem: Cannot allow mouse interaction for non-focusable float window. Solution: Add a "mouse" field to float window config.
| * feat(lsp)!: support multiple clients in lsp.buf.referencesMathias Fussenegger2024-10-20
| | | | | | | | | | | | | | Relates to: - https://github.com/neovim/neovim/issues/17712 - https://github.com/neovim/neovim/issues/30034
| * feat(terminal)!: make 'belloff' and 'visualbell' apply to terminal bell (#30859)zeertzjq2024-10-20
| | | | | | | | | | | | | | vim-patch:8.2.4744: a terminal window can't use the bell vim-patch:8.2.4745: using wrong flag for using bell in the terminal BREAKING CHANGE: Bells from :terminal are now silent by default, unless 'belloff' option doesn't contain "term" or "all".
| * feat(vim.ui.open): support lemonade #30845Uthman Mohamed2024-10-18
| |
| * fix(lsp.util): wrong arguments to 'validate' functiontemhelk2024-10-18
| |
| * fix(types): add narrower vim.validate typesMaria José Solano2024-10-18
| |
| * perf(validate): use lighter versionLewis Russell2024-10-17
| | | | | | | | | | - Also fix `vim.validate()` for PUC Lua when showing errors for values that aren't string or number.
| * Merge pull request #30825 from lewis6991/refactor/lsputilLewis Russell2024-10-17
| |\
| | * feat(lsp.util): minor codestyleLewis Russell2024-10-17
| | |
| | * feat(lsp.util): improve offset_encoding type annotationsLewis Russell2024-10-17
| | |
| | * feat(lsp.util): remove some variablesLewis Russell2024-10-17
| | |
| | * feat(lsp.util): use vim.w/bLewis Russell2024-10-17
| | |
| | * feat(lsp.util): remove some aliasesLewis Russell2024-10-17
| | |
| | * feat(lsp.util): remove unneeded tableLewis Russell2024-10-17
| | |
| | * fix(lsp.util): inconsistent handling of offset_encodingLewis Russell2024-10-17
| | |
| | * feat(lsp.util): get_bufs_with_prefix -> get_writeable_bufsLewis Russell2024-10-17
| | |
| | * feat(lsp.util): refactor get_border_size()Lewis Russell2024-10-17
| | |
| | * feat(lsp.util): simplify some bounds checkingLewis Russell2024-10-17
| | |
| | * feat(lsp.util): remove metatable in locations_to_itemsLewis Russell2024-10-17
| | |
| | * feat(lsp.util): refactor symbols_to_items()Lewis Russell2024-10-17
| | | | | | | | | | | | | | | - Remove the trivial function vim.lsp.util._get_symbol_kind_name() and its tests.
| | * feat(lsp.util): remove uneeded do-endLewis Russell2024-10-17
| | |
| | * feat(lsp.util): use vim.api aliasLewis Russell2024-10-17
| | |
| | * feat(lsp.util): fix type errorsLewis Russell2024-10-17
| | |
| | * feat(meta): add type for quickfix entriesLewis Russell2024-10-17
| | |
| | * feat(lsp.util): remove lsp spec extractLewis Russell2024-10-16
| | |
| | * feat(lsp.util): use faster version of vim.validateLewis Russell2024-10-16
| | |
| * | feat(lsp): show server name in code actions #30830Jordan2024-10-17
| | | | | | | | | | | | | | | | | | | | | Problem: If there are multiple LSP clients, it's not clear which actions are provided by which servers. #30710 Solution: Show the server name next to each action (only if there are multiple clients).
| * | vim-patch:6c2fc37: runtime(help): Update help syntaxzeertzjq2024-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makaes the following changes to the vim help syntax: - fix excessive URL detection in help, because `file:{filename}` in doc/options.txt is determined to be a URL. - update highlighting N for :resize in help - split Italian-specific syntax into separate help script - highlight `Note` in parentheses in help - update 'titlestring' behaviour in documentation for invalid '%' format closes: vim/vim#15883 https://github.com/vim/vim/commit/6c2fc377bfbfb6f1a46b1061413cd21116b596ed Co-authored-by: Milly <milly.ca@gmail.com>
| * | fix(lsp): str_byteindex_enc bounds checking #30747Tristan Knight2024-10-16
| |/ | | | | | | | | | | | | | | | | Problem: Previously the index was only checked against the UTF8 length. This could cause unexpected behaviours for strings containing multibyte chars Solution: Check indicies correctly against their max value before returning the fallback length