aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* fix(vim.opt): vimL map string values not trimmed (#14982)jadedpasta2021-07-04
| | | | | | | | | Options formatted as a list of comma-separated key-value pairs may have values that contain leading and trailing whitespace characters. For example, the `listchars` option has a default value of `"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table, leading and trailing whitespace should not be trimmed. Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu>
* doc/startup: cleanup; assign ENN to "conflicing configs" msg (#14971)Justin M. Keyes2021-07-03
|
* NVIM v0.5.0v0.5.0Björn Linse2021-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This release represents ~4000 commits since v0.4.4, the previous non-maintenance release. Highlights include builtin support for LSP, new APIs for extended marks (with byte resolution tracking of changes) and buffer decorations, as well as vast improvements to lua as a plugin and configuration language. Experimental support for tree-sitter as a syntax engine is also included, building on the new core APIs for byte tracking and decorations. FEATURES: New API functions: nvim_exec: execute multiline vim script blocks nvim_get_hl_id_by_name: Gets a highight definition by name nvim_exec_lua: new name for nvim_execute_lua nvim_notify: Notify the user with a message nvim_get_runtime_file: Find files in runtime directories nvim_get_all_options_info: Get option information for all options nvim_get_option_info: Get option information for one option nvim_echo: Echo a message with highlights nvim_open_term: Open a virtual terminal in a buffer nvim_chan_send: send data to a channel. (like chansend() but supports lua strings) nvim_set_decoration_provider: callback driven decoration API for a namespace nvim_buf_set_text: Set/replace a character range in a buffer nvim_buf_delete: Delete the buffer. |:bwipeout| nvim_buf_get_extmark_by_id: Returns position for a given extmark id. nvim_buf_get_extmarks: get extmarks in traversal order. nvim_buf_set_extmark: Creates or updates an extmark. nvim_buf_del_extmark: Removes an extmark. nvim_buf_call: call a function with buffer as temporary current buffer nvim_win_hide: Closes the window and hide the buffer it contains |:hide| nvim_win_call: Calls a function with window as temporary current window. New UI events: redraw.screenshot redraw.win_viewport Lua: 767cd8b17 #12235 startup: add init.lua as an alternative user config 687eb0b39 #14686 feat(startup): Source runtime/plugin/**/*.lua at startup #14686 runtime: allow lua in various runtime search paths such as syntax/ ftdetect/ indent/ ftplugin/ compiler/ colors/ 43956dea5 #13479 lua: Add vim.opt and fix scopes of vim.o 1407899c3 #12268 lua: Add buffer, window and tab accessors be662fe5c lua: vim.wait implementation 2b663c061 #14213 viml: embed Lua syntax highlighting 901dd79f6 feat: add completion to ':lua' 82688973 lua: complete methods in metatables 342148525 runtime: propagate lua parsing errors while using "require" aaca2c1c4 #13276 feat(lua): improve error message to make it actionable c60c7375f startup: handle autoload and lua packages during startup 3ccdbc570 #12536 lua: add vim.register_keystroke_callback 971a191c4 lua: Add ability to pass lua functions directly to vimL 91e41c857 #12401 lua: add vim.highlight.range f2894bffb #12279 lua: Add highlight.on_yank ae5bd0454 #11969 lua: add tbl_deep_extend ea4127e9a lua: metatable for empty dict value dab40f43b Add v:lua.func() vimL syntax for calling lua 678a51b1d Lua: vim.validate() 474d0bcbf lua: vim.rpcrequest, vim.rpcnotify, vim.NIL 8ee7c94a9 lua: add vim.fn.{func} for direct access to vimL function d0d38fc36 #11442 Lua: vim.env, vim.{g,v,w,bo,wo} Tree-sitter: Note: tree-sitter is considered experimental for 0.5. There's remaining bugs for buffer parsing, as well as known performance issues for large files and injected (nested) languages. e93342629 #10124 Tree-sitter API for lua 440695c29 tree-sitter: implement query functionality and highlighting prototype 8bea39f37 feat(treesitter): allow injections to be configured through directives 929f19414 feat(treesitter): add offset predicate for language injection cd75d3289 #14200 feat: treesitter checkhealth 1a631026a feat(treesitter): add language tree d3f544002 treesitter: runtime queries 3c5141d2c #13008 treesitter: add string parser 9437327d5 treesitter: use new on_bytes interface e4b5efa51 treesitter: use decoration provider API d6209a7b8 fix: Add a test and it is so pretty 836c31032 feat(ts): bump tree-sitter to v0.20.0 LSP client: 00dc12c5d #11336 lua LSP client: initial implementation d5aaad14e #11430 Followup improvements to LSP ee7ac469c #11578 LSP: Use async completion for omnifunc. 070bd3ea2 #11604 LSP: shrink API, improve docs 25afa10f9 #11669 Merge 'LSP: differentiate diagnostic underline by severity' e956ea767 #11777 LSP: show diagnostic in qf/loclist dd8b29cfe #11838 LSP: set InitializeParams.rootPath value 0c5d2ffeb #11837 Merge 'LSP: fixes, improve test visibility' ca8699378 #11638 LSP: implement documentHighlight 220a2b05c LSP/references: Add context to locations returned by server ccb038dc6 LSP/completion: add textEdit support da6f38ab3 #12313 LSP: Add workspace.applyEdit client capabilities f559e5249 #11607 LSP: Add textDocument/codeAction support 0d83a1c43 #12638 LSP: Feature/add workspace folders fd507e278 #13641 LSP: window/showMessageRequest e467d2939 LSP: Move workspace/configuration handler from nvim-lspconfig to core 2bdd553c9 feat(lsp): Add codelens support UI: f8134f2fd screen.c: remove fold_line special case c146eddc8 experimental support for per-window color schemes a1508c9f6 nvim__screenshot (dump TUI state to file) 08fe10010 terminal: enable pass through indexed colors to TUI in rgb mode 5a8569942 tests/ui: make screen.lua use "linegrid" representation internally 8fe19d9d8 screen: make ui_compositor aware of the intended size of a float 54ce1010e extmark: add new flexible "decorations" abstraction 4781333a7 decorations: allow virt_text overlay at any column bdebe8516 decorations: use extmark column adjustments for buffer highlights 7b488314d decorations: Allow highlights beyond end of line hl_eol 425bc438a decorations: add additional styling of virt_text overlays edb5864a2 floats: z-index 243820ebd floats: add borders (MS-DOS MODE) 5b6edc852 feat(float): add rounded borders preset 4a36ec6da #14310 float: add "solid" border style vim patches: around ~1000 vim patches and runtime updates got merged. Hooray! Changes include improvements to quickfix, prompt buffers, incsearch, display of search counts, and much much more. various features and changes: 858c05613 #12809 Support for :perl, :perlfile, :perldo and perleval() bc86f76c0 api/buffer: add "on_bytes" callback to nvim_buf_attach 19b623708 jobstart now supports env/clear_env ef7c6b972 Support specifying "env" option for termopen() 7c4f34966 #13287 switch from travis to github actions 24db59ca8 feat: implement BufModified autocmd b83d8223f implement Scroll autocommand 8caf84130 Lower "closed by the client" message level to INFO 7de276b87 bump libvterm to 0.1.4 097ec71bd #14096 aarch64/linux: fix build by updating LuaJIT bd5f0e969 #12531 support autoread using tui focus tracking 8a1276005 #12382 Add v:event.visual during `TextYankPost` 802f8429d api(nvim_open_win): add "noautocmd" option FIXES: 21444552c BugFix(clipboard): Fix block paste not working properly 01493e799 #14413 api: fix nvim_exec() silencing behaviour 9699f3be1 fix(doc): Add '/site' to stdpath('data') example in `:help 'rtp'` 581b2bcde screen: fix problem with p_ch eae4b1e5c luaref: fix leaks for global luarefs 409b2711f fix: segfault when pasting in term with empty buffer cf6c23fb0 #14273 fix plenty of errors discovered by clang 21035cff9 #14500 fix plenty of errors discovered by coverity bca19138b #13987 tui: fix possibility of evaluating uninitialized variables 9f2335937 fix_cursor: do not change line number when edit will not impact cursor row 33f92fe02 fix(pty): Always use $TERM from the job's env dict 6249059d4 checkhealth: fix terminfo problems on Windows 397be5d38 #12811 UI: fix cursor not displayed after hiding and un-hiding 87afc9031 screen.c: fix an issue with wrap and folds b419e39a2 screen.c: fix last character on foldtext 2ea312769 #13688 screen.c: fix display of signcolumn=auto in diffs c2d288e29 Fix screen terminal family issues 314b222c2 #14127 Fix click on foldcolumn with vsplit e65d0e53b vim.fn: throw error when trying to use API function
* Merge pull request #14864 from seandewar/get-config-zindexBjörn Linse2021-07-02
|\ | | | | fix(api/win_get_config): include z-index
| * fix(api/win_get_config): include z-indexSean Dewar2021-06-19
| |
* | doc(options): Fix recommended PowerShell config (#14349)Dimitri Tcaciuc2021-07-02
| | | | | | | | | | | | | | | | | | | | | | Ensure that * Shell uses UTF8 input/output mode * Stderr output is captured, in UTF8 * Program exit codes are correctly captured Update functional test harness and add tests for :make command. Closes #13713
* | Merge pull request #14792 from shadmansaleh/refactor/mkdir_pBjörn Linse2021-07-01
|\ \ | | | | | | Refactor(tests): Use os commands in mkdir_p helper
| * | Refactor(tests): mkdir_p in startup/init.lua testshadmansaleh2021-07-01
| | |
| * | Refactor(tests): Use os commands in mkdir_p helpershadmansaleh2021-06-30
| | |
* | | Tests(clipboard): Add test for block pasteshadmansaleh2021-07-01
| | |
* | | vim-patch:8.2.1905: the wininfo list may contain stale entries (#14884)Daniel Steinberg2021-06-30
|/ / | | | | | | | | | | Problem: The wininfo list may contain stale entries. Solution: When closing a window remove any other entry where the window pointer is NULL. https://github.com/vim/vim/commit/4882d983397057ea91c584c5a54aaccf15016d18
* | Merge pull request #14779 from tjdevries/tjdevries/vim_opt_fixesTJ DeVries2021-06-29
|\ \ | | | | | | An assortment of various vim.opt fixups.
| * | fix(vim.opt): Fix #14828 with empty values being incorrectly insertedTJ DeVries2021-06-29
| | |
| * | fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname styleTJ DeVries2021-06-29
| | |
| * | fix(vim.opt): Fix #14669 whichwrap now acts as expectedTJ DeVries2021-06-29
| | |
| * | fix(vim.opt): Add basic error handlingDavid Zhang2021-06-29
| | |
| * | fix(vim.opt): Get window options before setting.ckipp012021-06-29
| | | | | | | | | | | | | | | | | | | | | This closes #14677, but I also am a little unsure if there are times where this may not be correct. However, this just changes the behavior that even if `was_set` was false, we still get for `nvim_win_get_option`.
| * | fix(vim.opt): #14708 Now lets you put duplicate values in wildmodeTJ DeVries2021-06-29
| | |
* | | Merge pull request #14335 from chentau/extmark_delbytesBjörn Linse2021-06-29
|\ \ \ | |/ / |/| | Extmarks: manually zero out `curbuf->deleted_bytes2` on substitute and join
| * | Manually zero out deleted_bytes2 when substituting and joining lineschentau2021-06-29
| | |
* | | fix(doc): remove reference to vim.lsp.callbacks (#14576)Matthieu Coudron2021-06-28
| | | | | | | | | | | | too old now, can be confusing
* | | [RDY] Add buffer information to tabline_update (#12481)John Gehrig2021-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add buffer information to tabline_update Most terminal implementations of the tabline display buffer and tab information. Many neovim-qt users disable GuiTabline because it lacks functionality provided in the terminal implementation. The tabline_update event should include buffer information too, so client GUIs can display rich useful tabs.
* | | vim-patch:8.1.0897: can modify a:000 when using a reference (#14902)Jan Edmund Lazo2021-06-26
| | | | | | | | | | | | | | | | | | Problem: Can modify a:000 when using a reference. Solution: Make check for locked variable stricter. (Ozaki Kiichi, closes vim/vim#3930) https://github.com/vim/vim/commit/05c00c038bc16e862e17f9e5c8d5a72af6cf7788
* | | Fix `<afile>` getting prepended with a slash on WinClosed (#14515)Ghjuvan Lacambre2021-06-26
| | | | | | | | | | | | | | | | | | It is wrong to assume that you can't shorten a path if it's in `/`: you can always shorten it by removing the forward slash. Closes #14512
* | | fix(lsp): do not convert vim.NIL to nil in listsAkin Sowemimo2021-06-24
| | |
* | | Merge pull request #14868 from shadmansaleh/patch_verbose_for_luaBjörn Linse2021-06-23
|\ \ \ | | | | | | | | fix(runtime): Fix bugs regarding lua runtime files
| * | | fix(source): Source giving E484 & parsing error at line 1 for lua filesshadmansaleh2021-06-21
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's happening because do_source is only expected to return FAIL when it was unable to open file . But `nlua_exec_file` returns fail for parsing and execution error too . Those errors are emitted through `nlua_error`. So now return value of nlua_exec_file is ignored like do_cmdline. It now only returns fail when it was unable to open file that check is done before calling nlua_exec_file or do_cmdline. Errors in nlua_exec_file are still directly emitted through nlua_error like before.
* | | Merge pull request #14719 from snezhniylis/marktree_delete_node_iter_fixBjörn Linse2021-06-22
|\ \ \ | | | | | | | | Fix deletable nodes in MarkTree sometimes getting skipped
| * | | extmark: fix deletable nodes in MarkTree sometimes getting skippedsnezhniylis2021-06-22
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per #14236, performing extmark cleanup in a certain namespace does not guarantee removing all the extmarks inside given namespace. The issue resides within the tree node removal method and results in a couple of rare edge cases. To demonstrate what causes this bug, I'll give an example covering one of the edge cases. === AN EXAMPLE === (A) (B) (C) (D) (E) --------- --------- --------- --------- --------- <0, 1> <0, 1> <0, 1> <0, 1> <0, 1> <0, 2> <0, 2> <0, 2> <0, 2> <0, 2> <0, 3> <0, 3> <0, 3> <0, 3> <0, 3> <0, 4> <0, 4> <0, 4> <0, 4> <0, 4> <0, 5> <0, 5> <0, 5> <0, 5> <0, 5> <0, 6> <0, 6> <0, 6> <0, 6> <0, 6> <0, 7> <0, 7> <0, 7> <0, 7> <0, 7> <0, 8> <0, 8> <0, 8> <0, 8> <0, 8> <0, 9> <0, 9> * * <0, 9> * <0, 9> [0, 10] * [0, 10] <0, 9> [0, 11] [0, 11] [0, 11] [0, 11] [0, 11] [0, 12] [0, 12] * [0, 12] [0, 12] [0, 12] [0, 13] [0, 13] [0, 13] [0, 13] [0, 13] [0, 14] [0, 14] [0, 14] [0, 14] [0, 14] [0, 15] [0, 15] [0, 15] [0, 15] [0, 15] [0, 16] [0, 16] [0, 16] [0, 16] [0, 16] [0, 17] [0, 17] [0, 17] [0, 17] [0, 17] [0, 18] [0, 18] [0, 18] [0, 18] [0, 18] [0, 19] [0, 19] [0, 19] [0, 19] [0, 19] [0, 20] [0, 20] [0, 20] [0, 20] [0, 20] DIAGRAM EXPLANATION * Every column is a state of the marktree at a certain stage. * To make it simple, I don't draw the whole tree. What you see are 2 leftmost parent nodes ([0, 10], [0, 20]) and their children placed in order `MarkTreeIter` would iterate through. From top to bottom. * Numbers on this diagram represent extmark coordinates. Relative positioning and actual mark IDs used by the marktree are avoided for simplicity. * 2 types of brackets around coordinates represent 2 different extmark namespaces (`ns_id`s). * '*' shows iterator position. ACTUAL EXPLANATION Let's assume, we have two sets of extmarks from 2 different plugins: * Plugin1: <0, 1-9> * Plugin2: [0, 10-20] 1. Plugin2 calls `vim.api.nvim_buf_clear_namespace(buf_handle, ns_id, 0, -1)` to clear all its extmarks which results in `extmark_clear` call. 2. The iteration process goes on ignoring extmarks with irrelevant `ns_id` from Plugin1, until it reaches [0, 10], entering state (A). 3. At the end of cleaning up process, `marktree_del_itr` gets called. This function is supposed to remove given node and, if necessary, restructure the tree. Also, move the iterator to the next node. The bug occurs in this function. 4. The iterator goes backwards to the node's last child, to put it in the place of its deleted parent later. (B) 5. The parent node is deleted and replaced with its child node. (C) 6. Since now this node has 8 children, which is less than `MT_BRANCH_FACTOR - 1`, it get's merged with the next node. (D) 7. Finally, since at (B) the iterator went backward, it goes forward twice, skipping [0, 11] node, causing this extmark to persist, causing the bug. (E) ANALYSIS AND SOLUTION The algorithm works perfectly when the parent node gets replaced by its child, but no merging occurs. I.e. the exact same diagram, but without the (D) stage. If not for (D), it would iterate to <0, 9> and then to [0, 11]. So, iterating twice makes sense. The actual problem is in (C) stage, because the iterator index isn't adjusted and still pointing to no longer existent node. So my solution is to adjust iterator index after removing the child node. More info: https://github.com/neovim/neovim/pull/14719
* / / fixup! vim-patch:8.2.3020: unreachable code (#14866)Matthieu Coudron2021-06-22
|/ /
* | Merge pull request #13165 from mfussenegger/codelensMichael Lingelbach2021-06-14
|\ \ | | | | | | feat(lsp): Add codelens support
| * | feat(lsp): Add codelens supportMathias Fussenegger2021-06-14
| | |
* | | feat(float): add rounded borders presetChristian Clason2021-06-14
|/ / | | | | | | | | | | | | | | Add `borders = "rounded"` preset for `nvim_open_win`, equivalent to border = {"╭", "─", "╮", "│", "╯", "─", "╰", "│"} Also add undocumented "solid" preset to docs.
* | Merge pull request #14788 from shadmansaleh/fix/lua_runtime1Björn Linse2021-06-13
|\ \ | | | | | | fixup(runtime): Fix lua runtime files not listed in :scriptnames
| * | fixup(runtime): Fix lua runtime files not listedshadmansaleh2021-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | lua runtime files weren't listed in :scriptname & profiler. This fixes that. * Add tests * Small doc tweeks
* | | vim-patch:8.2.0038: spell suggestions insufficiently testedJan Edmund Lazo2021-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Spell suggestions insufficiently tested. Solution: Add spell suggestion tests. (Dominique Pelle, closes vim/vim#5398) https://github.com/vim/vim/commit/e9a8d1f9adaf4599b5a7923f8db8e207ed6e7eca Requires latest en.utf-8.spl from https://ftp.nluug.nl/pub/vim/runtime/spell/. Include the following patch because patch v8.2.0946 was merged: vim-patch:8.2.0948: spell test fails Problem: Spell test fails. Solution: Adjust expected text of the prompt. https://github.com/vim/vim/commit/d281b7c227bc4c78813fdc297ccee4b2cad7e605
* | | vim-patch:8.1.1838: there is :spellwrong and :spellgood but not :spellrareJan Edmund Lazo2021-06-12
|/ / | | | | | | | | | | Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim/vim#4291) https://github.com/vim/vim/commit/08cc374dabd2a02785129fa1c0100f7745c244ad
* | test: clear $GZIP, use nvim's system() (#14791)Jan Edmund Lazo2021-06-12
| |
* | fix(ui): Fix pum incorrect position in multigrid modeSerg Tereshchenko2021-06-12
| | | | | | | | Refs #12985
* | refactor(source): Move lua file detection to do_sourceshadmansaleh2021-06-11
| | | | | | | | | | | | So now :source can run lua files too :) * feat: Add support for :[ranged]source for lua files
* | refactor(tests): Simplify tests at functional/lua/runtime_specshadmansaleh2021-06-11
| |
* | feat(runtime): Allow lua to be used in syntaxshadmansaleh2021-06-11
| |
* | feat(runtime): Allow lua to be used in ftdetectshadmansaleh2021-06-11
| |
* | feat(runtime): Allow lua to be used in indentshadmansaleh2021-06-11
| |
* | feat(runtime): Allow lua to be used in ftpluginshadmansaleh2021-06-11
| |
* | feat(runtime): Allow lua to be used in compilershadmansaleh2021-06-11
| |
* | feat(runtime): Allow lua to be used in colorschemesshadmansaleh2021-06-11
| | | | | | | | * tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
* | feat(startup): Source runtime/plugin/**/*.lua at startupshadmansaleh2021-06-11
|/ | | | | | For opt plugins these files are sourced on `:packadd` * `:runtime` Now can exexute lua files
* api: include border in nvim_win_get_configCorey Williamson2021-06-10
|
* api: add nvim_win_callnotomo2021-06-10
|