Commit Graph

14780 Commits

Author SHA1 Message Date
Ashkan Kiani
69a0712a9c Reduce code blocks in markdown previews.
If the preview is just a code block, then use the language as the
filetype instead of using markdown.
This reduces the size of the preview.
2019-11-20 11:23:50 -08:00
erw7
91f4bb0aee TUI: use stdio names instead of magic numbers #11410 2019-11-17 12:58:58 -08:00
Christian Clason
1f0fc4e452 build/macOS: set -fno-stack-check for LuaJIT build #11412
Fixes LuaJIT build on macOS Catalina.
ref https://github.com/LuaJIT/LuaJIT/issues/521
ref https://github.com/Homebrew/homebrew-core/pull/46823
2019-11-17 12:55:25 -08:00
Marco Hinz
97f1222005
provider/python: add python3.8 executable (#11402)
Python 3.8 was released 2019-10-14:

  https://www.python.org/dev/peps/pep-0569
2019-11-17 14:23:17 +01:00
Justin M. Keyes
a45890e82e
Merge #11406 from janlazo/vim-8.1.1922
vim-patch:8.1.{1922,2289,2305}
2019-11-16 18:43:03 -08:00
Nikolay Shebanov
7116a41e30 tutor: change arrows (--->) to symbols ✗ and ✓ #11404
* Display ✓ or ✗ based on the line user sees
* Add vim-tutor-mode expectations to the lines marked with an arrow.
* Fix some existing expectations to behave predictably.
2019-11-16 15:35:32 -08:00
Jan Edmund Lazo
3056ff4b8c
vim-patch:8.1.2305: no warning for wrong entry in translations
Problem:    No warning for wrong entry in translations.
Solution:   Check semicolons in keywords entry of desktop file.
e53ec39270
2019-11-16 16:41:29 -05:00
Jan Edmund Lazo
b83027858a
vim-patch:8.1.2289: after :diffsplit closing the window does not disable diff
Problem:    After :diffsplit closing the window does not disable diff.
Solution:   Add "closeoff" to 'diffopt' and add it to the default.
c823477979
2019-11-16 16:40:25 -05:00
Jan Edmund Lazo
da7bb53d99
diff: move diff globals to diff.h 2019-11-16 16:40:25 -05:00
Jan Edmund Lazo
7274f5c177
vim-patch:8.1.1922: in diff mode global operations can be very slow
Problem:    In diff mode global operations can be very slow.
Solution:   Do not call diff_redraw() many times, call it once when redrawing.
            And also don't update folds multiple times.
4f57eefe1e
2019-11-16 16:40:24 -05:00
Björn Linse
d3ef88db63
Merge pull request #11338 from bfredl/vvlua
v:lua and better error messages for vimL->lua
2019-11-16 22:36:32 +01:00
Björn Linse
dab40f43b1 Add v:lua.func() vimL syntax for calling lua
Also simplify error messages when calling lua from vimL.
2019-11-16 22:33:21 +01:00
Björn Linse
18096631b1
Merge pull request #11399 from bfredl/markundo
extmark: do not crash in read-only buffer
2019-11-16 12:01:53 +01:00
Björn Linse
ebdf90e7d7 extmark: don't crash in RO buffer. 2019-11-16 11:58:32 +01:00
Björn Linse
6222cca36a undo: delete undo_off global without effect 2019-11-16 11:03:43 +01:00
Jan Edmund Lazo
d79164c9f9 vim-patch:8.1.0992: :normal resets reg_executing() result #11398
Problem:    A :normal command while executing a register resets the
            reg_executing() result.
Solution:   Save and restore reg_executing. (closes vim/vim#4066)
cce713ddcc
2019-11-16 00:34:25 -08:00
Justin M. Keyes
e3b08a0fc4
Merge #11384 from janlazo/vim-8.1.2293
vim-patch:8.1.{927,2293}
2019-11-14 00:02:29 -08:00
James McCoy
570ee5f404 f_getenv/setenv: Access v_special when v_type is VAR_SPECIAL #11388
Multiple Debian builds were failing these tests:

    Failures:
    	From test_environ.vim:
    	Found errors in Test_external_env():
    	function RunTheTest[37]..Test_external_env line 16: Expected '' but got 'FOO=null\n'
    	Found errors in Test_getenv():
    	function RunTheTest[37]..Test_getenv line 2: Expected v:null but got v:false
    	Found errors in Test_setenv():
    	function RunTheTest[37]..Test_setenv line 5: Expected v:null but got 'null'

This is because nvim has a separate tag (`v_special`) in `typval_T` for
special variables, whereas vim re-uses the `v_number` tag.

On little-endian architectures, using the incorrect tag is not an issue
because the byte representation is the same.  However, on big-endian
systems this caused the `v_number == kSpecialVarNull` checks to fail,
and the non-special code to execute.
2019-11-13 21:34:10 -08:00
Jan Edmund Lazo
a0c18bf201
spell: fix clang logic error
https://neovim.io/doc/reports/clang/report-487b01.html#EndPath
https://neovim.io/doc/reports/clang/report-ce4c3c.html#EndPath
2019-11-13 19:25:40 -05:00
Jan Edmund Lazo
c2ceed4994
quickfix: fix dead assignment
Cherry-picked from vim patch 8.1.1489.
2019-11-13 19:25:40 -05:00
Jan Edmund Lazo
6989ac05f4
vim-patch:8.1.0927: USE_CR is never defined
Problem:    USE_CR is never defined.
Solution:   Remove usage of USE_CR. (Ken Takata, closes vim/vim#3958)
0059074008
2019-11-13 19:25:39 -05:00
Jan Edmund Lazo
0cb6fc804d
vim-patch:8.1.2293: join adds trailing space when second line is empty
Problem:    Join adds trailing space when second line is empty. (Brennan
            Vincent)
Solution:   Do not add a trailing space.
cc184cfb09
2019-11-13 19:25:39 -05:00
Ashkan Kiani
00dc12c5d8 lua LSP client: initial implementation (#11336)
Mainly configuration and RPC infrastructure can be considered "done". Specific requests and their callbacks will be improved later (and also served by plugins). There are also some TODO:s for the client itself, like incremental updates.

Co-authored by at-tjdevries and at-h-michael, with many review/suggestion contributions.
2019-11-13 21:55:26 +01:00
Justin M. Keyes
db436d5277
Merge #11376 'extmark: renames, docs' 2019-11-12 00:05:26 -08:00
Justin M. Keyes
a24eff0e27 extmark: fix spelling of "Extmark"
The spelling "Extmark" is used almost everywhere, so don't spell it
"ExtMark" inconsistently.
2019-11-11 22:12:59 -08:00
Justin M. Keyes
2d7e1c32a8 extmark: rename ExtendedMark => Extmark 2019-11-11 22:12:59 -08:00
Justin M. Keyes
54473e9a67 doc [ci skip] 2019-11-11 22:12:59 -08:00
Justin M. Keyes
0190de9aab
Merge #11307 'Lua: vim.validate()' 2019-11-11 21:25:16 -08:00
Jan Edmund Lazo
8d70335b00 vim-patch:8.1.0622: adding quickfix items marks items as valid errors #11373
Problem:    Adding quickfix items marks items as valid errors. (Daniel Hahler)
Solution:   Check when items are valid. (Yegappan Lakshmanan, closes vim/vim#3683,
            closes vim/vim#3633)
9752c72f49
2019-11-11 21:24:25 -08:00
Björn Linse
122426966e
Merge pull request #11356 from bfredl/extmark2
extmark API feature
2019-11-11 21:48:14 +01:00
Björn Linse
18a8b702c0 extmark: review changes 2019-11-11 20:18:15 +01:00
timeyyy
a9065a5051 nsmarks: initial commit 2019-11-11 19:43:15 +01:00
Timothy C Eichler
e757f4d536 namespace: add ns_initialized func 2019-11-11 19:43:15 +01:00
Marco Hinz
181486d7e6
api: fix typo in debug function name 2019-11-11 19:25:10 +01:00
Justin M. Keyes
f59e1f58a2 Lua: mark some functions as "private"
Problem:  scripts/gen_vimdoc.py gets confused and tries to generate docs
          for `fn_index` and `func`.
Solution: Rename them to be private.
2019-11-11 00:43:02 -08:00
Justin M. Keyes
7a3d3257db fix nvim__buf_stats
Accidentally renamed in 1cb4674547.
2019-11-10 23:43:49 -08:00
Justin M. Keyes
a0d992785f Lua: Use vim.validate() instead of assert() 2019-11-10 23:43:49 -08:00
Justin M. Keyes
7aa4042d3b Lua: vim.validate() 2019-11-10 23:43:49 -08:00
Hirokazu Hata
678a51b1da Lua: vim.validate()
We often want to do type checking of public function arguments.

- test: Rename utility_function_spec.lua to vim_spec.lua
- .luacov: Map lua module names
2019-11-10 22:50:24 -08:00
Justin M. Keyes
b9c9283f72 spellfile.vim: improve error message for missing spellfile
Problem:  If spellfile is missing, then "set spell" in modeline/sandbox
          fails with a non-obvious error.
Solution: Check for sandbox early and give a meaningful error.
          Fixes #11359

Test case:
    # test.latex has `% vim: set spelllang=hu:`
    # no spell file for `hu` yet!
    nvim -u NORC --cmd 'autocmd FileType tex setlocal spell' --cmd 'set modeline' test.latex

Before:
    No spell file for "hu" in utf-8
    Download it?
    Downloading hu.utf-8.spl...
    Error detected while processing /usr/local/share/nvim/runtime/autoload/netrw.vim:
    line  583:
    E12: Command not allowed from exrc/vimrc in current dir or tag search: au WinEnter *^Iif &ft == "netrw"|call s:NetrwInsureWinVars()|endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread[13]..netrw#NetRead[4]..<SNR>67_NetrwOptionsSave:
    line   66:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread:
    line   13:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile:
    line   60:
    E171: Missing :endif
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search

After:
    Error detected while processing function spellfile#LoadFile:
    line    5:
    E605: Exception not caught: Cannot download spellfile in sandbox/modeline. Try ":set spell" from the cmdline.
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search
2019-11-10 12:35:45 -08:00
Björn Linse
06a020af09
Merge pull request #11366 from bfredl/flakycat
tests: vim.rpcnotify test is flaky
2019-11-10 19:26:40 +01:00
Björn Linse
d200a818a7 tests: vim.rpcnotify test is flaky 2019-11-10 17:13:53 +01:00
Marco Hinz
1cb4674547
api: add nvim_buf_get_virtual_text() (#11354)
This adds the missing partner function of nvim_buf_set_virtual_text().
2019-11-10 16:38:04 +01:00
Björn Linse
3a075ce3dc
Merge pull request #11310 from bfredl/luarpc
lua: add vim.rpcrequest, vim.rpcnotify and vim.NIL
2019-11-10 14:46:14 +01:00
Björn Linse
474d0bcbf7 lua: vim.rpcrequest, vim.rpcnotify, vim.NIL 2019-11-10 13:08:05 +01:00
Justin M. Keyes
ece3d19b02
Merge #11004 'test/Screen:expect: support "{MATCH:…}"' 2019-11-09 23:16:52 -08:00
Justin M. Keyes
4abb67c027 test/Screen:expect: replace "{IGNORE}" with "{MATCH:…}"
ref #11004
2019-11-09 22:26:01 -08:00
Daniel Hahler
c0abaf9ca6 tests: Screen:expect: support "{MATCH:…}" 2019-11-09 21:58:28 -08:00
Justin M. Keyes
268252c8c7
Merge #11343 from janlazo/vim-8.1.2244
vim-patch:8.1.{324,1091,2244,2258,2262,2268,2270,2272}
2019-11-09 21:55:28 -08:00
Justin M. Keyes
7a23b67d35
paste: Select-mode, Visual-mode #11360
fix #11344
2019-11-09 21:18:51 -08:00