Commit Graph

15716 Commits

Author SHA1 Message Date
Christian Clason
8a1276005a
Add v:event.visual during TextYankPost (#12382)
* propagate visual selection to textyankpost event

* adapt tests

* add docs

* also adapt oldtest
2020-06-03 10:51:25 -04:00
notomo
60c581b35d
lua: fix infinite loop for vim.split on empty string (#12420) 2020-06-02 19:31:43 -04:00
Christian Clason
91e41c8576
lua: add vim.highlight.range (#12401) 2020-05-31 14:56:00 -04:00
Poh Zi How
ed815c61fd
vim-patch.sh: fix bash version-check message #12398 2020-05-31 10:27:05 -07:00
Jan Edmund Lazo
4b87248285
vim-patch:8.2.0843: filetype elm not detected (#12403)
Problem:    Filetype elm not detected.
Solution:   Recognize *.elm files. (closes vim/vim#6157)
0016fd2e29
2020-05-30 18:06:23 -04:00
TJ DeVries
b8e2cd4f60
Merge pull request #12348 from tjdevries/luawait
[RFC] lua: Add vim.wait()
2020-05-30 12:56:02 -04:00
TJ DeVries
be662fe5c7 lua: vim.wait implementation 2020-05-30 12:01:32 -04:00
Björn Linse
504d6878da lua: vim.wait initial outline 2020-05-30 12:01:32 -04:00
BusyBruce
7d8dc4c331
provider: Fix ruby checkhealth error for Windows (#12400)
Plaform: Windows 10

run `cmd /c gem list -ra ^^neovim$`

*** REMOTE GEMS ***

minitest-neovim (0.1.0)
neovim (0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.1, 0.5.0, 0.4.0, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.0, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1)

run `cmd /c gem list -ra "^^neovim$"`

*** REMOTE GEMS ***
neovim (0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.1, 0.5.0, 0.4.0, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.0, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1)
2020-05-30 14:29:24 +02:00
Justin M. Keyes
977c0f292f
API: nvim_create_buf: unset 'modeline' in scratch-buffer #12379
Although 'nomodeline' is not strictly part of the definition of
a "scratch-buffer" it is obviously the right default.
2020-05-29 09:45:32 -07:00
Viktor Kojouharov
5a9226c800
lua: simple snippet support in the completion items (#12118)
Old behavior is: foo(${placeholder: bar, ...)

with lots of random garbage you'd never want inserted.

New behavior is: foo(bar, baz) 

(which maybe is good, maybe is bad [depends on user], but definitely better than it was).

-----

* Implement rudimentary snippet parsing

Add support for parsing and discarding snippet tokens from the completion items.

Fixes #11982

* Enable snippet support

* Functional tests for snippet parsing

Add simplified real-world snippet text examples to the completion items
test

* Add a test for nested snippet tokens

* Remove TODO comment

* Return the unmodified item if the format is plain text

* Add a plain text completion item
2020-05-28 08:31:56 -04:00
Christian Clason
2ca8f02a64
lsp: add preview_location util function (#12368)
* add preview_location

* add doc stub

* doc style; return bufnr&winnr of preview

* doc: function may return nil

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>

* doc: fixup

Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2020-05-26 09:07:10 -04:00
Hirokazu Hata
15b762761a
lsp: make the command error message more detailed (#11633)
* lsp.lua: make the error message more detailed

* test: add lsp._cmd_part test
2020-05-26 08:55:45 -04:00
Matthieu Coudron
618e9a7692
Merge pull request #11803 from erw7/virtual-terminal-input
[RDY] win/TUI: Use virtual terminal input if available
2020-05-26 11:03:50 +02:00
erw7
bb2be0de38 deps: update libuv
https://github.com/neovim/neovim/pull/11808
https://github.com/neovim/libuv/pull/12

v1.34.2
  * darwin: stop calling SetApplicationIsDaemon() (Ben Noordhuis)
  * osx,fsevent: fix race during uv_loop_close (Jameson Nash)
  * unix: handle uv__open_cloexec return value correctly (Anna Henningsen)
v1.34.1
  * unix: fix -Wstrict-aliasing compiler warning (Ben Noordhuis)
  * unix: cache address of dlsym("mkostemp") (Ben Noordhuis)
  * win,tty: avoid regressions in utf-8 handling (Jameson Nash)
  * win: remove bad assert in uv_loop_close (Jameson Nash)
  * tty,unix: avoid affecting controlling TTY (Jameson Nash)
v1.34.0
  * unix: refactor uv__fs_copyfile() logic (cjihrig)
  * fs: handle non-functional statx system call (Milad Farazmand)
  * unix,win: add uv_sleep() (cjihrig)
  * fs: add uv_fs_mkstemp (Saúl Ibarra Corretgé)
v1.33.0
  * win: fix reading hidden env vars (Anna Henningsen)
  * unix,win: add uv_random() (Ben Noordhuis)
  * win, tty: fix problem of receiving unexpected SIGWINCH (erw7)
  * fs: use statvfs in uv__fs_statfs() for Haiku (Calvin Hill)
  * fsevents: stop using fsevents to watch files (Jameson Nash)
  * win,tty: add uv_tty_{get,set}_vterm_state (erw7)
  * unix: update uv_fs_copyfile() fallback logic (Stefan Bender)
  * win: cast setsockopt struct to const char* (Shelley Vohr)
  * unix: fix {Net,Open}BSD build
2020-05-26 14:16:09 +09:00
erw7
57a4f8905b win/TUI: enable mouse on ConEmu and vtpcon without vti 2020-05-26 14:16:06 +09:00
erw7
29f1e1995d win: use virtual terminal input (VTI) if available #11803
fixes #9514
fixes #11773
2020-05-26 14:13:26 +09:00
Matthieu Coudron
8c588246a5
Merge pull request #10905 from erw7/vim-8.1.0475
vim-patch:8.1.{475,800,868,1007,1027,1031,1033,1037,1058,1435,1484,1485}
2020-05-25 14:01:36 +02:00
erw7
a532fb2cf4 eval: fix problem with free_unref_funccal not being called 2020-05-25 18:52:30 +09:00
erw7
c3dab08c8f vim-patch:8.1.1485: double free when garbage_collect() is used in autocommand
Problem:    Double free when garbage_collect() is used in autocommand.
Solution:   Have garbage collection also set the copyID in funccal_stack.
c07f67ad0e
2020-05-25 18:52:30 +09:00
Daniel Hahler
0cab85df4d vim-patch:8.1.1484: some tests are slow
Problem:    Some tests are slow.
Solution:   Add timing to the test messages.  Fix double free when quitting in
            VimLeavePre autocmd.
75ee544f99
2020-05-25 18:52:29 +09:00
Hirokazu Hata
b996205969
Merge pull request #12367 from h-michael/lsp-log 2020-05-25 11:56:42 +09:00
Jan Edmund Lazo
37ee95504e
vim-patch:8.0.1668: terminal debugger: can't re-open source code window (#12329)
Problem:    Terminal debugger: can't re-open source code window.
Solution:   Add the :Source command.  Also create the window if needed when
            gdb stops at a source line.
c4b533e1e9
2020-05-24 20:46:41 +02:00
kuuote
e89462d985
vim-patch:8.1.2233: cannot get the Vim command line arguments (#12117)
Problem:    Cannot get the Vim command line arguments.
Solution:   Add v:argv. (Dmitri Vereshchagin, closes vim/vim#1322)
69bf634858
2020-05-24 20:45:25 +02:00
Matthieu Coudron
97bcab8f5e
Merge pull request #12327 from janlazo/vim-8.2.0766
vim-patch:8.1.2228,8.2.{36,37,766,810}
2020-05-23 14:33:33 +02:00
Hirokazu Hata
e0e5ada2bf
lsp: change log name to "lsp.log" from "vim-lsp.log"
It's confusing because vim-lsp already has the same name as the plugin name that predates this built-in lsp.
Also, since "vim.fn.stdpath" is used, adding the prefix "nvim-" is redundant, so just "lsp.log" will suffice.
2020-05-23 15:02:38 +09:00
Austin Traver
ef8f965c64
doc: Add optional d for :lcd and :tcd (#12359)
The `:lcd -` command, and `:tcd -` which returns to a previous directory, can be done with `:lc -` and `:tc -` respectively. 

Basically, the d is optional, so I updated the documentation to indicate this in the traditional format.
2020-05-22 21:35:40 -04:00
Jan Edmund Lazo
0666b23d65
vim-patch:8.2.0810: error when appending "tagfile" to 'wildoptions'
Problem:    Error when appending "tagfile" to 'wildoptions'.
Solution:   use flags P_ONECOMMA and P_NODUP. (Dmitri Vereshchagin,
            closes vim/vim#6105)
2e61e2d083
2020-05-22 20:04:10 -04:00
Jan Edmund Lazo
9a8efec8fb
vim-patch:8.2.0037: missing renamed message
Problem:    Missing renamed message.
Solution:   Now really add the error number.
1500a42c42
2020-05-21 16:56:55 -04:00
Jan Edmund Lazo
30ec3a067b
vim-patch:8.2.0036: not enough test coverage for match functions
Problem:    Not enough test coverage for match functions.
Solution:   Add a few more test cases.  (Dominique Pelle, closes vim/vim#5394)
            Add error number.
49d68bf5e4
2020-05-21 16:56:55 -04:00
Jan Edmund Lazo
9cdea8148c
vim-patch:8.1.2228: screenpos() returns wrong values when 'number' is set
Problem:    screenpos() returns wrong values when 'number' is set. (Ben
            Jackson)
Solution:   Compare the column with the window width. (closes vim/vim#5133)
38ba4dce4a
2020-05-21 16:56:55 -04:00
Jan Edmund Lazo
63966a9ec2
vim-patch:8.2.0766: display error when using 'number' and 'breakindent'
Problem:    Display error when using 'number' and 'breakindent'.
Solution:   Adjust extra spaces in the first row. (Ken Takata, closes vim/vim#6089,
            closes vim/vim#5986)
e882f7a73c
2020-05-21 16:56:54 -04:00
Mathias Fußenegger
04a0486c66
Change uri_to_fname to not convert non-file URIs (#12351)
* Change uri_to_fname to not convert non-file URIs

A URI with a scheme other than file doesn't have a local file path.

* fixup! Change uri_to_fname to not convert non-file URIs

* fixup! fixup! Change uri_to_fname to not convert non-file URIs
2020-05-22 01:17:21 +09:00
Mathias Fußenegger
044eb56ed2
LSP: Don't swallow bufnr argument from callbacks (#12350)
The callbacks for `textDocument/documentSymbol` and `workspace/symbol`
never received the `bufnr` argument because the logic that adds error
validation and logging swallowed the argument.
2020-05-20 21:18:35 -04:00
Kei Kamikawa
c6dc397801
fixed hang issue with --headless and -r option specified (#12209)
* fixed hang issue with --headless and -r option specified

Calling the do_more_prompt function in headless mode will freeze neovim because it is eventally in the input-accepting state (the same as waiting for --more--).

* fixed "Press ENTER or type command to continue" to be suppressed

If in headless mode, we need to exit at this point. If we continue, we will enter the normal mode and the message "Press ENTER or type command to continue" will be displayed and we will be in the input waiting state.

* fixed functional ex_cmds tests

* Revert "fixed "Press ENTER or type command to continue" to be suppressed"

This reverts commit a02dc40e3b.

* Revert "fixed functional ex_cmds tests"

This reverts commit 3bdb8da20a.

* fixed conditional again

* added test for fixed hang issue with --headless (#11386)
2020-05-20 10:32:02 -04:00
Faris A Chugthai
7116105d66
provider: Add python3.9 to autoload/provider/pythonx.vim (#12344)
3.9's scheduled for beta release today.
https://www.python.org/dev/peps/pep-0596/
2020-05-20 13:57:46 +02:00
Hirokazu Hata
74fed7d50f
Merge pull request #12338 from h-michael/fix-flaky 2020-05-19 10:18:05 +09:00
Mike Hartington
5126546ed7
lsp: fix get diagnositcs 2020-05-19 10:06:30 +09:00
Hirokazu Hata
eabf1803cd
test: fix flaky vim.defer_fn test 2020-05-19 00:02:14 +09:00
Christian Clason
f2894bffb0
lua: Add highlight.on_yank (#12279)
* add lua function to highlight yanked region

* extract namespace, better naming, default values

* add default for event argument

* free timer

* factor out mark to position calculation

* d'oh

* make sure timer stops before callback (cf. luv example)

* factor out timer, more documentation

* fixup

* validate function argument for schedule

* fix block selection past eol

* correct handling of multibyte characters

* move arguments around, some cleanup

* move utility functions to vim.lua

* use anonymous namespaces, avoid local api

* rename function

* add test for schedule_fn

* fix indent

* turn hl-yank into proper (hightlight) module

* factor out position-to-region function

mark extraction now part of highlight.on_yank

* rename schedule_fn to defer_fn

* add test for vim.region

* todo: handle double-width characters

* remove debug printout

* do not shadow arguments

* defer also callable table

* whitespace change

* move highlight to vim/highlight.lua

* add documentation

* add @return documentation

* test: add check before vim.defer fires

* doc: fixup
2020-05-18 09:49:50 -04:00
TJ DeVries
a6be7a9180
doc: Vim internal variables & options in lua (#12302)
* doc: Add info about vim dicts in lua

* doc: preamble and info

* doc: remove weird spacing

* fixup
2020-05-17 23:29:34 -04:00
Eisuke Kawashima
a91ce497b4
lsp: Fix timezone format of LSP log (ISO 8601) (#12332) 2020-05-17 20:12:22 -04:00
Andreas Johansson
4fbbe1c957
lsp: Handle end lines in apply_text_edits (#12314)
If the LSP sends an end line that is larger than what nvim considers to be the
last line, you get an Index out of bounds error when fetching the line from
nvim, a change that was introduced in #12223. This change removes the strict
indexing and checks the return value from nvim_buf_get_lines.
2020-05-17 13:47:14 -04:00
Hirokazu Hata
ae5bd0454e
lua: add tbl_deep_extend (#11969) 2020-05-17 13:24:34 -04:00
Shougo
090d3c2813
matchdelete: fix porting (#12328)
really use win and not curwin
2020-05-17 13:55:10 +02:00
Shougo
d7d69fed18
vim-patch:8.1.1084: cannot delete a match from another window (#12325)
Problem:    Cannot delete a match from another window. (Paul Jolly)
Solution:   Add window ID argument to matchdelete(), clearmatches(),
            getmatches() and setmatches(). (Andy Massimino, closes vim/vim#4178)
aff749145e
2020-05-16 15:25:51 +02:00
Hirokazu Hata
f3d0a1741e
Merge pull request #12324 from alindeman/nil-code-actions 2020-05-16 11:58:54 +09:00
Andy Lindeman
986bed2329 Check for nil before checking for empty table
At least the `gopls` language server seems to return nil/null if no code
actions are available. Currently this results in an error:

> Error executing vim.schedule lua callback: shared.lua:199: Expected table, got nil
2020-05-15 21:34:28 -04:00
Jesse
f559e5249e
LSP: Add textDocument/codeAction support (#11607)
* Add textDocument/codeAction

* Add callback for workspace/executeCommand
* Escape newlines in codeAction titles
* Return empty list in get_line_diagnostics if no buffer diagnostics
* Add stub documentation
* Validate context parameter in code_action
* Add support for edit in CodeAction responses
* Group diagnostics by line in vim.lsp.util.get_line_diagnostics()
* Advertise code action literal support
2020-05-16 01:18:59 +02:00
James McCoy
c37d9fa3da
Merge pull request #11764 from blueyed/vim-patch-usage 2020-05-15 10:45:10 -04:00