aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
| * Revert "fix(Man.lua): trigger completion even without arguments" #31572Justin M. Keyes2024-12-13
| | | | | | This reverts commit 7940ec69136fa992c98aa7b37265fbc2e619232e.
| * fix(lsp): reuse client if configs match and no root dirLewis Russell2024-12-13
| | | | | | | | | | | | | | | | | | | | | | | | Problem: An LSP configuration that creates client with no root_dir or workspace_folders can result in vim.lsp.enable attaching to it multiple times. Solution: When checking existing clients, reuse a client if it wasn't initially configured have any workspace_folders. This more closely matches the behaviour we had prior to d9235ef
| * fix(man.lua): `:Man <tab>` does not complete #31569Luca Saccarola2024-12-13
| | | | | | closes: #31512
| * vim-patch:9.1.0919: filetype: some assembler files are not recognizedChristian Clason2024-12-13
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: some assembler are files not recognized Solution: detect '*.nasm' files as nasm filetype and '*.masm' as masm filetype (Wu, Zhenyu) closes: vim/vim#16194 https://github.com/vim/vim/commit/d66d68763d0947c292a9fdda4da6fda3650fa563 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
| * fix(diagnostic): broken variable reference #31557Jeremy Fleischman2024-12-12
| |
| * refactor(lsp/rpc): move transport logic to separate moduleLewis Russell2024-12-12
| |
| * fix(diagnostic): setqflist() is stuck after vim.lsp.buf.document_symbol #31553Jeremy Fleischman2024-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when updating the quickfix diagnostics list, we'd update it, and then open the quickfix buffer, but there was no guarantee that the quickfix buffer would be displaying the quickfix diagnostics list (it could very possibly be displaying some other quickfix list!). This fixes things so we first select the quickfix list before opening the quickfix buffer. If `open` is not specified, the behavior is the same as before: we update the diagnostics quickfix list, but do not navigate to it. fixes https://github.com/neovim/neovim/issues/31540
| * feat(diagnostic): update quickfix list by title #31486Jeremy Fleischman2024-12-11
| | | | | | | | | | | | | | Previously, there was a singleton diagnostics quickfix list. Now there's effectively one per title (up to vim's internal limit on quickfix lists). Suggested by mfussenegger https://github.com/neovim/neovim/pull/30868#pullrequestreview-2385761374.
| * fix(uri): uri_encode encodes brackets incorrectly for RFC2732 #31284Jonny Kong2024-12-11
| | | | | | | | | | | | | | | | | | | | **Problem:** The brackets in the RFC2732 regular expression are currently unescaped, causing them to be misinterpreted as special characters denoting character groups rather than as literal characters. **Solution:** Escape the brackets. Fix #31270
| * feat(treesitter): include capture id in return value of ↵Riley Bruins2024-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `get_captures_at_pos()` #30559 **Problem:** Currently, it is difficult to get node(s)-level metadata for a capture returned by `get_captures_at_pos()`. This is because it is stored in `metadata[id]` and we do not have access to the value of `id`, so to get this value we have to iterate over the keys of `metadata`. See [this commit](https://github.com/neovim/neovim/commit/d63622930001b39b12f14112fc3abb55b760c447#diff-8bd4742121c2f359d0345f3c6c253a58220f1a28670cc4e1c957992232059a6cR16). Things would be much simpler if we were given the `id` of the capture so we could use it to just index `metadata` directly. **Solution:** Include `id` in the data returned by `get_captures_at_pos()`
| * docs(annotation): return types for Vimscript functions #31546Colin Kennedy2024-12-11
| |
| * feat(lsp): add vim.lsp.config and vim.lsp.enableLewis Russell2024-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Design goals/requirements: - Default configuration of a server can be distributed across multiple sources. - And via RTP discovery. - Default configuration can be specified for all servers. - Configuration _can_ be project specific. Solution: - Two new API's: - `vim.lsp.config(name, cfg)`: - Used to define default configurations for servers of name. - Can be used like a table or called as a function. - Use `vim.lsp.confg('*', cfg)` to specify default config for all servers. - `vim.lsp.enable(name)` - Used to enable servers of name. Uses configuration defined via `vim.lsp.config()`.
| * docs(vvars): adjust lua types for vim.v variables #31510luukvbaal2024-12-09
| | | | | | | | - classes for v:event and v:completed_item - add remaining unknown types
| * docs: fix type of vim.validate valueMaria José Solano2024-12-09
| |
| * refactor(lsp): better tracking of requestsLewis Russell2024-12-08
| | | | | | | | | | Not essential, but adds robustness and hardening for future changes.
| * vim-patch:9.1.0911: Variable name for 'messagesopt' doesn't match short namezeertzjq2024-12-08
| | | | | | | | | | | | | | | | | | | | Problem: Variable name for 'messagesopt' doesn't match short name (after v9.1.0908) Solution: Change p_meo to p_mopt. Add more details to docs. closes: vim/vim#16182 https://github.com/vim/vim/commit/8cc43daee1f485c9abf1de3c638cce7835b9f861
| * vim-patch:9.1.0910: 'messagesopt' does not check max wait timezeertzjq2024-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'messagesopt' does not check max wait time (after v9.1.0908) Solution: Check for max wait value (Shougo Matsushita) closes: vim/vim#16183 https://github.com/vim/vim/commit/d9e9f89e0ffd6e7ce5e2a7f8f1ace5471e37c210 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * refactor: add vim._resolve_bufnrLewis Russell2024-12-07
| |
| * fix(inspect): always show priorityChristian Clason2024-12-07
| | | | | | | | | | | | | | | | Problem: It is not obvious if a treesitter highlight priority shown in `:Inspect` is higher or lower than the default. Solution: Also print default priority (`vim.hl.priorities.treesitter`). Add padding for better readability.
| * fix(treesitter): #trim! range for nodes ending at col 0 #31488Riley Bruins2024-12-07
| | | | | | | | | | | | | | | | | | Problem: char-wise folding for `#trim!` ranges are improperly calculated for nodes that end at column 0, due to the way `get_node_text` works. Solution: Add the blank line that `get_node_text` removes for for nodes ending at column 0. Also properly set column positions when performing linewise trims.
| * fix: remove vim.lsp._with_extendLewis Russell2024-12-07
| | | | | | | | Not used anywhere.
| * fix(lsp): cancel pending requests before refreshingtris2032024-12-07
| | | | | | | | | | | | | | | | | | | | | | Problem: Diagnostics and inlay hints can be expensive to calculate, and we shouldn't stack them as this can cause noticeable lag. Solution: Check for duplicate inflight requests and cancel them before issuing a new one. This ensures that only the latest request is processed, improving performance and preventing potential conflicts.
| * fix(lsp): check for configuration workspace folders when reusing clientsMaria José Solano2024-12-07
| |
| * fix(inspect): show priority for treesitter highlightsChristian Clason2024-12-07
| | | | | | | | | | | | | | | | Problem: `:Inspect` does not show priority for treesitter highlights, leading to confusion why sometimes earlier highlights override later highlights. Solution: Also print priority metadata if set.
| * vim-patch:9.1.0908: not possible to configure :messages (#31492)zeertzjq2024-12-07
| | | | | | | | | | | | | | | | | | | | | | Problem: not possible to configure :messages Solution: add the 'messagesopt' option (Shougo Matsushita) closes: vim/vim#16068 https://github.com/vim/vim/commit/51d4d84d6a7159c6ce9e04b36f8edc105ca3794b Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: h_east <h.east.727@gmail.com>
| * feat(stdlib): vim.json.encode(...,{escape_slash:boolean}) #30561Bartłomiej Maryńczak2024-12-06
| | | | | | | | | | | | | | | | | | | | | | | | Problem: vim.json.encode escapes every slash in string values (for example in file paths), and is not optional. Use-case is for preventing HTML injections (eg. injecting `</script>` closing tag); in the context of Nvim this is rarely useful. Solution: - Add a `escape_slash` flag to `vim.json.encode`. - Defaults to `false`. (This is a "breaking" change, but more like a bug fix.)
| * fix(lsp): add foldingrange method support check #31463Tristan Knight2024-12-06
| | | | | | | | | | | | Problem: The folding_range request method assumes that the client supports the method Solution: Add a capability guard to the call
| * Merge #30085 #trim! all whitespaceJustin M. Keyes2024-12-06
| |\
| | * feat(treesitter): #trim! can trim all whitespaceRiley Bruins2024-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit also implements more generic trimming, acting on all whitespace (charwise) rather than just empty lines. It will unblock https://github.com/nvim-treesitter/nvim-treesitter/pull/3442 and allow for properly concealing markdown bullet markers regardless of indent width, e.g.
| * | feat(defaults): disable 'foldcolumn' in terminal buffers (#31480)Micah Halter2024-12-06
| |/
| * fix(events): don't expand `args.file` for Lua callback (#31473)zeertzjq2024-12-06
| | | | | | | | | | | | | | | | Problem: In an autocommand Lua callback whether `args.file` is expanded depends on whether `expand('<afile>')` has been called. Solution: Always use the unexpanded file name for `args.file`. Related to #31306 and vim/vim#16106. This doesn't provide `sfname`, but at least makes `args.file` have a consistent value.
| * vim-patch:9.1.0906: filetype: Nvidia PTX files are not recognizedChristian Clason2024-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Nvidia PTX files are not recognized Solution: detect '*.ptx' files as ptx filetype (Yinzuo Jiang) Reference: https://docs.nvidia.com/cuda/parallel-thread-execution/ closes: vim/vim#16171 https://github.com/vim/vim/commit/bdb5f85a5189534653f36e92b1bc780ca8d25218 Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
| * fix(diagnostic): only store quickfix id when creating a new one #31466Jeremy Fleischman2024-12-05
| | | | | | | | | | | | The old code would always update `_qf_id` with the current quickfix, even if you're currently looking at a completely different, non-diagnostics quickfix list. This completely defeats the intent of <https://github.com/neovim/neovim/pull/30868>, whoops!
| * fix(defaults): don't replace keycodes in Visual search mappings (#31460)zeertzjq2024-12-05
| | | | | | Also remove "silent" to be more consistent with Normal mode search.
| * vim-patch:9.1.0905: Missing information in CompleteDone event (#31455)glepnir2024-12-05
| | | | | | | | | | | | | | | | | | Problem: Missing information in CompleteDone event Solution: add complete_word and complete_type to v:event dict (glepnir) closes: vim/vim#16153 https://github.com/vim/vim/commit/1c5a120a701fcf558617c4e70b5a447778f0e51d
| * misc: keep deprecated vim.loader.disable stub (#31450)Gregory Anders2024-12-04
| | | | | | | | Transitional stub to minimize breaking change pain, to be removed after 0.11 release.
| * feat(diagnostic): vim.diagnostic.setqflist improvements #30868Jeremy Fleischman2024-12-04
| | | | | | | | | | | | 1. Use the new "u" action to update the quickfix list so we don't lose our position in the quickfix list when updating it. 2. Rather than creating a new quickfix list each time, update the exiting one if we've already created one.
| * fix(vim.system): close pipe handles after process handleLewis Russell2024-12-04
| | | | | | | | Fixes #30846
| * defaults: disable 'number', 'relativenumber', and 'signcolumn' in terminal ↵Gregory Anders2024-12-04
| | | | | | | | buffers (#31443)
| * feat(lsp): deprecate vim.lsp.start_client #31341Maria José Solano2024-12-04
| | | | | | | | | | | | | | | | Problem: LSP module has multiple "start" interfaces. Solution: - Enhance vim.lsp.start - Deprecate vim.lsp.start_client
| * vim-patch:9.1.0902: filetype: Conda configuration files are not recognized ↵zeertzjq2024-12-04
| | | | | | | | | | | | | | | | | | | | | | (#31445) Problem: filetype: Conda configuration files are not recognized Solution: detect '.condarc' and 'condarc' files as yaml filetype. (zeertzjq) closes: vim/vim#16162 https://github.com/vim/vim/commit/876de275cb3affa5910664cc52a5177c214313e8
| * docs: misc, help tags for neovim.io searches #31428Justin M. Keyes2024-12-03
| | | | | | | | | | | | | | | | | | | | Problem: Various keywords are commonly searched-for on https://neovim.io, but don't have help tags. Solution: Add help tags. fix #31327
| * docs: provide example for configuring LSP foldexpr (#31411)Gregory Anders2024-12-02
| | | | | | | | | | Using the "supports_method" function with a client capability inside of an LspAttach autocommand is the preferred method to do this, so we should be showing users how to do it.
| * vim-patch:768728b: runtime(doc): Update documentation for "noselect" in ↵dundargoc2024-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | 'completeopt' In particular, make the distinction and interaction between "noinsert" and "noselect" clearer as it was very confusing before. closes: vim/vim#16148 https://github.com/vim/vim/commit/768728b48751c5e937409d12d98bfa1fb4c37266 Co-authored-by: dundargoc <gocdundar@gmail.com>
| * docs: example keybind for :Inspect #31391C.D. MacEachern2024-12-01
| |
| * vim-patch:9.1.0897: filetype: pyrex files are not detectedChristian Clason2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: pyrex files are not detected Solution: detect '*.pxi' and '*.pyx+' as pyrex filetype (user202729) References: https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#cython-file-types https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/using_with_c++.html closes: vim/vim#16136 https://github.com/vim/vim/commit/aa16b30552f0c6a00dcc761e3954cd5266bf106a Co-authored-by: user202729 <25191436+user202729@users.noreply.github.com>
| * feat(lsp): support `textDocument/foldingRange` (#31311)Yi Ming2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(shared): extract `vim._list_insert` and `vim._list_remove` * feat(lsp): add `vim.lsp.foldexpr()` * docs(lsp): add a todo for state management * feat(lsp): add `vim.lsp.folding_range.foldclose()` * feat(lsp): schedule `foldclose()` if the buffer is not up-to-date * feat(lsp): add `vim.lsp.foldtext()` * feat(lsp): support multiple folding range providers * refactor(lsp): expose all folding related functions under `vim.lsp.*` * perf(lsp): add `lsp.MultiHandler` for do `foldupdate()` only once
| * docs(lsp): update example, optional parameters #31299Yi Ming2024-11-28
| |
| * docs: more accurate typing for LSP references contextRiley Bruins2024-11-28
| | | | | | | | | | | | | | **Problem:** The `context` parameter for `references()` is just typed as a table, which is unhelpful. **Solution:** Properly type it as an `lsp.ReferenceContext`!
| * vim-patch:9.1.0890: %! item not allowed for 'rulerformat' (#31369)zeertzjq2024-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: %! item not allowed for 'rulerformat' (yatinlala) Solution: also allow to use %! for rulerformat option (Yegappan Lakshmanan) fixes: vim/vim#16091 closes: vim/vim#16118 https://github.com/vim/vim/commit/ac023e8baae65584537aa3c11494dad6f71770af Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>