Commit Graph

14518 Commits

Author SHA1 Message Date
Daniel Hahler 30ae60e7ca
Fix/revisit git-describe enhancement (#11124)
* Fix/keep massaging git-describe result

Ref: https://github.com/neovim/neovim/pull/11117#issuecomment-536416223

* build: revisit generation of version from Git

Fixes "make clean && make", where "auto/versiondef.h" would be missing
since b18b84d - because BYPRODUCTS are apparently removed when cleaning.

This includes the following improvements/changes:

- do not run git-describe during CMake's configure phase just for
  reporting
- do not print with changed Git version (too noisy, simplifies code)

* Move to src/nvim (included before config) for easier flow

* fallback to describe always, write empty include file

* update_version_stamp.lua: use prefix always
2019-10-02 03:45:59 +02:00
Daniel Hahler ac32426b94
build: get rid of warnings with `cmake --debug-output` (#11131) 2019-10-02 03:44:57 +02:00
Daniel Hahler 8a4ae3d664
tui: improve handle_background_color: short-circuit (#11067)
* handle_background_color: short-circuit if handled already

* Unit tests for handle_background_color

* set waiting_for_bg_response to false in tui_terminal_after_startup
  By then it should have been received.
2019-09-30 22:00:55 +02:00
Björn Linse 7e46fcaf23
Merge pull request #11121 from bfredl/invalidcell
screen: don't crash on invalid cells being recomposed (tui_raw_line assert)
2019-09-30 20:32:59 +02:00
Björn Linse dd26bd5974 screen: don't crash on invalid grid cells being recomposed 2019-09-30 19:05:54 +02:00
Daniel Hahler dc52458522
third-party: upgrade libluv: 1.30.0-0 => 1.30.1-1 (#11092)
Changes: https://github.com/luvit/luv/compare/1.30.0-0...1.30.1-1
2019-09-30 12:55:47 +02:00
Daniel Hahler 179c46a016
provider#pythonx: resolve/expand exe from host var (#11047)
This reverts part of ade88fe4c [1].

This is required for `let g:python3_host_prog = 'python'` etc, where it
should get picked up from PATH.

Without this it would show:

```
  - INFO: pyenv: Path: /home/user/.pyenv/libexec/pyenv
  - INFO: pyenv: Root: /home/user/.pyenv
  - INFO: Using: g:python3_host_prog = "python"
  - ERROR: "python" was not found.
  - INFO: Executable: Not found
  - ERROR: Detected pip upgrade failure: Python executable can import "pynvim" but not "neovim": python
    - ADVICE:
      - Use that Python version to reinstall "pynvim" and optionally "neovim".
          pip3 uninstall pynvim neovim
          pip3 install pynvim
          pip3 install neovim  # only if needed by third-party software
```

Note that it additionally causes a weird error
("Detected pip upgrade failure"), due to `s:check_bin` emptying
`python_exe` (because the non-absolute file not being readable), and
`provider#pythonx#DetectByModule('pynvim', a:version)` from 75593e6fce
then just getting the value from the host var again (without actual
checks).
This is implicitly fixed via this patch now (because it is skipped), but
could need some improvement in this regard probably.

With this patch it resolves it (for a virtualenv where pynvim is not
made available intentionally):
```
  - INFO: pyenv: Path: /home/daniel/.pyenv/libexec/pyenv
  - INFO: pyenv: Root: /home/daniel/.pyenv
  - INFO: Using: g:python3_host_prog = "python"
  - WARNING: $VIRTUAL_ENV exists but appears to be inactive. This could lead to unexpected results.
    - ADVICE:
      - If you are using Zsh, see: http://vi.stackexchange.com/a/7654
  - INFO: Executable: /home/daniel/.pyenv/shims/tmp-system-deoplete.nvim-f205aF/python
  - ERROR: Command error (job=11, exit code 1): `'/home/daniel/.pyenv/shims/tmp-system-deoplete.nvim-f205aF/python' -c 'import sys; sys.path.remove(""); import neovim; print(neovim.__file__)'` (in '/home/daniel/.dotfiles/vim/plugged/deoplete.nvim')
    Output: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
    Stderr: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
  - INFO: Python version: 3.7.4
  - INFO: pynvim version: unable to load neovim Python module
  - ERROR: pynvim is not installed.
    Error: unable to load neovim Python module
    - ADVICE:
      - Run in shell: pip3 install pynvim

```

Note: this appears to display the error twice via "Output:" and
"Stderr:".

1: https://github.com/neovim/neovim/pull/8784
2019-09-30 12:52:04 +02:00
Daniel Hahler b0f5441c5e
bundle: upgrade LuaJIT to latest v2.1 (#10321) 2019-09-30 12:50:22 +02:00
Daniel Hahler b18b84df5e
build: run git-describe for dev version during build (#11117)
This avoids invoking CMake after a new commit, which might take 15s on
some systems.

Skipped on CMake < 3.2.0 (missing BYPRODUCTS support).

Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2019-09-30 00:10:29 +02:00
Björn Linse ce637d0ef1
Merge pull request #11115 from bfredl/wildmenumode
cmdline: wildmenumode() should be true with wildoptions+=pum
2019-09-29 15:55:18 +02:00
Daniel Hahler 0a2a1e241f
cmake: use LibFindMacros for utf8proc (#11114)
Also update doc.
2019-09-29 04:44:02 +02:00
Daniel Hahler 34d55f8607
terminfo_start: keep first flushing of ui buffer (#11118)
Initially done in 3626d2107 (#11074, for #11062), it was reverted then
in 445f2f409 (#11083, which added flushing later).

But it is still required here to avoid the reporting of the background
response with urxvt/kitty (`nvim -u NONE -cq`).
Apparently I've tested this not enough with 445f2f409 (probably only within tmux).
2019-09-29 03:06:36 +02:00
Björn Linse 0636b25f28 cmdline: wildmenumode() should be true with wildoptions+=pum 2019-09-28 21:00:27 +02:00
Björn Linse e933426299
Merge pull request #10124 from bfredl/tree-sitter-api
Tree-sitter step 1: vendor runtime lib + add lua API
2019-09-28 18:35:02 +02:00
Björn Linse 9fa850991d tree-sitter: improve and cleanup tests 2019-09-28 17:46:25 +02:00
Björn Linse c844f986d4 tree-sitter: use "module" pattern in lua source 2019-09-28 17:46:25 +02:00
Björn Linse d5a69eb076 tree-sitter: handle node equality 2019-09-28 17:46:25 +02:00
Björn Linse 3ffcb477ef tree-sitter: start docs 2019-09-28 17:46:25 +02:00
Björn Linse e0d6228978 tree-sitter: use "range" instead of "point_range" consistently in lua API 2019-09-28 17:46:25 +02:00
Björn Linse f86a2c33a2 tree-sitter: simplify editing using the new old_byte_size parameter 2019-09-28 17:46:25 +02:00
Björn Linse 06ee45b9b1 tree-sitter: fix lint, delete "demo" plugin (replaced by functional tests) 2019-09-28 17:46:25 +02:00
Björn Linse 167a1cfdef tree-sitter: improve parser API (shared parser between plugins) 2019-09-28 14:55:43 +02:00
Björn Linse d697841a9d tree-sitter: cleanup tree refcounting 2019-09-28 14:55:43 +02:00
Björn Linse d24dec596c tree-sitter: inspect language 2019-09-28 14:55:43 +02:00
Björn Linse a88a9f128e tree-sitter: add some more API 2019-09-28 14:55:43 +02:00
Björn Linse c1dc1bedba tree-sitter: style 2019-09-28 14:55:43 +02:00
Björn Linse a361e09cc5 tree-sitter: use standard luaL_newmetatable and luaL_checkudata pattern 2019-09-28 14:55:43 +02:00
Björn Linse c8f861b739 tree-sitter: rename tree_sitter => treesitter for consistency 2019-09-28 14:55:43 +02:00
Björn Linse 4ea5e63aa8 tree-sitter: add basic testing on ci
build tree-sitter c parser on ci for testing purposes
2019-09-28 14:55:43 +02:00
Björn Linse afba23099f tree-sitter: support pre-registration of languages 2019-09-28 14:55:43 +02:00
Björn Linse 1e9e2451be tree-sitter: objectify API 2019-09-28 14:55:43 +02:00
Björn Linse 005b6d638c tree-sitter: split tree-sitter lua interface from demo code 2019-09-28 14:55:43 +02:00
Björn Linse c07e1e8696 tree-sitter: cleanup build code 2019-09-28 14:55:43 +02:00
Björn Linse b871100be7 Create BuildUtf8proc.cmake and FindUtf8proc.cmake
Using advanced search and replace technology
2019-09-28 14:31:03 +02:00
Björn Linse 0e0beef85e tree-sitter: load parsers as .so files 2019-09-28 14:31:03 +02:00
Björn Linse cd10096386 tree-sitter: initial tree-sitter support 2019-09-28 14:31:03 +02:00
Björn Linse 8ff2f193bb tree-sitter: change vendored tree-sitter to use nvim memory management 2019-09-28 14:31:03 +02:00
Björn Linse 3bddf05023 tree-sitter: vendor tree-sitter runtime
tree-sitter/tree-sitter commit 7685b7861ca475664b6ef57e14d1da9acf741275

Included files are:
lib/include/tree-sitter/*.h
lib/src/*.[ch]
LICENSE
2019-09-28 14:30:48 +02:00
Daniel Hahler 0d9a3c86a1
vim-patch:8.1.2083: multi-byte chars do not work properly with "%.*S" in printf() (#11106)
Problem:    Multi-byte chars do not work properly with "%.*S" in printf().
Solution:   Use mb_ptr2cells(). Daniel Hahler, closes vim/vim#4989)
ce0fac2897
2019-09-28 00:32:22 +02:00
Daniel Hahler fe9d54f418
doc: contrib/local.mk.example: include ENABLE_LTO (#11097)
Using it takes 30+ additional seconds for me with a ccache-enabled build
(43s vs. 12s).

While it certainly makes sense to use DEBUG during development,
bisecting etc, it should be made clearer what causes this.
2019-09-26 23:43:49 +02:00
John Szakmeister 298da52fdc
Merge pull request #10907 from jszakmeister/add-freebsd-sourcehut-support
build: add support for building for FreeBSD under Sourcehut
2019-09-26 05:35:12 -04:00
Daniel Hahler 54c66e636a
Fix two more flaky tests (#11095)
* mode_spec: retry with increasing matchtime

`matchtime=2` might still be too low (with luacov on AppVeyor).

    [  ERROR   ] test/functional\ui\mode_spec.lua @ 47: ui mode_change event works in insert mode
    test\functional\ui\screen.lua:587: mode
    Expected objects to be the same.
    Passed in:
    (string) 'insert'
    Expected:
    (string) 'showmatch'
    Hint: full state of "mode":
      "insert"

Followup to fe60013fb.
ref #10941
Initially regressed in 7ed2122622

``

* ui/screen_basic_spec: set timeoutlen=10000

This fixes the test on slow CI.

Ref: https://ci.appveyor.com/project/neovim/neovim/builds/27600387/job/t468h2b3w9lwtlm5#L10930
2019-09-26 07:37:51 +02:00
John Szakmeister b52ae0e8ba build: add support for building for FreeBSD under Sourcehut [skip ci] 2019-09-25 19:55:49 -04:00
Daniel Hahler cb25207171 vim-patch:8.0.0914: highlight attributes are always combined (#10256)
Problem:    Highlight attributes are always combined.
Solution:   Add the 'nocombine' value to replace attributes instead of
            combining them. (scauligi, closes vim/vim#1963)
0cd2a94a40

Closes https://github.com/neovim/neovim/pull/10256.
2019-09-26 00:50:54 +02:00
Daniel Hahler 2621f4455d
Merge pull request #10978 from blueyed/update-libuv
third-party: update libuv to v1.32.0
2019-09-25 11:52:41 +02:00
Daniel Hahler 0571145c40
paste: fix handling of "<" in cmdline (#11094)
Fixes https://github.com/neovim/neovim/issues/11088.
2019-09-25 09:15:33 +02:00
Daniel Hahler 70827ea1fa test/functional/preload.lua: _set_fmode for Windows 2019-09-25 05:47:15 +02:00
Daniel Hahler bb6b1267e7 Revert "win/os_env_exists(): workaround libuv bug #10734"
This reverts commit 278c5d452c.
2019-09-25 05:47:12 +02:00
Daniel Hahler 227ef71621 third-party: update libuv to v1.31.0 2019-09-25 05:45:54 +02:00
Daniel Hahler db6b4b677d
tests: busted: nvim handler: display durations always (#11075)
This shows them also with test failures/errors, where it is useful to
see how long the test took (for flaky failures running into timeout).
2019-09-25 02:20:32 +02:00