Commit Graph

18398 Commits

Author SHA1 Message Date
James McCoy
cd864748d3 test: use $TEST_TIMEOUT to specify timeout 2021-09-14 07:52:33 -07:00
Justin M. Keyes
09ff3146f3 test: timeout at 20 minutes #15597
Set a maximum test run-time of 20 minutes to:
- fail faster
- avoid wasting CI resources
- set a bound on the test time (if tests take longer than 20 minutes we
  need to invest in parallelizing them...)

Timeout looks like:

    -- Tests exited non-zero: Process terminated due to timeout
    -- No output to stderr.
    CMake Error at /…/neovim/cmake/RunTests.cmake:86
    (message):
      functional tests failed with error: Process terminated due to timeout
2021-09-14 07:52:27 -07:00
Justin M. Keyes
f809664f89 ci: skip "cancels stale events on channel close" #15278
- ref #14083 #15251
- also: docs: naming conventions
2021-09-14 07:51:01 -07:00
Justin M. Keyes
d83df7f7b5 feat(lua)!: register_keystroke_callback => on_key
Analogous to nodejs's `on('data', …)` interface, here on_key is the "add
listener" interface.

ref 3ccdbc570d #12536

BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
2021-09-14 07:29:46 -07:00
hrsh7th
64dc7a1b55 fix(lsp): correctly parse LSP snippets #15579
Fixes #15522
2021-09-14 07:11:40 -07:00
Justin M. Keyes
5a813160ae
Merge #15664 backport PRs
backport: PRs #14962, #14982, #14984, #14989, #15011, #15043
2021-09-14 07:02:06 -07:00
Daniel Steinberg
917f306666
backport: test/memory_usage_spec: skip on MacOS #15043
Memory compression could complicate the measurements.
2021-09-14 14:41:25 +01:00
Shadman
a9cca1b050
backport: fixup(clipboard): Fix error not properly handled #14984
fixes #14967
2021-09-14 13:15:39 +01:00
Folke Lemaitre
989ccb8222
backport: fix(lsp): restore diagnostics extmarks on buffer changes (#15011) 2021-09-14 13:15:38 +01:00
Folke Lemaitre
2ae4c96d91
backport: fix(lsp): prevent double <text> for cached plaintext markup 2021-09-14 13:15:38 +01:00
jadedpasta
ae89330ec0
backport: fix(vim.opt): vimL map string values not trimmed (#14982)
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>
2021-09-14 13:15:38 +01:00
Shadman
2229e99ef9
backport: fixup(clipboard): Use case matching #14962
Context: https://github.com/neovim/neovim/pull/14848#discussion_r663203173
2021-09-14 13:15:37 +01:00
James McCoy
88336851ee
Merge pull request #15496 from jamessan/stdin_closed_backport
backport: feat(job): add parameter to close stdin
2021-08-27 07:26:32 -04:00
Gregory Anders
3a0543bd61
Add test case for 'null' stdin mode 2021-08-26 21:57:25 -04:00
Gregory Anders
008b83f5a2
Rename stdin to stdin_mode
stdin is a macro in Windows builds.
2021-08-26 21:57:11 -04:00
Gregory Anders
915dda3f96
feat(job): add parameter to close stdin
Some programs behave differently when they detect that stdin is being
piped. This can be problematic when these programs are used with the job
control API where stdin is attached, but not typically used. It is
possible to run the job using a PTY which circumvents this problem, but
that includes a lot of overhead when simply closing the stdin pipe would
suffice.

To enable this behavior, add a new parameter to the jobstart options
dict called "stdin" with two valid values: "pipe" (the default)
implements the existing behavior of opening a channel for stdin and
"null" which disconnects stdin (or, if you prefer, connects it to
/dev/null). This is extensible so that other modes can be added in the
future.
2021-08-26 21:56:45 -04:00
Justin M. Keyes
b6b12ea7c3
fix(man.vim): filetype=man is too eager #15489
Problem:
"set filetype=man" assumes the user wants :Man features, this does extra
stuff like renaming the buffer as "man://".

Solution:
- old entrypoint was ":set filetype=man", but this is too presumptuous #15487
- make the entrypoints more explicit:
  1. when the ":Man" command is run
  2. when a "man://" buffer is opened
- remove the tricky b:man_sect checks in ftplugin/man.vim and syntax/man.vim
- MANPAGER is supported via ":Man!", as documented.

fixes #15487
2021-08-26 02:50:30 -07:00
James McCoy
502a56867d
Merge pull request #15445 from jamessan/appdata-version
fix: add 0.5.0 release to appdata
2021-08-21 15:21:45 -04:00
James McCoy
78482138ae
fix: add 0.5.0 release to appdata
[skip ci]
2021-08-21 14:36:12 -04:00
James McCoy
fe815244f0
Merge pull request #15389 from jamessan/32-bit-revert
[release-0.5] Revert "tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)"
2021-08-16 07:55:38 -04:00
James McCoy
c417d573a3
Revert "tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)"
This reverts commit ed11721b6b.

It broke multiple 32-bit builds and isn't actually required for building
in a true x86 32-bit environment.
2021-08-16 00:02:22 -04:00
James McCoy
56d86970b0
Merge pull request #15375 from jamessan/fragility
[release-0.5] test(lsp): disable finicky test when TEST_SKIP_FRAGILE is set
2021-08-14 22:11:01 -04:00
James McCoy
6c4f66f381
Merge pull request #15376 from jamessan/release-fixes
[release-0.5] Clean up release handling
2021-08-14 21:46:38 -04:00
James McCoy
8491077314
test(lsp): disable finicky test when TEST_SKIP_FRAGILE is set 2021-08-13 23:53:55 -04:00
James McCoy
6f965f41df
build: use RelWithDebInfo build for nightlies, Release for releases
Unlike Release build type, RelWithDebInfo does not disable asserts.
This helps get better debug info from people brave enough to use the
nightly builds, but shouldn't be used for official releases.

[skip ci]
2021-08-13 23:32:15 -04:00
James McCoy
f027c5e1e4
build: update appdata.xml version in release commit
Adding the version we just released in the "version bump" commit is
useless, since that means the actual release only reports the old
version.

Closes #15362

[skip ci]
2021-08-13 23:32:10 -04:00
James McCoy
f589c2619b
Merge pull request #15289 from jamessan/pending-c-parsers
[release-0.5] test(treesitter): skip all parsers tests if parsers aren't installed
2021-08-06 07:24:19 -04:00
James McCoy
8336488ce1
test(treesitter): skip all parsers tests if parsers aren't installed 2021-08-05 21:41:55 -04:00
Björn Linse
a5ac2f45ff NVIM v0.5.0
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
2021-07-02 17:54:29 +02:00
Björn Linse
b6ff02e27b ex_cmds: verify invalid command name 2021-07-02 17:44:44 +02:00
Björn Linse
7685fc9ecd
Merge pull request #14864 from seandewar/get-config-zindex
fix(api/win_get_config): include z-index
2021-07-02 14:52:08 +02:00
Dimitri Tcaciuc
8b07653902
doc(options): Fix recommended PowerShell config (#14349)
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
2021-07-02 08:15:40 -04:00
James McCoy
7d8202087b
Merge pull request #14951 from rktjmp/14924-checksums
feat(ci): Add sha256 checksums to release notes
2021-07-01 22:32:05 -04:00
Christian Clason
2dd7828511
runtime/vim: d2ea7cf10a4d026ebd402594d656af7d5c811c24 (#14950)
Port vim syntax file only.
2021-07-01 17:31:30 -04:00
Oliver Marriott
d1c906a7c6 feat(ci): Add sha256 checksums to release notes 2021-07-02 05:06:21 +10:00
dundargoc
e8247bc739
lint (#14941)
Fix SC2155 error, found by shellcheck v0.7.2.

https://github.com/koalaman/shellcheck/wiki/SC2155
2021-07-01 12:37:03 -04:00
Björn Linse
f133ab598f
Merge pull request #14792 from shadmansaleh/refactor/mkdir_p
Refactor(tests): Use os commands in mkdir_p helper
2021-07-01 16:20:34 +02:00
Björn Linse
a50a3a12d6
Merge pull request #14848 from shadmansaleh/fixup/block_paste_clipboard
fix(clipboard): Fix block paste from system clipboard not working properly
2021-07-01 15:47:21 +02:00
shadmansaleh
47a08ec72e Tests(clipboard): Add test for block paste 2021-07-01 15:01:01 +06:00
shadmansaleh
21444552c0 BugFix(clipboard): Fix block paste not working properly
Block copy and paste from system-clipboard currently breaks formatting.
This fixes it.

The bug occurs because system-clipboard doesn't contain information
about what mode the copy was made.
Simple solution to this is we keep a cache of copy we last made along
with mode information. If system-clipboard returns the cache we apply
the mode information that we know about that cache.
2021-07-01 15:01:01 +06:00
shadmansaleh
27ea0d37e1 Refactor(tests): mkdir_p in startup/init.lua test 2021-07-01 08:25:55 +06:00
Érico Nogueira Rolim
f35a5f2efc
Revert "tui: improve support for tmux, GNU Screen" (#14786)
* Revert "tui: improve support for tmux, GNU Screen"

This reverts commit c266c2f36e.

This commit broke neovim under tmux, where it "types" the background
string as input to the terminal. Fixing this with neovim as-is requires
changing tmux keybindings or TERM settings, which has to be done by
every single user, therefore a fix should happen on neovim's side.

Fixes #14298

* tui: fix code lints.
2021-06-30 21:29:51 -04:00
Daniel Steinberg
8bd6990084
vim-patch:8.2.1905: the wininfo list may contain stale entries (#14884)
Problem:    The wininfo list may contain stale entries.
Solution:   When closing a window remove any other entry where the window
            pointer is NULL.
4882d98339
2021-06-30 21:24:50 -04:00
Jan Edmund Lazo
d83bc835b6
Merge pull request #14938 from janlazo/vim-8.2.3072
vim-patch:8.2.{3072,3075}
2021-06-30 18:46:22 -04:00
Daniel Steinberg
fe10a4e555
Open funcs_data.mpack in binary mode. (#14944)
"b" flag is required to read binary files on Windows. 
https://www.lua.org/pil/21.2.2.html
2021-06-30 18:17:48 -04:00
shadmansaleh
b82d8faf53 Refactor(tests): Use os commands in mkdir_p helper 2021-06-30 23:27:36 +06:00
Thomas Vigouroux
390fed3248
Merge pull request #14939 from clason/bump-ts-0.20
[RDY] feat(ts): bump tree-sitter to v0.20.0
2021-06-30 18:18:35 +02:00
James McCoy
48b2092d01
Merge pull request #14942 from jamessan/functionaltest-lua
ci(gha): Add functionaltest-lua checker
2021-06-30 09:58:02 -04:00
Björn Linse
3438959da9
Update CONTRIBUTING.md: mention ASAN/UBSAN for runtime errors 2021-06-30 14:57:52 +02:00
Christian Clason
836c310321 feat(ts): bump tree-sitter to v0.20.0 2021-06-30 12:11:35 +02:00