Commit Graph

3807 Commits

Author SHA1 Message Date
Gregory Anders
d99d4af7b1
Merge pull request #16370 from gpanders/diagnostic-column-clamp 2021-11-21 12:06:44 -07:00
Dmytro Meleshko
134a6385e2
fix(lsp): send buffer contents joined on fileformat-specific linebreak (#16334) 2021-11-21 12:03:45 -05:00
Michael Lingelbach
a2749482d9
chore(lsp): clean up initialization process (#16369)
* send vim.NIL instead of not sending workspaceFolders
* read fallback rootPath and rootUri from workspaceFolders
* update documentation
2021-11-21 11:39:30 -05:00
Gregory Anders
5b0d8f85fd fix(diagnostic): clamp line numbers in setqflist and setloclist 2021-11-19 11:49:44 -07:00
Gregory Anders
34bb5fa5a9 fix(diagnostic): fix navigation with diagnostics placed past end of line 2021-11-19 11:37:45 -07:00
Gregory Anders
2abc799ffd fix(diagnostic): deepcopy diagnostics before clamping line numbers
The current 'clamp_line_numbers' implementation modifies diagnostics in
place, which can have adverse downstream side effects. Before clamping
line numbers, make a copy of the diagnostic. This commit also merges the
'clamp_line_numbers' method into a new 'get_diagnostics' local function
which also implements the more general "get" method. The public
'vim.diagnostic.get()' API now just uses this function (without
clamping). This has the added benefit that other internal API functions
that need to use get() no longer have to go through vim.validate.

Finally, reorganize the source code a bit by grouping all of the data
structures together near the top of the file.
2021-11-19 11:37:45 -07:00
zeertzjq
3d504f27a0 vim-patch:8.2.3618: getcwd() is unclear about how 'autochdir' is used
Problem:    getcwd() is unclear about how 'autochdir' is used.
Solution:   Update the help for getcwd().  Without any arguments always return
            the actual current directory. (closes vim/vim#9142)
851c7a699a
2021-11-19 20:07:04 +08:00
marvim
2d340a3746 docs: regenerate 2021-11-18 21:50:55 +00:00
Michael Lingelbach
f71be1f87b
fix(lsp): improve incremental sync robustness (#16358)
closes https://github.com/neovim/neovim/issues/16352

* improve handling of multi-byte deletions
2021-11-18 16:49:46 -05:00
Mathias Fußenegger
d249e18bbf
fix(uri): use valid EmmyLua annotations (#16359)
See:

- https://emmylua.github.io/annotations/param.html
- https://emmylua.github.io/annotations/return.html
2021-11-18 21:12:21 +01:00
Gregory Anders
5e46f649e2
fix(diagnostic): don't use nil col if missing from qflist (#16357)
If the quickfixlist item doesn't contain a column it is reported as 0.
Rather than using a nil value in such a case (which breaks diagnostics
elsewhere), just keep the 0 value.
2021-11-18 12:27:46 -07:00
Gregory Anders
8081a30ca8 docs: mark tagfunc.lua methods as private 2021-11-18 11:30:09 -07:00
Michael Lingelbach
f940e7a5b9
feat(lsp): add tagfunc (#16103) 2021-11-18 12:26:26 -05:00
zeertzjq
dba3590a0e
vim-patch:8.2.3591: no event is triggered when closing a window (#16306)
Problem:    No event is triggered when closing a window.
Solution:   Add the WinClosed event. (Naohiro Ono, closes vim/vim#9110)
23beefed73

Nvim has already implemented this feature, so this only changes tests
and docs.
2021-11-17 21:11:09 -05:00
zeertzjq
5ff972cafe
vim-patch:8.2.3522: cannot use \x and \u when setting 'listchars' (#16049)
Problem:    Cannot use \x and \u when setting 'listchars'.
Solution:   Support hex and unicode in hex form. (closes vim/vim#9006)
93ff6720fe
2021-11-17 20:55:59 -05:00
Michael Lingelbach
eb3d59126e
fix(lsp): change signature of buf_highlight_references (#16345)
the prior signature did not assume an active language client
this function can now be used directly by passing an offset encoding
defaults to utf-16 (standard for LSP)
2021-11-17 21:14:45 +01:00
Christian Clason
c0efe49e78
vim-patch:519cc559b08b (#16340)
Update runtime files
519cc559b0
2021-11-17 10:02:59 +01:00
Christian Clason
99211b008c
vim-patch:8.2.3604: not all sudoers files are recognized (#16338)
Problem:    Not all sudoers files are recognized.
Solution:   Add a file pattern. (Doug Kearns, closes vim/vim#1192)
c143fa0778
2021-11-16 18:34:39 +01:00
Christian Clason
b5eab2a98a
vim-patch:8.2.3603: fish filetype not recognized (#16337)
Problem:    Fish filetype not recognized.
Solution:   Add a file pattern and match script line. (Doug Kearns)
b1b163efd7
2021-11-16 18:26:03 +01:00
Gregory Anders
8fb09bc512
Merge pull request #16328 from gpanders/diagnostic-prefix-hi 2021-11-16 08:48:26 -07:00
Gregory Anders
98af683e0f
refactor(diagnostic): make bufnr arguments consistent (#16323)
Make the bufnr argument have similar semantics across API functions;
namely, a nil value means "all buffers" while 0 means "current buffer".
This increases the flexibility of the API by allowing functions such as
enable() and disable() to apply globally or per-namespace, rather than
only on a specific buffer.
2021-11-16 08:47:49 -07:00
Christian Clason
75959d04c4 vim-patch:8.2.3600: filetype test fails
Problem:    Filetype test fails.
Solution:   Add missint change.
314b773abb
2021-11-16 13:04:14 +01:00
Christian Clason
b20429c8a5 vim-patch:8.2.3599: not all gdbinit files are recognized
Problem:    Not all gdbinit files are recognized.
Solution:   Add "gdbinit". (Doug Kearns)
782b4bbc16
2021-11-16 12:40:50 +01:00
Christian Clason
e5ef736dfe vim-patch:8.2.3598: RouterOS filetype is not recognized
Problem:    RouterOS filetype is not recognized.
Solution:   Add file and script patterns. (closes vim/vim#9097)
0818ab82e7
2021-11-15 23:03:10 +01:00
Michael Lingelbach
87a053f126
fix(lsp): fix edge cases in incremental sync (#16308) 2021-11-15 08:51:30 -08:00
Gregory Anders
63413bd047 refactor(diagnostic)!: rename 'show_header' to 'header'
Rename the `show_header` option in `open_float` to simply `header` and
allow users to specify both the header string as well as the highlight
group.
2021-11-15 09:12:27 -07:00
Gregory Anders
cc48837622 feat(diagnostic): allow 'prefix' option to return highlight
Extend the 'prefix' option for `open_float` to also provide an optional
highlight group for the prefix string.
2021-11-15 09:05:40 -07:00
Jan Edmund Lazo
8f984dc1f2
Merge pull request #16047 from mcepl/vim-8.2.3520
vim-patch:8.2.3520: cannot define a function for thesaurus completion
2021-11-14 21:23:42 -05:00
Gregory Anders
3c74ba4acb
feat(diagnostic): add 'prefix' option to open_float (#16321)
The 'prefix' option accepts a function or a string that is used to add a
prefix string to each diagnostic displayed in the floating window.
2021-11-14 18:40:11 -07:00
Mathias Fußenegger
ee3a58d42e
fix(lsp): ensure buffers are re-attached on rename (#16266)
If a LSP server sent a workspace edit containing a rename the buffers
file name changed without the server receiving a close notification for
the old buffer and without the client properly re-attaching on the new
file.

This affected `Move` code-actions in nvim-jdtls, but also
`vim.lsp.buf.rename` on a class level.
2021-11-14 12:55:16 +01:00
Michael Lingelbach
0ecc58c277
fix(lsp): gracefully handle nil workspaceFolders (#16284)
* handle when workspaceFolder is nil in buf.list_workspace_folders and buf.add_workspace_folder
2021-11-11 01:15:59 -08:00
Michael Lingelbach
2ecf0a4c61
fix(lsp): rewrite incremental sync (#16252)
* use codeunits/points instead of byte ranges when applicable
* take into account different file formats when computing range and
  sending text (dos, unix, and mac supported)
* add tests of incremental sync
2021-11-09 14:37:48 -08:00
Gregory Anders
953ae71fd3
feat(diagnostic): do not require namespace for hide() and show() (#16261)
Also fix a few other small bugs regarding saving and restoring extmarks.
In particular, now that the virtual text and underline handlers have
their own dedicated namespaces, they should be responsible for saving
and restoring their own extmarks. Also fix the wrong argument ordering
in the call to `clear_diagnostic_cache` in the `on_detach` callback.
2021-11-09 14:33:01 -07:00
Michael Lingelbach
8f31b218f9
fix(lsp): do not index nil client in progress (#16262) 2021-11-09 22:05:41 +01:00
dundargoc
4174244d8b
docs: update description for 'list' option (#16254)
Neovim has different defaults for 'list' compared to Vim which is why
the documentation needs to be updated.
2021-11-08 08:22:53 -07:00
Christian Clason
8cbe100fcc
vim-patch:partial 113cb513f76d (#16260)
Update runtime files
113cb513f7

skip doc/eval.txt
skip doc/insert.txt
skip doc/user_06.txt (needs 8.2.3562)
partial skip doc/syntax.txt (needs 8.2.3562)
2021-11-08 00:10:44 +01:00
Sebastian Lyng Johansen
16d4af6d2f
feat(ui): add vim.ui.input and use in lsp rename (#15959)
* vim.ui.input is an overridable function that prompts for user input
* take an opts table and the `on_confirm` callback, see `:help vim.ui.input` for more details
* defaults to a wrapper around vim.fn.input(opts)
* switches the built-in client's rename handler to use vim.ui.input by default
2021-11-07 07:13:53 -08:00
elianiva
b74916cfd2
fix(lsp): convert range to byte index before highlighting (#16218)
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
2021-11-06 15:05:52 -07:00
Gregory Anders
03b805aee6
feat(lua): enable stack traces in error output (#16228) 2021-11-06 08:26:10 -06:00
Matěj Cepl
2dc0af3a4f
vim-patch:8.2.3528: 'thesaurus' and 'thesaurusfunc' do not have the same scope
Problem:    'thesaurus' and 'thesaurusfunc' do not have the same scope.
Solution:   Make 'thesaurusfunc' global-local.
f4d8b76d30
2021-11-06 14:24:46 +01:00
Gregory Anders
1fdbd29dfa
fix(diagnostic): handle an unknown or missing client (#16242)
Sometimes plugins use pseudo-client IDs (e.g. nvim-lint or null-ls) in
order to hook into the LSP infrastructure without being a bona fide LSP
client. In these cases, get_client_by_id() will return nil since the
client ID given does not correspond to a real client recognized by the
LSP subsystem. When this happens, use "unknown" for the client name.
2021-11-05 10:10:27 -06:00
Gregory Anders
fd347840ba
fix(diagnostic): fix option resolution in open_float (#16229) 2021-11-04 06:59:24 -06:00
James McCoy
2481b18a53
Merge pull request #16055 from doubleloop/config_depends 2021-11-03 08:24:39 -04:00
Michael Lingelbach
7899c4099b
docs(lsp): correct usage examples of formatexpr (#16216) 2021-11-02 17:02:04 -07:00
Christian Clason
487286b621
docs: mention replacement for deprecated vim.lsp.diagnostic.show_* (#16211) 2021-11-02 16:24:05 +01:00
Javier Lopez
961cd83b3b
refactor(api/marks)!: add opts param for feature extensibility (#16146)
In the future we might want to extend the concept of named marks and
adding opts reduces the need of changing the function signature in the
furute.
2021-11-01 07:46:26 -06:00
Nghia Le Minh
fa97d34858
fix(lsp): pass the enriched ctx to the client-side command (#16201) 2021-11-01 14:29:50 +01:00
Michael Lingelbach
519d8deb08
feat(lsp): add per-client commands (#16101) 2021-11-01 03:14:59 -07:00
Zachary Churchill
7ae86c1d4c
feat(ui): add opt.kind to vim.ui.select (#15838)
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2021-10-31 17:15:09 -07:00
Michael Lingelbach
5ad15c9fa1
fix(lsp): improve symbols_to_items performance (#16197)
* use table.insert instead of list_extend to avoid validation overhead

Co-authored-by: Gianmarco Fantinuoli <fanto-dev@hotmail.com>
2021-10-31 15:18:51 -07:00
black_desk
85a8bede45 fix(lsp): default to UTF-16 when lsp client using str_utfindex 2021-10-31 14:15:56 -07:00
black_desk
2e3a4747e2 fix(lsp): default to UTF-16 in make_position_params 2021-10-31 14:15:56 -07:00
David Hotham
98f578293b
fix(lsp): don't update active_clients on exit_timeout (#16192) 2021-10-31 12:05:57 -07:00
Michael Lingelbach
52fa1d26db
feat(lsp): add formatexpr (#16186)
Co-authored-by: Meck <yesmeck@gmail.com>
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2021-10-31 05:40:26 -07:00
Michael Lingelbach
4da0351651
fix(lsp): add placeholder cancel function (#16189)
Fixes a bug introduced by https://github.com/neovim/neovim/pull/15949

When no supported clients for a given method are available, buf_request
returns early with a nil value. If buf_request_sync is called on a
buffer with no clients that support a given method, the returned
`cancel` method (which is nil), is invoked, resulting in an error.

Solution: return an empty function handle
2021-10-31 04:44:45 -07:00
Michael Lingelbach
c9e5c778b0
feat(lsp): default to botright for setting qflist (#16177)
* Opens quickfix list spanning the entire nvim window in location
  handlers

closes https://github.com/neovim/neovim/issues/12241
2021-10-30 08:17:00 -07:00
Justin M. Keyes
a141f6e922
fix(vim.mpack): rename pack/unpack => encode/decode #16175
Problem:
1. "unpack" has an unrelated meaning in Lua:
   https://www.lua.org/manual/5.1/manual.html#pdf-unpack
2. We already have msgpackparse()/msgpackdump() and
   json_encode()/json_decode(), so introducing another name for the same
   thing is entropy.

Solution:
- Rename vim.mpack.pack/unpack => vim.mpack.encode/decode

Caveat:
This is incongruent with the `Unpacker` and `Packer` functions.
- It's probably too invasive to rename those.
- They also aren't part of our documented interface.
- This commit is "reversible" in the sense that we can always revert
  it and add `vim.mpack.encode/decode` as _aliases_ to
  `vim.mpack.pack/unpack`, at any time in the future, if we want
  stricter fidelity with upstream libmpack. Meanwhile,
  `vim.mpack.encode/decode` is currently the total _documented_
  interface of `vim.mpack`, so this change serves the purpose of
  consistent naming in the Nvim stdlib.
2021-10-30 06:59:59 -07:00
Gregory Anders
e921e98ce3
refactor(diagnostic): make display handlers generic (#16137)
Rather than treating virtual_text, signs, and underline specially,
introduce the concept of generic "handlers", of which those three are
simply the defaults bundled with Nvim. Handlers are called in
`vim.diagnostic.show()` and `vim.diagnostic.hide()` and are used to
handle how diagnostics are displayed.
2021-10-29 18:47:34 -07:00
jdrouhard
d1c470957b
feat(lsp): track pending+cancel requests on client object #15949 2021-10-29 05:45:01 -07:00
Matěj Cepl
cbec765915
vim-patch:8.2.3520: cannot define a function for thesaurus completion
Problem:    Cannot define a function for thesaurus completion.
Solution:   Add 'thesaurusfunc'. (Yegappan Lakshmanan, closes vim/vim#8987,
            closes 8950)
160e994d76
2021-10-23 22:30:50 +02:00
Christian Clason
9f392c071a
vim-patch:partial 079ba76ae7a7 (#16126)
Update runtime files
079ba76ae7

skip optwin.vim (needs 8.2.3520)
skip doc/options.txt (needs 8.2.1535)
skip doc/insert.txt (needs 8.2.3528)
2021-10-23 22:29:17 +02:00
Björn Linse
9dd371bb2e feat(lua): document support of packages with v:lua syntax
this already worked in 0.5 but was not properly documented or tested
2021-10-23 18:24:00 +02:00
Folke Lemaitre
cb15055c29
fix(lsp): cleanup progress messages for the correct client (#16110) 2021-10-21 09:36:27 -07:00
Michael Lingelbach
80456cf836
feat(lsp): add exit_timeout flag (#16070)
* This flag allows customizing the time before sending kill -15 to the
  server. If set to false, neovim exits immediately after sending
  request('shutdown'). Otherwise, polls until all servers have shutdown,
  and then kills remaining servers via kill -15 at exit_timeout
  duration. Defaults to 500 ms.
2021-10-21 09:36:01 -07:00
Michael Lingelbach
c5525f265b
fix(lsp): avoid duplicates in client attached buffers (#16099)
closes https://github.com/neovim/neovim/issues/16058

* add client.attached_buffers
* only update client.attached_buffers in on_attach
* use table instead of list for attached_buffers to avoid duplication
2021-10-20 09:33:09 -07:00
Mathias Fußenegger
dc6c9fe442
fix(lsp): adjust legacy show diagnostic functions to use correct scope (#16106)
* `where` was renamed to `scope`
2021-10-20 08:27:55 -07:00
Gregory Anders
427bac6877
fix(diagnostic): allow floats to be focusable (#16093)
Setting focus_id allows the float to be focused by calling the function
a second time (a feature of open_floating_preview).
2021-10-19 16:29:52 -06:00
Gregory Anders
a2994c82e3
fix(diagnostic): handle diagnostics placed past the end of line (#16095) 2021-10-19 16:27:49 -06:00
Björn Linse
208d259e83
Merge pull request #15767 from lewis6991/lua_var_index
feat(lua): allow passing handles to `vim.b/w/t`
2021-10-19 22:21:31 +02:00
Gregory Anders
dfef90a518
fix(gen_vimdoc.py): spacing around inline elements #16092
The spacing fix drew attention to a couple of places that were using
incorrect formatting such as the key listing for `nvim_open_win`, so
those were fixed too.
2021-10-19 12:55:22 -07:00
Lewis Russell
6c5e7bde9a feat(lua): allow passing handles to vim.b/w/t
vim.bo can target a specific buffer by indexing with a number, e.g:
`vim.bo[2].filetype` can get/set the filetype for buffer 2. This change
replicates that behaviour for the variable namespace.
2021-10-19 19:47:33 +01:00
Gregory Anders
064411ea7f
refactor(diagnostic)!: replace 'show_*' functions with 'open_float' (#16057)
'show_line_diagnostics()' and 'show_position_diagnostics()' are
almost identical; they differ only in the fact that the latter also
accepts a column to form a full position, rather than just a line. This
is not enough to justify two separate interfaces for this common
functionality.

Renaming this to simply 'show_diagnostics()' is one step forward, but
that is also not a good name as the '_diagnostics()' suffix is
redundant. However, we cannot name it simply 'show()' since that
function already exists with entirely different semantics.

Instead, combine these two into a single 'open_float()' function that
handles all of the cases of showing diagnostics in a floating window.
Also add a "float" key to 'vim.diagnostic.config()' to provide global
values of configuration options that can be overridden ephemerally.
This makes the float API consistent with the rest of the diagnostic API.

BREAKING CHANGE
2021-10-19 11:45:51 -06:00
sim
aa4f0879e3
feat(lsp): set codelens virtual text hl_mode to combine (#16048)
It looks a bit off with the extmark going over the cursorline.

(With hl_mode combine it keeps the background of the cursorline under the codelens virtualtext)
2021-10-19 18:41:57 +02:00
zeertzjq
bdd180b5d2
docs: clarify chdir/CWD behaviors #16083 2021-10-19 07:37:11 -07:00
William Chargin
9fb0f12357
feat(man.vim): convert spaces to underscores #16068
PostgreSQL ships with man pages for SQL statements like `CREATE TABLE`,
which are provided with underscores as `man 7 CREATE_TABLE`. This patch
updates `man#open_page` (as used by `:Man`) such that visually selecting
the words `CREATE TABLE` in SQL code and pressing `K` properly opens the
desired man page.

Writing `:Man CREATE TABLE` still does not work, since `CREATE` is
interpreted as a section name. (Similarly, `:Man CREATE TABLE AS` fails
because there are too many arguments to `:Man`.) But this is okay,
because if you're typing it anyway then you can just enter underscores
and also tab-completion properly suggests `:Man CREATE_TABLE(7)`.

This is a bit bespoke, but my box has over 9000 man pages (as reported
by `man -k '' | wc -l`), and not one of them has a space in the man page
name, whereas the Postgres manuals do exist and are actually useful.

Test Plan:
On a machine with Postgres manual pages, running

    nvim -u NORC +'exe "norm iCREATE TABLE foo(x int);" | norm 0veeK'

should open the appropriate man page.

wchargin-branch: man-spaces-to-underscores
2021-10-19 07:24:43 -07:00
github-actions[bot]
29b718d04c
docs: regenerate (#15986)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2021-10-19 06:03:20 -07:00
Josa Gesell
e7ea54a3df
feat(lsp): use vim.ui.select() in codelenses (#16004)
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2021-10-18 11:52:22 -07:00
hrsh7th
bd2f61c6c4
fix(lsp): fix cursor row after textEdits (#16038) 2021-10-18 11:49:33 -07:00
Gregory Anders
bcc9ba51fa
fix(lsp): persist diagnostic config for clients
Persist configuration settings set with `vim.lsp.with` and
`vim.lsp.diagnostic.on_publish_diagnostics` by setting the config for
the namespace associated with the client.
2021-10-18 10:01:41 -06:00
Jakub Łuczyński
6b0a2e6996 build(install): rescan GLOB files on rebuild 2021-10-18 11:44:15 +02:00
Jan Edmund Lazo
a1e8199fff
Merge pull request #15952 from zeertzjq/vim-8.1.1291
vim-patch:8.0.{1459,1460,1461,1463},8.1.{0602,0604,1291},8.2.{0189,0876,0909,1411}: chdir and DirChanged related patches
2021-10-17 10:26:11 -04:00
Gregory Anders
d2d30dfabd
fix(diagnostic): do not override existing config settings #16043
When using `true` as the value of a configuration option, the option is
configured to use default values. For example, if a user configures
virtual text to include the source globally (using
vim.diagnostic.config) and a specific namespace or producer configures
virtual text with `virt_text = true`, the user's global configuration is
overriden.

Instead, interpret a value of `true` to mean "use existing settings if
defined, otherwise use defaults".
2021-10-17 07:18:35 -07:00
zeertzjq
6004f9137a refactor(dirchanged): tab -> tabpage
Match Vim's behavior.
2021-10-17 22:04:53 +08:00
zeertzjq
34cfe74568 vim-patch:8.2.0876: :pwd does not give a hint about the scope of the directory
Problem:    :pwd does not give a hint about the scope of the directory
Solution:   Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes vim/vim#5469)
950587242c
2021-10-17 22:04:53 +08:00
zeertzjq
8727d38012 vim-patch:8.1.1291: not easy to change directory and restore
Problem:    Not easy to change directory and restore.
Solution:   Add the chdir() function. (Yegappan Lakshmanan, closes vim/vim#4358)
1063f3d200

Also includes some documentation changes from patch 8.1.1218.
2021-10-17 22:04:53 +08:00
zeertzjq
920473d2f2 vim-patch:8.0.1459: cannot handle change of directory
Problem:    Cannot handle change of directory.
Solution:   Add the DirChanged autocommand event. (Andy Massimino,
            closes vim/vim#888)  Avoid changing directory for 'autochdir' too often.
b7407d3fc9

Only add "auto" pattern. "window" and "global" are already implemented.
Skip `Test_dirchanged_auto` using `CheckFunction test_autochdir`.
Part of PR #15952. More information can be found there.

N/A patches for version.c:

vim-patch:8.0.1460: missing file in patch

Problem:    Missing file in patch.
Solution:   Add changes to missing file.
b5cb65ba2b

vim-patch:8.0.1461: missing another file in patch

Problem:    Missing another file in patch.
Solution:   Add changes to missing file.
15833239a4
2021-10-17 22:04:53 +08:00
dundargoc
f19dc06081
vim-patch:8.2.3519: TOML files are not recognized (#16045)
Problem:    TOML files are not recognized.
Solution:   Add filetype patterns for TOML. (Aman Verma, closes vim/vim#8984)
28b6a3bef6
2021-10-16 23:38:05 +02:00
Christian Clason
0ba77f2f31 vim-patch:2286304cdbba
Update runtime files
2286304cdb
2021-10-16 18:03:51 +02:00
dundargoc
1ced6cf08c
vim-patch:8.2.3501: tmux filetype dection is incomplete (#16021)
Problem:    tmux filetype dection is incomplete
Solution:   Also use tmux for files having text after .conf. (Eric Pruitt,
            closes vim/vim#8971)
e519eb41c1
2021-10-15 20:01:36 -04:00
Michael Lingelbach
68b2a9e569
fix: correctly capture uri scheme on windows (#16027)
closes https://github.com/neovim/neovim/issues/15261

* normalize uri path to forward slashes on windows
* use a capture group on windows that avoids mistaking drive letters as uri scheme
2021-10-15 12:03:41 -07:00
Javier Lopez
5365f24168
fix(heath/provider.vim): using list as string #16007
Fixes #15988
2021-10-12 20:06:19 -07:00
Jose Alvarez
ee342d3cef
fix(lsp): maintain client_ids table structure when filtering (#15991) 2021-10-11 08:52:11 -07:00
Michael Lingelbach
d288daac2b
fix(lsp): do not invoke handlers for unsupported methods (#15926)
Closes https://github.com/neovim/neovim/issues/15174

Instead of invoking handlers with unsupported methods, pre-compute which
clients support a given method and only notify the user if no clients
support the given method.
2021-10-10 22:32:50 -07:00
Jan Edmund Lazo
b3e0d6708e
Merge pull request #15502 from seandewar/vim-8.1.1921
Add method call support for more built-ins: vim-patch:8.1.{1336,1952,1961,1984}
2021-10-10 16:48:24 -04:00
jdrouhard
45fa70adcb
fix(lsp): add done flag to messages returned in util.get_progress_messages() (#15985) 2021-10-10 11:41:16 -07:00
zeertzjq
f4359b5dbd
vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878
Problem:    Cannot distinguish Normal and Terminal-Normal mode.
Solution:   Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856)
72406a4bd2
2021-10-09 18:15:46 -07:00
Jakub Łuczyński
a36c6e5df9
fix(checkhealth): duplicate checks if module name has "-" #15935
Problem:    Some plugins have structure `lua/nvim-someplugin/..`
            Since `-` is not allowed in vim function names, healthcheck names in
            lua and in vim can not have the same name (typically vim will use `_`
            instead of `-`).
Solution:   Normalize the names before checking for duplicates.
2021-10-08 17:36:35 -07:00
francisco souza
fcc11d5942
fix(lsp): add textDocument/prepareRename to capability map (#15961)
This is a simple fix for #15899, as it should at least stop calling
`prepareRename` on servers that don't support renaming.

I imagine a better fix would be to inspect the actual value for, but
that requires some plumbing changes on how capabilities are evaluated
before sending requests out.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2021-10-08 11:30:18 -07:00
Gregory Anders
d5dd0aa1e6
fix(diagnostic): error on invalid severity value (#15965)
Users can pass string values for severities that match with the enum
names (e.g. "Warn" or "Info") which are converted to the corresponding
numerical value in `to_severity`. Invalid strings were simply left
as-is, which caused confusing errors later on. Instead, report an
invalid severity string right up front to make the problem clear.
2021-10-08 12:28:02 -06:00
Rishikesh Vaishnav
3f09732195
fix(lsp): expose ContentModified error code to callbacks (#15262) 2021-10-08 11:19:33 -07:00