Commit Graph

15014 Commits

Author SHA1 Message Date
Ashkan Kiani 1e16b3cf28 Spaces not tabs. 2019-11-20 16:16:36 -08:00
Ashkan Kiani c40f8600d2 Change error writer to not be annoying. 2019-11-20 16:16:13 -08:00
Ashkan Kiani 03eb88848c Change callback resolution to be dynamic.
This allows default_callbacks to be specified after client creation to
be considered. Also it simplifies the code.
2019-11-20 16:09:03 -08:00
Ashkan Kiani a4b7004f48 Move everything to buf & default_callbacks
- Rename builtin_callbacks to default_callbacks and slightly change its
semantics:
  - No longer contains the default implementations. Instead, any
  default_callbacks will be used in preference for our .buf methods.
  - Add this to the docs.
2019-11-20 16:03:32 -08:00
Ashkan Kiani 2d580756ca Add everything to lsp.buf and get rid of autoload. 2019-11-20 15:35:18 -08:00
Ashkan Kiani c83380cf80 Add lsp.buf and hover implementation. 2019-11-20 14:21:57 -08:00
Ashkan Kiani ff65cc990a Bugfix. Don't use nvim.lua that doesn't exist :) 2019-11-20 11:41:45 -08:00
Ashkan Kiani 568b454088 Add vim.uri_to_bufnr 2019-11-20 11:39:54 -08:00
Ashkan Kiani 0904ffe387 Bugfixes.
- Return after an error in RPC.
- Use an empty vim table for serialization.
2019-11-20 11:36:50 -08:00
Ashkan Kiani 3ae9b3781e Bugfix for floating_preview
Don't modify your inputs.
2019-11-20 11:34:10 -08:00
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
Justin M. Keyes 525bb1b55d Merge #11280 "man.vim: implement 'tagfunc'" 2019-11-20 00:31:22 -08:00
Justin M. Keyes 182d3cebcf
Merge #11426 from janlazo/vim-8.0.1449
vim-patch:8.0.{1449,1793}
2019-11-19 21:32:48 -08:00
Jan Edmund Lazo 756e2b5f65
vim-patch:8.0.1793: no test for "vim -g"
Problem:    No test for "vim -g".
Solution:   Add a test for "-g" and "-y".
248be5c5de
2019-11-19 21:36:28 -05:00
Jan Edmund Lazo 025399aedb
vim-patch:8.0.1449: slow redrawing with DirectX
Problem:    Slow redrawing with DirectX.
Solution:   Avoid calling gui_mch_flush() unnecessarily, especially when
            updating the cursor. (Ken Takata, closes vim/vim#2560)
a338adcf22
2019-11-19 20:33:09 -05:00
Daniel Hahler 629ea19994
deps: upgrade bundled LuaRocks: 2.4.4 => 3.2.1 (#10292)
Changelog: https://github.com/luarocks/luarocks/compare/v2.4.4..v3.2.1#diff-4ac32a78649ca5bdd8e0ba38b7006a1e
2019-11-19 19:10:30 +01:00
Joe Hermaszewski 1ff5b60cb9 vim-patch:8.1.0251: support full paths for 'backupdir' #11269
Problem:    Using a full path is supported for 'directory' but not for
            'backupdir'. (Mikolaj Machowski)
Solution:   Support 'backupdir' as well. (Christian Brabandt, closes vim/vim#179)
b782ba475a
2019-11-17 23:38:27 -08:00
Marvim the Paranoid Android b1c4a8191e version.c: update [ci skip] #11160
vim-patch:8.0.1405: duplicated code for getting a typed character

vim-patch:8.1.0828: still using FEAT_VIRTUALEDIT
vim-patch:8.1.1971: manually enabling features causes build errors
vim-patch:8.1.2000: plugin cannot get the current IME status
vim-patch:8.1.2119: memory access error for empty string
vim-patch:8.1.2122: cannot build without terminal feature
vim-patch:8.1.2123: parsing CSI sequence is messy
vim-patch:8.1.2128: renamed libvterm sources makes merging difficult
vim-patch:8.1.2130: MSVC build fails
vim-patch:8.1.2132: MS-Windows: screen mess when not recognizing insider build
vim-patch:8.1.2138: including the build number in the Win32 binary is confusing
vim-patch:8.1.2144: side effects when using t_ti to enable modifyOtherKeys
vim-patch:8.1.2157: libvterm source files missing from distribution
vim-patch:8.1.2160: cannot build with +syntax but without +terminal
vim-patch:8.1.2163: cannot build with +spell but without +syntax
vim-patch:8.1.2170: cannot build without the +termresponse feature
vim-patch:8.1.2179: pressing "q" at the more prompt doesn't stop Python output
vim-patch:8.1.2186: error for bad regexp even though regexp is not used
vim-patch:8.1.2196: MS-Windows: running tests with MSVC lacks updates
vim-patch:8.1.2199: build failure when using normal features without GUI
vim-patch:8.1.2201: cannot build with dynamically linked Python 3.8
vim-patch:8.1.2202: MS-Windows: build failure with GUI and small features
vim-patch:8.1.2203: running libvterm tests without the +terminal feature
vim-patch:8.1.2204: crash on exit when closing terminals
vim-patch:8.1.2209: LF in escape codes may be expanded to CR-LF
vim-patch:8.1.2217: compiler warning for unused variable
vim-patch:8.1.2224: cannot build Amiga version
vim-patch:8.1.2237: mode() result depends on whether CURSOR_SHAPE is defined
vim-patch:8.1.2248: CTRL-W dot does not work when modifyOtherKeys is enabled
vim-patch:8.1.2254: MS-Windows: mouse scroll wheel doesn't work in popup
vim-patch:8.1.2255: ":term ++shell" does not work on MS-Windows
vim-patch:8.1.2256: test for ":term ++shell" fails on MS-Windows
vim-patch:8.1.2260: terminal test may fail on MS-Windows
vim-patch:8.1.2271: build error if FEAT_TAG_BINS is not defined
vim-patch:8.1.2284: compiler warning for unused variable
vim-patch:8.1.2291: memory leak when executing command in a terminal
vim-patch:8.1.2301: MS-Windows GUI: drawing error when background color changes
vim-patch:8.1.2311: warning for missing function prototype
vim-patch:8.1.2316: FORTIFY_SOURCE can also be present in CPPFLAGS
vim-patch:8.1.2318: MS-Windows GUI: main background shows in toolbar

https://github.com/neovim/neovim/pull/11215
vim-patch:8.1.0084: user name completion does not work on MS-Windows
vim-patch:8.1.0085: no test for completing user name and language
vim-patch:8.1.0361: remote user not used for completion
2019-11-17 19:19:52 -08:00
Justin M. Keyes d547c8d9ad
Merge #11414 from janlazo/vim-8.1.2312
vim-patch:8.1.{2312,2314,2317}
2019-11-17 19:18:40 -08:00
Justin M. Keyes af53a0c012
doc: Lua [ci skip] #11378
- Rework :help lua-commands
- Rename if_lua.txt => lua.txt
2019-11-17 19:06:59 -08:00
Jan Edmund Lazo 6ca3e6bfa9
vim-patch:8.1.2317: no test for spell affix file with flag on suffix
Problem:    No test for spell affix file with flag on suffix.
Solution:   Add a test case.
37ff4cf870
2019-11-17 21:55:56 -05:00
Jan Edmund Lazo f484d3b2d4
vim-patch:8.1.2314: vi' sometimes does not select anything
Problem:    vi' sometimes does not select anything.
Solution:   Recognize an empty selection. (Christian Brabandt, closes vim/vim#5183)
7170b295b0
2019-11-17 21:51:19 -05:00
Jan Edmund Lazo e4b185893f
vim-patch:8.1.2312: "line:" field in tags file not used
Problem:    "line:" field in tags file not used.
Solution:   Recognize the field and use the value. (Andy Massimino, Daniel
            Hahler, closes vim/vim#5232, closes vim/vim#2546, closes vim/vim#1057)
077b9dd354
2019-11-17 21:37:52 -05:00
Justin M. Keyes 54402d6b8f
Merge #11340 'Factor out parse_one_cmd()'
This will allow us to reuse the parsing logic elsewhere, namely for
'inccommand' logic, so we don't need to duplicate it for changes such as the
repeated colon fix in #11319.
2019-11-17 15:53:30 -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
smolck 4bd7881fce [scripts/gen_vimdoc.py] Generate better-formatted mpack
Changes the generated msgpack result values in the runtime/doc/*.mpack
files to be formatted like this (instead of being formatted like Vim help text):
    [
        'nvim_win_get_var': {
                'signature': 'nvim_win_get_var({window}, {name}, {err})',
                'parameters': [('Window', 'window'), ('String', 'name'), ('Error *', 'err')],
                'parameters_doc': [{'window': 'Window handle, or 0 for current window', 'name': 'Variable name'}],
                'doc': ['Gets a window-scoped (w:) variable'],
                'return': ['Variable value'],
                'seealso': []
            }
        },
        ...
    ]
2019-11-15 20:00:13 -06: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
Rob Pilling 807e4039cb Sort man pages by relevance during goto_tag() 2019-11-13 22:00:11 +00:00
Rob Pilling 18c5f6ab9f Don't attempt swapfiles for man pages
This is because we now use :tag to open a man page, which attempts
to open a swap file for a path under man://...
2019-11-13 21:57:17 +00:00
Rob Pilling aeee41192b Remove eventignore - :Man now uses :tag to populate the page 2019-11-13 21:56:28 +00:00
Rob Pilling 63abe3ca19 Factor out parse_one_cmd()
This will allow us to reuse the parsing logic elsewhere,
namely for inccommand logic.
2019-11-13 21:05:47 +00:00