aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
| * docs: clarify on_bytes argumentsJaehwang Jung2024-01-01
| | | | | | | | based on extmark_splice doc
| * fix(builtin): parameter mismatch between winsaveview and winrestviewaltermo2023-12-31
| |
| * refactor: fix luals warningsdundargoc2023-12-30
| |
| * docs(eval): add parameter type for vim.fn.mode() (#26776)xvzc2023-12-28
| |
| * docs: small fixes (#26651)dundargoc2023-12-28
| | | | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: WillLillis <wlillis@umass.edu>
| * revert: "fix: correct versions in deprecation warnings"dundargoc2023-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5cb906e91cb56302d0737aa80e2d890dde452029. They were intentionally fast-tracked. - `parse_snippet()` because of limited scope, and given that it's kinda semi-broken (arbitrary formatting rules, not that useful for what it was used for) - `extract_completion_items()` doesn't work if we want to add the LSP completionlist capability - `text_document_completion_list_to_complete_items()` also doesn't work for completionlist
| * fix(gen_lsp.lua): improve type name, and fix wrong type inheritanceJongwook Choi2023-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Style improvements: 1. Anonymous classes derived from `StructureLiteralType` should have a better name. The class name can be also nested. Examples: ```diff ----@field serverInfo? anonym1 +---@field serverInfo? lsp._anonym1.serverInfo ``` ```diff ----@field insertTextModeSupport? anonym26 +---@field insertTextModeSupport? lsp._anonym26.completionItem.insertTextModeSupport ``` 2. Add one separate empty line before each `@field` definition. Without these, empty lines the doc can look confusing because descriptions also may contain empty lines. See `lsp.CompletionItem` for example: ```lua ---The kind of this completion item. Based of the kind ---an icon is chosen by the editor. ---@field kind? lsp.CompletionItemKind ---Tags for this completion item. --- ---@since 3.15.0 ---@field tags? lsp.CompletionItemTag[] ``` It might feel like "Tags for this completion item" belongs to `kind`, not `tags` due to the lack of separator blank lines. The following (after this commit) should look much better: ```diff ---The kind of this completion item. Based of the kind ---an icon is chosen by the editor. ---@field kind? lsp.CompletionItemKind +--- ---Tags for this completion item. --- ---@since 3.15.0 ---@field tags? lsp.CompletionItemTag[] ``` 3. Escape some LSP-specific annotations that can't be recognized by lua-ls. It'd be better to make them visible in LSP hover doc windows. Example: `@sample ...`. Fixes: 1. A type may extend from more than one base types (as well as mixin types). Previously only the first base class was being considered, resulting incomplete base classes for `@class` definitions. Example: `InlayHintOptions` (should have both of `resolveProvider` and `workDoneProgress`, the latter is from `WorkDoneProgressOptions`) ```diff ----@class lsp.InlayHintOptions +---@class lsp.InlayHintOptions: lsp.WorkDoneProgressOptions ``` 2. Remove `<200b>` (zero-width space) unicode characters. 3. Add the missing newline at EOF.
| * docs(gen_lsp.lua): re-generate vim.lsp._meta.protocol type annotationsJongwook Choi2023-12-27
| | | | | | | | | | | | | | | | | | | | The purpose of this commit is to make diff clean and easy to read; to see the diff resulted from actual changes in gen_lsp.lua, not from the updated LSP protocol JSON data. Ran: `nvim -l scripts/gen_lsp.lua gen --methods` Based on 3.18.0 (2023-12-23)
| * feat(defaults): map Q and @x to repeat in Visual mode (#26495)Nacho Nieva2023-12-27
| |
| * fix: correct versions in deprecation warningsdundargoc2023-12-27
| | | | | | | | | | | | | | | | | | The following functions should be removed in 0.12 according to the deprecation strategy in MAINTAIN.md: - vim.lsp.util.extract_completion_items() - vim.lsp.util.parse_snippet() - vim.lsp.util.text_document_completion_list_to_complete_items()
| * refactor: use vim.deprecate on all deprecated functionsdundargoc2023-12-27
| |
| * feat(extmarks): add virt_text_repeat_linebreak flag (#26625)luukvbaal2023-12-26
| | | | | | | | | | | | Problem: Unable to predict which byte-offset to place virtual text to make it repeat visually in the wrapped part of a line. Solution: Add a flag to nvim_buf_set_extmark() that causes virtual text to repeat in wrapped lines.
| * feat(vim.deprecate): only issue warning if neovim version is high enoughdundargoc2023-12-25
| | | | | | | | | | | | | | | | | | | | | | | | As specified by MAINTAIN.md, features should be soft deprecated at first (meaning no warnings) to give people a chance to adjust. The problem with this approach is that deprecating a feature becomes harder than usual as during the soft deprecation period you need to remember not to issue a warning, and during the hard deprecation period you need to remember to start issuing a warning. This behavior is only enforced if the `plugin` parameter is `nil` as plugins may not want this specific behavior.
| * refactor(cpoptions): remove 'p'bfredl2023-12-25
| | | | | | | | | | | | Deleting a cpo flag a day keeps the doctor away We don't need two different ways to indent LISP code
| * feat(health): make :checkhealth support more split modifiers (#26731)zeertzjq2023-12-25
| |
| * feat(health): checkhealth buffer can show in a split window (#26714)Pablo Arias2023-12-25
| | | | | | | | | | | | :checkhealth now respects :vertical and :horizontal. For example: :vertical checkhealth foo bar will open the healthcheck buffer in a vertical split.
| * fix(treesitter): outdated highlight due to tree with outdated regionJaehwang Jung2023-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: A region managed by an injected parser may shrink after re-running the injection query. If the updated region goes out of the range to be parsed, then the corresponding tree will remain outdated, possibly retaining the nodes that shouldn't exist anymore. This results in outdated highlights. Solution: Re-parse an invalid tree if its region intersects the range to be parsed.
| * fix(lsp): filetype matching to documentSelector in dynamic capabilities (#25425)Michal Liszcz2023-12-22
| | | | | | | | | | | | | | Use the get_language_id client option to resolve the filetype when matching the document selector in a dynamic capability. Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
| * refactor(lsp): move glob parsing to util (#26519)Steven Arcangeli2023-12-22
| | | | | | | | | | | | | | | | refactor(lsp): move glob parsing to vim.glob Moving the logic for using vim.lpeg to create a match pattern from a glob into `vim.glob`. There are several places in the LSP spec that use globs, and it's very useful to have glob matching as a generally-available utility.
| * feat(lsp): add type annotations for lsp.util.locations_to_items (#26694)Mathias Fußenegger2023-12-22
| | | | | | | | Problem: luals reported many warnings Solution: Add type annotations
| * docs(options): add codeblock annotations to options.lua (#26696)Christian Clason2023-12-22
| | | | | | | | | | Also consistently remove leading colons in examples Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:9.0.2183: Maximum callback depth is not configurable (#26703)zeertzjq2023-12-22
| | | | | | | | | | | | | | | | | | Problem: Maximum callback depth is not configurable. Solution: Revert patch 9.0.2103. Set 'maxfuncdepth' in test. fixes: vim/vim#13732 closes: vim/vim#13736 https://github.com/vim/vim/commit/fe583b1e5987fbfdb5f2141c133dbff9665ed301
| * feat: generate types and docs for v variablesLewis Russell2023-12-21
| |
| * fix(osc52): use nvim_chan_send() to stderr for copying (#26690)zeertzjq2023-12-21
| | | | | | | | | | | | | | The data to be written can be very long, so use nvim_chan_send() instead of io.stdout:write() as the latter doesn't handle EAGAIN. A difference of these two approaches is that nvim_chan_send() writes to stderr, not stdout, so it won't work if client stderr is redirected.
| * docs: apply current colorscheme to default highlight groupsChristian Clason2023-12-20
| | | | | | | | | | | | Problem: Not all default highlight groups show their actual colors. Solution: Refactor `vimhelp.lua` and apply it to all relevant lists (UI groups, syntax groups, treesitter groups, LSP groups, diagnostic groups).
| * refactor(treesitter): cleanup highlighterLewis Russell2023-12-20
| | | | | | | | | | | | | | | | - Remove some unused fields - Prefix classes with `vim.` - Move around some functions so the query stuff is at the top. - Improve type hints - Rework how hl_cache is implemented
| * vim-patch:9.0.2179: no filetype detection for execline scriptsChristian Clason2023-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: no filetype detection for execline scripts Solution: Add filetype detection for execline as a prior to adding syntax support for execline (see https://github.com/djpohly/vim-execline/issues/2), i went ahead and made the filetype detection for execline scripts. closes: vim/vim#13689 Signed-Off-By: Mazunki Hoksaas <rolferen@gmail.com> https://github.com/vim/vim/commit/63210c214afa6589b6132bd060908a8711f4567f Co-authored-by: Mazunki Hoksaas <rolferen@gmail.com>
| * fix(treesitter): prepare highlight states for [s, ]sJaehwang Jung2023-12-19
| |
| * docs: small fixes (#26448)dundargoc2023-12-19
| | | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com> Co-authored-by: Jordan Mandel <jordan.mandel@live.com>
| * feat(api): add forward and back mouse buttonsAmanda Graven2023-12-18
| |
| * refactor: soft-deprecate diagnostic signs configured with :sign-define (#26618)Gregory Anders2023-12-18
| | | | | | | | | | Diagnostic signs should now be configured with vim.diagnostic.config(), but "legacy" sign definitions should go through the standard deprecation process to minimize the impact from breaking changes.
| * docs(diagnostic): add return value of `vim.diagnostic.config()` (#26615)Yi Ming2023-12-17
| |
| * perf(treesitter): filter out trees outside the visible range earlyJaehwang Jung2023-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Treesitter highlighter's on_line was iterating all the parsed trees, which can be quite a lot when injection is used. This may slow down scrolling and cursor movement in big files with many comment injections (e.g., lsp/_meta/protocol.lua). Solution: In on_win, collect trees inside the visible range, and use them in on_line. NOTE: This optimization depends on the correctness of on_win's botline_guess parameter (i.e., it's always greater than or equal to the line numbers passed to on_line). The documentation does not guarantee this, but I have never noticed a problem so far.
| * refactor(lsp): move changetracking to separate file (#26577)Lewis Russell2023-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(lsp): move changetracking to separate file - Prefixed changetracking types with `vim.lsp.` * fixup!: make _reset_timer a local function * fixup!: remove @private annotations * fixup!: changetracking.lua -> _changetracking.lua * fixup! types * fixup! add send_changes_for_group
| * refactor: only reload colorscheme if &bg changed (#26598)Gregory Anders2023-12-16
| | | | | | | | | | | | | | | | | | | | Currently, setting &bg at all re-initializes highlights and reloads the active colorscheme, even if the actual value of &bg has not changed. With https://github.com/neovim/neovim/pull/26595 this causes a regression since &bg is set unconditionally based on the value detected from the terminal. Instead, only reload the colorscheme if the actual value of &bg has changed.
| * vim-patch:82f19734bfcbChristian Clason2023-12-16
| | | | | | | | | | | | | | | | | | | | | | runtime(doc): remove deprecation warning for gdefault Deprecated can be misunderstood as being slated for removal; slightly change wording to be clearer. https://github.com/vim/vim/commit/82f19734bfcbddbaee8d5d837f7b7a7119366020 Co-authored-by: dundargoc <gocdundar@gmail.com>
| * feat(ui): completeopt support popup like vimmathew2023-12-16
| |
| * refactor(defaults): always set options, even if value hasn't changed (#26595)Gregory Anders2023-12-15
| | | | | | | | | | | | | | | | Comparing against the old value before setting matched the original C implementation, but there is no reason to use this restriction. In particular, this inhibits using OptionSet to determine when the option was set. If users need to handle a case where the option _changed_, it is easy to do so in an OptionSet autocommand using v:option_new and v:option_old (and friends).
| * Merge pull request #26579 from gpanders/defer-set-tgcGregory Anders2023-12-15
| |\ | | | | | | refactor(defaults): defer setting 'termguicolors' until after VimEnter
| | * refactor(defaults): defer setting 'termguicolors' until after VimEnterGregory Anders2023-12-14
| | | | | | | | | | | | | | | This ensures that any OptionSet autocommands will fire when the value is changed.
| | * fix(termcap): set 'nested' on TermResponse autocommandGregory Anders2023-12-14
| | |
| * | vim-patch:17dca3cb97cd (#26584)zeertzjq2023-12-15
| |/ | | | | | | | | | | | | | | | | runtime(doc): grammar & typo fixes closes: vim/vim#13654 https://github.com/vim/vim/commit/17dca3cb97cdd7835e334b990565c8c0b93b1284 Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
| * refactor(diagnostic): use named namespaces (#26568)Gregory Anders2023-12-14
| | | | | | | | | | Anonymous namespaces are more difficult to extend or hook into since they do not appear in the output of nvim_get_namespaces(). Use named namespaces instead.
| * docs: add comment for OSC 11 tmux passthrough (#26566)Gregory Anders2023-12-14
| |
| * feat(lsp): more annotationsLewis Russell2023-12-14
| |
| * feat(nvim_open_term): convert LF => CRLF (#26384)Raphael2023-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Unlike termopen(), nvim_open_term() PTYs do not carriage-return the cursor on newline ("\n") input. nvim --clean :let chan_id = nvim_open_term(1, {}) :call chansend(chan_id, ["here", "are", "some", "lines"]) Actual behavior: here are some lines Expected behaviour: here are some lines Solution: Add `force_crlf` option, and enable it by default.
| * fix(defaults): background detection in tmux (#26557)Jaehwang Jung2023-12-14
| | | | | | Wrap the query with passthrough sequence
| * feat(diagnostics): support numhl and linehl for diagnostic signsGregory Anders2023-12-13
| |
| * docs(diagnostic): fix typo in exampleGregory Anders2023-12-13
| |
| * fix(diagnostic): check for sign namespace instead of sign groupGregory Anders2023-12-13
| |