aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* fix(redraw): get the line again after evaluating somethingzeertzjq2023-03-04
|
* fix(treesitter): disallow empty filetypesLewis Russell2023-03-03
| | | Fixes #22473
* build: cmake cleanup (#22251)dundargoc2023-03-02
| | | | | | | | - Remove unused code - Use consistent casing. Variable names such as LibLuV_LIBRARIES is needlessly jarring, even if the name might be technically correct. - Use title casing for packages. find_package(unibilium) requires the find_module to be named "Findunibilium.cmake", which makes it harder to spot when scanning the files. Instead, use "Unibilium".
* test(treesitter/parser_spec): correct time unit (#22471)zeertzjq2023-03-02
|
* feat(vim.fs): pass path to find() predicate, lazy evaluate #22378Mike2023-03-01
| | | | | | | | Problem: No easy way to find files under certain directories (ex: grab all files under `test/`) or exclude the content of certain paths (ex. `build/`, `.git/`) Solution: Pass the full `path` as an arg to the predicate.
* fix(lsp): use buffer scheme for files not stored on disk (#22407)Mathias Fußenegger2023-03-01
| | | | | | Sending `didOpen` with a `file` scheme causes problems with some language servers because they expect the file to exist on disk. See https://github.com/microsoft/language-server-protocol/pull/1679
* test(ui): wait for another success with failure after successzeertzjq2023-03-01
| | | | | | | | | | | Problem: In a success-failure-success situation, if minimal timeout is reached between the failure and the second success, the session is stopped without waiting for the second success, causing the test to fail. Solution: Wait for another success if a failure is seen after a success. Ref #22155 #22464
* test(termxx_spec): fix TermClose bdelete test flakiness (#22463)zeertzjq2023-03-01
| | | | | | | | Problem: If shell-test finishes before the next RPC call, TermClose has already been triggered, so the test fails. Solution: Add INTERACT argument so that shell-test keeps running.
* Merge pull request #22454 from bfredl/lspredrawbfredl2023-02-28
|\ | | | | perf(lsp): only redraw the windows containing LSP tokens
| * perf(lsp): only redraw the windows containing LSP tokensbfredl2023-02-28
| | | | | | | | | | | | | | | | redraw! redraws the entire screen instead of just the windows with the buffer which were actually changed. I considered trying to calculating the range for the delta but it looks tricky. Could a follow-up.
* | Merge #22382 has('gui_running')Justin M. Keyes2023-02-28
|\ \ | |/ |/|
| * feat(ui): restore has('gui_running')Justin M. Keyes2023-02-27
| | | | | | | | | | | | | | | | | | | | Problem: has('gui_running') is still common in the wild and our answer has changed over time, causing frustration. https://github.com/vimpostor/vim-tpipeline/commit/95a6ccbe9f33bc42dd4cee45731d8bc3fbcd92d1 Solution: Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
| * feat(api): more fields in nvim_list_uisJustin M. Keyes2023-02-27
| | | | | | | | | | | | | | | | Problem: nvim_list_uis does not report all ":help ui-option" fields. Solution: Store ":help ui-option" fields on the `UI` object and update ui_array.
* | fix(column): cmdwin cursor is offset with 'statuscolumn' (#22445)luukvbaal2023-02-28
| |
* | fix(tui): avoid stack-use-after-scope with cursor color (#22435)zeertzjq2023-02-28
|/
* Revert "feat(lsp): implement workspace/didChangeWatchedFiles (#21293)"Mathias Fussenegger2023-02-25
| | | | | | This reverts commit 5732aa706c639b3d775573d91d1139f24624629c. Causes editor to freeze in projects with many watcher registrations
* feat(lsp): implement workspace/didChangeWatchedFiles (#21293)Jon Huhn2023-02-25
|
* feat(treesitter)!: remove silent option from language.add()Lewis Russell2023-02-24
| | | Simply use `pcall` if you want to silence an error.
* feat(treesitter): upstream foldexpr from nvim-treesitterLewis Russell2023-02-23
|
* perf(treesitter): smarter languagetree invalidationLewis Russell2023-02-23
| | | | | | | | | | | | | | Problem: Treesitter injections are slow because all injected trees are invalidated on every change. Solution: Implement smarter invalidation to avoid reparsing injected regions. - In on_bytes, try and update self._regions as best we can. This PR just offsets any regions after the change. - Add valid flags for each region in self._regions. - Call on_bytes recursively for all children. - We still need to run the query every time for the top level tree. I don't know how to avoid this. However, if the new injection ranges don't change, then we re-use the old trees and avoid reparsing children. This should result in roughly a 2-3x reduction in tree parsing when the comment injections are enabled.
* test(help): drop treesitter parse error to 0Christian Clason2023-02-23
| | | | | All parser errors have been fixed; make sure we don't introduce new ones.
* fix(highlight): avoid ORing underline flags (#22372)zeertzjq2023-02-23
| | | | | When combining attributes use the one that takes priority. For :highlight command use the last one specified. For API use a hard-coded order same as the order in docs.
* feat(lua): make sure require'bit' always works, even with PUC lua 5.1bfredl2023-02-22
|
* feat(treesitter): add filetype -> lang APILewis Russell2023-02-21
| | | | | | | | | | | | | | | | | | Problem: vim.treesitter does not know how to map a specific filetype to a parser. This creates problems since in a few places (including in vim.treesitter itself), the filetype is incorrectly used in place of lang. Solution: Add an API to enable this: - Add vim.treesitter.language.add() as a replacement for vim.treesitter.language.require_language(). - Optional arguments are now passed via an opts table. - Also takes a filetype (or list of filetypes) so we can keep track of what filetypes are associated with which langs. - Deprecated vim.treesitter.language.require_language(). - Add vim.treesitter.language.get_lang() which returns the associated lang for a given filetype. - Add vim.treesitter.language.register() to associate filetypes to a lang without loading the parser.
* test(legacy/prompt_buffer_spec): align script with oldtest more (#22354)zeertzjq2023-02-21
|
* fix(lsp): check if the buffer is a directory before w! it (#22289)Eduard Baturin2023-02-18
|
* test(tui_spec): use RPC request to setup autocommandszeertzjq2023-02-18
| | | | This avoids changing cmdline and fixes a warning.
* test: make {MATCH:} behave less unexpectedly in screen:expect()zeertzjq2023-02-18
| | | | Include the rest of the line and allow multiple {MATCH:} patterns.
* fix(api): allow empty Lua table for nested dicts #22268Justin M. Keyes2023-02-16
| | | | | | | | | | | | | | | Problem: The Lua-API bridge allows Dict params to be empty Lua (list) tables at the function-signature level. But not for _nested_ Dicts, because they are not modeled: https://github.com/neovim/neovim/blob/fae754073289566051433fae74ec65783f9e7a6a/src/nvim/api/keysets.lua#L184 Some API functions like nvim_cmd check for kObjectTypeDictionary and don't handle the case of empty Lua tables (treated as "Array"). Solution: Introduce VALIDATE_T_DICT and use it in places where kObjectTypeDictionary was being checked directly. fixes #21005
* feat: $NVIM_APPNAME #22128Ghjuvan Lacambre2023-02-16
| | | | | | | | | | | | | | | | | | | | This commit implements the ability to control all of the XDG paths Neovim should use. This is done by setting an environment variable named NVIM_APPNAME. For example, setting $NVIM_APPNAME makes Neovim look for its configuration directory in $XDG_CONFIG_HOME/$NVIM_APPNAME instead of $XDG_CONFIG_HOME/nvim. If NVIM_APPNAME is not set or is an empty string, "nvim" will be used as default. The usecase for this feature is to enable an easy way to switch from configuration to configuration. One might argue that the various $XDG environment variables can already be used for this usecase. However, setting $XDG environment variables also affects tools spawned by Neovim. For example, while setting $XDG_CONFIG_HOME will enable Neovim to use a different configuration directory, it will also prevent Git from finding its "default" configuration. Closes https://github.com/neovim/neovim/issues/21691
* vim-patch:9.0.1309: scrolling two lines with even line count and 'scrolloff' setzeertzjq2023-02-16
| | | | | | | | | | | Problem: Scrolling two lines with even line count and 'scrolloff' set. Solution: Adjust how the topline is computed. (closes vim/vim#10545) https://github.com/vim/vim/commit/1d6539cf36a7b6d1afe76fb6316fe662f543bf60 Cherry-pick test_scroll_opt.vim changes from patch 8.2.1432. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* Merge #22214 move init_default_autocmds to luaJustin M. Keyes2023-02-14
|\
| * refactor: move init_default_autocmds to luaglacambre2023-02-11
| | | | | | | | | | | | | | | | | | The original motivation for this change came from developping https://github.com/neovim/neovim/pull/22159, which will require adding more autocommand creation to Neovim's startup sequence. This change requires lightly editing a test that expected no autocommand to have been created from lua.
* | test: make expect_unchanged() less confusing (#22255)zeertzjq2023-02-15
| | | | | | | | | | | | | | | | Problem: The sleep before collecting the initial screen state is confusing and may lead to unexpected success if it comes after a blocking RPC call. Solution: Remove that sleep and add an "intermediate" argument.
* | refactor(api): consistent VALIDATE messages #22262Justin M. Keyes2023-02-14
| | | | | | | | | | | | | | | | | | | | Problem: Validation messages are not consistently formatted. - Parameter names sometimes are NOT quoted. - Descriptive names (non-parameters) sometimes ARE quoted. Solution: Always quote the `name` value passed to a VALIDATE macro _unless_ the value has whitespace.
* | Merge pull request #11756 from bfredl/crashfixbfredl2023-02-14
|\ \ | | | | | | custom statusline crash containing unprintable unicode
| * | fix(status): handle unprintable chars in the statuslineBjörn Linse2023-02-14
| | |
* | | Merge pull request #22108 from luukvbaal/statuscolumnLewis Russell2023-02-14
|\ \ \ | | | | | | | | perf(column): only build fold/sign column when present in 'statuscolumn'
| * | | perf(column): only build fold/sign column when present in 'statuscolumn'Luuk van Baal2023-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The fold and sign column is built and stored regardless of whether the corresponding item is present in 'statuscolumn'. Solution: Since the 'statuscolumn' parses itself, we can defer building the columns until the corresponding item is actually encountered.
* | | | refactor(api): VALIDATE macros #22256Justin M. Keyes2023-02-14
| | | | | | | | | | | | | | | | | | | | | | | | - VALIDATE() takes a format string - deduplicate check_string_array - VALIDATE_RANGE - validate UI args
* | | | test: remove unused field ext_float (#22243)zeertzjq2023-02-14
| | | |
* | | | refactor(api): VALIDATE macros #22187Justin M. Keyes2023-02-14
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Problem: - API validation involves too much boilerplate. - API validation errors are not consistently worded. Solution: Introduce some macros. Currently these are clumsy, but they at least help with consistency and avoid some nesting.
* | | fix(folds): cursorline highlight is not always applied on closed folds (#22242)luukvbaal2023-02-14
| | | | | | | | | | | | | | | | | | | | | Problem: The cursorline highlight logic checks for `w_cursor.lnum` which may be different from the line number passed to `win_line()` even when the cursor is actually on that line. Solution: Update cursor line highlight logic to check for the line number of the start of a closed fold if necessary.
* | | fix(tui): exit on input eofzeertzjq2023-02-14
| | |
* | | test(tui_spec): remove unnecessary arguments for remote UIzeertzjq2023-02-14
| | |
* | | feat(filetype): fall back to file extension when matching from hashbang (#22140)Jonas Strittmatter2023-02-13
| | | | | | | | | | | | | | | | | | If nothing matched in match_from_hashbang, also check the file extension table. For a hashbang like '#!/bin/env foo', this will set the filetype to 'fooscript' assuming the filetype for the 'foo' extension is 'fooscript' in the extension table.
* | | Merge pull request #22191 from lewis6991/feat/playground_impLewis Russell2023-02-13
|\ \ \ | | | | | | | | feat(treesitter): playground improvements
| * | | fix(treesitter): don't trample parsers when filetype!=langLewis Russell2023-02-10
| | | | | | | | | | | | | | | | | | | | This allows vim.treesitter.show_tree() to work on buffers where the filetype does not match the parser language name e.g, bash/sh.
* | | | fix(ui): make sure screen is valid after resizingzeertzjq2023-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When not inside an Ex command, screen_resize() calls update_screen(), which calls screenclear() and set the screen as valid. However, when inside an Ex command, redrawing is postponed so update_screen() screen doesn't do anything, and the screen is still invalid after the resize, causing ui_comp_raw_line() to be no-op until update_screen() is called on the main loop. Solution: Restore the call to screenclear() inside screen_resize() so that the screen is invalid after screen_resize(). Since screenclear() changes redraw type from UPD_CLEAR to UPD_NOT_VALID, it is called at most once for each resize, so this shouldn't change how much code is run in the common (not inside an Ex command) case.
* | | | build: don't check environment variable to detect CI (#22234)dundargoc2023-02-12
| | | | | | | | | | | | | | | | Instead use the cmake option, which should act as the definitive source to determine whether we use CI or not.