Commit Graph

3843 Commits

Author SHA1 Message Date
Sean Dewar
af6f454f5c
feat(msgpack): convert Blobs to BIN strings 2021-09-15 21:19:30 +01:00
Sean Dewar
ab82369c8e
feat(json): convert Blobs to array of byte values
Similiar to how Vim does it, but to be consistent with how Nvim encodes
lists, add a space after every comma.
2021-09-15 21:19:29 +01:00
Sean Dewar
9095101743
vim-patch:8.1.0735: cannot handle binary data
Problem:    Cannot handle binary data.
Solution:   Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638)
6e5ea8d2a9

Nvim-specific Blob conversions are implemented in future commits.

Refactor write_blob() to use a FileDescriptor, as f_writefile() was
refactored to use one (does not apply to read_blob()).

Use var_check_lock() in f_add() for Blobs from v8.1.0897.

Add a modeline to test_blob.vim and fix some doc typos.

Include if_perl.txt's VIM::Blob() documentation. Interestingly, this
function already worked before this port, as it just returns a Blob
string literal, not an actual Blob object.

N/A patches for version.c:

vim-patch:8.1.0741: viminfo with Blob is not tested

Problem:    Viminfo with Blob is not tested.
Solution:   Extend the viminfo test.  Fix reading a blob.  Fixed storing a
            special variable value.
8c8b8bb56c

vim-patch:8.1.1022: may use NULL pointer when out of memory

Problem:    May use NULL pointer when out of memory. (Coverity)
Solution:   Check for blob_alloc() returning NULL.
e142a9467a
2021-09-15 21:19:22 +01:00
Gregory Anders
a5bbb932f9 refactor: move vim.lsp.diagnostic to vim.diagnostic
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).

More discussion at [1].

[1]: https://github.com/neovim/neovim/pull/15585
2021-09-15 14:09:47 -06:00
Michael Lingelbach
685cf39813
feat(lsp): improve logging (#15636)
* Simplify rpc encode/decode messages to rpc.send/rcp.receive
* Make missing handlers message throw a warning
* Clean up formatting style in log
* Move all non-RPC loop messages to trace instead of debug
* Add format func option to log to allow newlines in per log entry
2021-09-15 11:35:04 -07:00
Justin M. Keyes
b63b4777ec
docs: third-party licenses, TEST_COLORS, system() #15665 2021-09-14 10:20:33 -07:00
hrsh7th
516775e9d8
fix(lsp): correctly parse LSP snippets #15579
Fixes #15522
2021-09-14 04:31:41 -07:00
Christian Clason
5fd21b8d3e
vim-patch:6c391a74fe90 (#15654)
Update runtime files
6c391a74fe

omit autoload/getscript.vim

skip doc/eval.txt (needs 8.2.2468)
skip doc/various.txt (needs 8.2.3400)

(typofixes courtesy of @dundargoc)
2021-09-13 16:33:41 +02:00
Christian Clason
1a9d2a4040
vim-patch:89a9c159f23f #15641
Update runtime files
89a9c159f2

Omit:
nsis/lang/turkish.nsi
pixmaps/gen-inline-pixbufs.sh
doc/popup.txt
doc/terminal.txt
tutor/tutor*
src/[g]vimtutor
CONTRIBUTING.md

Skip:
doc/eval.txt (needs 8.1.2342)
doc/testing.txt (needs 8.2.0299)
2021-09-13 06:05:27 -07:00
Christian Clason
b9d57fa107
vim-patch:8.2.3432: octave/Matlab filetype detection does not work properly (#15652)
Problem:    Octave/Matlab filetype detection does not work properly.
Solution:   Update the patterns used for matching. (Doug Kearns)
ca0627df69
2021-09-13 10:00:09 +02:00
Sean Dewar
643cb8a6ec
doc(options): remove vim9script reference (#15645)
[skip ci]
2021-09-12 13:51:00 +02:00
Christian Clason
5615ea8b6b
vim-patch:8.2.3368: not all Racket files are recognized (#15643)
Problem:    Not all Racket files are recognized.
Solution:   Also recognize .rktl and .rktd files. (Doug Kearns)
9cd91a1e88
2021-09-12 13:09:18 +02:00
Christian Clason
ae73aa8339
vim-patch:8.2.3374: Pyret files are not recognized (#15642)
Problem:    Pyret files are not recognized.
Solution:   Recognize .arr files as Pyret. (Doug Kearns)
eb05d05f8a
2021-09-12 12:55:34 +02:00
Christian Clason
229effac9f
vim-patch:partial 6aa57295cfbe (#15633)
* vim-patch:partial 6aa57295cfbe

Update runtime files
6aa57295cf

omit doc/popup.txt
omit plugin/manpager.vim

partial skip runtime/doc/eval.txt (needs 8.2.{0258,0924,1544,2324,2468,2606})

skip ftplugin/julia.vim, indent/julia.vim, syntax/julia.vim (already
        ported in
        65f32f0f19)
skip syntax/scala.vim (already ported in
        a92e83ac14)
2021-09-12 11:02:33 +02:00
Christian Clason
4a7a99ff31
Merge pull request #15550 from jasonccox/vim-8.2.3385
vim-patch:8.2.3385,8.2.3393
2021-09-12 10:55:35 +02:00
Justin M. Keyes
413e86869e
Merge #14611 from seandewar/vim-8.1.1116
vim-patch:8.1.{1116,1188,1190,1355,1722,2035,2036,2038,2043},8.2.{0886,2309}
2021-09-11 12:12:59 -07:00
Christian Clason
e31652879e
vim-patch:partial 53f7fccc9413 (#15631)
* vim-patch:partial 53f7fccc9413

Update runtime files
53f7fccc94

omit macros/hanoi/hanoi.vim
omit spell/tet/main.aap
omit tools/shtags.1
omit tools/xcmdsrv_client.c

skip doc/pattern.txt (requires 8.2.3110; 8.2.{1665,1872})
skip doc/map.txt (requires 8.2.3228)
2021-09-11 16:47:45 +02:00
Sean Dewar
90a4cf92d2
vim-patch:8.2.0886: cannot use octal numbers in scriptversion 4
Problem:    Cannot use octal numbers in scriptversion 4.
Solution:   Add the "0o" notation. (Ken Takata, closes vim/vim#5304)
c17e66c5c0

:scriptversion is N/A.

Cherry-pick latest str2nr() doc changes from v8.1.2035.
Cherry-pick various mentions of the 0o prefix from:
 - v8.2.2324
 - 2346a63784
 - 11e3c5ba82
 - 82be4849ee

Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309.

Make STR2NR_OOCT work the same as STR2NR_OCT when forcing.
In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually
force anything. Rather than abort(), make it work as STR2NR_OCT.

This means STR2NR_FORCE | STR2NR_OCT works the same as
STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
2021-09-11 15:36:03 +01:00
Sean Dewar
6617629ad6
vim-patch:8.1.2035: recognizing octal numbers is confusing
Problem:    Recognizing octal numbers is confusing.
Solution:   Introduce scriptversion 4: do not use octal and allow for single
            quote inside numbers.
60a8de28d1

:scriptversion is N/A.

Cherry-pick Test_readfile_binary() from v8.1.0742.

Note that this patch was missing vim_str2nr() changes, and so fails the
tests; this was fixed in v8.1.2036.
2021-09-11 15:33:20 +01:00
Sean Dewar
cd18fe17a8
vim-patch:8.1.1116: cannot enforce a Vim script style
Problem:    Cannot enforce a Vim script style.
Solution:   Add the :scriptversion command. (closes vim/vim#3857)
558ca4ae55

:scriptversion is N/A, but ":let ..=" is relevant.

N/A patches for version.c

vim-patch:8.1.1188: not all Vim variables require the v: prefix

Problem:    Not all Vim variables require the v: prefix.
Solution:   When scriptversion is 3 all Vim variables can only be used with
            the v: prefix.  (Ken Takata, closes vim/vim#4274)
d2e716e6df

vim-patch:8.1.1190: has('vimscript-3') does not work

Problem:    has('vimscript-3') does not work.
Solution:   Add "vimscript-3" to the list of features.
93a4879c20

vim-patch:8.1.2038: has('vimscript-4') is always 0

Problem:    has('vimscript-4') is always 0.
Solution:   Add "vimscript-4" to the feature table. (Naruhiko Nishino,
            closes vim/vim#4941)
af91438338
2021-09-11 15:33:06 +01:00
Christian Clason
521817ee76
Merge pull request #15619 from clason/vim-90df4b9d4234
vim-patch:90df4b9d4234

chore(vim-patch): add doc/vim9.txt to unwanted files
2021-09-11 12:59:30 +02:00
Justin M. Keyes
915703f2d8 docs: extmarks indexing #15311
ref #11456
2021-09-10 19:10:09 -07:00
Javier López
f8e406ed30 docs: extmarks indexing #15311
fix #11456
2021-09-10 18:31:11 -07:00
Patrice Peterson
9b553ad28d docs: extmark indexing #12742
Extmarks mostly use api-indexing, except for nvim_buf_get_extmarks(),
which uses api-indexing with inclusive ranges.

ref #11456
2021-09-10 17:59:28 -07:00
zeertzjq
9697023a0b
vim-patch:8.2.3389: cannot stop insert mode completion without side effects #15538
Problem:    Cannot stop insert mode completion without side effects.
Solution:   Add CTRL-X CTRL-Z. (closes vim/vim#8821)
dca29d9cf4
2021-09-10 17:14:32 -07:00
Justin M. Keyes
7525052270
Merge #15626 vim-patch:8.1.{2281,2283},8.2.{2903,3391,3397} 2021-09-10 08:43:45 -07:00
Sean Dewar
fd1dbb103b
vim-patch:8.1.2281: 'showbreak' cannot be set for one window
Problem:    'showbreak' cannot be set for one window.
Solution:   Make 'showbreak' global-local.
ee85702c10

Change in oneleft() is N/A as the relevant condition was removed
(has_mbyte is always true for Nvim, so the condition was always false;
see commit 73dc9e9).

Use wp over curwin for curs_columns().

Required for v8.2.2903 (otherwise test fails as it'll leave the global
option set).

N/A patches for version.c:

vim-patch:8.1.2283: missed on use of p_sbr

Problem:    Missed on use of p_sbr.
Solution:   Add missing p_sbr change.
91e22eb6e0

Already ported in commit 43a874a.
2021-09-10 15:50:43 +01:00
Sean Dewar
f46341fa43
vim-patch:8.2.3400: ":z!" is not supported
Problem:    ":z!" is not supported.
Solution:   Make ":z!" work and add tests. (Dominique Pellé, closes vim/vim#8836)
            Use display height instead of current window height.
7f2dd1e90c
2021-09-10 15:35:19 +01:00
Sean Dewar
b3a97c56b6
vim-patch:8.2.3384: cannot disable modeline for an individual file
Problem:    Cannot disable modeline for an individual file.
Solution:   Recognize "nomodeline" in a modeline. (Hu Jialun, closes vim/vim#8798)
9dcd349ca8

Cherry-pick missing modeline for test_modeline.vim (heh) from v8.2.1432.
2021-09-10 15:35:18 +01:00
Gregory Anders
c58ee4ef7f
docs: clarify :runtime START, OPT behavior #15342
By default, the :runtime command searches "pack/*/start" in 'packpath'
along with 'runtimepath'. Update the documentation to reflect this
behavior.
2021-09-10 07:11:50 -07:00
Justin M. Keyes
329047b3db
docs #15625
fix #12261
fix #15536
fix #15623
fix #15572
ref #14244
ref #15034

close #15555
close #14957
2021-09-10 06:59:17 -07:00
zeertzjq
af6948d271
docs(terminal): clarify CTRL-\ behavior #15171 2021-09-10 06:24:08 -07:00
Javier Lopez
4b452d4efb
perf(lua): optimize vim.deep_equal #15236
By remembering the keys already compared in repeating a comparison is
avoided. Thanks: https://stackoverflow.com/a/32660766
2021-09-10 06:22:40 -07:00
Christian Clason
aab3583e74
vim-patch:8.2.3399: Octave files are not recognized (#15622)
Problem:    Octave files are not recognized.
Solution:   Detect Octave files. (Doug Kearns)
deba5eb195
2021-09-10 14:01:13 +02:00
Christian Clason
be557dddf4 vim-patch:90df4b9d4234
Update runtime files
90df4b9d42

omit .github/CODEOWNERS
omit doc/vim9.txt
omit po/it.po

skip ftplugin/jsonc.vim
skip indent/jsonc.vim
skip syntax/jsonc.vim
(already ported in dce50312e1)

partial skip doc/eval.txt (needs 8.1.{2304,2321})
2021-09-10 09:14:56 +02:00
Christian Clason
8f0c843c13
vim-patch:4d8f476176ea (#15612)
* vim-patch:4d8f476176ea

Update runtime files
4d8f476176

skip nsis/README.txt
skip doc/vim9.txt
skip src/nvim/po/it.po
2021-09-10 08:48:27 +02:00
Gregory Anders
a422f2136a
docs(gen_vimdoc.py): ignore health.lua files #15614 2021-09-09 18:28:12 -07:00
Christian Clason
2fe95cb1ad
vim-patch:partial 2346a6378483 (#15599)
Update runtime files
2346a63784

omit doc/vim.man
omit doc/vim9.txt
omit doc/vimdiff.txt
omit doc/vimdiff.man

skip doc/eval.txt (missing patch 8.2.2324)
skip doc/help.txt (missing patch 8.2.2344)
2021-09-09 18:59:11 +02:00
Björn Linse
0f596665cc feat(lua): make vim.mpack support vim.NIL and vim.empty_dict() 2021-09-09 16:06:43 +02:00
Justin M. Keyes
9f3679cbfd docs: naming conventions 2021-09-09 06:28:11 -07:00
Justin M. Keyes
69fe427df4 feat(lua)!: register_keystroke_callback => on_key
Analogous to nodejs's `on('data', …)` interface, here on_key is the "add
listener" interface.

ref 3ccdbc570d #12536

BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
2021-09-09 06:09:33 -07:00
Sean Dewar
4eb1ebbcf7
fix(doc): various fixes #15604
In particular:
- jobwait: omitting {timeout} arg is the same as -1.
- sockconnect: omitting {opts} arg is the same as {}.
- jobsend: obsoleted by chansend; don't mention it in job_control.txt.
- menu_get: add to |functions| table.

[skip ci]
2021-09-09 00:37:59 -07:00
Zi How Poh
c1f573fbc9
feat(lsp): support textDocument/prepareRename (#15514) 2021-09-08 17:00:15 +02:00
Christian Clason
11289ad733
fix(termdebug): replace term_getline with getbufline #15598
Correct incomplete runtime file port in
79cbbd5179
2021-09-08 07:35:40 -07:00
Christian Clason
79cbbd5179
vim-patch:d2ea7cf10a4d #15571
Update runtime files
d2ea7cf10a

omit `runtime/doc/if_tcl.txt`
omit `runtime/doc/textprop.txt`
omit `runtime/tutor/*`
omit `runtime/syntax/vim.vim` (cherry-picked in 2dd7828511)

manual merge of `runtime/pack/dist/opt/termdebug/plugin/termdebug.vim`
2021-09-08 07:24:12 -07:00
Michael Lingelbach
384a43fe71
chore(lsp): fix formatting in vim.lsp.log (#15596) 2021-09-07 21:48:19 -07:00
Michael Lingelbach
e6777a7a04 feat(lsp): add warning message for large log size 2021-09-07 20:52:08 -07:00
Michael Lingelbach
e26802650d feat(lsp): add lsp healthcheck
Add healthcheck for language server client, currently only checks
logging status.
2021-09-07 20:51:40 -07:00
Mathias Fußenegger
687a0b3d3e
fix(lsp): adapt codelens resolve to handler signature change (#15578)
Follow up to https://github.com/neovim/neovim/pull/15504
2021-09-06 17:30:53 +02:00
Jose Alvarez
3f526feebf
fix(lsp): update workspace/applyEdit handler signature (#15573) 2021-09-05 12:48:54 -07:00
Michael Lingelbach
23fe6dba13
Merge pull request #15504 from mjlbach/feat/change-handler-signature
feat(lsp)!: change handler signature
2021-09-05 10:27:52 -07:00
Michael Lingelbach
f7dabbc115 docs: regenerate 2021-09-05 10:05:38 -07:00
Michael Lingelbach
df17d7844e feat(lsp)!: change handler signature
Previously, the handler signature was:

  function(err, method, params, client_id, bufnr, config)

In order to better support external plugins that wish to extend the
protocol, there is other information which would be advantageous to
forward to the client, such as the original params of the request that
generated the callback.

In order to do this, we would need to break symmetry of the handlers, to
add an additional "params" as the 7th argument.

Instead, this PR changes the signature of the handlers to:

  function(err, result, ctx, config)

where ctx (the context) includes params, client_id, and bufnr. This also leaves
flexibility for future use-cases.

BREAKING_CHANGE: changes the signature of the built-in client handlers, requiring
updating handler calls
2021-09-05 10:04:30 -07:00
Izhak Jakov
dce50312e1
vim-patch:90df4b9 (#15494)
Add JSONC runtime files

Co-authored-by: Izhak Jakov <izhakjakov>
2021-09-04 19:49:17 +02:00
Jason Cox
85ba41a4b3 vim-patch:8.2.3385: escaping for fish shell does not work properly
Problem:    Escaping for fish shell does not work properly.
Solution:   Insert a backslash before a backslash. (Jason Cox, closes vim/vim#8810)
6e82351130
2021-09-02 13:07:29 -06:00
Justin M. Keyes
5f8518b3f0
fix(defaults): "syntax sync maxlines=1" on CmdwinEnter #15552
I mistakenly suggested maxlines=&cmdwinheight, forgetting that it is
calculated from topline, not cursor. maxlines=1 makes the most sense in
cmdwin.

ref #15401 622a36b1f1
2021-09-02 10:29:59 -07:00
Gregory Anders
622a36b1f1
feat(defaults): limit syntax cost on CmdwinEnter #15401
Add a new default autocommand to limit syntax highlighting
synchronization in the command window. This refactors the nvim_terminal
autocommand out of main() and into a new init_default_autocmds()
function, which is now part of the startup process and can be further
extended with more default autocommands down the road.

ref #6289 #6399
2021-09-02 04:17:04 -07:00
Mathias Fußenegger
5c643dee7b
docs(lsp): remove private lsp.diagnostic functions from docs (#15541)
Both `apply_to_diagnostic_items` and `show_diagnostics` are local
functions and cannot be called by users.
2021-09-01 14:28:15 +02:00
Mathias Fußenegger
684550ff38
docs(lsp): document codelens.get bufnr parameter (#15540)
Alternative to https://github.com/neovim/neovim/pull/15224
2021-09-01 13:29:11 +02:00
Gregory Anders
3c081d0280 fix(jobwait): always drain process event queues #15402
Problem:
jobwait() returns early if the job was stopped, but the job might have
pending callbacks on its event queue which are required to complete its
teardown. State such as term->closed might not be updated yet (by the
pending callbacks), so codepaths such as :bdelete think the job is still
running.

Solution:
Always flush the job's event queue before returning from jobwait().

ref #15349
2021-08-31 06:53:06 -07:00
Oliver Marriott
c52ec8f9eb
fix(tutor): formatting, layout #15098
* fix(tutor): adjust over-80ch lines and corresponding expect file
* fix(tutor): standardise indentation and formatting, add nowrap modeline

- unifies the formatting/layout, which was a bit inconsistent,
- adds a nowrap modeline

Since the tutor uses a lot of conceals, which are included in the character
count when calculating line wrapping, lines were breaking at what looked like
odd spots, which gives a poor first impression and lowered readability.

I have adjusted some lines to be over 80ch in the source, but once they're
rendered out with conceals, they're actually under 80, so even with nowrap we
don't visually extend past 80.

fix #15088
2021-08-30 05:27:35 -07:00
Jose Alvarez
325fad8983
fix(lsp): resolve bufnr in buf_is_attached (#15523) 2021-08-30 07:46:00 -04:00
marvim
119b4daced docs: regenerate 2021-08-29 15:34:51 +00:00
Björn Linse
6896d22b63 fix(lua): preserve argument lists which are not lists 2021-08-29 16:04:50 +02:00
Jose Alvarez
04938eed3e
fix(lsp): check if buffer is valid in changetracking (#15505) 2021-08-28 11:57:06 +02:00
Gregory Anders
e5d464d8e0 docs: update 'backupdir' and 'undodir' descriptions 2021-08-27 10:45:25 -06:00
Gregory Anders
460019366e feat: defaults: auto-create backup dir
Copy the behavior of 'undodir' and create the last specified directory
in the 'backupdir' option if it doesn't exist.

Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir'
by default. Note that 'undodir' always behaves as though it has the
trailing slashes, regardless of whether or not they are present. They
are added to the default option value to minimize surprise.

The '.' value in 'backupdir' is kept because the default behavior for
backups is solely to have a backup if the save of the main file to disk
fails. As soon as that save is completed the backup file is removed, so
generally there is no need to put them in a central location.

Co-authored by: murphy66 <murphy66@gmail.com>
2021-08-27 10:34:44 -06:00
zeertzjq
32024787b6
vim-patch:8.1.2229: color number column above/below cursor #15409
Problem:    Cannot color number column above/below cursor differently.
Solution:   Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624)
efae76ab1a
2021-08-27 05:50:37 -07:00
zeertzjq
f6e662bbe9
feat(lsp): get_border_size(): support repeating border char list #15474 2021-08-27 04:19:17 -07:00
notomo
274a3504a7
fix(lua): verify buffer in highlight.on_yank (#15482)
Resolve an issue with deferred clearing of highlight failing if the 
buffer is deleted before the timeout by checking whether the
buffer is valid first.
2021-08-26 16:37:36 +02:00
zeertzjq
6ff1e3fa1f
fix(man.vim): use -addr=other instead of -range=-1 #15172
-range=-1 requires the current file to have at least <count> lines, whereas -addr=other doesn't.

-addr=other also sets <count> to -1 by default when it is not specified, though this feature seems undocumented.
2021-08-26 04:36:31 -07:00
zeertzjq
d8ddd1e425
fix(man.vim): reduce false positives for manReference #14242
Co-authored-by: Anmol Sethi <hi@nhooyr.io>
2021-08-26 04:31:37 -07:00
Justin M. Keyes
4c499899b2
Merge #15293 Vimscript "method" syntax
Port VimL's method call syntax - vim-patch:8.1.{1638,1800,1803,1807,1809,1816,1820,1821,1828,1834,1835,1861,1863,1878,1879,1888,1909,1911,1912}
2021-08-26 04:26:32 -07:00
Justin M. Keyes
2548a9e180
fix(man.vim): filetype=man is too eager #15488
Problem:
"set filetype=man" assumes the user wants :Man features, this does extra
stuff like renaming the buffer as "man://".

Solution:
- old entrypoint was ":set filetype=man", but this is too presumptuous #15487
- make the entrypoints more explicit:
  1. when the ":Man" command is run
  2. when a "man://" buffer is opened
- remove the tricky b:man_sect checks in ftplugin/man.vim and syntax/man.vim
- MANPAGER is supported via ":Man!", as documented.

fixes #15487
2021-08-26 02:19:52 -07:00
Thomas Vigouroux
a373ca1d82
Merge pull request #15466 from vigoux/ts-query-auto
feat(ts): add query module in treesitter keys
2021-08-24 17:45:54 +02:00
Michael Lingelbach
5d633546bf
fix(lsp): enable additional capabilities (#15470)
Declaration, type-definition, and implementation capabilities were
previously disabled if the client received table output from the server
capabilities. The workDoneProgress capability is sent for many servers
for all supported capabilities as part of this table. Default to setting 
capability to table instead of false.
2021-08-23 16:25:15 -04:00
Christian Clason
a92e83ac14
vim-patch:6aa5729 (#15463)
Update Scala syntax file
6aa57295cf
2021-08-23 17:58:45 +02:00
Thomas Vigouroux
8e0963d307
feat(ts): add query module in treesitter keys 2021-08-23 15:34:08 +02:00
Lewis Russell
c5d76c5b9b
fix(doc): example for vim.diff() (#15464) 2021-08-23 13:47:54 +02:00
Thomas Vigouroux
34b60ec894
Merge pull request #15434 from Dkendal/feature-lua-treesitter-sibling
feat(treesitter): add next, prev sibling method
2021-08-23 09:14:40 +02:00
Jesse Atkinson
da5d023c97
vim-patch:8.2.3358: structurizr files are not recognized (#15417)
Problem:    Structurizr files are not recognized.
Solution:   Recognize the file by contents. (Bastian Venthur, closes vim/vim#8764)
dea561111a
2021-08-22 14:40:59 -07:00
Gregory Anders
c2a211b8e3
docs: make Lua docstrings consistent #15255
The official developer documentation in in :h dev-lua-doc specifies to
use "--@" for special/magic tokens. However, this format is not
consistent with EmmyLua notation (used by some Lua language servers) nor
with the C version of the magic docstring tokens which use three comment
characters.

Further, the code base is currently split between usage of "--@",
"---@", and "--- @". In an effort to remain consistent, change all Lua
magic tokens to use "---@" and update the developer documentation
accordingly.
2021-08-22 13:55:28 -07:00
Lewis Russell
783140c670
fix(doc): move vim.diff doc (#15456)
... to prevent bots from overwriting it
2021-08-22 13:52:56 +02:00
Lewis Russell
3d3c0c669d
feat(api): add lua C bindings for xdiff (#14536)
* feat(api): add lua C bindings for xdiff

* chore: opt.hunk_lines -> opt.result_type

opt.on_hunk now takes precedence over opt.result_type

* chore: fix indents

Fix indents

* chore: change how priv is managed

Assign priv NULL and unconditionally apply XFREE_CLEAR to it when
finished.
2021-08-22 12:22:04 +02:00
Justin M. Keyes
8331cd13c4
docs #15447
- update ":help 'hidden'" #15410
- update ":help K" #15398
- try to capture some of the debug steps from #12036 (bpftrace, USDT probes)
2021-08-21 18:26:33 -07:00
Gregory Anders
50b30de200
feat(terminal): TermClose: set exit code in v:event.status #15406
Closes #4713
2021-08-20 10:45:28 -07:00
Dylan Kendal
140084180e
feat(treesitter): add next, prev sibling method
Add tsnode methods to change to the next, previous, named or unnamed
nodes.
2021-08-20 11:58:15 -04:00
github-actions[bot]
2ae9ff1285
docs: regenerate (#15431)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-08-19 20:28:18 +02:00
Björn Linse
69741107e6
Merge pull request #15429 from bfredl/hl_2
perf(treesitter): avoid string lookup of highlight name in hot loop
2021-08-19 19:15:16 +02:00
Mathias Fußenegger
ff0833cb4e
feat(lsp): allow root_dir to be nil (#15430)
According to the protocol definition `rootPath`, `rootUri` and
`workspaceFolders` are allowed to be null.

Some language servers utilize this to provide "single file" support.
If all three are null, they don't attempt to index a directory but
instead only provide capabilities for a single file.
2021-08-19 18:15:18 +02:00
Zi How Poh
ea39ff5732
feat(lsp): jump to diagnostics by position (#14795) 2021-08-19 11:36:01 -04:00
Björn Linse
2460f0a702 perf(treesitter): avoid string lookup of highlight name in hot loop
These numbers are guaranteed to be stable even if you do "highlight
clear" (all attributes disappear, but not the id to name mapping itself)
2021-08-19 16:45:04 +02:00
Björn Linse
d088066fa1
Merge pull request #15422 from bfredl/syn_name2id_go_brr
feat(highlights): some improvements and perf fixes
2021-08-19 15:48:22 +02:00
Björn Linse
fca52f5f32 feat(match): allow hl group to be defined after :match command 2021-08-19 15:08:50 +02:00
Gregory Anders
d417e67e59 feat(defaults): set nojoinspaces 2021-08-17 16:39:04 -06:00
Gregory Anders
f6c72b745c feat(defaults): set hidden 2021-08-17 16:38:39 -06:00
Gregory Anders
2cb8db34e3
feat: defaults: set undo points in <C-U> and <C-W> (#15400) 2021-08-16 18:28:52 -07:00
Gregory Anders
3954537b9e
feat(defaults): remove 'options' from viewoptions #15397
ref #6289
2021-08-16 13:05:24 -07:00
Mathias Fussenegger
c1e17866c8 docs(lsp): prevent internal comments from showing as vim.lsp.init docs 2021-08-16 20:27:51 +02:00
Gregory Anders
4ba74953b5
feat(defaults): switchbuf=uselast #15394 2021-08-16 11:20:46 -07:00
Gregory Anders
7215d35694
feat: defaults: inccommand=nosplit #15395 2021-08-16 10:39:17 -07:00
Gregory Anders
0aa8128aaa
feat(defaults): map CTRL-L to search highlights, update diffs #15385 2021-08-16 08:31:14 -07:00
Justin M. Keyes
54726e8bb9
fix(defaults): do not map Y in visual-mode #15387
Y in visual-mode is unrelated to the normal-mode behavior.

reverts part of #13268
2021-08-16 00:13:25 -07:00
Matthieu Coudron
5a111c1b02
feat(defaults): map Y to y$ #13268
rationale:
- consistent with D and Y
- long recommended by Vim's own ":help Y"

close #13268
close #416
ref #6289
2021-08-15 21:24:59 -07:00
Christian Clason
65f32f0f19 vim-patch:6aa5729
Add Julia runtime files.
6aa57295cf
2021-08-15 11:02:19 +02:00
Christian Clason
0dc4bec69e vim-patch:8.2.3283: Julia filetype is not recognized
Problem: Julia filetype is not recognized
Solution: Add filetype detection. (Christian Clason, closes #8700)

issue: vim/vim#7498
vim-patch: vim/vim@0eec851
2021-08-15 11:02:12 +02:00
Sean Dewar
b2994e35c9
feat(v:lua): support calling v:lua as a method 2021-08-13 01:11:36 +01:00
Sean Dewar
5d88349817
feat(eval): partially port v8.1.1915
Cannot be fully ported as chdir() hasn't been ported yet.
2021-08-12 22:35:25 +01:00
Sean Dewar
56b56a76e8
vim-patch:8.1.1911: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make a few more functions usable as a method.
64b4d73524

Note that the old-style version of Test_byteidx() was already translated
to a Lua test in 069_multibyte_formatting_spec.lua. Keep both versions,
using Test_byteidx() to mainly test the method call syntax for byteidx()
and byteidxcomp().
2021-08-12 22:35:24 +01:00
Sean Dewar
7925f0b633
vim-patch:8.1.1909: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make a few more functions usable as a method.
e49fbff384
2021-08-12 22:35:24 +01:00
Sean Dewar
5fbc1a49c7
vim-patch:8.1.1888: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
073e4b92e6

test_popup.vim already has the changes from this patch (they're N/A
anyway).
2021-08-12 22:35:24 +01:00
Sean Dewar
41dbd3a2e0
vim-patch:8.1.1879: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make float functions usable as a method.
93cf85f9ef

Fix atan2() doc typo (patch referred to it as atan()).
Adjust Test_fmod() method test to expect "str2float('nan')".
2021-08-12 22:35:23 +01:00
Sean Dewar
287a77ef51
vim-patch:8.1.1861: only some assert functions can be used as a method
Problem:    Only some assert functions can be used as a method.
Solution:   Allow using most assert functions as a method.
24278d2407

Port tests to assert_spec.lua.
2021-08-12 22:35:22 +01:00
Sean Dewar
f03dd22f0d
vim-patch:8.1.1835: cannot use printf() as a method
Problem:    Cannot use printf() as a method.
Solution:   Pass the base as the second argument to printf().
fd8ca21b3f
2021-08-12 22:35:22 +01:00
Sean Dewar
5811390f82
vim-patch:8.1.1834: cannot use a lambda as a method
Problem:    Cannot use a lambda as a method.
Solution:   Implement ->{lambda}(). (closes vim/vim#4768)
22a0c0c4ec

Add an additional lua_funcname argument to call_func_rettv() to maintain
support for v:lua.

A memory leak was introduced with this patch that was fixed in
v8.1.2107.
2021-08-12 22:35:22 +01:00
Sean Dewar
32589341a4
vim-patch:8.1.1828: not strict enough checking syntax of method invocation
Problem:    Not strict enough checking syntax of method invocation.
Solution:   Check there is no white space inside ->method(.
5184132ec0
2021-08-12 22:35:21 +01:00
Sean Dewar
aa2dc8b7b4
vim-patch:8.1.1809: more functions can be used as a method
Problem:    More functions can be used as a method.
Solution:   Add has_key(), split(), str2list(), etc.
a74e4946de
2021-08-12 22:35:20 +01:00
Sean Dewar
003c8acc8a
vim-patch:8.1.1807: more functions can be used as a method
Problem:    More functions can be used as a method.
Solution:   Add append(), appendbufline(), assert_equal(), etc.
            Also add the :eval command.
25e42231d3

:eval is already ported.
2021-08-12 22:35:20 +01:00
Sean Dewar
e6be6c307a
vim-patch:8.1.1803: all builtin functions are global
Problem:    All builtin functions are global.
Solution:   Add the method call operator ->.  Implemented for a limited number
            of functions.
ac92e25a33

- Note that to *exactly* port hunk @@ -7376,18 +7444,19 from
  handle_subscript(), we need the :scriptversion patches (I have an open
  PR for those, but this patch works fine without them anyway).
- Port call_internal_func() from v7.4.2058.
- Adjust some error messages in tests, as they rely on the Blob patches.
- Add a modeline to test_method.vim.

Ignore the global_functions and base_method tables and prefer the
current GPerf implementation. Instead, add an extra base_arg field to
VimLFuncDef that holds the number of the argument to use as the base
(1-indexed, so that 0 may be used to refer to functions that cannot be
used as methods).

This also means we support using any argument as a base from the get-go,
rather than just the first (Vim includes this ability in future patches,
however).

To mark a function as usable as a method, use the "base" key as
described in eval.lua.
2021-08-12 22:35:19 +01:00
Andrea Cappuccio
adebbebdd7
fix(lsp): properly handle nil lines when trimming empty lines (#15325) 2021-08-10 20:52:30 +02:00
Hans Pinckaers
1a10acb997
fix(lsp): floating popup should take offset_x into account when positioning (#15297) 2021-08-09 23:56:58 +02:00
Cezary Drożak
33b4513b89
doc: Document -complete=lua option (#15102) 2021-08-09 21:21:14 +02:00
github-actions[bot]
3cacd108d0
docs: regenerate (#15324)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-08-09 20:54:28 +02:00
Matthieu Coudron
0e9d97896a
Merge pull request #15307 from muniter/update-help.txt
docs(help.txt): Add a tag to the neovim api.
2021-08-09 19:51:47 +02:00
max397574
a3d5f391cf
docs: Add some references to LSP specification (#15321) 2021-08-09 19:45:00 +02:00
Javier Lopez
109a417e21 docs(help.txt): add treesitter to the main help file 2021-08-09 09:17:02 -05:00
Javier Lopez
4667bfb732 docs(help.txt): add a tag to the neovim api 2021-08-09 09:16:56 -05:00
Jan Edmund Lazo
43a874ab74
vim-patch:8.2.3198: cannot use 'formatlistpat' for breakindent
Problem:    Cannot use 'formatlistpat' for breakindent.
Solution:   Use a negative list indent. (Maxim Kim, closes vim/vim#8594)
f674b358fc

Port get_showbreak_value() from patch v8.1.2281
to avoid breaking changes when porting older patches.
2021-08-08 22:22:34 -04:00
Jan Edmund Lazo
f89a275e32
vim-patch:8.2.3160: 'breakindent' does not work well for bulleted lists
Problem:    'breakindent' does not work well for bulleted and numbered lists.
Solution:   Add the "list" entry to 'breakindentopt'. (Christian Brabandt,
            closes vim/vim#8564, closes vim/vim#1661)
4a0b85ad01
2021-08-08 22:22:34 -04:00
Gregory Anders
68f61b167e
vim-patch:8.2.3285: scdoc filetype is not recognized (#15294)
Problem:    Scdoc filetype is not recognized.
Solution:   Add filetype detection. (Gregory Anders, closes vim/vim#8701)
dd097bdc13
2021-08-08 18:27:34 -04:00
dundargoc
c9131ef9b5
docs: fix paragraph for BufEnter in the documentation (#15301) 2021-08-07 12:18:40 +02:00
Thomas Vigouroux
faa3007927
Merge pull request #14767 from theHamsta/no-treesitter-mapping-to-non-existent
fix(treesitter): do not map hl_group when no mapping is set
2021-08-07 11:44:41 +02:00
Folke Lemaitre
e7bde44d6d
fix(lsp): prevent duplicate lines seperated by newlines (#15284) 2021-08-06 17:15:49 -04:00
Stephan Seitz
912152d635 chore: remove reference to nvim-treesitter in comment 2021-08-06 22:08:45 +02:00
Stephan Seitz
f489d98653 fix(treesitter): do not map hl_group when no mapping is set
This changes the behavior of the hl_cache to the old one.

- when the capture exists as a hlgroup -> use it
- when hl_map contains a mapping -> use it
- else do nothing (before: map capture to non-existing capture)

Before also captures `@foo.bar` would intend to use the hlgroup `foo.bar`
which results in a confusing error since hlgroups can't contain dots.
2021-08-06 22:04:28 +02:00
Gregory Anders
2093b12b82 refactor: remove remaining references to nvim_buf_set_virtual_text 2021-08-03 11:39:46 -06:00
Jan Edmund Lazo
8baf7bce2b
Merge pull request #15226 from zeertzjq/vim-8.1.2029
vim-patch:8.1.2029,8.1.2117,8.1.2214,8.2.3204
2021-08-02 19:23:57 -04:00
zeertzjq
1666fe9dfe vim-patch:8.1.2029: cannot control 'cursorline' highlighting well
Problem:    Cannot control 'cursorline' highlighting well.
Solution:   Add "screenline". (Christian Brabandt, closes vim/vim#4933)
017ba07fa2
2021-08-02 05:41:17 +08:00
Bastian Ahrens
4c605ec78a doc(treesitter): Fix typos 2021-08-01 17:09:19 +02:00
Thomas Vigouroux
51251e1dc7
Merge pull request #15217 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-08-01 11:26:00 +02:00
Jan Edmund Lazo
a5c25e4f3e
Merge pull request #15228 from janlazo/vim-8.2.3002
vim-patch:8.2.{3002,3019,3025,3030,3032,3044,3046,3063,3101,3115,3119,3120,3131,3136,3140,3157,3163,3218,3245,3254}
2021-07-31 19:15:36 -04:00
marvim
0c93525340 docs: regenerate 2021-07-31 20:26:57 +00:00
Mathias Fußenegger
24f2b9ef1c
fix(lsp): Include client name in handler error messages (#15227)
Makes it easier to tell with language server caused an error.
2021-07-31 22:26:02 +02:00
Jan Edmund Lazo
e4fedf5156
vim-patch:8.2.3254: win_gettype() does not recognize a quickfix window
Problem:    win_gettype() does not recognize a quickfix window.
Solution:   Add "quickfix" and "loclist". (Yegappan Lakshmanan, closes vim/vim#8676)
28d8421bfb
2021-07-31 15:10:51 -04:00
Jan Edmund Lazo
59e96717d2
vim-patch:8.2.3019: location list only has the start position.
Problem:    Location list only has the start position.
Solution:   Make it possible to add an end position. (Shane-XB-Qian,
            closes vim/vim#8393)
6864efa596

N/A patches for version.c:

vim-patch:8.2.3002: Vim doesn't abort on a fatal Tcl error

Problem:    Vim doesn't abort on a fatal Tcl error.
Solution:   Change emsg() to iemsg(). (Dominique Pellé, closes vim/vim#8383)
affd0bc626

vim-patch:8.2.3030: Coverity reports a memory leak

Problem:    Coverity reports a memory leak.
Solution:   Fix the leak and a few typos. (Dominique Pellé, closes vim/vim#8418)
cb54bc6562

Patch v8.2.3022 is mostly N/A but cannot be included here
because of new feature check for "has()".

vim-patch:8.2.3032: build problems with MSVC, other crypt issues with libsodium

Problem:    Build problems with MSVC, other crypt issues with libsodium.
Solution:   Adjust MSVC makefile. Disable swap file only when 'key' is set.
            Adjust error message used when key is wrong.  Fix Coverity issues.
            (Christian Brabandt, closes vim/vim#8420, closes vim/vim#8411)
226b28b961

vim-patch:8.2.3044: Amiga MorphOS and AROS: process ID is not valid

Problem:    Amiga MorphOS and AROS: process ID is not valid.
Solution:   Use FindTask to return something which is unique to all processes.
            (Ola Söder, closes vim/vim#8444)
3a62b14077

vim-patch:8.2.3046: Amiga MorphOS: Term mode is set using DOS packets

Problem:    Amiga MorphOS: Term mode is set using DOS packets.
Solution:   Use the same way of setting term mdoe on all next gen Amiga-like
            systems.  (Ola Söder, closes vim/vim#8445)
b420ac9d20
2021-07-31 15:10:23 -04:00
zeertzjq
5f01714b25
vim-patch:8.1.2019: 'cursorline' always highlights the whole line (#15161)
Problem:    'cursorline' always highlights the whole line.
Solution:   Add 'cursorlineopt' to specify what is highlighted.
            (closes vim/vim#4693)
410e98a70b
2021-07-30 21:51:26 -04:00
Jan Edmund Lazo
3865b43205
vim-patch:8.2.2957: using getchar() in Vim9 script is problematic
Problem:    Using getchar() in Vim9 script is problematic.
Solution:   Add getcharstr(). (closes vim/vim#8343)
3a7503c34c

Cherry-pick Test_getchar() changes from patch v8.1.2304
to sync with upstream.

Port f_getcharstr() to src/nvim/eval/funcs.c, not src/nvim/getchar.c.
Patch v8.1.2042 is not ported yet.
2021-07-29 21:51:39 -04:00
Björn Linse
d628e4250f
Merge pull request #15207 from gpanders/bye-syncolor
fix(highlight): remove syncolor.vim
2021-07-29 23:31:57 +02:00
Gregory Anders
3521bf7672
feat(lsp): implement vim.lsp.diagnostic.redraw() (#15203)
Add a new function to redraw diagnostics from the current diagnostic
cache, without receiving a "publishDiagnostics" message from the server.
This is already being done in two places in the Lua stdlib, so this
function unifies that functionality in addition to providing it to third
party plugins.

An example use case for this could be a command or key-binding for
toggling diagnostics virtual text. The virtual text configuration option
can be toggled using `vim.lsp.with` followed by
`vim.lsp.diagnostic.redraw()` to immediately redraw the diagnostics
with the updated setting.
2021-07-29 09:02:17 -07:00
zeertzjq
04ba81ddba vim-patch:8.2.3236: mode() does not indicate using CTRL-O in Select mode
Problem:    mode() does not indicate using CTRL-O in Select mode.
Solution:   Use "vs" and similar. (closes vim/vim#8640)
eaf3f36168
2021-07-29 07:47:17 +08:00
Gregory Anders
d3bc61b31d fixup! fix(highlight): remove syncolor.vim 2021-07-27 14:14:42 -06:00
Gregory Anders
9afa0d25a6 fix(highlight): remove syncolor.vim
Remove syncolor.vim in favor of defining the default highlight groups
directly in `init_highlight`. This approach provides a number of
advantages:

1. The highlights are always defined, regardless of whether or not the
   syntax regex engine is enabled.
2. Redundant sourcing of syntax files is eliminated (syncolor.vim was
   often sourced multiple times based on how the user's colorscheme file
   was written).
3. The syntax highlighting regex engine and the highlight groups
   themselves are more fully decoupled.
4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy
   (they now both do the same thing).

This approach also correctly solves a number of bugs related to
highlighting (#15176, #12573, #15205).
2021-07-27 14:14:30 -06:00
marvim
86baf582b8 docs: regenerate 2021-07-26 18:48:46 +00:00
Gregory Anders
3e00d4f01c
feat(lsp): make list handlers configurable (#15199)
The handlers for textDocument/references, textDocument/documentSymbol,
and workspace/symbol open their results in the quickfix list by default
and are not configurable. They are also incompatible with `vim.lsp.with`
as they do not accept a configuration parameter.

Add a `config` parameter to the handler for these three messages which
allows them to be configured with `vim.lsp.with`. Additionally, add a
new configuration option 'loclist' that, when true, causes these
handlers to open their results in the location list rather than the
quickfix list.
2021-07-26 11:39:50 -07:00
Thomas Vigouroux
b8813bacfe
Merge pull request #15090 from kraftwerk28/master
docs: fix typo in treesitter.txt
2021-07-26 20:38:11 +02:00
Thomas Vigouroux
5c42e2a87f
docs(ts): add documentation for listing fns 2021-07-25 20:52:05 +02:00
Björn Linse
192adfe99f
Merge pull request #14311 from matveyt/nomode_ce
refactor(state): Remove EXMODE_NORMAL
2021-07-25 19:35:23 +02:00
Stephan Seitz
289c153d1f doc: group documentation of predicates and directives 2021-07-24 20:57:45 +02:00
Stephan Seitz
b2a9afef6d treesitter: add query.list_directives 2021-07-24 20:57:45 +02:00
matveyt
8ce0929418 Remove EXMODE_NORMAL 2021-07-23 18:08:40 +02:00
Stephan Seitz
5ea6cc1d75 docs(tree-sitter): document highlight priority 2021-07-22 21:38:57 +02:00
Stephan Seitz
242608e669 feat(treesitter): allow to set highlight priority for queries 2021-07-22 21:38:57 +02:00
Marc Jakobi
a8c3d50fad
lsp: add vim.lsp.diagnostic.set_qflist() function (#14831)
* Add vim.lsp.diagnostic.set_qflist() function
* replaces opts.open_loclist with unified opts.open
2021-07-22 08:48:28 -07:00
Björn Linse
ea35584bac
Merge pull request #14771 from gpanders/colorscheme
fix: source syncolors.vim before startup scripts
2021-07-22 14:10:56 +02:00
sim
710b9ed1c7
lsp(start_client): Allow passing custom workspaceFolders to the LSP (#15132)
Some language servers *cough*rust-analyzer*cough* need an empty/custom
workspaceFolders for certain usecases. For example, rust-analyzer
needs an empty workspaceFolders table for standalone file support
(See https://github.com/rust-analyzer/rust-analyzer/pull/8955).

This can also be useful for other languages that need to commonly
open a certain directory (like flutter or lua), which would help
prevent spinning up a new language server altogether.

In case no workspaceFolders are passed, we fallback to what we had
before.
2021-07-20 22:00:38 +02:00
marvim
823412eda9 docs: regenerate 2021-07-19 21:24:46 +00:00
Folke Lemaitre
9358aa04c4
docs: made can_merge private (#15138) 2021-07-19 14:23:28 -07:00
Gregory Anders
4ed2d4fd66
fix(lsp): allow diagnostic.clear to accept nil bufnr (#15137)
Passing `nil` is equivalent to passing 0, i.e. it simply uses the
current buffer number.

This fixes a bug when vim.lsp.diagnostic.disable() is called without
arguments.
2021-07-19 14:23:12 -07:00
Gregory Anders
1aeb945553
feat(lsp): allow diagnostics to be disabled for a buffer (#15134)
Add two new methods to allow diagnostics to be disabled (and re-enabled)
in the current buffer. When diagnostics are disabled they are simply not
displayed to the user, but they are still sent by the server and
processed by the client.

Disabling diagnostics can be helpful in a number of scenarios. For
example, if one is working on a buffer with an overwhelming amount of
diagnostic warnings it can be helpful to simply disable diagnostics
without disabling the LSP client entirely. This also allows users more
flexibility on when and how they may want diagnostic information to be
displayed. For example, some users may not want to display diagnostic
information until after the buffer is first written.
2021-07-19 11:49:55 -07:00
rayx
c487a73fa2
feat(lsp): allow configuring zindex for floating windows (#15086) 2021-07-19 09:03:59 -07:00
Folke Lemaitre
526fc609b8
fix(shared): do not treat empty tables as list in deep extend (#15094)
An empty table was previously always treated as a list, which means that
while merging tables, whenever an empty table was encountered it would
  always truncate any table on the left.

`vim.tbl_deep_extend("force", { b = { a = 1 } }, { b = {} })`

Before: `{ b = {} }`
After: `{ b = { a = 1 } }`
2021-07-19 08:52:44 -07:00
Folke Lemaitre
c36df20aef
feat: aggregate code actions from all clients (#15121) 2021-07-18 01:58:35 -07:00
Ido Ariel
d8f5f4d090
doc(lsp): various small fixes (#15113)
- remove incorrect usage of docstrings
- fix make_formatting_params return type documentation to 'DocumentFormattingParams'
- make progress_handler private
- fix links
2021-07-17 11:15:57 +02:00
Gregory Anders
0bcf96bf0b fix: source syncolors.vim before startup scripts
This fixes an issue (#12573) where colorscheme files are sourced twice
upon startup. This occurs when the startup script calls `:colorscheme`,
which sets the `g:colors_name` global variable. When syntax highlighting
is enabled in `syn_maybe_enable()` the `syntax.vim` script is sourced
which in turn sources `synload.vim`. This script checks to see if
`g:colors_name` is set and, if so, runs

    exe "colors " . colors_name

This is done to ensure that highlight groups are defined before enabling
the syntax highlighting engine.

Instead, source syncolors.vim before the startup scripts which sets up
default highlights and only load the full syntax engine after
the startup scripts or when the user runs `:syntax on`. Add a guard
variable `did_syncolor` to prevent syncolor.vim from being sourced
twice and remove the line mentioned above from synload.vim so that
the colorscheme file is not re-sourced when the syntax engine is loaded.
2021-07-14 20:51:36 -06:00
Michael Lingelbach
19a2e59f7e
Merge pull request #15017 from donbex/local-file-uri
fix(lsp): accept file URIs without a hostname
2021-07-14 12:20:13 -07:00
kraftwerk28
ceaef6bf3f docs: fix typo in treesitter.txt 2021-07-14 21:41:53 +03:00
Michael Lingelbach
c31bc6ea73
fix(lsp): pass bufnr for async formatting (#15084)
the `textDocument/rangeFormatting` nad `textDocument/formatting` did not
pass bufnr to apply_text_edits, meaning edits were applied to
the user's currently active buffer. This could result in text being
applied to the wrong buffer.
2021-07-14 09:15:43 -07:00
Gregory Anders
eb7f24b4ae feat(job): add parameter to close stdin
Some programs behave differently when they detect that stdin is being
piped. This can be problematic when these programs are used with the job
control API where stdin is attached, but not typically used. It is
possible to run the job using a PTY which circumvents this problem, but
that includes a lot of overhead when simply closing the stdin pipe would
suffice.

To enable this behavior, add a new parameter to the jobstart options
dict called "stdin" with two valid values: "pipe" (the default)
implements the existing behavior of opening a channel for stdin and
"null" which disconnects stdin (or, if you prefer, connects it to
/dev/null). This is extensible so that other modes can be added in the
future.
2021-07-12 15:17:10 +02:00
Michael Lingelbach
eece0735fe
fix(lsp): avoid ipairs on non-sequential tables (#15059)
ipairs terminates on the first nil index when iterating over table keys:

for i,k in ipairs( {[1] = 'test', [3] = 'test'} ) do
  print(i, k)
end

prints:
1 test

Instead, use pairs which continues iterating over the entire table:

for i,k in pairs( {[1] = 'test', [3] = 'test'} ) do
  print(i, k)
end

prints:
1 test
3 test
2021-07-11 11:34:26 -07:00
Shadman
22b5381396
fixup(clipboard): Fix error not properly handled #14984
fixes #14967
2021-07-11 06:19:54 -07:00
Mathias Fussenegger
c21a6972a0 fix(lsp): Ensure human readable errors are printed
`return err_message(tostring(err))` caused errors to be printed as
`table: 0x123456789` instead of showing the error code and error
message.

This also removes some `if err` blocks that never got called because at
the end of `handlers.lua` all the handlers are wrapped with logic that
adds generic error handling.
2021-07-11 11:22:35 +02:00
Mathias Fussenegger
256570a7a6 fix(lsp): Ensure users get feedback on references/symbols errors or empty results
Relates to https://github.com/neovim/neovim/issues/15050

Users should get some indication if there was an error or an empty
result.
2021-07-11 10:57:00 +02:00
Mathias Fußenegger
7c61d9c3bf
fix(lsp): Add separator between codelens in virttext (#15049)
Before:

  Lens1Lens2

After:

  Lens1 | Lens2

Fixes https://github.com/neovim/neovim/issues/15048
2021-07-10 21:35:38 +02:00
Oliver Marriott
0b64d5ecd1
fix(lsp): correctly check for windows in lsp logger (#14954) 2021-07-10 11:11:33 -07:00
Tom Payne
1dab9357de feat(vim.uri): Allow URI schemes other than file: without authority 2021-07-10 18:27:37 +01:00
Alessandro Pezzoni
a2c2a08652 fix(lsp): accept file URIs without a hostname
RFC 8089, which defines the file URI scheme, also allows URIs without a
hostname, i.e. of the form file:/path/to/file. These are returned by
some language servers and accepted by other LSP implementations, such as
VSCode's, so it is reasonable for us to accept them as well.
2021-07-10 18:27:37 +01:00
Mathias Fussenegger
e43dbfdd05 feat(lsp): Make line diagnostics display prettier
Adds indentation that matches the number prefix to ensure diagnostic
messages spawning multiple lines align.

Before:

    Diagnostics:
    1. • Variable not in scope: red :: t0 -> t
    • Perhaps you meant one of these:
        ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
        ‘pred’ (imported from Prelude)
    2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
    • Perhaps you meant ‘replaceDoubleColon’ (line 32)

After:

    Diagnostics:
    1. • Variable not in scope: red :: t0 -> t
       • Perhaps you meant one of these:
           ‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
           ‘pred’ (imported from Prelude)
    2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
       • Perhaps you meant ‘replaceDoubleColon’ (line 32)
2021-07-09 20:36:08 +02:00
marvim
832e1708c2 docs: regenerate 2021-07-09 10:39:24 +00:00
Folke Lemaitre
9132b76da6
fix(lsp): support duplicate params in signature help (#15032) 2021-07-09 03:38:29 -07:00
marvim
6b313d68d0 docs: regenerate 2021-07-08 15:42:31 +00:00
Folke Lemaitre
03d15d9e09
fix(lsp): restore diagnostics extmarks that were moved to the last edit line (#15023) 2021-07-08 08:40:41 -07:00
Folke Lemaitre
af263711a3
feat(lsp): highlight active parameter in signature help (#15018) 2021-07-07 23:04:35 -07:00
cbarrete
f2205b83c5
doc: "--remote" is not supported #14936
There are plans to support the --remote-xx stuff (or something like it): #1750 #8326
But we don't need this doc meanwhile.
2021-07-07 19:04:49 -07:00
cbarrete
bd7a0b46a9
doc: remove mentions of compile-time flags #14935
Nvim always compiles everything in so those are useless at best and
confusing at worst.
2021-07-07 18:51:40 -07:00
Folke Lemaitre
77b33e4b9f
fix(lsp): restore diagnostics extmarks on buffer changes (#15011) 2021-07-07 22:31:39 +02:00
Folke Lemaitre
910967e5af
fix(lsp): prevent double <text> for cached plaintext markup 2021-07-05 00:39:46 +02:00
Jan Edmund Lazo
18bfcfe77f
Merge pull request #14981 from janlazo/vim-8.2.3081
vim-patch:8.2.{3081,3082,3085,3087,3088,3093,3094,3097,3098}
2021-07-04 11:00:48 -04:00
Jan Edmund Lazo
c2a7e445ce
vim-patch:8.2.3087: Gemtext files are not recognized
Problem:    Gemtext files are not recognized.
Solution:   Recognize .gmi and .gemini files. (closes vim/vim#8427)
fcde67c99f
2021-07-04 09:22:49 -04:00
Jan Edmund Lazo
d7060183b8
vim-patch:8.2.3085: JSONC files are not recognized
Problem:    JSONC files are not recognized.
Solution:   Recognize .jsonc files. (Izhak Jakov, closes vim/vim#8500)
acbb4b5720

N/A patches for version.c:

vim-patch:8.2.3081: cannot catch errors in a channel command

Problem:    Cannot catch errors in a channel command.
Solution:   Instead of skipping the error make it silent. (closes vim/vim#8477)
11a632d60b

vim-patch:8.2.3082: a channel command "echoerr" does not show anything

Problem:    A channel command "echoerr" does not show anything.
Solution:   Do not use silent errors when using an "echoerr" command.
            (closes vim/vim#8494)
b836f631db

vim-patch:8.2.3094: Test_popup_atcursor_pos() fails without the conceal feature

Problem:    Test_popup_atcursor_pos() fails without the conceal feature.
Solution:   Add a check for the conceal feature. (Dominique Pellé,
            closes vim/vim#8505)
c60e959cba

vim-patch:8.2.3098: popup window test is flaky on MS-Windows with GUI

Problem:    Popup window test is flaky on MS-Windows with GUI.
Solution:   Skip the check in this situation.
999db2346b
2021-07-04 09:22:45 -04:00
jadedpasta
490615612e
fix(vim.opt): vimL map string values not trimmed (#14982)
Options formatted as a list of comma-separated key-value pairs may have
values that contain leading and trailing whitespace characters. For
example, the `listchars` option has a default value of
`"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table,
leading and trailing whitespace should not be trimmed.

Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu>
2021-07-04 00:14:39 -07:00
Justin M. Keyes
05330ba508
doc/startup: cleanup; assign ENN to "conflicing configs" msg (#14971) 2021-07-03 06:31:00 -07:00
Shadman
d791274a9d
fixup(clipboard): Use case matching #14962
Context: https://github.com/neovim/neovim/pull/14848#discussion_r663203173
2021-07-02 17:47:18 -07:00
Björn Linse
62d67de598 version bump 2021-07-02 18:12:11 +02:00
Dimitri Tcaciuc
8b07653902
doc(options): Fix recommended PowerShell config (#14349)
Ensure that
  * Shell uses UTF8 input/output mode
  * Stderr output is captured, in UTF8
  * Program exit codes are correctly captured

Update functional test harness and add tests
for :make command.

Closes #13713
2021-07-02 08:15:40 -04:00
Christian Clason
2dd7828511
runtime/vim: d2ea7cf10a4d026ebd402594d656af7d5c811c24 (#14950)
Port vim syntax file only.
2021-07-01 17:31:30 -04:00
shadmansaleh
21444552c0 BugFix(clipboard): Fix block paste not working properly
Block copy and paste from system-clipboard currently breaks formatting.
This fixes it.

The bug occurs because system-clipboard doesn't contain information
about what mode the copy was made.
Simple solution to this is we keep a cache of copy we last made along
with mode information. If system-clipboard returns the cache we apply
the mode information that we know about that cache.
2021-07-01 15:01:01 +06:00
TJ DeVries
19b7cef0a7 fix(vim.opt): Fix #14828 with empty values being incorrectly inserted 2021-06-29 09:18:59 -04:00
TJ DeVries
6ecec87c09 fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname style 2021-06-29 08:42:07 -04:00
TJ DeVries
9119ea1bec fix(vim.opt): Fix #14669 whichwrap now acts as expected 2021-06-29 08:42:07 -04:00
David Zhang
b02e64c4df fix(vim.opt): Add basic error handling 2021-06-29 08:42:07 -04:00
ckipp01
e6175f6389 fix(vim.opt): Get window options before setting.
This closes #14677, but I also am a little unsure if there are times
where this may not be correct. However, this just changes the behavior
that even if `was_set` was false, we still get for
`nvim_win_get_option`.
2021-06-29 08:42:07 -04:00
TJ DeVries
1d3ee1c441 fix(vim.opt): #14708 Now lets you put duplicate values in wildmode 2021-06-29 08:42:07 -04:00
Daniel Steinberg
f83c25942d
fix(doc/api): Remove 'border' as unsupported (#14916)
PR #13998 added support for floating window borders.
2021-06-28 20:40:56 -04:00
Matthieu Coudron
3552916cb9
fix(doc): remove reference to vim.lsp.callbacks (#14576)
too old now, can be confusing
2021-06-28 23:02:17 +02:00
John Gehrig
5aaa1a1c04
[RDY] Add buffer information to tabline_update (#12481)
* Add buffer information to tabline_update

Most terminal implementations of the tabline display buffer and tab
information. Many neovim-qt users disable GuiTabline because it lacks
functionality provided in the terminal implementation.

The tabline_update event should include buffer information too, so client GUIs
can display rich useful tabs.
2021-06-27 15:30:09 -04:00
jimman2003
bdf3df4027
Fixed +1 -1 in util.lua (#14913)
No point in adding and then subtracting I believe ;)
2021-06-26 13:43:18 -04:00
Jan Edmund Lazo
7a239a8a9a
vim-patch:8.2.2954: short file name extension for Scala not recognized
Problem:    Short file name extension for Scala not recognized.
Solution:   Recognize *.sc. (closes vim/vim#8337)
6db7b6375a
2021-06-26 11:43:35 -04:00
Jan Edmund Lazo
eb7e7ad882
vim-patch:8.2.3049: JSON patch file not recognized
Problem:    JSON patch file not recognized.
Solution:   Recognize json-patch as json. (Kevin Locke, closes vim/vim#8450)
6582e230a0
2021-06-26 11:37:57 -04:00
Jan Edmund Lazo
750ad18845
vim-patch:8.2.3050: cannot recognize elixir files
Problem:    Cannot recognize elixir files.
Solution:   Recognize Elixir-specific files.  Check if an .ex file is Euphoria
            or Elixir. (Austin Gatlin, closes vim/vim#8401, closes vim/vim#8446)
f3caeb63d6
2021-06-26 10:51:29 -04:00
Sean Dewar
c1120ad0e1
fix(doc/usr_41): don't mention 0o prefix for octs (#14906)
v8.2.0886 isn't ported yet.
Also remove mentions of Vim9 and legacy script for now.

[skip ci]
2021-06-25 20:10:58 -04:00
Folke Lemaitre
e680d7d6af
fix(lsp): render the last line in stylize_markdown 2021-06-25 11:45:42 -07:00
Michael Lingelbach
3b44b21894
Merge pull request #14910 from folke/lsp_fences_docs
style(lsp): make get_markdown_fences private
2021-06-25 11:04:44 -07:00
Ghjuvan Lacambre
b86b410a92
Update busy_start/busy_stop ui events documentation (#14415)
Closes #14386
2021-06-25 13:01:57 -04:00
Folke Lemaitre
28dde1038f
style(lsp): make get_markdown_fences private 2021-06-25 18:32:00 +02:00
Michael Lingelbach
5d792701cf
Merge pull request #14904 from mfussenegger/nil-message-callbacks
fix(lsp): Handle nil message_callbacks
2021-06-25 09:13:01 -07:00
Michael Lingelbach
7b5a233d64
Merge pull request #14617 from folke/fancy_markdown_fences_support
feat(lsp): use `g:markdown_fenced_languages` in `vim.lsp.util.stylized_markdown`
2021-06-25 09:02:28 -07:00
Michael Lingelbach
22c27c0fb4
Merge pull request #14903 from mfussenegger/add-workspace-folder
fix(lsp): Set `dir` completion option for add_workspace_folder
2021-06-25 08:29:57 -07:00
Folke Lemaitre
aa1e20497a
feat(lsp): use markdown_fenced_languages in stylized_markdown 2021-06-25 17:27:38 +02:00
Folke Lemaitre
08f81f0f29
fix(lsp): syntax improvements for lsp_markdown 2021-06-25 17:01:06 +02:00
Mathias Fussenegger
58473178ff fix(lsp): Handle nil message_callbacks
The `onexit` handler could set `message_callbacks` to `nil` within the
luv event loop while the mainloop runs a function that tries to access
`message_callbacks`.

This adds some checks to prevent errors in that case.

Fixes https://github.com/neovim/neovim/issues/14863
2021-06-25 14:45:17 +02:00
Mathias Fussenegger
7ea652e4bf fix(lsp): Set dir completion option for add_workspace_folder
Given that the input is pre-filled with a path, it should be possible to
use dir completion.
2021-06-25 14:28:17 +02:00
Jan Edmund Lazo
510ed996d2
Merge pull request #14886 from janlazo/vim-8.1.1437
vim-patch:8.1.{1437,2391},8.2.{1255,2185,2294,3033,3034,3037,3038,3043}
2021-06-24 19:36:21 -04:00
Akin Sowemimo
444f175335 fix(lsp): do not convert vim.NIL to nil in lists 2021-06-24 11:23:19 +01:00
Jan Edmund Lazo
4cb0bf0942
vim-patch:8.2.1255: cannot use a lambda with quickfix functions
Problem:    Cannot use a lambda with quickfix functions.
Solution:   Add support for lambda. (Yegappan Lakshmanan, closes vim/vim#6499)
d43906d2e5
2021-06-23 23:16:20 -04:00
smolck
0d7e33bc13
docs(starting): mention init.lua in paths and remove repetition (#14883) 2021-06-23 09:36:03 +02:00
Michael Lingelbach
060255253f fix(lsp): handlers should focus quickfix list 2021-06-21 20:44:37 -07:00
Jan Edmund Lazo
997a9c8792
Merge pull request #14849 from seandewar/demethod-curwin
fix(doc): various fixes
2021-06-19 20:18:30 -04:00
Michael Lingelbach
c16afaa1f8
Merge pull request #14851 from ckipp01/hlCodeLens 2021-06-19 15:44:48 -07:00
ckipp01
90bdb6e74d Add hl group docs for codelenses 2021-06-20 00:16:37 +02:00
Sean Dewar
41332f6187
fix(doc/index.txt): various ex command fixes
Add :eval and :checkhealth (:eval was also missing upstream).
Fix :perlfile typo, add abbreviations for :perl, :perlfile and :perldo.
Remove :scriptversion; it hasn't been ported yet (#14611).

[skip ci]
2021-06-19 16:58:50 +01:00
Sean Dewar
b5c0ade437
fix(doc): :sleep! does not hide cursor
:sleep is the same as :sleep! in the port of v8.2.2366
2021-06-19 16:58:50 +01:00
Sean Dewar
7d025f2e8e
fix(doc): remove :promptfind and :promptrepl
:promptfind and :promptrepl are N/A for Nvim.
2021-06-19 16:58:39 +01:00
Sean Dewar
bb35ed6aaa
fix(doc): don't use method call syntax in examples
The method call syntax patches aren't ported yet.
2021-06-19 16:37:04 +01:00
Steven Arcangeli
43835ab0da fix(lsp): fix severity_limit logic in set_loclist 2021-06-19 07:35:17 -07:00
Thomas Vigouroux
7da86f55a7
Merge pull request #14833 from vigoux/tree-sitter-docs-tidy
docs(treesitter): tidy docs and remove legacy information
2021-06-19 08:48:35 +02:00
Folke Lemaitre
39d9713c5b
chore(lsp): removed deprecated floating preview methods 2021-06-17 07:48:40 +02:00
Thomas Vigouroux
3a438bbb44
docs(treesitter): mention query help page 2021-06-16 19:10:15 +02:00
Thomas Vigouroux
1b6b32c544
docs(treesitter): tidy docs and remove legacy information 2021-06-16 19:06:29 +02:00
Lukas Reineke
f76f72a27b
fix(lsp): add bufnr to formatting requests
Add the buffer number to the `textDocument/formatting` request, so
that it is passed to the handler.
The built-in formatting handlers do not use the buffer number, but user
overrides should have access to it.
2021-06-15 23:53:43 -07:00
Shadman
3df0e475e8
docs(lsp): Clarify opts for show_line_diagnostics() 2021-06-15 23:21:04 -07:00
marvim
45a7cd2c19 docs: regenerate 2021-06-15 06:20:14 +00:00
cbarrete
8cdffd42dd
docs(lsp): annotate call_hierarchy function as private 2021-06-14 23:19:23 -07:00
Jaehwang Jerry Jung
b8dfa2f112
fix(lsp): fix on_detach in lsp.diagnostic
`lsp.diagnostic.get_all()` was returning diagnotics for `:bwipeout`-ed
buffers because the diagnostic cache is not cleared. The first argument
of on_detach callback is the string "detach", not the bufnr.
2021-06-14 23:07:52 -07:00
Folke Lemaitre
d7d1f40d2c
fix(lsp): replace --- by a line in stylize_markdown 2021-06-15 07:35:58 +02:00
Michael Lingelbach
b28d458f87
Merge pull request #14482 from elianiva/lsp/remove_hover_line
feat(lsp): hide triple - in hover window
2021-06-14 15:03:25 -07:00
Michael Lingelbach
98b597bf03
Merge pull request #14737 from rktjmp/lsp-guard-against-negative-lines
[RDY] fix(lsp): guard against negative diagnostic line numbers
2021-06-14 15:01:58 -07:00
elianiva
6488fca06b
feat(lsp): hide triple - in hover window. 2021-06-15 05:01:45 +07:00
Timothée Sterle
15039d7597
fix(lsp): allow 'rounded' and 'solid' in floats 2021-06-14 23:19:45 +02:00
Michael Lingelbach
8162792283
Merge pull request #13165 from mfussenegger/codelens
feat(lsp): Add codelens support
2021-06-14 14:15:57 -07:00
marvim
67c4ae1322 docs: regenerate 2021-06-14 20:39:02 +00:00
Mathias Fussenegger
2bdd553c9e feat(lsp): Add codelens support 2021-06-14 21:45:14 +02:00
Jan Edmund Lazo
8f4ba0a46b
vim-patch:8.2.2990: Jupyter Notebook files are not recognized
Problem:    Jupyter Notebook files are not recognized.
Solution:   Recognize *.ipynb. (closes vim/vim#8375)
2e66b0d137
2021-06-13 15:27:24 -04:00
Jan Edmund Lazo
8b81218300
vim-patch:8.2.1354: test 59 is old style
Problem:    Test 59 is old style.
Solution:   Convert into a new style test. (Yegappan Lakshmanan, closes vim/vim#6604)
aa970abd0a
2021-06-13 10:19:48 -04:00
Michael Lingelbach
141647cfbb
Merge pull request #14765 from folke/lsp_plaintext
fix(lsp): convert_input_to_markdown_lines: preserve plaintext
2021-06-12 17:48:04 -07:00
Björn Linse
9c7132cda4
Merge pull request #14788 from shadmansaleh/fix/lua_runtime1
fixup(runtime): Fix lua runtime files not listed in :scriptnames
2021-06-13 00:52:30 +02:00
Folke Lemaitre
afb0274c28
fix(lsp): convert_input_to_markdown_lines: preserve plaintext 2021-06-12 21:47:17 +02:00
shadmansaleh
1f280b582f fixup(runtime): Fix lua runtime files not listed
lua runtime files weren't listed in :scriptname & profiler.
This fixes that.

* Add tests

* Small doc tweeks
2021-06-13 00:27:52 +06:00
Oliver Marriott
ee4735881d fix(lsp): guard against negative diagnostic line numbers 2021-06-13 03:38:59 +10:00
Jan Edmund Lazo
72b512bd53
vim-patch:8.2.0945: cannot use "z=" when 'spell' is off
Problem:    Cannot use "z=" when 'spell' is off.
Solution:   Make "z=" work even when 'spell' is off. (Christian Brabandt,
            Gary Johnson, closes vim/vim#6227)
152e79e94b
2021-06-12 13:06:50 -04:00
Jan Edmund Lazo
f376e67a53
vim-patch:8.2.0038: spell suggestions insufficiently tested
Problem:    Spell suggestions insufficiently tested.
Solution:   Add spell suggestion tests. (Dominique Pelle, closes vim/vim#5398)
e9a8d1f9ad

Requires latest en.utf-8.spl from
https://ftp.nluug.nl/pub/vim/runtime/spell/.

Include the following patch because patch v8.2.0946 was merged:

vim-patch:8.2.0948: spell test fails

Problem:    Spell test fails.
Solution:   Adjust expected text of the prompt.
d281b7c227
2021-06-12 13:06:49 -04:00
Jan Edmund Lazo
e75244af63
vim-patch:8.1.1865: spellrare and spellrepall in the wrong order
Problem:    Spellrare and spellrepall in the wrong order.
Solution:   Put spellrare below spellrepall. (closes vim/vim#4820)
a3891681f7
2021-06-12 13:06:49 -04:00
Jan Edmund Lazo
61117d89a3
vim-patch:8.1.1838: there is :spellwrong and :spellgood but not :spellrare
Problem:    There is :spellwrong and :spellgood but not :spellrare.
Solution:   Add :spellrare. (Martin Tournoij, closes vim/vim#4291)
08cc374dab
2021-06-12 13:06:48 -04:00
Jan Edmund Lazo
d09b8ad715
Merge pull request #14761 from janlazo/vim-8.2.2966
vim-patch:8.2.{1702,2422,2966,2971,2974}
2021-06-11 21:07:47 -04:00
Björn Linse
81a6b70880
Merge pull request #14686 from shadmansaleh/feat/evaluate_plugin/lua
runtime: allow to use .lua files for most features defined as &rtp/{feature}/*.vim
2021-06-11 17:42:21 +02:00
Jan Edmund Lazo
8ebbeee1d0
vim-patch:8.2.2971: cannot yank a block without trailing spaces
Problem:    Cannot yank a block without trailing spaces.
Solution:   Add the "zy" command. (Christian Brabandt, closes vim/vim#8292)
544a38e44d
2021-06-10 22:58:15 -04:00
Michael Lingelbach
f9b9b82047 fix(lsp): cap diagnostic end range to buf length
Closes #14743
2021-06-10 22:16:34 -04:00
shadmansaleh
e1edc079dd refactor(source): Move lua file detection to do_source
So now :source can run lua files too :)

* feat: Add support for :[ranged]source for lua files
2021-06-11 01:01:03 +06:00
shadmansaleh
f000251e08 feat(runtime): Allow lua to be used in syntax 2021-06-11 01:01:03 +06:00
shadmansaleh
f256a18fef feat(runtime): Allow lua to be used in ftdetect 2021-06-11 01:01:02 +06:00
shadmansaleh
4dffe1ff2f feat(runtime): Allow lua to be used in indent 2021-06-11 01:01:02 +06:00
shadmansaleh
fd5e5d2715 feat(runtime): Allow lua to be used in ftplugin 2021-06-11 01:01:02 +06:00
shadmansaleh
68be8b99cf feat(runtime): Allow lua to be used in compiler 2021-06-11 01:01:02 +06:00
shadmansaleh
1e6c02510a feat(runtime): Allow lua to be used in colorschemes
* tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
2021-06-11 01:01:02 +06:00
shadmansaleh
687eb0b39f feat(startup): Source runtime/plugin/**/*.lua at startup
For opt plugins these files are sourced on `:packadd`

* `:runtime` Now can exexute lua files
2021-06-11 00:58:38 +06:00
marvim
04f9511715 docs: regenerate 2021-06-10 08:03:28 +00:00
Björn Linse
53791c0546
Merge pull request #14510 from urandom/doc_nvim_buf_set_extmark
Minor observational corrections to the nvim_buf_set_extmark documentation
2021-06-10 09:39:35 +02:00
Mathias Fussenegger
f03a4d616b feat(lsp): Split out a diagnostics_to_items function from set_loclist
Makes it easier to re-use the logic to populate the quickfix list
instead of the location list.
2021-06-07 18:24:32 +02:00
marvim
0819e1acf9 docs: regenerate 2021-06-06 10:23:07 +00:00
Michael Lingelbach
4ce61742cf
Merge pull request #14726 from folke/lsp_single_popup_per_buffer
fix(lsp): max 1 floating preview per buffer. Fixes #11508
2021-06-06 03:22:10 -07:00
Viktor Kojouharov
36d05845f7 feat(lsp): extend diagnostic.set_loclist
add option to show workspace diagnostic instead of the current buffer's
2021-06-06 09:59:46 +02:00
Michael Lingelbach
5902bed406 docs(lsp): fix locations_to_items docstring 2021-06-05 17:22:47 -07:00
Michael Lingelbach
36802b895f
Merge pull request #14730 from mjlbach/feature/open_loclist_on_win
fix(lsp): set_loclist should target current win
2021-06-05 17:12:55 -07:00
Michael Lingelbach
f214c19e2b
Merge pull request #14707 from ray-x/master
fix(lsp): floating window border size for string type
2021-06-05 15:00:07 -07:00
Michael Lingelbach
15abde1676 fix(lsp): set_loclist should target current win
Currently, for large number of diagnostics, the delay in populating
loclist may be sufficient for a user to switch to another window,
resulting in the loclist being populated on the wrong window.
2021-06-05 14:46:10 -07:00
Michael Lingelbach
d846bd7e06 feat(lsp): remove line from diagnostic quickfix
Adding the line takes up valuable horizontal screen space, and also
precludes using the quickfixtextfunc built into neovim due to the
harcoded `|`.
2021-06-05 13:39:30 -07:00
Folke Lemaitre
149efa9b2b
fix(lsp): max 1 floating preview per buffer. Fixes #11508 2021-06-05 10:13:01 +02:00
ray-x
351050a10f fix(lsp): floating window border size for string type 'none' and 'shadow' 2021-06-02 20:44:13 +10:00
marvim
2ebc28018e docs: regenerate 2021-06-02 00:43:13 +00:00
Jose Alvarez
d4caafacc1 fix(lsp): check mode in omnifunc callback 2021-06-01 22:13:21 +09:00
Michael Lingelbach
b10cda83fa
Merge pull request #14693 from shadmansaleh/enhance/lsp/make_focusable_parameter_configurable
feat(lsp): Make focusability of lsp float configurable
2021-06-01 04:32:59 -07:00
shadmansaleh
68d48e25b6 docs(lsp): Fix opts param not captured by docgen
In the documentation for `vim.lsp.util.open_floating_preview`
the opts table keys were prefixed with `--` instead of `---`,
preventing capture by docgen.
2021-06-01 17:29:06 +06:00
shadmansaleh
0bd34cb4ec feat(lsp): Make focusability of lsp float configurable
This pr allows the user to specify whether `lsp.utils.open_floating_preview`
is focusable via the `opts` parameter. Defaults to true.

It can be configured by setting the focusable key inside opts parameter:

```lua
vim.lsp.util.open_floating_preview(contents, syntax, {focusable = false})
```
2021-06-01 17:23:35 +06:00
Michael Lingelbach
64bdaef327
Merge pull request #14694 from folke/lsp_popup_border 2021-06-01 01:52:38 -07:00
Folke Lemaitre
0ece34cbb8
fix(lsp): properly handle border character list without highlight groups. Fixes #14691 2021-06-01 09:36:29 +02:00
Jan Edmund Lazo
e399731561
vim-patch:8.2.2914: cannot paste a block without adding padding
Problem:    Cannot paste a block without adding padding.
Solution:   Add "zp" and "zP" which paste without adding padding. (Christian
            Brabandt, closes vim/vim#8289)
2fa9384ca1

Cherry-pick Test_normal_z_error() from patch v8.2.0369.
2021-05-31 21:06:11 -04:00
Michael Lingelbach
638c29b7c9 fix(docs): delete duplicate tags 2021-05-31 11:51:02 -07:00
Michael Lingelbach
0866df4d6a
Merge pull request #14687 from kabouzeid/vim-docs
Updated vim docs
2021-05-31 11:27:58 -07:00
Michael Lingelbach
96dfa07642
Merge pull request #14635 from folke/lsp_get_lines
perf(lsp): get all lines from a file in one go (`locations_to_items`)
2021-05-31 11:12:23 -07:00
Karim Abou Zeid
07f81b3b05 docs: regenerate 2021-05-31 19:47:51 +02:00
Amirreza Askarpour
3cd688ff77
fix vim.opt:remove doc (#14664) 2021-05-30 00:09:30 -04:00
Michael Lingelbach
cabf8ab26b
Merge pull request #14649 from folke/lsp_float_refactor
refactor(lsp): consolidate the different floating window methods into `open_floating_preview`
2021-05-29 12:06:58 -07:00
Folke Lemaitre
64da499ac2
refactor(lsp): consolidate the different floating window methods into open_floating_preview 2021-05-29 13:42:15 +02:00
TJ DeVries
43956dea55
lua: Add vim.opt and fix scopes of vim.o (#13479)
* lua: Add vim.opt

* fixup: cleaning

* fixup: comments

* ty clason

* fixup: comments

* this is the last commit. period.
2021-05-28 17:24:48 +02:00
Pino Toscano
192ea01edd
cmake: install app icon in XDG hicolor icon theme (#14656)
Install the icon of the application in the hicolor XDG icon theme;
this way it can be properly loaded by XDG menus in the currently set
XDG icon theme, without looking in the legacy pixmaps location.
2021-05-27 22:37:24 +02:00
Mathias Fussenegger
e06a73900f lsp: Ensure floating markdown buffers are deleted on hide
After the change to use fancy_floating_markdown for the signature help I
noticed that scratch buffers start to accumulate.
2021-05-26 19:27:04 +02:00
Jan Edmund Lazo
31ea80649d
vim-patch:3ec3217f0491
Update runtime files
3ec3217f04

Omit fuzzy-match in pattern.txt.
2021-05-25 22:11:04 -04:00
Folke Lemaitre
54c441c80b
perf(lsp): get all lines from a file in one go 2021-05-25 12:23:39 +02:00
Jan Edmund Lazo
0a653f7ab9
vim-patch:8.2.2879: file extension .hsig not recognized (#14628)
Problem:    File extension .hsig not recognized.
Solution:   Use Haskell filetype for .hsig files. (Marcin Szamotulski,
            closes vim/vim#8236)
f5409dbf66
2021-05-23 17:15:38 -04:00
Mathias Fussenegger
5d4717010c lsp: Only mute RequestCancelled or ContentModified, but not other errors
handlers passed to `lsp_buf_request` weren't called if the server
responded with an error that looks like this:

     "decoded", {
      error = {
        code = -32601,
        message = "No delegateCommandHandler for foo"
      },
      id = 5,
      jsonrpc = "2.0"
    }

An example where that happens is both eclipse.jdt.ls and the
haskell-language-server when invoking a command that doesn't exist:

    :lua vim.lsp.buf_request(
      0,
      'workspace/executeCommand',
      { command = 'foo' },
      function(err, _, res)
        print(vim.inspect(err), vim.inspect(res))
      end
    )
2021-05-23 17:04:19 +02:00
Jan Edmund Lazo
59d550345d
vim-patch:8.2.2778: problem restoring 'packpath' in session
Problem:    Problem restoring 'packpath' in session.
Solution:   Let "skiprtp" also apply to 'packpath'.
d23b714d8b

Port Test_mksession_skiprtp() to lua functional test.
2021-05-22 17:32:24 -04:00
Jan Edmund Lazo
8415615b59
vim-patch:8.2.2772: problems when restoring 'runtimepath' from a session file
Problem:    Problems when restoring 'runtimepath' from a session file.
Solution:   Add the "skiprtp" item in 'sessionoptions'.
635bd60804

Allow "terminal" value for sessionoptions even if it's no-opt
because patch v8.0.1592 is not ported yet.

Omit vim9 test, Test_mksession_skiprtp().
2021-05-22 15:40:06 -04:00
Michael Lingelbach
0cbe748da3
Merge pull request #14615 from folke/faster_locations_to_items
perf(lsp): `locations_to_items`: use libuv for unloaded buffers to get line
2021-05-22 10:58:45 -07:00
Folke Lemaitre
c98e4d1a2a
perf(lsp): locations_to_items use libuv for unloaded buffers to get line 2021-05-22 18:56:48 +02:00
Michael Lingelbach
5b2be75256
Merge pull request #14269 from fdschmidt93/fix/document_symbol_range
fix(lsp): prefer selectionRange over range for document symbols in vim.lsp.util.symbols_to_items
2021-05-22 09:18:03 -07:00
Michael Lingelbach
9c7ad33006
Merge pull request #14603 from folke/format_on_save
fix(lsp): allow apply_text_edits to append text (insert at last line)
2021-05-22 09:13:06 -07:00
Thiago Mota Martins
6dd04ed5f6
doc/options: Removed vim-only text from ambiwidth. (#14602)
NeoVim always includes all features and doesn´t have termcap-options (t_u7).
2021-05-21 19:59:48 -04:00
Michael Lingelbach
efe33fc799
Merge pull request #14604 from folke/master
feat(lsp): use same formatting for `signature_help` as `hover`
2021-05-21 11:17:17 -07:00
Folke Lemaitre
bfdd750fce feat(lsp): use fancy_floating_markdown for signature_help 2021-05-21 19:55:30 +02:00
Folke Lemaitre
02390af5a6 fix(lsp): clear current_syntax before formatting fancy markdown region 2021-05-21 19:18:22 +02:00
Folke Lemaitre
262645b325 fix(lsp): preview_location options and syntax fallback 2021-05-21 19:16:50 +02:00
Folke Lemaitre
d09f53d8ec fix(lsp): allow apply_text_edits and set_lines to insert text after the last line. Fixes #14017 2021-05-21 09:06:00 +02:00
Michael Lingelbach
75992f2ad9
Merge pull request #14596 from folke/master
lsp: `lsp.util.fancy_floating_markdown` improvements
2021-05-20 23:41:34 -07:00
Thiago Mota Martins
de96626ad4
Fixed ttimeout documentation. (#14600)
ttimeout is a boolean. The correct command for this line is ":set ttimeoutlen=9999"
2021-05-20 18:39:41 -04:00
Folke Lemaitre
07f54201c7 feat(lsp): lsp.util.fancy_floating_markdown improvements
fix: fancy_floating_markdown: syn region must include keepend to make sure syntax regions are applied correctly. Fixes #14594

feat: fancy_floating_markdown: handle <pre></pre> code blocks as a markdown code block with plaintext

fix: possible nil check for markdown code blocks till end of buffer

refactor: only one check is needed to see if stripped[h.finish +1] is valid

fix(lsp): dont't set doc ownsyntax, since it breaks contained syntaxes. Set regions for the markdown blocks intsead

fix: apply markdown formatting for code blocks without a language

fix: use markdownCodeBlock when no language was set in a code block
2021-05-21 00:34:30 +02:00
kevinhwang91
d29148ffd8 Merge remote-tracking branch 'origin/master' into qftf 2021-05-20 21:15:31 +08:00
Michael Lingelbach
045e47ec55
Merge pull request #14563 from mjlbach/fix_intelephense_langserver
lsp: handle case where CompletionItem.insertTextFormat is nil
2021-05-19 12:39:44 -07:00
Marco Hinz
6deae3d14b
fix(health/python3): remove obsolete check (#14590)
Python 3.3 reached its end-of-life 2017-09-29:

  https://www.python.org/dev/peps/pep-0398

Closes https://github.com/neovim/neovim/issues/14586
2021-05-19 19:26:15 +02:00
Marco Hinz
f6a86a3d7d
Merge pull request #14589 from mhinz/revert-smarter-tagstack
Unfortunately, there are some subtle bugs in the smarter tagstack changes,
so we'll revert them for now and try to come up with a better approach.

One of the added tests, adds current position to jumplist before jumping,
is valuable though and changed to still work after reverting the other two
commits.

Closes #14571
2021-05-19 18:58:21 +02:00
Michael Lingelbach
edd48f57aa
Merge pull request #14583 from cbarrete/unsupported-call-hierarchies
lsp: handle unsupported call hierarchy call
2021-05-19 09:39:44 -07:00
kevinhwang91
19d4926f5a vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slow
Problem:    Using 'quickfixtextfunc' is a bit slow.
Solution:   Process a list of entries. (Yegappan Lakshmanan, closes vim/vim#6234)
00e260bb6c
2021-05-20 00:24:22 +08:00
kevinhwang91
00246d7be5 vim-patch:8.2.0933: 'quickfixtextfunc' does not get window ID of location list
Problem:    'quickfixtextfunc' does not get window ID of location list.
Solution:   Add "winid" to the dict argument. (Yegappan Lakshmanan,
            closes vim/vim#6222)
7ba5a7eff3
2021-05-20 00:19:25 +08:00
kevinhwang91
ebe1a08366 vim-patch:8.2.0869: it is not possible to customize the quickfix window contents
Problem:    It is not possible to customize the quickfix window contents.
Solution:   Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closes vim/vim#5465)
858ba06d5f
2021-05-20 00:16:07 +08:00
Cédric Barreteau
ca336c681d lsp: handle unsupported call hierarchy call 2021-05-19 11:55:03 -04:00
Marco Hinz
34922fba6b
Revert "lsp: make tagstack smarter motion-wise (#12262)"
This reverts commit 8885ea7f24.
2021-05-19 15:33:32 +02:00
Marco Hinz
3e5c484ec5
Revert "lsp: fix regression in jump_to_location() (#14446)"
This reverts commit 993ca90c9b.
2021-05-19 15:31:41 +02:00
Björn Linse
ef9d3e6791 docs: fix some remanining cases of gender pronoun for "the user"
Adapted from original PR by:
Co-Author: Mathias Jean Johansen <mathias@mjj.io>
2021-05-18 22:47:17 +02:00
Michael Lingelbach
63df353545 lsp: handle case where CompletionItem.insertTextFormat is nil
* Update tests to use explicit insertTextFormat for snippets
2021-05-16 15:25:34 -07:00
Yegappan Lakshmanan
e0a01bdf7f
Update vim diff and credits (#14566)
Patch 8.2.2524 added the support for the fields 'foldopen', 'foldclose'
and 'foldsep' to the 'fillchars' option in Vim:

http://ftp.vim.org/pub/vim/patches/8.2/8.2.2524

Update the credits in intro.txt based on Vim credits.
2021-05-16 13:55:53 -04:00
Jan Edmund Lazo
dab6b08a1e
Merge pull request #14406 from shadmansaleh/vim-8.2.0877
vim-patch:8.2.{0877, 0880, 0884, 0887, 0896} - port searchcount()
2021-05-15 20:57:50 -04:00
Shadman
d67dcaba02
vim-patch:8.2.2854: custom statusline cannot contain % items (#14558)
Problem:    Custom statusline cannot contain % items.
Solution:   Add "%{% expr %}". (closes vim/vim#8190)
30e3de21fc
2021-05-15 13:10:41 -04:00