Commit Graph

18798 Commits

Author SHA1 Message Date
dundargoc
3b3dbcf7b7
refactor: format files with uncrustify #15607 2021-09-10 06:14:15 -07:00
Christian Clason
aab3583e74
vim-patch:8.2.3399: Octave files are not recognized (#15622)
Problem:    Octave files are not recognized.
Solution:   Detect Octave files. (Doug Kearns)
deba5eb195
2021-09-10 14:01:13 +02:00
James McCoy
185ed18e6c
Merge pull request #15618 from jamessan/test-timeout-config
test: use $TEST_TIMEOUT to specify timeout
2021-09-10 06:27:20 -04:00
Christian Clason
8f0c843c13
vim-patch:4d8f476176ea (#15612)
* vim-patch:4d8f476176ea

Update runtime files
4d8f476176

skip nsis/README.txt
skip doc/vim9.txt
skip src/nvim/po/it.po
2021-09-10 08:48:27 +02:00
Gregory Anders
a422f2136a
docs(gen_vimdoc.py): ignore health.lua files #15614 2021-09-09 18:28:12 -07:00
James McCoy
8d93223f83
test: use $TEST_TIMEOUT to specify timeout 2021-09-09 20:49:26 -04:00
Christian Clason
2fe95cb1ad
vim-patch:partial 2346a6378483 (#15599)
Update runtime files
2346a63784

omit doc/vim.man
omit doc/vim9.txt
omit doc/vimdiff.txt
omit doc/vimdiff.man

skip doc/eval.txt (missing patch 8.2.2324)
skip doc/help.txt (missing patch 8.2.2344)
2021-09-09 18:59:11 +02:00
Björn Linse
d80aac3b2a
Merge pull request #15566 from bfredl/mpack
libs: vendor libmpack and libmpack-lua
2021-09-09 18:47:03 +02:00
Justin M. Keyes
13748512f6
test(busted): disable colors in test-runner output #15610
Problem
-------

Because test/busted/outputHandlers/nvim.lua doesn't know if it's running
in a terminal (no "isatty" equivalent), it outputs color codes in CI
logs and local tooling that runs the tests in a pipe:

    [1m[ SKIPPED ] 

This is just noise, hard for humans to read.

Solution
--------

Disable the color codes. If we later find a clever way to detect
a terminal in nvim.lua, we might consider re-enabling colors, but that
would still affect the CI build logs...
2021-09-09 09:18:43 -07:00
Björn Linse
422198cde6
Merge pull request #15091 from yatli/mouse_drag_fix
fix #15075 (mouse crash in multigrid)
2021-09-09 17:37:59 +02:00
Björn Linse
ad8eda3f5b fix(ci): don't enrage the CI Gods by calling a file 'core.*' 2021-09-09 16:06:43 +02:00
Björn Linse
0f596665cc feat(lua): make vim.mpack support vim.NIL and vim.empty_dict() 2021-09-09 16:06:43 +02:00
Björn Linse
eaf661dacd feat(lua): add vim.mpack for msgpack support in lua 2021-09-09 16:06:43 +02:00
Björn Linse
2a08aeff1a fix(build): make vendored libmpack and libmpack-lua build properly 2021-09-09 16:06:43 +02:00
Björn Linse
4ef3c2c2c1 build: vendor libmpack/libmpack-lua sources from b593809d93b5299bbee4e1d18e2e2d55f9fa53a6 2021-09-09 16:06:43 +02:00
Björn Linse
c8f46480bc build: vendor libmpack source from libmpack/libmpack 22b1fd90285117c995728511f9525d29520a8c82 2021-09-09 16:06:43 +02:00
Justin M. Keyes
d8339be691
Merge #15460 feat(lua)!: register_keystroke_callback => on_key 2021-09-09 06:55:35 -07:00
Justin M. Keyes
9f3679cbfd docs: naming conventions 2021-09-09 06:28:11 -07:00
Justin M. Keyes
69fe427df4 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-09 06:09:33 -07:00
Sean Dewar
4eb1ebbcf7
fix(doc): various fixes #15604
In particular:
- jobwait: omitting {timeout} arg is the same as -1.
- sockconnect: omitting {opts} arg is the same as {}.
- jobsend: obsoleted by chansend; don't mention it in job_control.txt.
- menu_get: add to |functions| table.

[skip ci]
2021-09-09 00:37:59 -07:00
Christian Clason
ed0c747788
Merge pull request #15602 from clason/vim-8.2.3390
vim-patch:8.2.3390: included xdiff code is outdated

build: move src/nvim/xdiff to src/xdiff
2021-09-09 08:43:20 +02:00
Christian Clason
fbe88ef8f5 build: move src/nvim/xdiff to src/xdiff
Closes #11239
2021-09-08 22:34:54 +02:00
Christian Clason
69f4438d35 vim-patch:8.2.3390: included xdiff code is outdated
Problem:    Included xdiff code is outdated.
Solution:   Sync with xdiff in git 2.33. (Christian Brabandt, closes vim/vim#8431)
ba02e4720f
2021-09-08 22:33:20 +02:00
Zi How Poh
c1f573fbc9
feat(lsp): support textDocument/prepareRename (#15514) 2021-09-08 17:00:15 +02:00
Christian Clason
11289ad733
fix(termdebug): replace term_getline with getbufline #15598
Correct incomplete runtime file port in
79cbbd5179
2021-09-08 07:35:40 -07:00
Christian Clason
79cbbd5179
vim-patch:d2ea7cf10a4d #15571
Update runtime files
d2ea7cf10a

omit `runtime/doc/if_tcl.txt`
omit `runtime/doc/textprop.txt`
omit `runtime/tutor/*`
omit `runtime/syntax/vim.vim` (cherry-picked in 2dd7828511)

manual merge of `runtime/pack/dist/opt/termdebug/plugin/termdebug.vim`
2021-09-08 07:24:12 -07:00
Justin M. Keyes
5e5a329ea2
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-08 07:21:28 -07:00
Michael Lingelbach
384a43fe71
chore(lsp): fix formatting in vim.lsp.log (#15596) 2021-09-07 21:48:19 -07:00
Michael Lingelbach
257e8a7431
Merge pull request #15595 from mjlbach/feat/add-healthcheck-lsp
* feat(lsp): add lsp healthcheck

* feat(lsp): add warning message for large log size
2021-09-07 21:16:19 -07:00
Michael Lingelbach
e6777a7a04 feat(lsp): add warning message for large log size 2021-09-07 20:52:08 -07:00
Michael Lingelbach
e26802650d feat(lsp): add lsp healthcheck
Add healthcheck for language server client, currently only checks
logging status.
2021-09-07 20:51:40 -07:00
Björn Linse
47f99d6644
Merge pull request #15575 from dundargoc/refactor/uncrustify
refactor: format files with uncrustify
2021-09-07 22:18:46 +02:00
Yatao Li
28ac6c00e6 fix(multigrid): #15075 mouse events crash neovim 2021-09-08 01:57:40 +08:00
Dundar Göc
1e49a1c888 refactor: format files with uncrustify 2021-09-07 19:07:51 +02:00
Jit
db695cc4ca
fix(screen): missing search highlights when redrawing from timer #15380
* Revert "vim-patch:8.1.2294: cursor pos wrong with concealing and search causes a scroll"
* Add a test which covers #13074 910bbc3cca
  while reverting the screen.c code changes from there.

Fixes #14064
2021-09-06 15:18:33 -07:00
Mathias Fußenegger
687a0b3d3e
fix(lsp): adapt codelens resolve to handler signature change (#15578)
Follow up to https://github.com/neovim/neovim/pull/15504
2021-09-06 17:30:53 +02:00
Jose Alvarez
3f526feebf
fix(lsp): update workspace/applyEdit handler signature (#15573) 2021-09-05 12:48:54 -07:00
Michael Lingelbach
23fe6dba13
Merge pull request #15504 from mjlbach/feat/change-handler-signature
feat(lsp)!: change handler signature
2021-09-05 10:27:52 -07:00
Michael Lingelbach
f7dabbc115 docs: regenerate 2021-09-05 10:05:38 -07:00
Michael Lingelbach
df17d7844e feat(lsp)!: change handler signature
Previously, the handler signature was:

  function(err, method, params, client_id, bufnr, config)

In order to better support external plugins that wish to extend the
protocol, there is other information which would be advantageous to
forward to the client, such as the original params of the request that
generated the callback.

In order to do this, we would need to break symmetry of the handlers, to
add an additional "params" as the 7th argument.

Instead, this PR changes the signature of the handlers to:

  function(err, result, ctx, config)

where ctx (the context) includes params, client_id, and bufnr. This also leaves
flexibility for future use-cases.

BREAKING_CHANGE: changes the signature of the built-in client handlers, requiring
updating handler calls
2021-09-05 10:04:30 -07:00
Björn Linse
7a0468e7ad
Merge pull request #15569 from bfredl/end_fill
refactor(screen): let win_line() always handle fillers after last line
2021-09-05 17:45:46 +02:00
Ben Noordhuis
c9c9422af0
build: fix fpclassify -Wfloat-conversion warning #15570
Work around a glibc bug where it truncates the argument to fpclassify()
from double to float by implementing fpclassify() ourselves.

Correctness test (Note that the FP_SUBNORMAL test depends on an atof() that
knows how to parse subnormals. Glibc does, not sure about other libcs.):

    #include <math.h>
    #include <stdint.h>
    #include <string.h>

    int xfpclassify(double d)
    {
      uint64_t m;
      int e;

      memcpy(&m, &d, sizeof(m));
      e = 0x7ff & (m >> 52);
      m = 0xfffffffffffffULL & m;

      switch (e) {
        default: return FP_NORMAL;
        case 0x000: return m ? FP_SUBNORMAL : FP_ZERO;
        case 0x7ff: return m ? FP_NAN : FP_INFINITE;
      }
    }

    #include <assert.h>
    #include <stdlib.h>

    int main(void)
    {
      assert(FP_ZERO == xfpclassify(atof("0.0")));
      assert(FP_ZERO == xfpclassify(atof("-0.0")));
      assert(FP_NORMAL == xfpclassify(atof("1.0")));
      assert(FP_NORMAL == xfpclassify(atof("-1.0")));
      assert(FP_INFINITE == xfpclassify(atof("inf")));
      assert(FP_INFINITE == xfpclassify(atof("-inf")));
      assert(FP_NAN == xfpclassify(atof("nan")));
      assert(FP_NAN == xfpclassify(atof("-nan")));
      assert(FP_SUBNORMAL == xfpclassify(atof("1.8011670033376514e-308")));
      return 0;
    }
2021-09-05 07:37:25 -07:00
Björn Linse
274248c354 refactor(screen): let win_line() always handle fillers after last line 2021-09-05 11:22:45 +02:00
Izhak Jakov
dce50312e1
vim-patch:90df4b9 (#15494)
Add JSONC runtime files

Co-authored-by: Izhak Jakov <izhakjakov>
2021-09-04 19:49:17 +02:00
Björn Linse
6117877823
Merge pull request #15563 from dundargoc/refactor/uncrustify
refactor: update uncrustify config and format screen.c
2021-09-04 09:39:30 +02:00
Dundar Göc
15af08ad17 refactor: update uncrustify config and format screen.c
Also set new option cmt_trailing_single_line_c_to_cpp to true. It
converts trailing, single-line c-comments (/**/) into cpp-comments (//).
2021-09-03 21:23:23 +02:00
Justin M. Keyes
5f8518b3f0
fix(defaults): "syntax sync maxlines=1" on CmdwinEnter #15552
I mistakenly suggested maxlines=&cmdwinheight, forgetting that it is
calculated from topline, not cursor. maxlines=1 makes the most sense in
cmdwin.

ref #15401 622a36b1f1
2021-09-02 10:29:59 -07:00
Gregory Anders
622a36b1f1
feat(defaults): limit syntax cost on CmdwinEnter #15401
Add a new default autocommand to limit syntax highlighting
synchronization in the command window. This refactors the nvim_terminal
autocommand out of main() and into a new init_default_autocmds()
function, which is now part of the startup process and can be further
extended with more default autocommands down the road.

ref #6289 #6399
2021-09-02 04:17:04 -07:00
Justin M. Keyes
6751d6254b
refactor(tests): use assert_alive() #15546 2021-09-01 09:42:53 -07:00
Justin M. Keyes
0603eba6e7
feat(api): nvim_get_chan_info: include "argv" for jobs #15537
ref #15440
2021-09-01 07:29:38 -07:00