Commit Graph

3528 Commits

Author SHA1 Message Date
Jan Edmund Lazo
d5b063aec1
Revert vim-patch:942db23c9cb7 for phpcomplete.vim
It targets Vim 8.2 without feature and version checks.
2021-05-04 07:28:24 -04:00
Thomas Vigouroux
3fc71ea228
Merge pull request #14418 from DerekStride/treesitter-set-directive
[RDY] tree-sitter ensure there is a nested table allocated for `#set!`
2021-05-03 21:41:39 +02:00
Michael Lingelbach
ad81144442
Merge pull request #14334 from DarwinSenior/vim.log
lsp: deep copy vim.lsp.log when reloading
2021-05-02 23:40:34 -07:00
Michael Lingelbach
cfaf666ac9
Merge pull request #14462 from kabouzeid/feature/formatting_seq_sync
[LSP] Support for sequential formatting with multiple clients
2021-05-02 12:52:27 -07:00
Jan Edmund Lazo
ad6bb386be
vim-patch:4c295027a426
Update runtime files
4c295027a4
2021-05-02 13:00:38 -04:00
Jan Edmund Lazo
d19ede86ea
vim-patch:8.2.2790: filetype test fails
Problem:    filetype test fails
Solution:   Also update the scripts detection
63276685f9
2021-05-02 12:54:06 -04:00
Jan Edmund Lazo
0020858e1c
vim-patch:8.2.2788: Raku is now the only name what once was called perl6
Problem:    Raku is now the only name what once was called perl6.
Solution:   Adjust the filetype detection. (closes vim/vim#8120)
3f88e71fa2
2021-05-02 12:54:02 -04:00
Jan Edmund Lazo
3bc852cabf
vim-patch:11e3c5ba8203
Update runtime files
11e3c5ba82
2021-05-02 12:53:49 -04:00
Jan Edmund Lazo
7e36c9a2d3
vim-patch:56994d215815
Update runtime files.
56994d2158
2021-05-02 12:44:04 -04:00
Jan Edmund Lazo
abb13dde98
vim-patch:130cbfc31235
Update runtime files
130cbfc312
2021-05-02 12:03:34 -04:00
Jan Edmund Lazo
b8f3ef10c9
vim-patch:dad4473f02e1
Update runtime files.
dad4473f02

Omit :echoconsole. Patch v8.2.2638 is not ported.
2021-05-02 11:51:38 -04:00
Karim Abou Zeid
bcf03affbd Increase default LSP sync timeout to 1000ms 2021-05-02 17:08:57 +02:00
Jan Edmund Lazo
eea3a692c6
vim-patch:c8cdf0f80b3c
Update runtime files.
c8cdf0f80b
2021-05-02 10:33:32 -04:00
Karim Abou Zeid
d923f38882 Add client.request_sync doc 2021-05-02 16:24:58 +02:00
Jan Edmund Lazo
6a8436065c
vim-patch:9faec4e3d439
Update runtime files.
9faec4e3d4

Omit vim9.
2021-05-02 10:23:35 -04:00
Karim Abou Zeid
f0f3fddcdd Synchronous formatting methods notify the user on timeout and interrupted 2021-05-02 16:16:49 +02:00
Karim Abou Zeid
dc9c6ea219 Support multiple range formatting clients 2021-05-02 15:37:31 +02:00
Karim Abou Zeid
54368736d0 doc clarification 2021-05-02 15:23:13 +02:00
Jan Edmund Lazo
2081504a33
vim-patch:942db23c9cb7
Update runtime files
942db23c9c

Omit po files.
2021-05-01 23:47:11 -04:00
Jan Edmund Lazo
ac83c6eba6
vim-patch:e0e391755432
Update runtime files.
e0e3917554
2021-05-01 23:19:58 -04:00
Jan Edmund Lazo
8f8602d2df
vim-patch:98a29d00a48e
Update runtime files.
98a29d00a4
2021-05-01 23:19:57 -04:00
Jan Edmund Lazo
dd2bc06411
vim-patch:82be4849eed0
Update runtime files.
82be4849ee
2021-05-01 23:19:57 -04:00
Jan Edmund Lazo
c1dd4e83b4
vim-patch:7e6a515ed14e
Update runtime files.
7e6a515ed1

Omit vim9.
2021-05-01 22:29:03 -04:00
Jan Edmund Lazo
b1cd67b62e
vim-patch:4072ba571bab
Update runtime files.
4072ba571b

Omit vim9 references.
Omit assert_fails(). Patch v8.2.1183 is not ported yet.
2021-05-01 22:29:03 -04:00
Jan Edmund Lazo
710f0eae2f
vim-patch:1b884a005398
Update runtime files.
1b884a0053

Omit doc/autocmd.txt.
Omit tools/emoji_list.vim. Patch v8.2.1540 is not ported.
2021-05-01 22:29:03 -04:00
Jan Edmund Lazo
83b6a18598
vim-patch:23515b4ef758
Update runtime files
23515b4ef7

Omit filetype.txt changes for :Man.
2021-05-01 22:29:03 -04:00
Jan Edmund Lazo
0c93005383
vim-patch:4466ad6baa22
Update runtime files
4466ad6baa

Omit vim9 references in autocmd.txt.
Omit matchfuzzypos().
2021-05-01 22:29:02 -04:00
Jan Edmund Lazo
2ebd1f6286
vim-patch:3132cddd209e
Update runtime files
3132cddd20

Omit :sort,sort() changes.
2021-05-01 22:29:02 -04:00
Jan Edmund Lazo
330500a5bf
vim-patch:cb80aa2d53e5
Update runtime files.
cb80aa2d53

Omit runtime/doc/tabpage.txt.
Patch v8.2.1401 is not ported yet.

Port optwin.vim changes without gettext().
Patch v8.2.1544 is not ported yet.
2021-05-01 22:29:02 -04:00
Karim Abou Zeid
48a59f8f4f Add formatting_seq_sync, change formatting and formatting_sync 2021-05-01 21:12:40 +02:00
Jan Edmund Lazo
b16c7c515c
vim-patch:4f4d51a942cc
Update runtime files.
4f4d51a942

Omit "??" operator.
Patches v8.2.1794,v8.2.1798 are not ported yet.
2021-05-01 14:22:52 -04:00
francisco souza
993ca90c9b
lsp: fix regression in jump_to_location() (#14446)
This fixes a regression that was introduced in [1] by accidentally leaving out a line.

1: https://github.com/neovim/neovim/pull/12262
2021-05-01 19:28:21 +02:00
TJ DeVries
27da5511a0
docs: Treesitter (#13260)
* doc & fixes: Generate treesitter docs

* fixup to treesitter-core

* docs(treesitter): fix docs for most functions

Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2021-05-01 08:19:48 -04:00
Shadman
ca6107cfbc
doc: update vim.cmd() (#14450) 2021-05-01 13:09:05 +02:00
Jan Edmund Lazo
b084f49496
vim-patch:8.2.1827: filetype detection does not test enough file names
Problem:    Filetype detection does not test enough file names.
Solution:   Test more file names. (Adam Stankiewicz, closes vim/vim#7099)
10a1a534d1
2021-05-01 02:27:32 -04:00
Jan Edmund Lazo
e1171cf1d2
vim-patch:d58a3bf7dac8
Update runtime files.
d58a3bf7da

Omit syntax/man.vim.
2021-05-01 02:01:25 -04:00
Jan Edmund Lazo
d1a2523f6c
vim-patch:1d59aa1fdfb1
Update runtime files.
1d59aa1fdf
2021-05-01 01:37:13 -04:00
Mathias Fussenegger
69d4143e7b lsp: Allow decoded.result to be false
Some servers might respond to `workspace/executeCommand` requests with a
boolean result and that could be `false`.

A `false` result should be allowed and not trigger the `on_error`
handler:

    -- Invalid server message
    on_error(client_errors.INVALID_SERVER_MESSAGE, decoded)

Concrete example where this occurred is with eclipse.jdt.ls:

    vim.lsp.buf_request(
      0,
      'workspace/executeCommand',
      {
        command = 'java.project.isTestFile',
        arguments = { vim.uri_from_bufnr(0), },
      },
      function(err, _, resp)
        print(vim.inspect(err), vim.inspect(resp))
      end
    )
2021-04-30 20:17:56 +02:00
Jan Edmund Lazo
f5d1f0bf03
vim-patch:1c6737b20a5c
Update runtime files.
1c6737b20a
2021-04-29 23:35:37 -04:00
Jan Edmund Lazo
1e03e76daf
vim-patch:207f009326c8
Update runtime files.
207f009326

Omit nl.po.
2021-04-29 21:56:34 -04:00
Jan Edmund Lazo
9f54d125d2
vim-patch:3d1cde8a2f28
Update runtime files.
3d1cde8a2f
2021-04-29 21:08:09 -04:00
Jan Edmund Lazo
09f3e62bc6
vim-patch:e7b1ea0276cc
Update runtime files.
e7b1ea0276
2021-04-29 20:42:16 -04:00
Jan Edmund Lazo
0a0034718c
vim-patch:2547aa930b59
Update runtime files.
2547aa930b

Omit modifyOtherKeys, vim9, vim.man.
2021-04-29 09:27:19 -04:00
Jan Edmund Lazo
27fb03f5a0
vim-patch:7ff78465f705
Update runtime files
7ff78465f7
2021-04-28 23:04:14 -04:00
Jan Edmund Lazo
bb172c5104
vim-patch:e46a44050562
Runtime file updates
e46a440505

Omit vim9.
2021-04-28 22:42:43 -04:00
Jan Edmund Lazo
7c6ca6fed8
vim-patch:73fef33014db
Update runtime files
73fef33014

Omit usr_46.txt.
2021-04-28 22:14:37 -04:00
Jan Edmund Lazo
df2acdc3be
vim-patch:65e0d77a66b7
Update runtime files
65e0d77a66

Omit usr_46.txt because of vim9.
2021-04-28 21:57:50 -04:00
Jan Edmund Lazo
565783be4b
vim-patch:acc224064033
Update runtime files
acc2240640

Omit 'quickfixtextfunc'.
Omit ftplugin/man.vim.
2021-04-28 21:29:57 -04:00
Jan Edmund Lazo
04a4bbbe56
vim-patch:8.2.0860: cannot use CTRL-A and CTRL-X on unsigned numbers
Problem:    Cannot use CTRL-A and CTRL-X on unsigned numbers.
Solution:   Add "unsigned" to 'nrformats'. (Naruhiko Nishino, closes vim/vim#6144)
aaad995f83
2021-04-28 21:29:57 -04:00
Jan Edmund Lazo
65821cc1b9
vim-patch:388a5d4f20b4
Update runtime files
388a5d4f20

Omit vim9.
2021-04-28 21:29:57 -04:00
Jan Edmund Lazo
0185625c04
vim-patch:47e13953ffdb
Update runtime files
47e13953ff

Ignore *.rej files, generated by vim-patch.sh.
Source of mistakes for 1st-time contributors.
2021-04-28 21:29:57 -04:00
Jan Edmund Lazo
3d86857f28
vim-patch:2cfb4a2a7248
Update runtime files
2cfb4a2a72
2021-04-28 21:29:56 -04:00
Jan Edmund Lazo
038ce7a5af
vim-patch:7ceefb35c811
Update runtime files
7ceefb35c8

Omit {ftplugin,syntax}/man.vim changes.
Omit E565,E578. They depend on patches v8.2.0614, v2.2.0670.
2021-04-28 21:29:56 -04:00
Jan Edmund Lazo
c2635665c5
vim-patch:2c7f8c574f1f
Update runtime files
2c7f8c574f

Omit the following line for man.vim:
hi def link manFooter PreProc
2021-04-28 21:29:56 -04:00
Jan Edmund Lazo
9d3576246b
vim-patch:8.2.2801: free Pascal makefile not recognized
Problem:    Free Pascal makefile not recognized.
Solution:   Add the fpcmake filetype. (Doug Kearns)
f6d9935a13
2021-04-27 22:54:38 -04:00
Jan Edmund Lazo
e612a0a76a
vim-patch:d1caa941d876
Update runtime files
d1caa941d8

Cherry-pick error E452 from patch v8.2.0486.
2021-04-27 22:40:39 -04:00
Jan Edmund Lazo
d894b3da1e
vim-patch:191acfdecabf
Update runtime files
191acfdeca

Skip has() changes for the "check" optional argument.
Patch v8.2.0427 is not ported yet.

Skip Vim9 (ex. :def).
2021-04-27 21:47:42 -04:00
Jan Edmund Lazo
c287e734f1
vim-patch:ff78155aa175
Update runtime files
ff78155aa1

Omit menu_info().
2021-04-27 21:31:28 -04:00
Jan Edmund Lazo
e7f6c52014
vim-patch:b17893aa940d
Update runtime files
b17893aa94

Omit feedkeys() changes.
2021-04-27 21:25:35 -04:00
Jan Edmund Lazo
a299f54cd7
vim-patch:eab6dff19f38
Update runtime files
eab6dff19f

Omit de.po translations.
2021-04-27 20:25:21 -04:00
derekstride
44d4526e18
Ensure there is a nested table allocated for #set!
Fixes the following bug:
```
test/functional/helpers.lua:107: Error executing lua:
vim/treesitter/query.lua:256: attempt to index a nil value
```
2021-04-27 12:29:37 -02:30
Jan Edmund Lazo
95f02cb587
vim-patch:8.2.2388: no easy way to get the maximum or mininum number value
Problem:    No easy way to get the maximum or mininum number value.
Solution:   Add v:numbermax and v:numbermin.
57d5a01cb4
2021-04-27 09:21:36 -04:00
Jan Edmund Lazo
25c0675fe3
vim-patch:8.2.0296: mixing up "long long" and __int64 may cause problems
Problem:    Mixing up "long long" and __int64 may cause problems. (John
            Marriott)
Solution:   Pass varnumber_T to vim_snprintf().  Add v:numbersize.
f9706e9df0
2021-04-27 09:21:35 -04:00
Jan Edmund Lazo
e257aff016
vim-patch:bc93cebb692f
Update runtime files.
bc93cebb69
2021-04-27 09:21:35 -04:00
Jan Edmund Lazo
278ca5f456
vim-patch:ebdf3c964a90
Update runtime files.
ebdf3c964a

Omit vim9.
2021-04-27 09:21:35 -04:00
Jan Edmund Lazo
4819737853
vim-patch:560979ed4f02
Update runtime files.
560979ed4f

Omit vim9.
2021-04-27 09:21:34 -04:00
Jan Edmund Lazo
e8178093dc
vim-patch:1d9215b9aaa1
Update runtime files.
1d9215b9aa
2021-04-27 09:21:34 -04:00
Jan Edmund Lazo
d112db157c
vim-patch:ade0d3946801
Update runtime files.
ade0d39468
2021-04-27 09:21:34 -04:00
Jan Edmund Lazo
f406e4631d
vim-patch:8024f9363683
Update runtime files.
8024f93636

Omit "modifyOtherKeys" changes.
2021-04-27 09:21:34 -04:00
Jan Edmund Lazo
5e1f434764
vim-patch:2963456ff2b7
Update runtime files.
2963456ff2
2021-04-27 09:21:33 -04:00
Jan Edmund Lazo
c8f07e5e1f
vim-patch:d7df279808f7
Update a few runtime files.
d7df279808
2021-04-27 09:21:33 -04:00
Jan Edmund Lazo
ae362c2120
vim-patch:5666fcd0bd79
Update runtime files.
5666fcd0bd

Do not manually port E290 error message.
Neovim has E5030,E5031 error messages to replace E290.
2021-04-27 09:21:33 -04:00
Jan Edmund Lazo
841bc219d2
vim-patch:95a9dd1efc5a
Update runtime files.
95a9dd1efc
2021-04-27 09:21:32 -04:00
Jan Edmund Lazo
62adc04f08
vim-patch:469bdbde1e8e
Minor runtime file updates.
469bdbde1e
2021-04-27 09:21:32 -04:00
Jan Edmund Lazo
f19c896e9d
vim-patch:2ed639abdc40
Update a few runtime files.
2ed639abdc
2021-04-27 09:21:32 -04:00
Jan Edmund Lazo
d227c22f00
vim-patch:32b364fcc097
Runtime file updates.
32b364fcc0
2021-04-27 09:21:31 -04:00
Jan Edmund Lazo
527d108223
vim-patch:664f3cf3f21d
Runtime file updates.
664f3cf3f2
2021-04-27 09:21:31 -04:00
Jan Edmund Lazo
3e47e529b0
vim-patch:c08ee7476b19
Update runtime files.
c08ee7476b
2021-04-27 09:21:31 -04:00
Jan Edmund Lazo
5426785541
vim-patch:9834b96820be
Update version 8.2 notes and make syntax.
9834b96820
2021-04-27 09:21:31 -04:00
Jan Edmund Lazo
8e782f6124
vim-patch:4ceaa3a6e0b8
Update a few runtime files
4ceaa3a6e0

Omit de.po.
2021-04-27 09:21:31 -04:00
Jan Edmund Lazo
b918d99a61
vim-patch:91359014b359
Update runtime files.
91359014b3
2021-04-27 09:21:30 -04:00
Jan Edmund Lazo
348f72524d
vim-patch:0c0734d527a1
Update runtime files
0c0734d527

Omit rand(), srand() documentation.
Patch v8.1.2342 is not ported yet.
2021-04-27 09:21:30 -04:00
Jan Edmund Lazo
d1231d4f8e
vim-patch:403f3eb4c189
Update runtime files.
403f3eb4c1

Port sr.po changes, done by vim-patch.sh.
No way I'm manually porting the rest.
2021-04-27 09:21:30 -04:00
Jan Edmund Lazo
52564c9aa2
vim-patch:09c6f265b210
Update runtime files.
09c6f265b2

Omit getmousepos().
Patch v8.1.2304 is not ported yet.
2021-04-27 09:21:30 -04:00
Jan Edmund Lazo
d270313c79
vim-patch:1ebbb6ee452d
Fix vim.desktop generation.
1ebbb6ee45
2021-04-27 09:21:29 -04:00
Jan Edmund Lazo
cf0fb01ea5
vim-patch:574ee7bc1246
Update runtime files
574ee7bc12

Omit ru.po because I don't know the language and there's too much to port.
2021-04-27 09:21:29 -04:00
Jan Edmund Lazo
6cdb755507
vim-patch:5ef1c6a4838a
Update runtime files
5ef1c6a483

"scrollfocus" is for Windows GUI only so it is N/A.
2021-04-27 09:21:29 -04:00
Jan Edmund Lazo
d4b65fa6fb
vim-patch:1ff14ba24c4d
Update runtime files.
1ff14ba24c
2021-04-27 09:21:28 -04:00
Jan Edmund Lazo
233292b0ba
vim-patch:96f45c0b6fc9
Update runtime files
96f45c0b6f

Omit de.po changes.
Same reason as before: too much and I don't understand the language.
2021-04-27 09:21:28 -04:00
Jan Edmund Lazo
f0bf853f41
vim-patch:2e693a88b24d
Update runtime files.
2e693a88b2
2021-04-27 09:21:28 -04:00
Jan Edmund Lazo
ecb48e7f8a
fixup! man.vim: Refactor verify_exists to unset $MANSECT as needed
":unset" is not a valid Ex command.
Use setenv() to set/unset environment variables.
2021-04-27 09:21:28 -04:00
Jan Edmund Lazo
b1fed1ada9
vim-patch:5be4ceecea55
Update runtime files.
5be4ceecea
2021-04-27 09:21:27 -04:00
Jan Edmund Lazo
766a107839
vim-patch:589edb340454
Updte runtime files
589edb3404

Omit state() changes in eval.txt because patch v8.1.2047 is not merged.
2021-04-27 09:21:27 -04:00
Jan Edmund Lazo
d6cef4ef9d
vim-patch:8fe1000e9c34
Update runtime files
8fe1000e9c

Omit de.po changes.
There's too many lines to port and I don't understand the language.
2021-04-27 09:21:27 -04:00
Jan Edmund Lazo
01a629ca03
vim-patch:8.1.1726: the eval.txt help file is too big
Problem:    The eval.txt help file is too big.
Solution:   Split off testing support to testing.txt.  Move function details
            to where the functionality is explained.
ed997adaa1

Vim commit 5477506a9f01d40fad2e8f0555bc37adee30478f
contains the duplicate tag fix in runtime/doc/testing.txt.
2021-04-27 09:21:26 -04:00
Michael Bleuez
684b4ae736 doc : fixing missing @return in nvim_open_term doc 2021-04-24 12:47:52 +02:00
Michael Lingelbach
11728988dc
Merge pull request #14429 from ckipp01/force
[LSP] - Don't automatically force shutdown on second restart.
2021-04-23 14:52:13 -07:00
Gabriel Sanches
8885ea7f24
lsp: make tagstack smarter motion-wise (#12262)
This commit prevents two things regarding the tagstack and jumping to
locations:

  - Pushing the same item twice in a row

  - Pushing an item where the destination is the same as the source

Both prevent having to press CTRL-T additional times just to pop items
that don't make the cursor move.
2021-04-23 14:50:35 -07:00
Michael Lingelbach
4eb29e079a Revert "lsp: fix blocking in closing of clients"
This reverts commit 2e6c09838f.

* Fixes #14428
* This commit caused neovim to close while open handles to the uv timer
  to kill active language servers were still open
2021-04-23 12:17:00 -07:00
Marco Hinz
be494023d8
lsp: check if config is nil 2021-04-23 20:56:44 +02:00
Marco Hinz
4de404a681
lsp: sort diagnostics by severity (#14372)
Allow to sort diagnostics (and thus signs and virtual text) by severity, so that
the most important message is shown first.

    vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
      vim.lsp.diagnostic.on_publish_diagnostics, {
        severity_sort = true,
      }
    )

Fixes https://github.com/neovim/neovim/issues/13929
2021-04-23 20:09:56 +02:00
ckipp01
2a77d9d8a4 Don't automatically force shutdown on second restart.
This is maybe a bit of a niche case, but I hit on this often as I'm
developing a server, and therefore continually restarting it to get the
latest changes of the server. Previously, I could only do this once
since if you send in a request to restart/shut down the server, it will
register it as a `tried_graceful_shutdown = true` meaning that the next
restart would force it to be killed instead of another graceful exit.

Instead, this changes the name a bit and now it will only mark
`graceful_shutdown_failed = true` _if_ it actually fails to gracefully
shutdown. This change allows for a user to restart multiple times in a
situation like mine where nothing is going wrong, but I just want to
restart continually as I'm developing without having to close and
reopen.
2021-04-23 14:26:33 +02:00
Sean Dewar
65f35e0c7d
vim-patch:8.2.1588: cannot read back the prompt of a prompt buffer
Problem:    Cannot read back the prompt of a prompt buffer.
Solution:   Add prompt_getprompt(). (Ben Jackson, closes vim/vim#6851)
077cc7aa0e

Updated prompt_getprompt() doc to cb80aa2d53
and removed mention of method syntax usage (not supported by Nvim).
2021-04-21 14:55:04 +01:00
Sean Dewar
eef5a627bf
doc: port changes for locale-based :sort
Cherry-picked from 3132cddd20.
2021-04-20 10:12:10 +01:00
Sean Dewar
6a0b8cbd81
vim-patch:8.2.1933: cannot sort using locale ordering
Problem:    Cannot sort using locale ordering.
Solution:   Add a flag for :sort and sort() to use the locale. (Dominique
            Pellé, closes vim/vim#7237)
55e29611d2
2021-04-20 10:12:02 +01:00
Sean Dewar
1d72b6e4cd
eval: port v:collate
Cherry-picked from patch v8.2.0988. Required for patch v8.2.1933.
2021-04-20 02:03:46 +01:00
Michael Lingelbach
26bd5a58df
Merge pull request #14180 from oberblastmeister/lsp_exit_perf
fix slow closing of lsp clients when exiting vim
2021-04-19 17:35:58 -07:00
Brian Shu
2e6c09838f lsp: fix blocking in closing of clients 2021-04-19 20:04:08 -04:00
Matthieu Coudron
e343437bb6
Merge pull request #12323 from da-x/orphaned-signs
Handle 'orphaned signs' on line deletion for signcolumn >= 2
2021-04-18 17:12:41 +02:00
Jan Edmund Lazo
a129887c00
vim-patch:8.2.2773: PSL filetype not recognized (#14389)
Problem:    PSL filetype not recognized.
Solution:   Add a filetype pattern. (Daniel Kho, closes vim/vim#8117)
112a006417
2021-04-17 22:41:51 -04:00
Dan Aloni
f2ed7605da Handle 'orphaned signs' on line deletion for signcolumn >= 2 2021-04-17 10:11:17 +03:00
Dingcheng Yue
6974d0c6c1 lsp: deep copy vim.lsp.log when reloading
If vim.lsp.log is loaded the second time,
the vim.log.levels will be modified with additional
entries from 0-5.
This will cause the require to fail as level:lower does
not exists on numbered value.
2021-04-16 11:43:20 +01:00
Björn Linse
a6504ec339
Merge pull request #13684 from pohzipohzi/input
doc: add description for cancelreturn option in input()
2021-04-16 09:47:45 +02:00
Jan Edmund Lazo
fe808f02f6
Merge pull request #14355 from janlazo/vim-8.1.2313
vim-patch:8.1.2313,8.2.{2046,2769}
2021-04-15 21:55:56 -04:00
Jan Edmund Lazo
b34dc4c458
ex_cmds: port :eval
Cherry-picked from patch v8.1.1807.
Required for patch v8.2.2761.
2021-04-15 18:30:03 -04:00
Jan Edmund Lazo
011cfc538c
vim-patch:8.2.2769: Modula-3 config files are not recognized
Problem:    Modula-3 config files are not recognized.
Solution:   Add filetype patterns. (Doug Kearns)
6bc00699c5
2021-04-15 18:08:55 -04:00
Brian Shu
ef5314ce59 lsp: add lsp.buf_request_all for invoking asynchronous callbacks
fixed nil issue

changed poll to 10

changed wording

added docs to once

comma

english
2021-04-15 12:54:59 -04:00
Mathias Fussenegger
046991e4d5 lsp: Remove vim.NIL handling from apply_text_document_edit
The rpc layer normalizes `vim.NIL` to `nil`, so the scenario tested
should never happen.
2021-04-14 21:42:03 +02:00
Mathias Fussenegger
b67f689e4c lsp: Accept text document edits with version zero
There were a couple of reports of "Buffer X newer than edits" problems.
We first assumed that it is incorrect for a server to send 0 as a
version - and stated that they should send a `null` instead, given that
in the specification the `textDocument` of a `TextDocumentEdit` is a
`OptionalVersionedTextDocumentIdentifier`.

But it turns out that this was a change in 3.16, and in 3.15 and earlier
versions of the specification it was a `VersionedTextDocumentIdentifier`
and language servers didn't have a better option than sending `0` if
they don't keep track of the version numbers.

So this changes the version check to always accept `0` values.

See

- https://github.com/neovim/neovim/issues/12970
- https://github.com/neovim/neovim/issues/14256
- https://github.com/haskell/haskell-language-server/pull/1727
2021-04-14 21:29:32 +02:00
Aru Sahni
d9c7adc64c
doc: prefer "python -m pip" (#14353)
The current guidance for install Python packages is to use

    python -m pip install <package_name>

Instead of

    pip install <package_name>

This ensures that one is using the version of pip that is tied to the
environment's interpreter (and, thusly, its packages).  This has [been
endorsed by a core
maintainer](https://snarky.ca/why-you-should-use-python-m-pip/) as
being the recommended way to invoke pip.

As there currently are a few places where the old invocation was used,
attempt to bring them in line.

Fixes #14234
2021-04-14 20:48:13 +02:00
Sean Dewar
6ab4c8f955
doc: port prompt-buffer section (#14342)
[skip ci]

Changes from original include:
- "See |terminal-window|" -> "See |terminal|".
- Remove mention of using CTRL-W window commands in insert mode.
- Converted usage example to use the Nvim job and channel API.
- Removed logging from usage example, as ch_logfile() has no direct Nvim
  counterpart.
- Fixed some small grammar/spelling mistakes.
2021-04-14 20:39:37 +02:00
Michael Lingelbach
cd3e74201a
lsp: fix _make_floating_popup_size when wrap_at is nil (#14359) 2021-04-14 13:01:14 +02:00
Thomas Vigouroux
e652b2987a
Merge pull request #14046 from nvim-treesitter/feature/language-tree-directive-config
feat(treesitter): allow injections to be configured through directives
2021-04-14 05:36:05 +02:00
Marco Hinz
6b16ec701e
lsp: fix off-by-one in line diagnostic highlighting 2021-04-14 02:11:47 +02:00
Michael Lingelbach
391fe1064e
Merge pull request #14119 from mfussenegger/lsp-debounce
lsp: Add a flag to debounce didChange notifications
2021-04-13 15:03:13 -07:00
Marco Hinz
2001ba2c6a
Merge pull request #14324 from mhinz/lsp-border-float-placement 2021-04-13 23:43:50 +02:00
Mathias Fussenegger
720c6353b5 lsp: Add a flag to debounce didChange notifications
Would help with cases as reported in https://github.com/neovim/neovim/issues/14087
2021-04-13 21:02:30 +02:00
Marco Hinz
ef3f05c432
tutor: force one sign per line (#14352)
The only thing setting signs in the tutor buffer (buftype=nofile), should be
tutor.vim itself.

Instead of endlessly piling up new signs per line, just unplace any sign on the
line before placing a new one.

Closes https://github.com/neovim/neovim/issues/13808
Closes https://github.com/neovim/neovim/pull/13809
2021-04-13 12:13:44 +02:00
Marco Hinz
3831825167
lsp: correct float placement when using borders
Because borders add up to 2 to the height of a float, we need to subtract that
from the anchor position, when opening a float in the lower half of the window.
2021-04-12 19:54:54 +02:00
Marco Hinz
a215adabc1
lsp: make sure borders are always inside of the screen
Add a helper function to get the additional width a border adds to a float to
make sure that the border is always inside the visible screen.
2021-04-12 19:51:18 +02:00
Jan Edmund Lazo
3893027200
Merge pull request #14337 from janlazo/vim-8.2.0409
vim-patch:8.1.{1841,2416},8.2.{409,1920,2050}
2021-04-11 21:43:45 -04:00
Jan Edmund Lazo
4ff70cc58b
vim-patch:8.1.2416: loading menus sets v:errmsg
Problem:    Loading menus sets v:errmsg.
Solution:   Avoid setting v:errmsg and add a test for that. (Jason Franklin)
e24c5b3332
2021-04-11 17:05:42 -04:00
James McCoy
9699f3be10
fix(doc): Add '/site' to stdpath('data') example in :help 'rtp'
[skip ci]
2021-04-10 13:45:48 -04:00
Christian Clason
1b030f889c
doc: advertise nanotee/nvim-lua-guide (#14332) [skip ci]
Mention https://github.com/nanotee/nvim-lua-guide at the beginning of ":h lua" as well as ":h lua-vimscript".

Closes #12369 .
2021-04-09 19:36:23 +02:00
Jan Edmund Lazo
0d0eeff8a3
eval: add v:_null_string
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.

Use v:_null_string, not non-existent env var, for null string tests.

Mention v:_null_string in id() because id(v:_null_string) returns (nil).
2021-04-08 22:36:20 -04:00
Jan Edmund Lazo
1a1fe58f7e
vim-patch:8.0.1505: debugger can't break on a condition
Problem:    Debugger can't break on a condition. (Charles Campbell)
Solution:   Add ":breakadd expr". (Christian Brabandt, closes vim/vim#859)
c6f9f739d3

Do not port "has_watchexpr()" to avoid dead code.
"has_watchexpr()" always returns 0 because "debug_expr" is always 0.

Restore "eval_expr()" as a wrapper to allocate "typval_T" for "eval0()".
Remove it in later patches.

Include "typval_compare()" changes from patch v8.1.0958,
partially ported in 8b60368c1b.

Close https://github.com/neovim/neovim/pull/12373

N/A patches for version.c:

vim-patch:8.2.2720: GTK menu tooltip moves the cursor

Problem:    GTK menu tooltip moves the cursor.
Solution:   Position the cursor after displaying the tooltip.  Do not show the
            tooltip when editing the command line.
01ac0a1f66
2021-04-08 07:28:46 -04:00
pohzipohzi
afae96e69a doc: add description for cancelreturn option in input() 2021-04-08 17:56:31 +08:00
Michael Lingelbach
48e8057285
Merge pull request #14302 from vigoux/fix-8449
Update docs
2021-04-07 09:14:49 -07:00
Marco Hinz
cd75d3289a
Merge pull request #14200 from teto/treesitter-checkhealth
feat: treesitter checkhealth
2021-04-07 16:40:56 +02:00
Thomas Vigouroux
d7a1bbd81a
docs: add priority option in buf_set_extmark 2021-04-07 15:36:46 +02:00
Michael Lingelbach
91cdc11984
Merge pull request #14309 from mjlbach/feature/hover_return_win_buf
lsp: hover window should return buf/winnr from focusable float
2021-04-07 00:58:32 -07:00
Michael Lingelbach
5610e8a4ac lsp: hover window should return buf/winnr from focusable float 2021-04-07 00:21:56 -07:00
Michael Lingelbach
2c0bcc539a lsp: update documentation on window borders 2021-04-06 23:51:15 -07:00
Thomas Vigouroux
952508d405
fix(ts): move checkhealth in runtime/vim 2021-04-06 19:03:04 +02:00
Thomas Vigouroux
e8bc3d717e
feat(ts): include parser ABI version in checkhealth 2021-04-06 19:02:58 +02:00
Matthieu Coudron
86ced59a6a
feat: treesitter checkhealth 2021-04-06 18:54:22 +02:00
Michael Lingelbach
370469be25
Merge pull request #14300 from elianiva/feat/lsp_border_config
feat(lsp): make hover/signature_help borders configurable
2021-04-05 22:44:28 -07:00
elianiva
c84b1b1ad0 feat(lsp): make hover/signature_help borders configurable
change hl groups for the example

rename borders -> border
2021-04-06 12:13:31 +07:00
Jan Edmund Lazo
ce0153e4f7
vim-patch:8.2.2714: filetype pattern ending in star is too far up
Problem:    Filetype pattern ending in star is too far up.
Solution:   Move down to where patterns ending in star belong. (closes vim/vim#8065)
409da842db
2021-04-05 11:29:35 -04:00
Michael Lingelbach
2c4e9c5245
lsp: floating window improvements (#14207)
* remove left/right padding feature from trim_and_pad
* use invisible borders by default on floating windows
2021-04-05 15:43:08 +02:00
Jan Edmund Lazo
76f5c72860
Merge pull request #14063 from lewis6991/master
vim-patch:8.1.{1631,1682,1899}: sign improvements
2021-04-04 10:28:16 -04:00
Jan Edmund Lazo
ffef1519ca
vim-patch:8.2.2697: function list test fails
Problem:    Function list test fails.
Solution:   Add missing function. (Yegappan Lakshmanan)
0df6030145
2021-04-03 20:26:05 -04:00
Lewis Russell
5257bce979 vim-patch:8.1.1682: placing a larger number of ...
...signs is slow

Problem:    Placing a larger number of signs is slow.
Solution:   Add functions for dealing with a list of signs. (Yegappan
            Lakshmanan, closes #4636)
2021-04-03 23:56:54 +01:00
Jan Edmund Lazo
abdda66410
vim-patch:8.2.2694: when 'matchpairs' is empty every character beeps (#14279)
Problem:    When 'matchpairs' is empty every character beeps. (Marco Hinz)
Solution:   Bail out when no character in 'matchpairs' was found.
            (closes vim/vim#8053)  Add assert_nobeep().
5b8cabfef7
2021-04-03 08:49:39 -04:00
Steven Sojka
8bea39f372 feat(treesitter): allow injections to be configured through directives 2021-04-02 12:48:16 -05:00
Jan Edmund Lazo
dde89730b4
vim-patch:8.2.2690: PowerShell files are not recognized (#14276)
Problem:    PowerShell files are not recognized.
Solution:   Recognize several PowerShell extension. (Heath Stewart,
            closes vim/vim#8051)
ef38bcf051

N/A patches for version.c:

vim-patch:8.2.2689: tiny build fails

Problem:    Tiny build fails.
Solution:   Add #ifdef around use of p_stl.
160a2b4dac

vim-patch:8.2.2691: autoconf may mess up compiler flags

Problem:    Autoconf may mess up compiler flags.
Solution:   Handle removing FORTIFY_SOURCE a bit better. (Vladimir Lomov,
            closes vim/vim#8049)
3fa5e64e0e
2021-04-02 13:44:25 -04:00
Stephan Seitz
43eb22d4c9 Fix #14192: Handle IO errors and close files in query.lua 2021-04-02 16:21:49 +02:00
Thomas Vigouroux
3f7cd18c4a
Merge pull request #14218 from steelsojka/bugfix/check-queries-exist
fix(treesitter): check highlight queries exist
2021-04-02 05:24:49 +02:00
Kevin Svetlitski
da31f1c7dd
doc: Fix typo in the help for <Cmd> where lhs was used instead of rhs (#14272) 2021-04-01 21:50:02 -04:00
Michael Lingelbach
3b01dd4183 lsp: allow launching language servers with uv_spawn using cwd arg 2021-04-01 14:24:37 -07:00
Thomas Vigouroux
11bea67a55
fix: allow accessing vim.treesitter.language without require 2021-04-01 16:51:36 +02:00
Fabian David Schmidt
a2bd2f220c fix: selectionrange over range for document symbols 2021-04-01 14:16:01 +02:00
Michael Lingelbach
3d25a72a60
Merge pull request #14264 from mjlbach/feature/handle_reloading_buffer
lsp: add on_reload callback for buffer edits outside of neovim
2021-04-01 01:08:39 -07:00
Michael Lingelbach
f738f089da
Merge pull request #14262 from mjlbach/feature/lsp_did_save_autocommand
lsp: clear did_save handler autocommand on each attach
2021-04-01 00:53:47 -07:00
Michael Lingelbach
f87ae324bb lsp: fix textDocument/workspaceSymbol -> workspace/symbol 2021-03-31 23:53:07 -07:00
Michael Lingelbach
92e106ba23 lsp: add on_reload callback for buffer edits outside of neovim 2021-03-31 22:41:00 -07:00
Michael Lingelbach
08941e163e lsp: clear did_save handler autocommand on each attach 2021-03-31 20:23:17 -07:00
TJ DeVries
06c065469b
ts: Add per-language highlight links 2021-03-31 18:09:00 +02:00
Thomas Vigouroux
94c2ce2ce4
Merge pull request #14252 from tjdevries/tjdevries/ts_query_overrides
ts: Add per-language query overriding
2021-03-31 17:59:42 +02:00
Michael Lingelbach
db47cf8153
Merge pull request #14233 from mjlbach/disable_utf16_conversion
lsp: use utf-8 when utf-16 not requested
2021-03-30 14:37:55 -07:00
Michael Lingelbach
0cadab1412 lsp: use utf-8 when utf-16 not requested 2021-03-30 14:14:09 -07:00
TJ DeVries
240cec9192
ts: Add language version to vim.treesitter (#14255) 2021-03-30 16:40:29 -04:00
TJ DeVries
04fb94cd80 ts: Add per-language query overriding 2021-03-30 08:25:11 -04:00
zeertzjq
f89bfa6869
vim-patch:8.2.2454: leading space can not be made visible (#14138)
Problem:    Leading space can not be made visible.
Solution:   Add "lead:" to 'listchars'. (closes vim/vim#7772)
91478ae49a
2021-03-29 21:26:11 -04:00
Aditya Alok
291f1ece7f
added support for termux-clipboard : clipboard.vim (#14244)
Termux - Android terminal emulator
Link - https://termux.com/
2021-03-29 20:52:35 -04:00
Andy K. Massimino
b4aea3d1c8 vim-patch:8.2.2612: col('.') may get outdated column value
Problem:    col('.') may get outdated column value.
Solution:   Add a note to the help how to make this work and add a test for
            it. (closes vim/vim#7971)
18b7d86d7f
2021-03-29 19:46:00 -04:00
Jan Edmund Lazo
63c2a7af2d
Merge pull request #13851 from VVKot/vim-8.1.0105
vim-patch:8.1.{0105,0114,0116,0126,0138,0154,0479,0542,0936}
2021-03-28 13:40:34 -04:00
Björn Linse
6d4a922e07
Merge pull request #14091 from euclidianAce/euclidianAce/nvim_win_hide
api: add vim.api.nvim_win_hide
2021-03-28 19:07:56 +02:00
Corey Williamson
45236981d8 run docgen 2021-03-28 19:03:35 +02:00
Michael Lingelbach
32cf278a19 lsp: fix utf-16 ranges to use second return value for incremental sync 2021-03-28 02:22:13 -07:00
VVKot
7fc58ec99a vim-patch:8.1.0542: shiftwidth() does not take 'vartabstop' into account
Problem:    shiftwidth() does not take 'vartabstop' into account.
Solution:   Use the cursor position or a position explicitly passed.
            Also make >> and << work better with 'vartabstop'. (Christian
            Brabandt)
f951416a83
2021-03-28 08:38:21 +01:00
VVKot
6752ac4968 vim-patch:8.1.0105: all tab stops are the same
Problem:    All tab stops are the same.
Solution:   Add the variable tabstop feature. (Christian Brabandt,
            closes vim/vim#2711)
04958cbaf2
2021-03-28 08:37:01 +01:00
Michael Lingelbach
b79596eb5e
Merge pull request #14231 from mjlbach/fix_utf16_ranges
lsp: fix utf16 ranges for incremental sync
2021-03-27 19:02:48 -07:00
Michael Lingelbach
af683fdb57 lsp: fix utf16 ranges for incremental sync 2021-03-27 18:31:29 -07:00
Marco Hinz
2b663c061b
viml: embed Lua syntax highlighting [skip ci] (#14213) 2021-03-28 00:43:06 +01:00
Jan Edmund Lazo
3261ba98a2
vim-patch:8.1.2326: cannot parse a date/time string
Problem:    Cannot parse a date/time string.
Solution:   Add strptime(). (Stephen Wall, closes #)
10455d43fe

N/A patches for version.c:

vim-patch:8.1.2344: Cygwin: warning for using strptime()

Problem:    Cygwin: warning for using strptime().
Solution:   Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata,
            closes vim/vim#5265)  Use 700 for _XOPEN_SOURCE for mkdtemp().
6a228c6463
2021-03-27 10:53:41 -04:00
Steven Sojka
98f9df253e fix(treesitter): check highlight queries exist 2021-03-26 11:25:19 -05:00
Steven Sojka
2a794b8f5d fix(treesitter): dedupe runtime file list 2021-03-23 12:58:27 -05:00
Michael Lingelbach
9f5c8226bb
Merge pull request #14186 from mjlbach/feature/make_signature_help_beautiful
lsp: add syntax highlighting to signature help
2021-03-23 09:38:21 -07:00
Jan Edmund Lazo
d41778c993
Merge pull request #14178 from andymass/vim-8.2.0088
[RFC] vim-patch 8.2.0088: insufficient tests for tags...
2021-03-22 20:35:24 -04:00
Michael Lingelbach
3113d4befa lsp: add syntax highlighting to signature help 2021-03-22 10:57:21 -07:00
TJ DeVries
875979ec3f lsp: Unopened buffers return 0 for line count, which leads to broken positions 2021-03-22 10:22:23 -04:00
TJ DeVries
880fb0d146 lsp: Force re-display of diagnostics when opening a file 2021-03-22 10:21:56 -04:00
Andy K. Massimino
6519b18471 vim-patch:8.2.0088: insufficient tests for tags; bug in using extra tag field
Problem:    Insufficient tests for tags; bug in using extra tag field when
            using an ex command to position the cursor.
Solution:   Fix the bug, add more tests. (Yegappan Lakshmanan, closes vim/vim#5439)
830c1afc9d
2021-03-21 10:37:45 -04:00
Jan Edmund Lazo
c620ca4cc2
vim-patch:8.2.2634: 'tagfunc' does not indicate using a pattern
Problem:    'tagfunc' does not indicate using a pattern.
Solution:   Add the "r" flag. (Andy Massimino, closes vim/vim#7982)
f90c855c71
2021-03-21 10:35:26 -04:00
Jan Edmund Lazo
0bf9f10da0
vim-patch:8.2.2625: rss files not recognized
Problem:    Rss files not recognized.
Solution:   Recognize .rss as XML. (Kivin Locke, closes vim/vim#7987)
af125866db
2021-03-20 22:27:51 -04:00
Jan Edmund Lazo
429c6d2d4f
vim-patch:8.2.2624: atom files not recognized
Problem:    Atom files not recognized.
Solution:   Recognize .atom as XML. (Kivin Locke, closes vim/vim#7986)
74b99f6ab6

N/A patches for version.c:

vim-patch:8.2.2622: GTK: error when starting up and -geometry is given

Problem:    GTK: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes vim/vim#7978)
a555e6fcb6

vim-patch:8.2.2626: GTK3: error when starting up and -geometry is given

Problem:    GTK3: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes vim/vim#7978)
240014321b
2021-03-20 22:27:47 -04:00
Vincent Rischmann
24ad2c7067 runtime/lua/vim/lsp: check emptyness in get_completion_word 2021-03-21 00:30:01 +01:00
Jan Edmund Lazo
dc8da7ba40
Merge pull request #14060 from andymass/vim-8.2.1703
[RFC] vim-patch:8.2.{1693,1703,1705}
2021-03-20 18:08:16 -04:00
Jan Edmund Lazo
049213b419
Merge pull request #14164 from andymass/vim-8.1.2020
[RFC] vim-patch 8.{1.2020,2.0093,2.0422}: add win_splitmove()
2021-03-20 15:59:53 -04:00
Andy K. Massimino
1ef4340f22 vim-patch:8.1.2020: it is not easy to change the window layout
Problem:    It is not easy to change the window layout.
Solution:   Add win_splitmove(). (Andy Massimino, closes vim/vim#4561)
d20dcb3d01
2021-03-19 23:02:28 -04:00
Michael Lingelbach
2358e52fc4 lsp: set syntax instead of filetype for preview location highlighting 2021-03-19 12:55:58 -07:00
Mathias Fussenegger
84213b5b9a lsp: Add support for delete workspaceEdit resource operation 2021-03-18 19:53:43 +01:00
Mathias Fussenegger
191afb42be lsp: Add support for create workspaceEdit resource operation 2021-03-18 19:53:42 +01:00
Mathias Fussenegger
5e401b693b lsp: Add support for file rename via workspaceEdit 2021-03-18 19:53:14 +01:00
Matthieu Coudron
0ab88c2ea8
Merge pull request #14145 from teto/remove-tshighlighter
chore: remove deprecated lua module tshighlighter
2021-03-16 18:44:41 +01:00
Michael Lingelbach
2f64cda49e lsp: update lsp_markdown syntax to not clash with built-in markdown syntax 2021-03-15 22:58:54 -07:00
Matthieu Coudron
b540141876 chore: remove deprecated lua module tshighlighter 2021-03-16 01:41:28 +01:00
Michael Lingelbach
054eb31dc7
Merge pull request #14098 from mjlbach/fix_highlighting_lsp_markdown
lsp: fix highlighting for lsp markdown code blocks
2021-03-15 10:28:05 -07:00
Björn Linse
e8a0ff001f
Merge pull request #14076 from mfussenegger/treesitter019
treesitter: Update to 0.19.3
2021-03-15 18:06:26 +01:00
Björn Linse
bb6d2c9b7c api: destabilize nvim_set_hl_ns
The sematics and signature of this API is going to change, but we
don't wanna delay 0.5 for it. Mark API as unstable for now.
2021-03-15 09:58:39 +01:00
Jan Edmund Lazo
ea99cbc85a
vim-patch:8.2.2591: Poke files are not recognized
Problem:    Poke files are not recognized.
Solution:   Add a filetype entry. (Matt Ihlenfield)
c80f647512
2021-03-12 18:34:58 -05:00
Mathias Fussenegger
16827817bb lsp: Use incremental sync by default
With the new implementation added in
https://github.com/neovim/neovim/pull/14079 I think this is now working
well enough to enable it by default.

There are high CPU usage issues popping up now and then and they might
at least partially be related to the full-text sync.
2021-03-11 20:13:52 +01:00
Mathias Fussenegger
02271009ca Update lsp, lua and api docs (gen_vimdoc.py) 2021-03-11 16:16:26 +01:00
Michael Lingelbach
6b7cde3dd0 lsp: fix highlighting for lsp markdown code blocks 2021-03-10 17:26:22 -08:00
Michael Lingelbach
4ed860a64c
Merge pull request #14073 from mjlbach/feature/syntax_highlight_rule
lsp: add custom syntax rule for floating window
2021-03-10 14:15:24 -08:00
Josa Gesell
d1074e0077
lsp: Resolve codeLense server capabilities (#14056) 2021-03-10 17:02:09 -05:00
TJ DeVries
564dd7d8db
lsp: get_language_id (#14092)
* Allow specifying a languageId for a lsp

For some languages the filetype might not match the languageId the
language server accepts. In these cases the config for the language
server can contain a function which gets the current buffer and filetype
and returns a languageId. When it isn't provided the filetype is used
instead.

Example:
```lua
require'lspconfig'.sourcekit.setup{
    get_language_id = function(bufnr, ft)
        return 'swift'
    end;
}
```

Closes #13093

* lsp: Change to get_language_id

Co-authored-by: Jan Dammshäuser <mail@jandamm.de>
2021-03-10 16:53:23 -05:00
Michael Lingelbach
53414555eb lsp: fix endline such that it cannot point outside the buffer range 2021-03-10 09:17:20 -08:00
Michael Sartain
300e71de9c
runtime/termdebug 82be4849eed0b8fbee45bc8da99b685ec89af59a (#13660)
port termdebug dissasembly window only (termdebug.vim)

This patch adds disassembly window to Termdebug

  :Asm should bring up disassembly window

or setting:

  g:termdebug_disasm_window

Values greater than 1 will set disasm window height.

Code works by calling gdb disassemble command, demangling output and
storing in Termdebug-asm-listing buffer + window.

Current pc address is parsed from 'addr=' cursor msg and we search for
that address in the disasm window. When the search fails, we execute a
new "disassemble $pc" command.

When in a location without a proper stack frame, "disassemble $pc" can
fail and in this case we add a +length argument and try again.

Tested with x86_64 gdb v10.1 and v8.2.1, and aarch64 gdb v7.12.
2021-03-10 08:20:22 -05:00
Michael Lingelbach
d49177afd9 lsp: add custom syntax rules for lsp floating window 2021-03-09 21:15:10 -08:00
Michael Lingelbach
e4e51c69d7 lsp: add incremental text synchronization
* Implementation derived from and validated by vim-lsc authored by Nate
  Bosch
2021-03-09 20:14:08 -08:00
Mathias Fussenegger
b73e653703 treesitter: Update to 0.19.3 2021-03-09 19:21:26 +01:00
Matthieu Coudron
5c4fbe34f9
Merge pull request #13993 from teto/gendoc
improve vimdoc generation
2021-03-07 17:20:09 +01:00
Michael Lingelbach
0496b572ac
Merge pull request #13919 from TheAlakazam/lsplogfix
fix: fix empty line in lsp log after each run
2021-03-06 09:40:57 -08:00
Lee Wannacott
d8dff33e4b Added If true to show that {after} and {follow} parameters of nvim_put() are expecting boolean values 2021-03-07 00:54:13 +13:00
Lee Wannacott
ea99e7f2ab Forgot to add colon to the {follow} parameters statement 2021-03-07 00:31:58 +13:00
Lee Wannacott
cde94598ed Clarify that nvim_put()'s {after} and {follow} parameters expect boolean values true, or false. 2021-03-07 00:06:13 +13:00
Piyush Jaipuriyar
82c09f7c0b lsp: add explicit entry on lsp log start
fix: address typo and review comments
2021-03-06 10:39:40 +05:30
Michael Lingelbach
3fbff98cfd
Merge pull request #13793 from mjlbach/fix_terminating_eol_diagnostic
[RDY] lsp: fix diagnostic reported on terminating EOL character
2021-03-05 07:27:50 -08:00
Andy K. Massimino
8601e8b0d6 vim-patch:8.2.1703: ":highlight clear" does not restore default link
Problem:    ":highlight clear" does not restore default link.
Solution:   Remember the default link and restore it. (Antony Scriven,
            closes vim/vim#6970, closes vim/vim#4405)
213da551de
2021-03-05 01:45:54 -05:00
Jan Edmund Lazo
8f4b9b8b7d
Merge pull request #14048 from saadparwaiz1/runtime/haskell
Update Runtime Files For Haskell
2021-03-04 22:48:16 -05:00
Michael Lingelbach
58be81d645 lsp: don't invoke vim.notify on sigterm of language server 2021-03-04 13:50:49 -08:00
Michael Lingelbach
c50b737d6f
Merge pull request #14047 from mjlbach/feature/notify_on_crash
lsp: invoke vim.notify when client exits with code or signal other than 0
2021-03-04 12:27:46 -08:00
Michael Lingelbach
bdb2512325 lsp: invoke vim.notify when client exits with code or signal other than 0 2021-03-04 10:55:50 -08:00
Matthieu Coudron
55d6699dfd chore: rename progress_callback to progress_handler 2021-03-04 15:42:05 +01:00
Volodymyr Kot
df4440024b
vim-patch:30e9b3c42567 (#13936)
Update runtime files
30e9b3c425
2021-03-03 18:19:01 -05:00
Saad Parwaiz
1888d9cbd0 runtime/haskell: 4f4d51a942cc2c6b3e936ee0f93f00c2d000065c
port syntax file only
2021-03-03 02:00:56 +00:00
Saad Parwaiz
6cfd5d7163 runtime/haskell: 8fe1000e9c3438d0ff36cf2340f0f0e48f8fb89f
port haskellcomplete file only
2021-03-03 01:55:43 +00:00
Saad Parwaiz
af0a9da975 runtime/cabal: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port cabal, cabalconfig, cabalproject syntax file
2021-03-03 01:54:39 +00:00
Saad Parwaiz
4053b7b1ca runtime/cabal: 4f4d51a942cc2c6b3e936ee0f93f00c2d000065c
port cabal syntax file only
2021-03-03 01:54:33 +00:00
Michael Lingelbach
db96edb58d lsp: fix diagnostic reported on terminating EOL character 2021-03-02 09:42:00 -08:00
Jan Edmund Lazo
f32acc70e8
vim-patch:8.2.2236: 'scroll' option can change when setting the statusline
Problem:    'scroll' option can change when setting the statusline or tabline
            but the option context is not updated.
Solution:   Update the script context when the scroll option is changed as a
            side effect. (Christian Brabandt, closes vim/vim#7533)
746670604a
2021-03-02 00:35:52 -05:00
Jan Edmund Lazo
a5bacdbfb4
vim-patch:8.1.1901: the +insert_expand feature is not always available
Problem:    The +insert_expand feature is not always available.
Solution:   Graduate the +insert_expand feature.
e2c453d38f
2021-03-01 23:41:10 -05:00
David Zhang
365c353c9a fix: show error when language server start fails and prevent future requests 2021-02-26 17:24:18 +08:00
Michael Lingelbach
0c7610cf9d
Merge pull request #14014 from mfussenegger/textDocumentSync
LSP: Resolve text_document_save capability according to spec
2021-02-25 10:25:14 -08:00
Jan Edmund Lazo
a2b6e5ed4e
Merge pull request #14004 from erw7/fix-fic
option: fix problem with fileignorecase not being set properly
2021-02-25 12:45:53 -05:00
Mathias Fussenegger
eff7666163 LSP: Resolve text_document_save capability according to spec
Fixes https://github.com/neovim/neovim/issues/13989
See https://github.com/microsoft/language-server-protocol/issues/288
2021-02-25 10:08:14 +01:00
erw7
6deabca3e7 eval: add fname_case to feature list 2021-02-25 13:50:31 +09:00
Mathias Fussenegger
b5292a047d Update lsp and api docs with gen_vimdoc changes
Applies the changes generated with ./scripts/gen_vimdoc.py to add
missing documentation.
2021-02-24 23:44:52 +01:00
Chris Kipp
7d82aaa6f5
[LSP] Add in more docs for highlight groups with document_highlight() (#13614)
Currently it's not 100% clear that without setting these, using the autocomds
to utilize the `textDocument/documentHighlight` functionality, nothing will
actually be visible since the highlight groups don't have any details. This
just adds in a couple simple extra notes to make sure that's done
2021-02-24 17:23:47 +01:00
Simon Hauser
6b7cc45c48
fix: treesitter languagetree crash when using telescope buffer previewer (#13986) 2021-02-23 21:39:35 -05:00
kuuote
0450e155d4
vim-patch:8.2.2233: cannot convert a byte index into a character index (#13978)
Problem:    Cannot convert a byte index into a character index.
Solution:   Add charidx(). (Yegappan Lakshmanan, closes vim/vim#7561)
17793ef23a
2021-02-22 20:13:14 -05:00
Matthieu Coudron
9d5f842807
lsp: remove deprecated references to 'callbacks' (#13945)
vim.lsp.callbacks was deprecated a few months ago. This is a cleanup before the release.
Use vim.lsp.handlers instead.
2021-02-23 00:02:51 +01:00
Matthieu Coudron
46a58b74f4
feat(lsp): use vim.notify for some errors (#13992) 2021-02-22 23:31:12 +01:00
erw7
66b0ab0883
vim-patch:8.1.1310: named function arguments are never optional
Problem:    Named function arguments are never optional.
Solution:   Support optional function arguments with a default value. (Andy
            Massimino, closes vim/vim#3952)
42ae78cfff
2021-02-22 09:16:41 -05:00
Jan Edmund Lazo
595f6e4d64
vim-patch:8.2.2070: can't get the exit value in VimLeave(Pre) autocommands (#13981)
Problem:    Can't get the exit value in VimLeave or VimLeavePre autocommands.
Solution:   Add v:exiting like in Neovim. (Yegappan Lakshmanan, closes vim/vim#7395)
f0068c5154

Rearrange VimVarIndex enums and vimvars[] entries to sync with  Vim.

N/A patches for version.c:

vim-patch:8.2.2535: MS-Windows: cannot run all vim9 tests

Problem:    MS-Windows: cannot run all vim9 tests.
Solution:   Make test_vim9 target work.
723ef5db98
2021-02-20 23:45:14 -05:00
Mathias Fußenegger
1caf58578c
lsp: Fix text edits operating on the last line of a document (#13677)
`lines` can be empty, in which case `#lines[#lines]` failed with an
error:

    lsp/util.lua:214: attempt to get length of a nil value
2021-02-19 22:20:42 -05:00
Michael Lingelbach
b2fcfc65b7
lsp: client stop cleanups (#13877)
* lsp: client stop cleanups

* Add diagnostic clearing to client.stop() method used by nvim-lspconfig
* Clear diagnostic cache to prevent stale diagnostics on client restart

* lsp: Add test for vim.lsp.diagnostic.reset
2021-02-19 22:05:49 -05:00
Jan Edmund Lazo
b46a92f519
runtime/tar: 23515b4ef7580af8b9d3b964a558ab2007cacda5
Port tar files only in order to support '*.tar.zst' files.

Close https://github.com/neovim/neovim/pull/13337
2021-02-17 23:59:17 -05:00
Jan Edmund Lazo
d3c6f74498
runtime/tar: 8024f936368336241406137a2fa78ed5ee9000a6
Port tar runtime files only.
2021-02-17 23:54:40 -05:00
Jan Edmund Lazo
1d84277738
runtime/tar: 2963456ff2b740244b3a064785fe681b1998d75e
Port tar files for release v31 only.
2021-02-17 23:39:37 -05:00
Brian Ryall
18f90336cb
vim-patch:8.2.2523: Svelte filetype not recognized (#13961)
Problem:    Svelte filetype not recognized.
Solution:   Add a detection rule. (Brian Ryall, closes vim/vim#7858)
c0fcb6e0b1
2021-02-18 00:22:48 +01:00
Brian Ryall
64b7d7ae78
vim-patch:8.2.2522: Beancount filetype not recognized (#13960)
Problem:    Beancount filetype not recognized.
Solution:   Add a detection rule. (Brian Ryall, closes vim/vim#7859)
9bbd883b35
2021-02-18 00:20:07 +01:00
Björn Linse
d623400cad
Merge pull request #13944 from chentau/on_bytes_doc
Doc: update documentation for on_bytes
2021-02-17 13:14:18 +01:00
chentau
d966e0142d Doc: update documentation for on_bytes 2021-02-17 00:47:19 -08:00
Jakub Łuczyński
4bc74c2431
netrw: move netrw_home to XDA_DATA_HOME (#13939) 2021-02-16 21:21:43 -05:00
Yegappan Lakshmanan
03383ee27b
doc: Update vim_diff.txt (#13954)
Update vim_diff.txt to reflect the following patches:

patch 8.1.1113: making an autocommand trigger once is not so easy
patch 8.2.2128: there is no way to do something on CTRL-Z
patch 8.2.2508: cannot change the character displayed in non existing lines
patch 8.2.2518: 'listchars' should be window-local
2021-02-16 19:50:06 +01:00
Jan Edmund Lazo
44dac91501
runtime/netrw: 207f009326c8f878defde0e594d7d9ed9860106e
Port runtime/doc/pi_netrw.txt only.
2021-02-16 07:58:05 -05:00
Jan Edmund Lazo
d29553d4a9
runtime/netrw: 8024f936368336241406137a2fa78ed5ee9000a6
Port runtime/doc/pi_netrw.txt only.
2021-02-16 07:55:03 -05:00
Jan Edmund Lazo
44ba77e589
runtime/netrw: 2963456ff2b740244b3a064785fe681b1998d75e
Port netrw files for release v168 only.
2021-02-16 07:51:25 -05:00
Jan Edmund Lazo
8d2c76c80c
runtime/netrw: 469bdbde1e8ea8110705327ab193acca79296742
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:32:28 -05:00
Jan Edmund Lazo
803be53cf7
runtime/netrw: 2ed639abdc4000436115f378e28320b7bee38a6e
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:31:30 -05:00
Jan Edmund Lazo
08947d1642
runtime/netrw: 91359014b359cf816bf943fe2c7d492996263def
Port netrw files for release v167 only.
2021-02-15 21:29:20 -05:00
Jan Edmund Lazo
9b662a57db
runtime/netrw: 09c6f265b21065ffa9437837b1d0955137175e45
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:21:10 -05:00
Jan Edmund Lazo
68816c7e0a
runtime/netrw: 574ee7bc1246070dba598f9561a2776aa1a10d07
Port runtime/doc/pi_netrw.txt only.
2021-02-15 21:19:47 -05:00
Jan Edmund Lazo
e35c766518
runtime/netrw: 5ef1c6a4838a9629b793f3ae676f72a764171b00
Port netrw files only.
2021-02-15 21:16:27 -05:00
Jan Edmund Lazo
147d40f2a0
vim-patch:8.2.0925: getcompletion() does not return command line arguments
Problem:    Getcompletion() does not return command line arguments.
Solution:   Add the "cmdline" option. (Shougo, closes vim/vim#1140)
1f1fd44ef7
2021-02-14 10:00:59 -05:00
Jan Edmund Lazo
54cd7298f8
vim-patch:8.2.0054: :diffget and :diffput don't have good completion
Problem:    :diffget and :diffput don't have good completion.
Solution:   Add proper completion. (Dominique Pelle, closes vim/vim#5409)
ae7dba8969
2021-02-13 18:17:25 -05:00
最上川
8399f48ca9
man.vim: :Man should not change global value of 'tagfunc' option (#13926) 2021-02-13 11:54:03 -05:00
Sean Dewar
d9dd360d2a vim-patch:8.2.1967: the session file does not restore the alternate file
Problem:    The session file does not restore the alternate file.
Solution:   Add ":balt".  Works like ":badd" and also sets the buffer as the
            alternate file.  Use it in the session file. (closes vim/vim#7269,
            closes vim/vim#6714)
59d8e56e04

Include minimal test_buffer.vim from patch 8.2.0243 for Test_balt().
Add entry for :balt to runtime/doc/index.txt from vim/vim#7819.
2021-02-11 19:00:24 +00:00
Jan Edmund Lazo
81b4c88130
vim-patch:8.2.2490: 'wrap' option is always reset when starting diff mode
Problem:    'wrap' option is always reset when starting diff mode.
Solution:   Add the "followwrap" item in 'diffopt'. (Rick Howe, closes vim/vim#7797)
4223d43c0f
2021-02-10 18:20:02 -05:00
Björn Linse
94622ca66b buffer updates: add on_reload callback and handle it in treesitter parser 2021-02-10 18:58:46 +01:00
Björn Linse
fa5f583981 treesitter: propagate on_detach event properly 2021-02-10 18:57:49 +01:00
Matthieu Coudron
00423730b5
Merge pull request #13843 from teto/notif_provider
[RDY] Notification provider
2021-02-08 15:49:27 +01:00
Santos Gallegos
947f9a04d4 treesitter: small fixes
Mostly typos I found while reading the code.
2021-02-07 01:27:38 -05:00
James McCoy
33f92fe025
fix(pty): Always use $TERM from the job's env dict
Before #12937, the only way to specify the `$TERM` for a pty job was
through the `TERM` key in the job's opts dict.  This was shuttled to the
child process throug a special field on the PtyProcess object and
injected into the environment after forking.

Now that we have a proper way to specify the environment for a job, we
can simply ensure that the env dict has a proper `TERM` set and avoid
the extra shuttling of data around.

This deprecates the use of the `TERM` option, but will still honor it if
present, although at a lower priority than a `TERM` present in the env
dict.

This also fixes #13874 because we're no longer trying to overwrite
`TERM` in the env dict with the special pty `term_name`.  Doing so
raises an internal error because of the existing key which, under
certain circumstances, would cause the "hit enter" prompt.  However,
since the child process had already forked, there was no way for the
user to acknowledge the prompt and we would just hang there.
2021-02-06 07:12:33 -05:00
erw7
02a9663869
Merge pull request #13701 from erw7/fix-checkhealth
Fix checkhealth problems
2021-02-06 13:01:37 +09:00
erw7
787339892d
Merge pull request #12080 from erw7/feature-bracketed-paste-on-term
terminal: add bracketed pasting feature
2021-02-06 12:51:24 +09:00
runiq
94cf7bba00
lsp: Fix pumvisible() check introduced in #12900 (#13866)
`pumvisible()` returns a number, and numbers are always `true` in Lua,
so the return value needs to be checked explicitly.

Using https://github.com/neovim/neovim/pull/12900 as context, it appears
the intention was to move into the `if` branch when the completion popup
is not shown (i.e. `vim.fn.pumvisible() == 0`).
2021-02-04 12:35:17 +01:00
erw7
4dc41c0516 Change default for tpf option
Change the default of tpf to the same value as the default of xterm's
disallowedPasteControls, because it may be a security risk.
2021-02-04 15:20:05 +09:00
erw7
1e3fadb419 Add termpastefilter option
Change to specify a character to be filtered as an option when pasting on
the terminal.
2021-02-04 15:20:05 +09:00
Matthieu Coudron
3f81f5c7a4 feat: adds vim.notify
Adds function to notify the user like this:
`:lua vim.notify("hello user")`
embeds log levels vim.log.levels.

you can then reassign vim.notify to for instance
```
function notify_external(msg, log_level, opts)
	vim.fn.jobstart({"notify-send", msg })
end
```
2021-01-31 00:18:22 +01:00
Saad Parwaiz
55fed9a2b0 runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh compiler only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
bf1da7424d runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh ftplugin only.
2021-01-30 20:50:04 +00:00
Saad Parwaiz
7722eb0953 runtime/zsh: b17893aa940dc7d45421f875f5d90855880aad27
port zsh ftplugin only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
da61cca9f7 runtime/zsh: 23515b4ef7580af8b9d3b964a558ab2007cacda5
port zsh syntax file only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
d89cbb62ab runtime/zsh: b17893aa940dc7d45421f875f5d90855880aad27
port zsh syntax file only
2021-01-30 20:50:04 +00:00
Saad Parwaiz
44802202be runtime/zsh: 96f45c0b6fc9e9d404e6805593ed1e0e6795e470
Port zsh syntax file only
2021-01-30 20:50:04 +00:00
Thomas Vigouroux
8950f4e94a
Merge pull request #13784 from runiq/get_extmark_by_id-limit_break
doc: remove nvim_buf_get_extmark_by_id limit opt
2021-01-28 18:27:24 +01:00
Jan Edmund Lazo
78f0f00cd5
Merge pull request #13820 from janlazo/vim-8.2.2392
vim-patch:8.2.{2392,2399,2402}
2021-01-25 21:20:14 -05:00
Michael Lingelbach
1a6d89eb90
lsp: match textDocument/didChange eol behavior (#13792)
We should be consistent in sending the EOL character to servers(I think). Julia expects this to match on bufwrite, or it crashes when vim appends the newline during the write process.
2021-01-25 17:52:40 +01:00
Jan Edmund Lazo
687ff6566a
vim-patch:8.2.2402: some filetypes not detected
Problem:    Some filetypes not detected.
Solution:   Detect Ruby Signature and Puppet related files. (Doug Kearns)
8323cab31c
2021-01-24 21:56:54 -05:00
Jan Edmund Lazo
2ce7e4e8a7
vim-patch:8.2.2392: fennel filetype not recognized
Problem:    Fennel filetype not recognized.
Solution:   Detect with pattern and hashbang. (Chinmay Dalal, closes vim/vim#7729)
402115f1c2
2021-01-24 14:15:16 -05:00
Matthieu Coudron
69103ff0cf
Merge pull request #13807 from spywhere/min-size-auto-sign
Auto sign column with minimum size support
2021-01-23 22:46:29 +01:00
Patrice Peterson
08f2aa5917 Doc: Generate API docs for buf_set_extmark gravity
Cf. #13679
2021-01-23 19:32:18 +01:00
Michael Lingelbach
3a3e6742f9
lsp: clear diagnostics on client shutdown (#13788) 2021-01-23 17:43:06 +01:00
Jan Edmund Lazo
4bd7f1133b
vim-patch:8.2.2384: turtle filetype not recognized
Problem:    Turtle filetype not recognized.
Solution:   Add a rule to detect turtle files. (closes vim/vim#7722)
5e6a7aa2b2
2021-01-21 23:19:16 -05:00
Sirisak Lueangsaksri
fcd6eea217 opt: update docs on signnumber (#13783) 2021-01-20 23:57:21 +07:00
notomo
8e86f5e460 api: nvim_echo 2021-01-20 16:41:39 +01:00
Steven Sojka
ed558e269a fix(languagetree): use tree nodes instead of regions in contains 2021-01-20 06:52:47 -06:00
Thomas Vigouroux
d9c1586e4a
Merge pull request #13765 from jvgrootveld/ts-default-start-end-row-on-capture
treesitter: default start and end row when omitted
2021-01-20 10:32:48 +01:00
Michael Lingelbach
d6d4e3d1ae
lsp: remove duplicate settings validation (#13789) 2021-01-18 21:02:30 -05:00
Michael Lingelbach
f9b3110549
lsp: validate and document server settings (#13698)
* update lua documentation
* run docgen
2021-01-18 14:11:37 -05:00
Mathias Fußenegger
3f63100d5b
LSP: Fix nil settings handling in workspace/configuration (#13708)
The `workspace/configuration` handler could fail with the following
error if `config.settings` is nil:

    runtime/lua/vim/lsp/util.lua:1432: attempt to index local 'settings' (a nil value)"

This ensures that `config.settings` is always initialized to an empty
table.
2021-01-18 19:33:10 +01:00
Maltimore
4d1e7e5b12
Update nvim.appdata.xml to reflect version 0.4.4 (#13754)
Set release date based on commit ee77d8665f
2021-01-18 09:29:32 -05:00
Patrice Peterson
fe02c65395 doc: remove nvim_buf_get_extmark_by_id limit opt
Passing any key but `details` in the opts results in an error.
2021-01-18 13:34:08 +01:00
Chris Kipp
1a4d380b5a
LSP: Add in clientInfo to initalize_params. (#13757)
* Add in clienInfo to initalize_params.

Some servers (like Metals in my case) will actually pull this
info from the initalize_params and display it in the logs. I
know from the server perspective it helps at times to have this
available to pull from to have more details about the client and
version. You can see that this is part of the spec here:

microsoft.github.io/language-server-protocol/specification#initialize
2021-01-18 10:13:26 +01:00
Michael Lingelbach
6d659bb338
lsp: add client/registerCapability handler (#13780)
Until we support dynamicRegistration, we should handle the client/registerCapability in core. There are still some language servers that send this request despite dynamicRegistration not being registered client-side (we got an upstream fix for the node ones, but this depends on them bumping vscode-languageserver-node).
2021-01-18 10:11:19 +01:00
Michael Lingelbach
61437c20b5
api: add vim.version (#13762)
retrun a structured version dict
:lua print(vim.inspect(vim.version()))

{
  api_compatible = 0,
  api_level = 7,
  api_prerelease = true,
  major = 0,
  minor = 5,
  patch = 0
}
2021-01-18 09:37:18 +01:00
“jvgrootveld”
9bed991cfb treesitter: Fix linter warning and add helper function to remove duplicated logic
This function returns the start and stop value if set else the node's range is used
When the node's range is used, the stop is incremented by 1 to make the search inclusive
2021-01-18 08:17:12 +01:00
Jan Edmund Lazo
6a01b3fcc3
vim-patch:8.2.2366: when using ":sleep" the cursor is always displayed
Problem:    When using ":sleep" the cursor is always displayed.
Solution:   Do not display the cursor when using ":sleep!". (Jeremy Lerner,
            closes vim/vim#7688)
e2edc2ed4a

Cursor showing/hiding is moved from core to TUI.
":sleep!" behaves the same as ":sleep".
2021-01-17 12:42:28 -05:00
Jan Edmund Lazo
7befdb3419
vim-patch:8.2.2353: spartql files are not detected
Problem:    Spartql files are not detected.
Solution:   Add the sparql filetype.  (closes vim/vim#7679)
17d015b243
2021-01-17 12:42:27 -05:00
Michael Lingelbach
640febaca7 log.c: warn instead of error on failed stdpath('cache') creation 2021-01-16 18:58:11 -08:00
Michael Lingelbach
abbfaf286f
logs: make kXDGCacheHome if it doesn't exist (#13758) 2021-01-16 21:14:59 +01:00
“jvgrootveld”
a2818819bb treesitter: default start and end row when omitted
Add support for default start and end row when omitted in the
query:iter_captures and query:iter_matches functions.

When the start and end row values are omitted, the values of the given
node is used. The end row value is incremented by 1 to include the node end
row in the match.

Updated tests and docs accordingly.
2021-01-15 21:44:40 +01:00
Jan Edmund Lazo
0fad952a2b
Merge pull request #13750 from janlazo/vim-8.2.2329
vim-patch:8.2.{2329,2334}
2021-01-14 20:56:30 -05:00
Thomas Vigouroux
acf6ed5541
fix(treesitter): use source() method on attach
Fixes an issue that tree-sitter always attached to the current buffer,
instead of the provided buffer.
2021-01-14 12:01:50 +01:00
Jan Edmund Lazo
d953614e72
vim-patch:8.2.2334: Pascal-like filetypes not always detected
Problem:    Pascal-like filetypes not always detected.
Solution:   Improved Puppet, InstantFPC and Pascal detection. (Doug Kearns,
            closes vim/vim#7662)
a0122dcd1c
2021-01-13 18:25:00 -05:00
Michael Lingelbach
ea8756f85d
logging: move to XDG_CACHE_HOME (#13739)
while there is some controversy, stdpath('cache') looks like  a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
2021-01-13 23:20:21 +01:00
Michael Lingelbach
77a6049e07
lsp: fix on_attach signature documentation (#13723)
* trim trailing whitespace from docs
2021-01-12 22:47:34 +01:00
Michael Lingelbach
953a548454
lsp: remove references to LspInstall (#13738)
and adjust sumneko setup instructions
2021-01-12 22:09:41 +01:00
TJ DeVries
9f3b2a757b
lsp: Add severity_limit for other diagnostics features (#13528)
* lsp: Add severity_limit for other diagnostics

* docs and tests

* fix: lint

* Add to other types

* fix: lint
2021-01-12 12:58:50 -05:00
TJ DeVries
e0a4399adc
fix(lsp): Allow subsequent text document edits to pass (#13534)
* fix: Allow subsequent text document edits to pass

* fixup: cleaner code

* add tests
2021-01-11 11:39:11 -05:00
James McCoy
ad43f789e7
Merge pull request #13439 from shade-of-noon/man-iskeyword
[RDY] man.vim: Set iskeyword explicitly.
2021-01-11 08:07:47 -05:00
Dimitar Apostolov
b535575acd
runtime/elm: acc224064033e5cea21ef7f1eefb356ca06ff11d (#13718)
Port ftplugin, syntax and indent Elm files.

Ref: #13193
2021-01-08 19:48:56 -05:00
Matthieu Coudron
fe1ebea339
Merge pull request #13689 from janlazo/vim-8.2.0050
vim-patch:8.1.{1731,1764,2111,2126},8.2.{50,590}
2021-01-06 21:17:44 +01:00
erw7
6249059d4b checkhealth: fix terminfo problems on Windows
fixes #13415
2021-01-06 12:43:58 +09:00
erw7
b77e21b35c checkhealth: fix problem where &shada is empty
fixes #13700
2021-01-06 12:17:45 +09:00
Timmy Xiao
2bfd0ba8ae
LSP: Add diagnostic tags to client capabilities (#13578)
pyright (possibly others) does not send any hint diagnostics if we do not have tagSupport in PublishDiagnosticsClientCapabilities. This PR just adds them.
2021-01-05 21:15:08 +01:00
Jan Edmund Lazo
25cb2c722e
vim-patch:8.2.0590: no 'backspace' value allows ignoring the insertion point
Problem:    No 'backspace' value allows ignoring the insertion point.
Solution:   Add the "nostop" and 3 values. (Christian Brabandt, closes vim/vim#5940)
aa0489e12d
2021-01-05 09:47:38 -05:00
Patrik Wenger
6d5626f355 remove trailing tabs 2021-01-04 20:10:34 +01:00
Björn Linse
885c2f7281 treesitter: simplify query reading logic
Only the plugin/package manager should "manage" after/. Consumers of
nvim_get_runtime_file() should not need to special case it (if your plugin
manager is broken then fix it instead).

Don't use vim.fn.readfile(). Lua can already read files. It is even
better at it than vim script.

expose M.get_query_files(). Listing the queries is essential for user
config debug, and let plugins do fun things with it.
Abstraction-by-obscurity is not useful (plugins can just cargo cult copy
the code anyway, better with public entry points).
2021-01-04 11:06:02 +01:00
Jan Edmund Lazo
a1ed941a78
vim-patch:8.2.0861: cannot easily get all the current marks (#13676)
Problem:    Cannot easily get all the current marks.
Solution:   Add getmarklist(). (Yegappan Lakshmanan, closes #6032)
cfb4b47de0

Cherry-pick the column number fix from patch v8.2.0871
because patch v8.2.0871 cannot be fully ported
without the method patches.

Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
2021-01-03 15:33:21 -05:00
Michael Lingelbach
fff4facdc4
LSP: fix messageRequest to not return nested title (#13674)
* LSP: fix window/showMessageRequest to not return nested title

* Add window/showMessageRequest handler to docs
2021-01-03 20:31:09 +01:00
Jan Edmund Lazo
01eda00962
vim-patch:8.2.0917: quickfix entries do not suport a "note" type
Problem:    Quickfix entries do not suport a "note" type.
Solution:   Add support for "note". (partly by Yegappan Lakshmanan,
            closes vim/vim#5527, closes vim/vim#6216)
e928366de5
2021-01-02 12:20:34 -05:00
Matthieu Coudron
48caf1df85
Merge pull request #13649 from mjlbach/move_from_nvim-lspconfig
LSP: Move workspace/configuration from nvim-lspconfig to core
2021-01-01 23:52:48 +01:00
jdrouhard
4a0a6f7bff
LSP: progress callback should only update existing dict for reports (#13652)
Change the update of the client.messages.progress table to overwrite only the percentage and message properties on $report, Previously we were overwriting the table which meant client.messages.progress[token].message.title was wiped on report.
2021-01-01 23:51:47 +01:00
Jan Edmund Lazo
5eccfd2b2e
Merge pull request #13655 from janlazo/vim-8.2.2255
vim-patch:8.1.{1241,1261,1275,1281,1549,1590,1881,2079,2322,2360,2411},8.2.{113,388,934,2255,2258,2260,2269}
2021-01-01 17:40:26 -05:00
Jan Edmund Lazo
b580cf83bd
vim-patch:8.2.2258: not all OCaml related files are detected
Problem:    Not all OCaml related files are detected.
Solution:   Update OCaml file type detection.  (Markus Mottl, closes vim/vim#7590)
beef4eeda5
2021-01-01 16:56:24 -05:00
TJ DeVries
7718826edf docs: nvim_buf_set_text 2021-01-01 14:24:40 -05:00
Björn Linse
90f619f140
Merge pull request #13592 from bfredl/setmouse
ui: make 'mouse' handling in external UI more consistent
2021-01-01 20:04:09 +01:00
Björn Linse
6db86cb2d3 ui: make 'mouse' handling in external UI more consistent
before the behaviour of 'mouse' was inconsistent in external UI,
as some remapping logic would check has_mouse() and others don't
(no difference in TUI or vim classic). With this change, the behaviour
is consistently up to the UI decide (see ui.txt edit)

Behaviour of tui.c is unaffected by this change.
2021-01-01 15:47:44 +01:00
Jan Edmund Lazo
d7b577d6ab
vim-patch:8.1.1281: cannot specify a count with :chistory
Problem:    Cannot specify a count with :chistory.
Solution:   Add a count to :chistory and :lhistory. (Yegappan Lakshmanan,
            closes vim/vim#4344)
8ffc7c8b5f
2021-01-01 04:58:05 -05:00
Jan Edmund Lazo
d1608f7503
vim-patch:8.1.1275: cannot navigate to errors before/after the cursor
Problem:    Cannot navigate to errors before/after the cursor.
Solution:   Add the :cbefore and :cafter commands. (Yegappan Lakshmanan,
            closes vim/vim#4340)
cf6a55c4b0
2021-01-01 04:58:05 -05:00
erw7
35dc6d6e87
vim-patch:8.1.1261: no error for quickfix commands with negative range
Problem:    No error for quickfix commands with negative range.
Solution:   Add ADDR_UNSIGNED and use it for quickfix commands.  Make
            assert_fails() show the command if the error doesn't match.
25190db225

N/A patches for version.c:

vim-patch:8.2.0113: "make cmdidxs" fails

Problem:    "make cmdidxs" fails.
Solution:   Allow address for ":cquit".  Add --not-a-term to avoid a delay.
9b24dfcb9f
2021-01-01 04:57:50 -05:00
Michael Lingelbach
e467d29390 LSP: Move workspace/configuration handler from nvim-lspconfig to core 2021-01-01 01:40:33 -08:00
Michael Lingelbach
8742082661 LSP: Add helper function from accessing language server settings from nvim-lspconfig 2021-01-01 01:40:33 -08:00
Michael Lingelbach
fd507e2788
LSP: window/showMessageRequest (#13641)
Another 3.16 compatibility. Solves Vue crashing currently. Currently not handling the return result, but would allow opening web browser in this case.
2020-12-31 00:09:33 +01:00
Michael Lingelbach
28b7574c94
lsp: Disable capabilities not currently supported by language client handlers (#13638)
Several language servers are incorrectly invoking handlers which are not yet implemented in core.
2020-12-30 23:54:02 +01:00
Timmy Xiao
329547bf70
doc: Fix some spelling errors (#13636)
- Change 'conenvience' to 'convenient'
- Change 'lsp-handers' to 'lsp-handlers'
2020-12-30 23:39:05 +01:00
Michael Lingelbach
fb90b6ec98
LSP: implement window/workDoneProgress/create (#13640) 2020-12-30 23:17:35 +01:00
Adam P. Regasz-Rethy
93762072d1
lsp: Use correct bufnr for documentHighlight handler (#13622) 2020-12-29 00:05:30 +01:00
HARSH-SHETH
b9c48e1d75 Fixed a typo.
Changed 'reqesting' to 'requesting' in /runtime/doc/api.txt file
2020-12-27 10:19:21 +05:30
Jan Edmund Lazo
8cf4a02bf2
vim-patch:8.1.2212: cannot see the selection type in :reg output
Problem:    Cannot see the selection type in :reg output. (Ayberk Aydın)
Solution:   Add c/l/b. (Christian Brabandt, closes vim/vim#5110, closes vim/vim#4546)
3691f1ee72

Patch v8.1.0999 is not ported so ":registers" does not omit register 1.
2020-12-25 10:17:00 -05:00
Jan Edmund Lazo
c56377bac6
vim-patch:8.2.2203: Moodle gift files are not recognized
Problem:    Moodle gift files are not recognized.
Solution:   Add a filetype pattern. (Delim Temizer)
b34f337472
2020-12-24 09:23:35 -05:00
Josh French
6eecd4230d
lsp: Fire LspDiagnosticsChanged before returning (#13483)
Run hook even when transitioning from some diagnostics to no diagnostics
2020-12-23 23:29:37 +01:00
Nils
aa3b17d04a
lsp: Add <nomodeline> to doautocmd calls (#13576)
When using "au User LspDiagnosticsChanged redrawstatus!", modelines get processed again (see h: doautocmd). Fortunately this can be suppressed using the <nomodeline> flag. this replaces every doautocmd call, that issues a User command, with doautocmd <nomodeline>.
2020-12-21 20:03:50 +01:00
Matthieu Coudron
1e59134834
lsp: add $/progress report (#13294)
Heavily inspired by https://github.com/nvim-lua/lsp-status.nvim.
listen to the LspProgressUpdate event to update your statusline.
2020-12-20 21:59:25 +01:00
Jan Edmund Lazo
b1711e6f92
foldcolumn: support "auto" (#13571)
"set foldcolumn=auto" is documented but not supported.
Support it by making it behave as "auto:1", similar to "signcolumn".

Close https://github.com/neovim/neovim/pull/13561
2020-12-20 15:20:42 -05:00
Mathias Fußenegger
abcbc5a9f3
lsp: Fix text payload in didSave notification (#13363)
According to the specification[1] the payload must look like this:

    interface DidSaveTextDocumentParams {
    	/**
    	 * The document that was saved.
    	 */
    	textDocument: TextDocumentIdentifier;

    	/**
    	 * Optional the content when saved. Depends on the includeText value
    	 * when the save notification was requested.
    	 */
    	text?: string;
    }

`text` must be on the same level as `textDocument´.

Where `TextDocumentIdentifier` is:

    interface TextDocumentIdentifier {
	/**
	 * The text document's URI.
	 */
	uri: DocumentUri;
    }

[1]: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave
2020-12-20 18:12:39 +01:00
Mitchell Hanberg
fa46123998
doc: Fix vim.lsp.diagnostic.get_next (#13495) 2020-12-20 16:17:11 +01:00
Tyson Andre
a4c41ba931 runtime/php: 1c6737b20a5cf71751b180461cea22fc76d8870c
Port php syntax file only.

Ref https://github.com/neovim/neovim/issues/12844
2020-12-19 12:39:10 -05:00
Tyson Andre
cd0a4040c4 runtime/php: 47e13953ffdbb9f163b901196dec8c2100b72edd
Port php syntax file only.
2020-12-19 12:39:07 -05:00
Tyson Andre
bec4172aa9 runtime/php: 5ef1c6a4838a9629b793f3ae676f72a764171b00
Port php syntax file only.
2020-12-19 12:39:04 -05:00
Kevin Svetlitski
46afc1def8
Add <Enter> to existing vim syntax highlighting for angle-bracket notation (#13553) 2020-12-19 10:22:50 -05:00
Björn Linse
2debabb080
Merge pull request #13355 from notomo/check-textlock-in-api
api: add textlock check
2020-12-16 15:40:21 +01:00
Björn Linse
5e202f69b3
Merge pull request #13367 from nvim-treesitter/offset-lang-injection
feat(treesitter): add offset predicate for language injection
2020-12-16 13:59:36 +01:00
notomo
93ba977793 docs: add check_textlock attribute 2020-12-16 21:57:24 +09:00
Thomas Vigouroux
25e20da550
feat(buffer_updates): allow ignoring when previewing
Also adds a test that we actually subscribe to buffer events when in
CMDPREVIEW.
2020-12-15 22:29:27 +01:00
Steven Sojka
929f194145 feat(treesitter): add offset predicate for language injection
refactor(treesitter): add directives to queries
2020-12-15 07:03:47 -06:00
erw7
82100a6bdb
healthcheck: fix health check issue with shada file (#13291)
- If the shada file is set with shada option n, use it.
- If the shadafile is NONE, it does not check for file read/write access.
- If the shada file does not exist, try to create it.
2020-12-13 21:49:29 -05:00
Matthew Nibecker
e8ae3ade77
Fix lsp tests breaking from new LuaJIT version
Apparently the new version of LuaJIT changed the consistency with which it
sorted table dictionaries. IIRC lua sorts dictionary keys by memory address, so
it would appear that the reasons tests were previously passing was because of
a differentiation in the implementation of the lua runtime.

Ensure that array fields in the lsp protocol tables are consistently created,
by using ipair when generating arrays for completionItemKind and
symbolItemKind.

For CodeActionKind, the current implementation includes both the keys and the
values in the array. This is incorrect. Ensure that only the values are
included in the array and sort them for consistency.
2020-12-13 21:03:27 -05:00
Jan Edmund Lazo
d5ab4b800c
vim-patch:8.1.1089: tutor does not check $LC_MESSAGES
Problem:    Tutor does not check $LC_MESSAGES.
Solution:   Let $LC_MESSAGES overrule $LANG. (Miklos Vajna, closes vim/vim#4112)
b44b7add8a
2020-12-12 16:38:23 -05:00
Jan Edmund Lazo
4fa6aa90ad
runtime/javascript: 207f009326c8f878defde0e594d7d9ed9860106e
Port javascript and javascript react ftplugins only.
2020-12-12 11:40:25 -05:00
Jan Edmund Lazo
a8860b033f
runtime/javascript: e7b1ea0276cc83cd5c612f3189a174a60d57b5ed
Port javascript autocomplete file only.
2020-12-12 11:38:33 -05:00
Jan Edmund Lazo
a2f8a795cd
runtime/javascript: 388a5d4f20b4b64341d1604aa238cab85827b892
Port javascript syntax file only.

Ref https://github.com/neovim/neovim/issues/13185
2020-12-12 11:38:31 -05:00
Jan Edmund Lazo
552ff68349
runtime/javascript: 09c6f265b21065ffa9437837b1d0955137175e45
Port javascriptreact.vim syntax only.

Ref https://github.com/neovim/neovim/issues/13185
2020-12-12 11:38:28 -05:00
Jan Edmund Lazo
e2be382977
runtime/javascript: 5be4ceecea5520265066eac972460ebb1cdf05e7
Port javascript syntax files only.

Ref: https://github.com/neovim/neovim/issues/13185
2020-12-12 11:38:25 -05:00
Jan Edmund Lazo
062576f679
vim-patch:8.2.0047: cannot skip tests for specific MS-Windows platform (#13461)
Problem:    Cannot skip tests for specific MS-Windows platform.
Solution:   Add windowsversion().
0c1e3744ff
2020-12-11 19:45:22 -05:00
Thomas Vigouroux
99007bcc12
Merge pull request #13450 from nvim-treesitter/fix-unknown-language-parser
fix(treesitter): don't throw an error for missing injected langs
2020-12-10 11:12:39 +01:00
Edwin Pujols
de5372c8c0 man.vim: Add double click mapping. 2020-12-09 18:17:53 -04:00
Kevin Fleming
fb1c08a86f
doc: Fix incorrect LSP diagnostic-related helptags (#13388) 2020-12-09 11:21:16 +01:00
Olivier Roques
222a0452fa
doc: Add missing parameter end_pos for range_formatting (#13481) 2020-12-09 11:19:56 +01:00
TJ DeVries
08ec36efaf
feat: Allow incremental sync & lsp flags (#13371) 2020-12-08 21:09:33 -05:00
Sean Dewar
8329f624de vim-patch:8.2.2106: TOML files are not recognized
Problem:    TOML files are not recognized.
Solution:   Match *.toml. (issue vim/vim#7432)
b237ae7b83
2020-12-07 18:03:29 +00:00
Leandro Ostera
c86ba6dea4
Fix typo on treesitter.txt help page 2020-12-07 08:08:23 +01:00
Jan Edmund Lazo
a4e18e50ef
runtime/doc: strftime() is always available 2020-12-06 19:26:33 -05:00
Thomas Vigouroux
5855a3ea7b
Merge pull request #13449 from nvim-treesitter/fix-language-for-range
fix(treesitter): incorrect method name call
2020-12-06 23:27:38 +01:00
James McCoy
b940cbb858
Merge pull request #13417 from shade-of-noon/man_count.13411
runtime: Fix man.vim count handling.
2020-12-04 18:36:54 -05:00