aboutsummaryrefslogtreecommitdiff
path: root/test/functional
Commit message (Collapse)AuthorAge
...
| * | fix(vim.wo): never allow non-zero bufnrLewis Russell2024-06-12
| | |
* | | refactor(terminal): move :terminal defaults to _defaults.luaGregory Anders2024-06-12
| | |
* | | feat(highlight): add StatusLineTerm and StatusLineTermNC groupsGregory Anders2024-06-12
|/ / | | | | | | | | | | | | These highlight groups are used for the statusline in :terminal windows. By default they link to StatusLine and StatusLineNC (respectively), so there is no visual difference unless a colorscheme defines these groups separately.
* | feat(terminal): add support for copying with OSC 52 in embedded terminal ↵Gregory Anders2024-06-11
| | | | | | | | | | | | | | | | | | (#29117) When libvterm receives the OSC 52 escape sequence it ignores it because Nvim does not set any selection callbacks. Install selection callbacks that forward to the clipboard provider, so that setting the clipboard with OSC 52 in the embedded terminal writes to the system clipboard using the configured clipboard provider.
* | fix(column): clamp line number for legacy signsLuuk van Baal2024-06-10
| | | | | | | | | | | | | | | | Problem: Legacy :sign API still allows placing signs beyond the end of the buffer. This is unaccounted for by the signcolumn tracking logic and is disallowed in general for the extmark API which implements it now. Solution: Clamp legacy sign line number to the length of the buffer.
* | fix(glob): handle overlapping `{}` condition elements #29236Jon Huhn2024-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes an issue where glob patterns like `{a,ab}` would not match `ab` because the first option `a` matches, then the end of the string is expected but `b` is found, and LPeg does not backtrack to try the next option `ab` which would match. The fix here is to also append the rest of the pattern to the generated LPeg pattern for each option. This changes a glob `{a,ab}` from being parsed as ("a" or "ab") "end of string" to ("a" "end of string" or "ab" "end of string") Here, matching against `ab` would try the first option, fail to match, then proceed to the next option, and match. The sacrifice this change makes is dropping support for nested `{}` conditions, which VSCode doesn't seem to support or test AFAICT. Fixes #28931 Co-authored-by: Sergey Slipchenko <faergeek@gmail.com>
* | feat(lsp): include end_col, end_lnum in vim.lsp.buf.locations_to_items #29164Tom Praschan2024-06-09
| |
* | feat(lua): add `vim._with`dundargoc2024-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a function to perform operations in their own sealed context, similar to pythons `with`. This helps ease operations where you need to perform an operation in a specific context, and then restore the context. Marked as private for now as it's not ready for public use. The current plan is to start using this internally so we can discover and fix any problems. Once this is ready to be exposed it will be renamed to `vim.with`. Usage: ```lua local ret = vim._with({context = val}, function() return "hello" end) ``` , where `context` is any combination of: - `buf` - `emsg_silent` - `hide` - `horizontal` - `keepalt` - `keepjumps` - `keepmarks` - `keeppatterns` - `lockmarks` - `noautocmd` - `options` - `sandbox` - `silent` - `unsilent` - `win` (except for `win` and `buf` which can't be used at the same time). This list will most likely be expanded in the future. Work on https://github.com/neovim/neovim/issues/19832. Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* | fix(man): filter OSC 8 hyperlink markup #29171Lennard Hofmann2024-06-07
| | | | | | | | | | Problem: `man cmake` shows "8;;https://cmake.orghttps://cmake.org8;;" Solution: Remove noise so that it shows as "https://cmake.org". See also: https://en.wikipedia.org/wiki/ANSI_escape_code#OSC
* | feat: get/set namespace properties #28728altermo2024-06-07
| | | | | | | | ref https://github.com/neovim/neovim/pull/28432 ref https://github.com/neovim/neovim/issues/28469
* | fix(lsp): fix reverse sorting of same position text edits (#29212)Al Colmenar2024-06-07
| | | | | | | | | | | | | | | | Problem: Text edits with the same position (both line and character) were being reverse sorted prior to being applied which differs from the lsp spec Solution: Change the sort order for just the same position edits
* | fix(lsp): revert buf_versions deprecation/replacement (#29217)Mathias Fußenegger2024-06-07
| | | | | | | | | | | | | | | | | | * Revert "fix(lsp): account for changedtick version gap on modified reset (#29170)" This reverts commit 2e6d295f799c27372e5c0c44727fa613c81717fd. * Revert "refactor(lsp): replace util.buf_versions with changedtick (#28943)" This reverts commit 5c33815448e11b514678f39cecc74e68131d4628.
* | feat(editorconfig): add support for spelling_language (#28638)sus-domesticus2024-06-06
| |
* | fix(tui): move $COLORTERM check to _defaults.lua (#29197)Gregory Anders2024-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently check $COLORTERM in the TUI process to determine if the terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor" or "24bit" then we automatically assume that the terminal supports truecolor, but if $COLORTERM is set to any other value we still query the terminal. The `rgb` flag of the UI struct is a boolean which only indicates whether the UI supports truecolor, but does not have a 3rd state that we can use to represent "we don't know if the UI supports truecolor". We currently use `rgb=false` to represent this "we don't know" state, and we use XTGETTCAP and DECRQSS queries to determine at runtime if the terminal supports truecolor. However, if $COLORTERM is set to a value besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear indication that the terminal _does not_ support truecolor, so it is incorrect to treat `rgb=false` as "we don't know" in that case. Instead, in the TUI process we only check for the terminfo capabilities. This must be done in the TUI process because we do not have access to this information in the core Neovim process when `_defaults.lua` runs. If the TUI cannot determine truecolor support from terminfo alone, we set `rgb=false` to indicate "we don't know if the terminal supports truecolor yet, keep checking". When we get to `_defaults.lua`, we can then check $COLORTERM and only query the terminal if it is unset. This means that users can explicitly opt out of truecolor determination by setting `COLORTERM=256` (or similar) in their environment.
* | fix(lua): don't clamp -1 or v:maxcol in vim.highlight.range() (#29203)zeertzjq2024-06-05
| |
* | fix(diagnostic): fix float scope filtering (#29134)Andre Toerien2024-06-04
| |
* | fix(lsp): account for changedtick version gap on modified reset (#29170)Mathias Fußenegger2024-06-04
| | | | | | | | Follow up to https://github.com/neovim/neovim/pull/28943 Fixes https://github.com/neovim/neovim/issues/29163
* | fix(ui): superfluous showmode / excessive grid_cursor_goto #29089luukvbaal2024-06-04
| | | | | | | | | | | | | | | | | | Problem: Unsetting global variables earlier in #28578 to avoid recursiveness, caused superfluous or even unlimited showmode(). Solution: Partly revert #28578 so that the globals are unset at the end of showmode(), and avoid recursiveness for ext UI by adding a recursive function guard to each generated UI call that may call a Lua callback.
* | refactor(lua): use tuple syntax everywhere #29111Ilia Choly2024-06-04
| |
* | feat(ftplugin): change 'commentstring' to `// %s` for C/C++ (#29085)Soham Shanbhag2024-06-03
| | | | | | | | | | | | | | | | | | Problem: The default commentstring for C/C++ can lead to invalid code when commenting and does not match the Nvim codebase. Solution: Change commentstring to `// %s` as used by Neovim. Also set all commentstrings that derive from the default C string explicitly (and correctly).
* | fix(lsp): trim trailing whitespace from completion words (#29122)Mathias Fußenegger2024-06-02
| | | | | | | | | | the `complete()` mechanism doesn't play nicely with trailing newlines or tabs. A newline causes it to insert a null character, showing up as `^@`.
* | test: add a test for #29119zeertzjq2024-06-02
| |
* | fix(luacats): allow all types inside tuplesIlia Choly2024-06-01
| |
* | fix(column): crash with 'signcolumn' set to "number" (#29003)luukvbaal2024-06-01
| | | | | | | | | | | | Problem: Numberwidth may depend on number of signs with text in the buffer and is not handled correctly for extmark signs. Solution: Move legacy sign code for changed numberwidth so that it is handled properly for legacy and extmark signs alike.
* | docs(luacats): add tuple supportIlia Choly2024-05-31
|/
* refactor(lsp): replace util.buf_versions with changedtick (#28943)Mathias Fußenegger2024-05-30
| | | | | | | `lsp.util.buf_versions` was already derived from changedtick (`on_lines` from `buf_attach` synced the version) As far as I can tell there is no need to keep track of the state in a separate table.
* feat(lsp): support postfix snippets in completionMathias Fussenegger2024-05-30
|
* feat(lsp): use fuzzy match on filterText instead of prefix matchMathias Fussenegger2024-05-30
| | | | | | | | The `complete()` mechanism matches completion candidates against the typed text, so strict pre-filtering isn't necessary. This is a first step towards supporting postfix snippets (like `items@insert` in luals)
* Merge pull request #29016 from bfredl/shadareaderbfredl2024-05-29
|\ | | | | refactor(shada): remove ShaDaReadDef secondary wrapper
| * refactor(shada): remove ShaDaReadDef secondary wrapperbfredl2024-05-28
| | | | | | | | | | | | `FileDescriptor` is already a wrapper around an fd and a buffer. By allowing to just use the buffer without an fd, it can already handle in-memory reads.
* | feat(defaults): use vim.diagnostic.jump() for default mappings (#29066)Gregory Anders2024-05-28
| | | | | | | | This allows the mappings to work with a count and also enables new ]D and [D mappings to go to the last/first diagnostic in the buffer.
* | Merge pull request #27339 from MariaSolOs/completionGregory Anders2024-05-28
|\ \ | | | | | | feat(lsp): completion side effects
| * | feat(snippet): add default keymaps during snippet sessionMaria José Solano2024-05-28
| | |
| * | test(lsp): add completion testsMaria José Solano2024-05-27
| | |
| * | feat(lsp): completion side effectsMaria José Solano2024-05-27
| | |
* | | feat(diagnostic): add vim.diagnostic.jump() (#26745)Gregory Anders2024-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate vim.diagnostic.goto_prev() and vim.diagnostic.goto_next() in favor of a unified vim.diagnostic.jump() interface. We cannot name the function "goto()" because some of our tooling (luacheck and stylua) fail to parse it, presumably because "goto" is a keyword in newer versions of Lua. vim.diagnostic.jump() also allows moving to a specific diagnostic and moving by multiple diagnostics at a time (useful for creating mappings that use v:count).
* | | fix(ui): flush ext_cmdline events before doing cmdpreview #27950luukvbaal2024-05-28
| |/ |/| | | | | Problem: Unable to update the screen for external cmdline during cmdpreview. Solution: Flush the cmdline UI before cmdpreview state.
* | fix(runtime): source c ftplugin properly for cpp on Windows (#29053)zeertzjq2024-05-28
| | | | | | | | | | | | | | | | On Windows, '{' is currently not treated as a wildcard char, so another wildcard char is needed for the pattern to be treated as a wildcard. It may be worth trying to make '{' always a wildcard char in the future, but that'll be a bit harder as it'll be necessary to make sure '{' is escaped at various places.
* | fix(lsp): do not detach from buffer if there are uninitialized clients (#29029)Ilia Choly2024-05-27
| | | | | | | | | | Problem: if on_lines is called before the LSP is initialized, the buffer is detached. Solution: check for uninitialized clients before detaching.
* | perf: add fast path to vim.validate (#28977)Gregory Anders2024-05-27
| | | | | | | | | | | | For many small/simple functions (like those found in shared.lua), the runtime of vim.validate can far exceed the runtime of the function itself. Add an "overload" to vim.validate that uses a simple assertion pattern, rather than parsing a full "validation spec".
* | fix(treesitter): find buffer in multiple windows #28922Guilherme Soares2024-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. When interacting with multiple :InspectTree and the source buffer windows there is a high chance of errors due to the window ids not being updated and validated. 2. Not all InspectTree windows were closed when the source buffer was closed. Solution: 1. Update InspectTree window id on `CursorMoved` event and validate source buffer window id before trying to navigate to it. 2. Close all InspectTree windows
* | fix(drawline): don't draw beyond end of window (#29035)zeertzjq2024-05-27
| |
* | fix(tui): reset clear_region attributes during startup #28713luukvbaal2024-05-26
| | | | | | | | | | | | Problem: Fix added in #28676 worked accidentally(used variables were themselves uninitialized at this point during startup) and does not always work. Solution: Reset attributes when clearing regions during startup.
* | fix(tohtml): properly handle multiple hl groups #29012Riley Bruins2024-05-26
| | | | | | | | | | | | | | | | | | Problem: :TOhtml doesn't properly handle virtual text when it has multiple highlight groups. It also improperly calculates position offset for multi-byte virt_text characters. Solution: Apply the `vim.api.nvim_strwidth` broadly to properly calculate character offset, and handle the cases where the `hl` argument can be a table of multiple hl groups.
* | refactor(tests): more global highlight definitionsbfredl2024-05-26
| |
* | refactor(tests): use more global highlight definitionsbfredl2024-05-26
| |
* | refactor(tests): update screen:snapshot_util() to use new-style highlightsbfredl2024-05-25
| | | | | | | | | | | | | | | | | | | | | | This makes screen:snapshot_util() generate code with the new screen:add_extra_attr_ids { ... } pattern. For convenience, the old-style configuration is still detected and supported (until all tests have been refactored, which is my goal for the 0.11 cycle) Remove the last traces of the "ignore" attr anti-pattern. This code is no longer functional, it is just "ignore" argument being passed around like a hot potato at this point.
* | refactor(lua): rewrite vim.highlight.range() (#28986)zeertzjq2024-05-25
| | | | | | | | - Use getregionpos(). - Use a single extmark for non-blockwise selection.
* | Merge pull request #28617 from glepnir/border_hlbfredl2024-05-25
|\ \ | |/ |/| fix(float): missing default highlight for title
| * fix(float): missing default highlight for titleglepnir2024-05-25
| | | | | | | | | | | | Problem: there is missing default title highlight when highlight not defined in title text chunk. Solution: when attr is not set use default title highlight group.