Commit Graph

3010 Commits

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

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

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

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

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

* docs and tests

* fix: lint

* Add to other types

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

* fixup: cleaner code

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

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

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

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

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

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

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

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

N/A patches for version.c:

vim-patch:8.2.0113: "make cmdidxs" fails

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

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

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

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

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

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

Where `TextDocumentIdentifier` is:

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

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

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

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

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

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

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

Ref: https://github.com/neovim/neovim/issues/13185
2020-12-12 11:38:25 -05:00
Jan Edmund Lazo
062576f679
vim-patch:8.2.0047: cannot skip tests for specific MS-Windows platform (#13461)
Problem:    Cannot skip tests for specific MS-Windows platform.
Solution:   Add windowsversion().
0c1e3744ff
2020-12-11 19:45:22 -05:00
Thomas Vigouroux
99007bcc12
Merge pull request #13450 from nvim-treesitter/fix-unknown-language-parser
fix(treesitter): don't throw an error for missing injected langs
2020-12-10 11:12:39 +01:00
Edwin Pujols
de5372c8c0 man.vim: Add double click mapping. 2020-12-09 18:17:53 -04:00
Kevin Fleming
fb1c08a86f
doc: Fix incorrect LSP diagnostic-related helptags (#13388) 2020-12-09 11:21:16 +01:00
Olivier Roques
222a0452fa
doc: Add missing parameter end_pos for range_formatting (#13481) 2020-12-09 11:19:56 +01:00
TJ DeVries
08ec36efaf
feat: Allow incremental sync & lsp flags (#13371) 2020-12-08 21:09:33 -05:00
Sean Dewar
8329f624de vim-patch:8.2.2106: TOML files are not recognized
Problem:    TOML files are not recognized.
Solution:   Match *.toml. (issue vim/vim#7432)
b237ae7b83
2020-12-07 18:03:29 +00:00
Leandro Ostera
c86ba6dea4
Fix typo on treesitter.txt help page 2020-12-07 08:08:23 +01:00
Jan Edmund Lazo
a4e18e50ef
runtime/doc: strftime() is always available 2020-12-06 19:26:33 -05:00
Thomas Vigouroux
5855a3ea7b
Merge pull request #13449 from nvim-treesitter/fix-language-for-range
fix(treesitter): incorrect method name call
2020-12-06 23:27:38 +01:00
James McCoy
b940cbb858
Merge pull request #13417 from shade-of-noon/man_count.13411
runtime: Fix man.vim count handling.
2020-12-04 18:36:54 -05:00
Steven Sojka
e15c5f58df fix(treesitter): don't throw an error for missing injected langs 2020-12-04 16:56:29 -06:00
Steven Sojka
2985c17867 fix(treesitter): incorrect method name call 2020-12-04 16:15:47 -06:00
Björn Linse
6c344a75d4
Merge pull request #13173 from tjdevries/tjdevries/option_info
api: add option metadata
2020-12-04 13:45:32 +01:00
TJ DeVries
ced951c2aa api/options: fixup 2020-12-04 13:29:44 +01:00
Edwin Pujols
e8153ad9c2 man.vim: Set iskeyword explicitly.
This also fixes `:Man!`, which wasn't setting 'iskeyword' to contain
parentheses, etc.
2020-12-04 08:14:40 -04:00
Jan Edmund Lazo
2bcae20242
vim-patch:8.2.2085: Qt translation file is recognized as typescript
Problem:    Qt translation file is recognized as typescript.
Solution:   Check the first line for "<?xml". (closes vim/vim#7418)
c0d670ce16
2020-12-03 18:58:30 -05:00
Mathias Fußenegger
f5e0f17968
lsp: Change diagnosticg.get_all to return {bufnr: Diagnostic[]} (#13310)
Allows users to associate the diagnostics with the right bufnr.
2020-12-03 14:22:15 -05:00
runiq
5c7141cc71
lsp: Make open_floating_preview buffers ephemeral (#13437)
Fixes #13429.
2020-12-03 14:20:56 -05:00
eightpigs
fa73bb70fc
lsp: Fix "unsupported_method" error when the buffer does not have an LSP Server (#13175) 2020-12-03 01:00:54 -05:00
Björn Linse
72c22862dc
Merge pull request #12235 from dm1try/add_init_lua
add init.lua as an alternative user config
2020-12-01 18:54:50 +01:00
Björn Linse
f88c2490c7
Merge pull request #13425 from bfredl/secretcharm
ex_getln: add secret charm
2020-12-01 17:32:48 +01:00
dm1try
c65d3fd67b doc: mention init.lua
use a generic name instead of "init.vim" in starting.txt
2020-12-01 10:51:31 +01:00
Yegappan Lakshmanan
e20ee69952 Update vim_diff.txt 2020-11-30 20:48:52 -08:00
Björn Linse
bed9839f46 ex_getln: add secret charm
Opt in to this secret world using

    set wildchar=0
    " already the default, but remove if non-zero existing config:
    set wildcharm=0

now you can map 'wildmode' just like any mode:

    cnoremap <tab> <c-z>
    function! Spacey()
      return getcmdline()[-1:] == "/" ? "\<bs>" : ""
    endfunc
    cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/"

Possibly asked questions:

What about backwards compatibility?
====

Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working.

Doesn't `<c-z>` mean suspend?
====

Not in cmdline mode. If it would then the recommended wildcharm would not
have been `<c-z>` to start with.

My config relies on `:<c-z>` being a synonym to `:<nop>`!
====
just no.
2020-12-01 00:57:52 +01:00
Edwin Pujols
ba2e94d223 runtime: Fix man.vim count handling.
Here I use a negative number to decide whether the count has been
explicitly set. I think it unlikely that negative sections will ever be
created given that negative numbers complicate argument handling:
```
$ man -1 foo
man: invalid option -- '1'
```
and given that there's already precedence for alphanumeric sections like
`3p`, `3x`, `n`, etc.

---

This does work, though:
```
$ man -S -3 baz
```
With `man baz.-3` and `man 'baz(-3)'`, (GNU) man *might* consider `-3`
internally as a section, but in the end reports as if the whole
argument was the name of a topic:
```
$ man 'baz(-3)'
No manual entry for baz(-3)
```

---

Closes #13411.
2020-11-29 19:56:15 -04:00
Jan Edmund Lazo
aec61074a9
Merge pull request #13404 from jarimayenburg/filetype_docker
[RDY] runtime: Updated Dockerfile syntax with latest from Vim upstream
2020-11-29 11:31:14 -05:00
Jari Maijenburg
abb61cd01a runtime/dockerfile.vim: ebdf3c964a901fc00c9009689f7cfda478342c51
Port only dockerfile.vim from upstream
ebdf3c964a
2020-11-29 16:31:09 +01:00
Jari Maijenburg
ff1e3048cc runtime/dockerfile.vim: 560979ed4f0216f902a2c247e937f00a27dcb198
Port only dockerfile.vim from upstream
560979ed4f
2020-11-29 16:30:31 +01:00
Damien Rajon
dc6593a84a
doc: fix lsp statusline examle (#13286)
Co-authored-by: Damien Rajon <damien@askmarty.io>
2020-11-29 14:24:52 +01:00
Yuki Ito
900228a20f lsp: Reduce memory usage for buffering the message from LSP. 2020-11-29 06:49:44 +09:00
Jan Edmund Lazo
a35c54b2ae
vim-patch:8.2.0095: cannot specify exit code for :cquit (#13407)
Problem:    Cannot specify exit code for :cquit.
Solution:   Add optional argument. (Thinca, Yegappan Lakshmanan, closes vim/vim#5442)
1860bde9d3

Co-authored-by: erw7 <erw7.github@gmail.com>
2020-11-28 21:28:57 +01:00
Jan Edmund Lazo
d956842751
Merge pull request #13397 from adrian5/filetype-gitrebase
runtime: Patch gitrebase filetype
2020-11-27 09:20:33 -05:00
adrian5
70c2849bc9 gitrebase.vim: patch runtime/syntax to 664f3cf3f21
vim/vim@664f3cf3f2
2020-11-27 04:30:56 +01:00
adrian5
23ef9d2dbc gitrebase.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b
2020-11-27 04:28:07 +01:00
adrian5
37e2751c37 gitrebase.vim: patch runtime/ftplugin to c08ee7476
vim/vim@c08ee7476b
2020-11-27 04:16:36 +01:00
Raphael
0e7f965a1b
use if_nil variable replace vim.F.if_nil 2020-11-26 14:32:38 +08:00
Jan Edmund Lazo
4537ff659e
Merge pull request #13375 from janlazo/vim-8.2.2041
vim-patch:8.1.{2290,2390},8.2.{242,257,302,303,462,991,996,2041,2042,2043,2047,2048,2049,2054}
2020-11-25 22:48:53 -05:00
Raphael
dd00c74737
Lsp: fix vim.F.ifnil to vim.F.if_nil (#13384) 2020-11-25 21:17:03 -05:00
Michael Lingelbach
0d83a1c43f
LSP: Feature/add workspace folders (#12638)
* First implementation of workspace folders
* Add completion for current directory
* Add tracking of workspace folders
* Add workspace folder listing
* Add checks on adding/removing workspaces
* Add appropriate initialization options
* Add documentation
* Make workspaceFolders available wherever client is
2020-11-25 21:07:02 +01:00
Björn Linse
ca7fa2a43a
Merge pull request #13357 from vigoux/luahl-priority
feat(luahl): add priority mechanism
2020-11-25 12:43:08 +01:00
Thomas Vigouroux
c0a6989d93
feat(luahl): add priority mechanism
Base priority is 0x1000, in order to stay kinda backward compatible.
Also set tree-sitter default highlight to 100 (middle-ish value)
2020-11-25 10:10:05 +01:00
Jan Edmund Lazo
8d7fa8962b
vim-patch:8.2.0996: using "aucmdwin" in win_gettype() is not ideal
Problem:    Using "aucmdwin" in win_gettype() is not ideal.
Solution:   Rename to "autocmd".
40a019f157
2020-11-25 02:46:20 -05:00
Jan Edmund Lazo
9b2efe6b7d
vim-patch:8.2.0991: cannot get window type for autocmd and preview window
Problem:    Cannot get window type for autocmd and preview window.
Solution:   Add types to win_gettype(). (Yegappan Lakshmanan, closes vim/vim#6277)
0fe937fd86

Cherry-pick test_preview.vim,test_window_cmd.vim changes
from patch v8.2.0522.
2020-11-25 02:45:00 -05:00
Jan Edmund Lazo
ede747c2cc
vim-patch:8.2.0257: cannot recognize a terminal in a popup window
Problem:    Cannot recognize a terminal in a popup window.
Solution:   Add the win_gettype() function.
00f3b4e007
2020-11-25 02:10:44 -05:00
Jan Edmund Lazo
ec53d43f84
vim-patch:8.2.2041: haskell filetype not optimally recognized
Problem:    Haskell filetype not optimally recognized.
Solution:   Recognize all *.hsc files as Haskell. (Marcin Szamotulski,
            closes vim/vim#7354)
a09bee322e
2020-11-24 22:03:36 -05:00
bkegley
21eb2e5ef8
fix(treesitter): docs reflect parser:parse()
Update docs to document that `parser:parse()` now returns a table of trees
2020-11-24 20:56:47 -06:00
Thomas Vigouroux
e6d1656831
languagetree: call changedtree callback per tree
Also fix a typo
2020-11-24 16:53:03 +01:00
shade-of-noon
71d4f5851f
man.vim: Use page title instead of full path. (#13353)
In commit 63f0ca3263, `tagfunc` was introduced to
`runtime/autoload/man.vim`. Nonetheless the tag function instead
of using a short buffer name (e.g. `man://foo(3)`) uses the full
path to the man page (e.g. `man:///usr/share/.../foo.3.gz`). This
behaviour is inconsistent with `:Man!`, thus this commit.

Closes #13334
2020-11-24 09:48:06 +01:00
saadparwaiz1
60158dfb81
checkhealth: support virtual env dir with spaces 2020-11-24 09:39:11 +01:00
Thomas Vigouroux
2d36b62eda
Merge pull request #13270 from vigoux/ts-range-ranges
treesitter: allow table to be used as ranges
2020-11-23 18:42:08 +01:00
Thomas Vigouroux
52d76f0a32
fix(treesitter): allow ranges in set_included_ranges 2020-11-23 15:09:32 +01:00
Jan Edmund Lazo
1aae464222
vim-patch:8.1.2115: MS-Windows: shell commands fail if &shell contains a space
Problem:    MS-Windows: shell commands fail if &shell contains a space.
Solution:   Use quotes instead of escaping. (closes vim/vim#4920)
2efc44b3f0

Always double-quote &shell if it contains a space.
Neovim does not support escaping space with backslash, unlike Vim.

N/A patches for version.c:

vim-patch:8.0.1455: if $SHELL contains a space then 'shell' is incorrect

Problem:    If $SHELL contains a space then the default value of 'shell' is
            incorrect. (Matthew Horan)
Solution:   Escape spaces in $SHELL. (Christian Brabandt, closes vim/vim#459)
4bfa8af141

vim-patch:8.2.1194: test failure because shell prompt differs

Problem:    Test failure because shell prompt differs.
Solution:   Set the shell prompt.
a4dc6f92bb
2020-11-23 07:45:24 -05:00
Steven Sojka
1a631026a9
feat(treesitter): add language tree
Implement the LanguageTree structure to enable language injection.

This is done be removing the old Parser metatable and replacing by the
new structure, with the same API (almost).

Some noticeable differences :
  - `parser:parse()` now returns a table of trees
  - There is no incremental parsing for child (injected) languages

Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2020-11-23 08:06:17 +01:00
Jan Edmund Lazo
cd691f2b6f
Merge pull request #13333 from adrian5/filetype-xml
runtime: Patch xml, xmllint, xmlformat filetypes
2020-11-22 22:01:15 -05:00
Jan Edmund Lazo
ee8f530b40
Merge pull request #13348 from adrian5/filetype-gitconfig
runtime: Patch gitconfig.vim syntax
2020-11-22 21:41:34 -05:00
Jan Edmund Lazo
093c44d697
Merge pull request #13351 from janlazo/vim-8.1.1598
vim-patch:8.1.{1598,1601,2332},8.2.2032
2020-11-22 19:42:28 -05:00
adrian5
2d35706b97 xml.vim: patch runtime/syntax to 4ceaa3a6e0b8cb299
vim/vim@4ceaa3a6e0
2020-11-22 22:47:39 +01:00
adrian5
f1b826778e xml.vim: patch runtime/syntax to 96f45c0b6fc9e9d40
vim/vim@96f45c0b6f
2020-11-22 22:45:05 +01:00
adrian5
4230c54660 xml.vim: patch runtime/indent to 4ceaa3a6e0b8cb299
vim/vim@4ceaa3a6e0
2020-11-22 22:42:02 +01:00
adrian5
e175cebf17 xml.vim: patch runtime/indent to 96f45c0b6fc9e9d40
vim/vim@96f45c0b6f
2020-11-22 22:40:08 +01:00
adrian5
fad90537c2 xmllint.vim: patch runtime/compiler to 1c6737b20a5
vim/vim@1c6737b20a
2020-11-22 22:36:17 +01:00
Jan Edmund Lazo
6068b907cb
Merge pull request #13345 from shade-of-noon/lingering-e145
Remove leftover handling of restricted mode.
2020-11-22 16:11:22 -05:00
Edwin Pujols
070d7c2950 runtime: Remove error handling for E145.
Restricted mode (-Z) has been removed per #11996.
Some runtime files had lingering error handling (error
identifier `E145`) so I cleaned them up.
2020-11-22 15:46:47 -04:00
Jan Edmund Lazo
e2a2efc432
vim-patch:8.2.2032: cabalconfig and cabalproject filetypes not recognized
Problem:    Cabalconfig and cabalproject filetypes not recognized.
Solution:   Detect more cabal files. (Marcin Szamotulski, closes vim/vim#7339)
dcbab75db3

N/A patches for version.c:

vim-patch:8.1.1598: update to test file missing

Problem:    Update to test file missing.
Solution:   Update the popup window test file.
53a95d6584

vim-patch:8.1.1601: missing changes to popup window test file

Problem:    Missing changes to popup window test file.
Solution:   Add those changes.
8da4181631
2020-11-22 13:30:38 -05:00
adrian5
fc0f57228d xmlformat.vim: patch runtime/autoload to eab6dff19
vim/vim@eab6dff19f
2020-11-22 18:05:02 +01:00
adrian5
67612b1766 xmlformat.vim: patch runtime/autoload to 96f45c0b6
vim/vim@96f45c0b6f
2020-11-22 18:00:23 +01:00
adrian5
04463f027a gitconfig.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b
2020-11-22 04:43:16 +01:00
adrian5
b0b57a2a6a gitconfig.vim: patch runtime/syntax to 5be4ceecea5
vim/vim@5be4ceecea
2020-11-22 04:34:44 +01:00
shade-of-noon
5c92ee5d71
Update vim_diff.txt
Update for restricted mode removal.
2020-11-21 11:18:23 -04:00
shade-of-noon
60e1e60b88
Grammar - remove superfluous word. 2020-11-21 10:05:18 -04:00
Jan Edmund Lazo
480b04122e
Merge pull request #13321 from seandewar/vim-8.2.2011
vim-patch:8.2.{2006,2011}
2020-11-19 23:34:13 -05:00
adrian5
9e405c44b9 gitcommit.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b
2020-11-20 02:44:05 +01:00
adrian5
dee5dfd930 gitcommit.vim: patch runtime/ftplugin to c08ee7476
vim/vim@c08ee7476b
2020-11-20 02:39:43 +01:00
Sean Dewar
a18f050e51 vim-patch:8.2.2006: .pbtxt files are not recognized
Problem:    .pbtxt files are not recognized.
Solution:   Recognize .pbtxt as protobuf text buffers. (closes vim/vim#7326)
88774a30c0
2020-11-19 17:35:41 +00:00
rockerBOO
fb19663851 docs: Follow conventions 2020-11-16 01:13:15 -05:00
rockerBOO
46ab054b1d docs: Update nvim_lsp to lspconfig 2020-11-16 01:10:55 -05:00
Mathias Fußenegger
0798ad3a3a
lsp: Expose all diagnostics (#13285)
* lsp: Remove duplicate `diagnostics` fallback in diagnostic.display

* lsp: Expose all diagnostics

Before the changes in #12655 it was possible to retrieve all diagnostics
via `vim.lsp.util.diagnostics_by_buf`.

This adds a `diagnostic.get_all()` to enable users to retrieve all
diagnostics.

Use cases for that could include loading all diagnostics into the
quickfix list, or to build an enhanced goto_next that can move across
buffers.
2020-11-14 14:39:05 -05:00
TJ DeVries
35325ddac0
doc: fixup sign information (#13281)
Thanks to @sunzoje for finding the outdated documentation.
2020-11-13 00:02:40 -05:00
TJ DeVries
f75be5e9d5
lsp: vim.lsp.diagnostic (#12655)
Breaking Changes:
- Deprecated all `vim.lsp.util.{*diagnostics*}()` functions.
    - Instead, all functions must be found in vim.lsp.diagnostic
    - For now, they issue a warning ONCE per neovim session. In a
      "little while" we will remove them completely.
- `vim.lsp.callbacks` has moved to `vim.lsp.handlers`.
    - For a "little while" we will just redirect `vim.lsp.callbacks` to
      `vim.lsp.handlers`. However, we will remove this at some point, so
      it is recommended that you change all of your references to
      `callbacks` into `handlers`.
    - This also means that for functions like |vim.lsp.start_client()|
      and similar, keyword style arguments have moved from "callbacks"
      to "handlers". Once again, these are currently being forward, but
      will cease to be forwarded in a "little while".
- Changed the highlight groups for LspDiagnostic highlight as they were
  inconsistently named.
    - For more information, see |lsp-highlight-diagnostics|
- Changed the sign group names as well, to be consistent with
  |lsp-highlight-diagnostics|

General Enhancements:
- Rewrote much of the getting started help document for lsp. It also
  provides a much nicer configuration strategy, so as to not recommend
  globally overwriting builtin neovim mappings.

LSP Enhancements:
- Introduced the concept of |lsp-handlers| which will allow much better
  customization for users without having to copy & paste entire files /
  functions / etc.

Diagnostic Enhancements:
- "goto next diagnostic" |vim.lsp.diagnostic.goto_next()|
- "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()|
    - For each of the gotos, auto open diagnostics is available as a
      configuration option
- Configurable diagnostic handling:
    - See |vim.lsp.diagnostic.on_publish_diagnostics()|
    - Delay display until after insert mode
    - Configure signs
    - Configure virtual text
    - Configure underline
- Set the location list with the buffers diagnostics.
    - See |vim.lsp.diagnostic.set_loclist()|
- Better performance for getting counts and line diagnostics
    - They are now cached on save, to enhance lookups.
    - Particularly useful for checking in statusline, etc.
- Actual testing :)
    - See ./test/functional/plugin/lsp/diagnostic_spec.lua
- Added `guisp` for underline highlighting

NOTE: "a little while" means enough time to feel like most plugins and
plugin authors have had a chance to refactor their code to use the
updated calls. Then we will remove them completely. There is no need to
keep them, because we don't have any released version of neovim that
exposes these APIs. I'm trying to be nice to people following HEAD :)

Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
2020-11-12 22:21:34 -05:00
georg3tom
7777532ceb Removed restricted mode - Fix #11972 2020-11-11 18:07:58 +01:00
Yegappan Lakshmanan
f67b3ea39c
Update the differences with Vim. (#13239)
:cquit can use count to set the exit code
	patch 8.2.0095: cannot specify exit code for :cquit

:tchdir tab-local current-directory
	patch 8.1.1218: cannot set a directory for a tab page

Autocmd Events:
	- DirChanged
	    patch 8.0.1459: cannot handle change of directory
	- TextYankPost
	    patch 8.0.1394: cannot intercept a yank command

tabpagenr() "#" argument
    g<Tab> goes to the last-accessed tabpage.
	patch 8.2.1401: cannot jump to the last used tabpage

hl-QuickFixLine
	patch 8.0.0641: cannot set a separate highlighting for the quickfix line

v:event
	patch 8.0.1394: cannot intercept a yank command

K in help documents can be used like CTRL-].
	Updated as part of a runtime update.
	4c05fa08c9
2020-11-09 23:01:54 -05:00
Björn Linse
42ffa2d62e
Merge pull request #13205 from romgrk/add-bufmodified-autocmd
Implement BufModifiedSet autocmd
2020-11-09 12:23:14 +01:00
Stephan Seitz
0276c8addd tree-sitter: Put base languages first in queries
This reverts the handling of base languages to the old way how
nvim-treesitter handled them. When a language extends a base language
it usually wants to be able to overwrite queries.

Related: https://github.com/nvim-treesitter/nvim-treesitter/issues/633
2020-11-08 13:55:42 +01:00
Rom Grk
6b5975a1eb doc: add BufModifiedSet 2020-11-07 23:22:54 -05:00
francisco souza
5161ff88fa
lsp: fix formatting_sync with multiple clients (#13233)
buf_request_sync returns a table indexed by the client id, so when
starting a second client on a separate buffer, result[1] will be nil.

Closes #13232.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2020-11-07 23:31:55 +01:00
champignoom
df750e7248
vim-patch:8.2.1964: not all ConTeXt files are recognized (#13245)
Problem:    Not all ConTeXt files are recognized.
Solution:   Add two patterns. (closes vim/vim#7263)
faebda8cc1
2020-11-07 15:03:14 -05:00
Andrea Cedraro
4c7ad9527d
Add v:event flag on DirChanged signaling switching window (#13153)
Closes #9909
2020-11-07 12:02:06 -05:00
Björn Linse
e5d83a3bf3
Merge pull request #13117 from romgrk/add-scroll-events
Implement scroll autocommand
2020-11-07 15:13:20 +01:00
Rom Grk
0fce70252d doc: fix WinScrolled details 2020-11-07 06:25:07 -05:00
Thomas Vigouroux
0227091fb9
Merge pull request #13229 from ElPiloto/more_treesitter_doc
[RDY] doc: Supplement documentation for treesitter.
2020-11-05 12:08:55 +01:00
Luis Piloto
9162cc5417
Update runtime/doc/treesitter.txt
Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2020-11-05 09:14:33 +00:00
Shougo
9cc702ae11
Add g:loaded_matchit check (#13226)
I have added g:loaded_matchit check to skip matchit loading like other default plugins.
2020-11-04 18:46:03 -05:00
Jan Edmund Lazo
33560002b4
healthcheck: suggest to skip tests perl provider (#13223)
CPAN tests are unreliable on Windows.
CI does the same to reduce flaky,slow builds.
2020-11-04 18:40:34 -05:00
ElPiloto
d1bed96778 doc: Fix treesitter doc PR. 2020-11-04 19:55:12 +00:00
ElPiloto
44180c3553 doc: Supplement documentation for treesitter.
- Describe query components (capture, match, pattern). Not
well-described in tree-sitter documentation.

- Describe Query() object. Not actually described anywhere in
documenation.
2020-11-04 17:45:38 +00:00
Thomas Vigouroux
c7d460c197
treesitter: separate tree and parser
While this might sound silly, it is needed for further improvements.
2020-11-04 08:14:20 +01:00
Lucas Hoffmann
432f3240f1
docs: Fix typo in example code 2020-11-03 10:05:26 +01:00
Rom Grk
13e0ca3e19 Merge branch 'master' into add-scroll-events 2020-11-03 03:11:08 -05:00
Thomas Vigouroux
186ba3b688
Merge pull request #13178 from steelsojka/fix-empty-main-query-file
fix(treesitter): account for no main query file
2020-11-02 18:16:37 +01:00
TJ DeVries
dc14b1468a
lsp: remove vim.NIL from processing (#13174)
* lsp: remove vim.NIL from processing

* lsp: remove instances of vim.NIL
2020-11-02 08:50:44 -05:00
Jan Edmund Lazo
f9adb3eccb
vim-patch:8.2.0864: pragmas are indented all the way to the left
Problem:    Pragmas are indented all the way to the left.
Solution:   Add an option to indent progmas like normal code. (Max Rumpf,
            closes vim/vim#5468)
d881b516da

N/A patches for version.c:

vim-patch:8.1.2030: tests fail when build with normal features and terminal

Problem:    Tests fail when build with normal features and terminal.
            (Dominique Pelle)
Solution:   Disable tests that won't work. (closes vim/vim#4932)
997d42427e

vim-patch:8.1.2063: some tests fail when +balloon_eval_term is missing

Problem:    Some tests fail when +balloon_eval_term is missing but
            _balloon_eval is present. (Dominique Pelle)
Solution:   Check the right feature in the test. (closes vim/vim#4962)
1e82a784ac

vim-patch:8.2.1938: wiping out a terminal buffer makes some tests fail

Problem:    Wiping out a terminal buffer makes some tests fail.
Solution:   Do not wipe out the terminal buffer unless wanted.
a46765a797
2020-11-01 19:55:40 -05:00
Jesse
720d442d19
lsp: complete support for CodeActionKinds to capabilities (#13180)
We support applying all kinds in the spec equivalently and some servers (including dartls) won't send code actions if support for the relevant kinds is not explicitly stated in the client capabilities. Therefore, this PR makes that support explicit.

Also, as we support all CodeActionKinds, we should also mark the server as supporting code actions when it specifies code action kinds. This is also done in this PR.
2020-11-01 18:11:32 +01:00
Björn Linse
8821587748
Merge pull request #13192 from bfredl/nodeid
] treesitter: add node:id()
2020-11-01 17:27:38 +01:00
Björn Linse
03c478ae53 treesitter: add node:id() 2020-11-01 14:59:17 +01:00
Jan Edmund Lazo
bc68653a86
Merge pull request #13167 from romgrk/vim-8.2.1909
vim-patch:8.2.1909: number of status line items is limited to 80
2020-10-31 20:31:42 -04:00
Rom Grk
10bf69a43e vim-patch:8.2.1909: number of status line items is limited to 80
Problem:    Number of status line items is limited to 80.
Solution:   Dynamically allocate the arrays. (Rom Grk, closes vim/vim#7181)
8133cc6bf4

The members of stl_item_T have not been prefixed with stl_ contrary to
the vim patch because the amount of stl_ prefixes on single lines of
code in that region was hurtful to readability.
2020-10-31 19:54:06 -04:00
TJ DeVries
98024853f4
lsp: Remove snippet lies (#13183)
We don't actually support snippets in core in the way that users would
truly expect. So, by default, we will not say that builtin-lsp has
`snippetSupport`.

To re-enable, users can do the following:

First, get a capabilities dictionary with

`local capabilities = vim.lsp.protocol.make_client_capabilities()`

Then override

`capabilities.textDocument.completion.completionItem.snippetSupport = true`

and then pass those capabilties to the setup function.

```
nvim_lsp.server_name.setup {
  ...,
  capabilities = capabilities,
  ...,
}
```

See https://github.com/neovim/neovim/issues/12795
2020-10-30 10:58:12 -04:00
Jan Edmund Lazo
9fee5f1423
Merge pull request #13172 from janlazo/vim-8.2.1910
vim-patch:8.1.{2034,2050},8.2.{131,913,929,1521,1910,1913,1922}
2020-10-30 08:56:38 -04:00
necabo
037ffd54dc
Fix clipboard provider detection (#13190)
Fixes #13189
2020-10-29 21:35:20 -04:00
Jan Edmund Lazo
026c8dde87
vim-patch:8.1.2034: dark them of GTK 3 not supported
Problem:    Dark them of GTK 3 not supported.
Solution:   Add the "d" flag in 'guioptions'. (Jonathan Conder, closes vim/vim#4934)
50bf7ce0c9
2020-10-29 18:36:38 -04:00
Steven Sojka
e27af09052 fix(treesitter): account for no main query file 2020-10-28 07:34:11 -05:00
Rom Grk
e606654ac2 doc: update doc: s/Scroll/WinScrolled/ 2020-10-28 04:49:49 -04:00
Michael Lingelbach
fd7aa6768a
lsp: Fix case where active_signature == vim.NIL (#13114) 2020-10-27 22:39:24 -04:00
skippi
089f4f8e4a vim-patch:8.1.1769: 'shellslash' is also used for completion
Problem:    'shellslash' is also used for completion.
Solution:   Add the 'completeslash' option. (Yasuhiro Matsumoto, closes vim/vim#3612)
ac3150d385
2020-10-26 15:20:12 -05:00
Matthieu Coudron
a22fe09b90
Merge pull request #13154 from fsouza/fix-callback-logic
[RDY] lsp: fix fallback for callback in method_unsupported
2020-10-25 22:09:41 +01:00
Mathias Fußenegger
7fef16e1d6
lsp: Store diagnostics for unloaded buffers (#13102)
To avoid loading buffers https://github.com/neovim/neovim/pull/12440
changed the logic to not process diagnostics for unloaded buffers.

This is problematic for language servers where compile errors or build
errors are reported via diagnostics. These errors may prevent the
language server from providing all functions and it is difficult for
users to debug it without having access to the errors.

For example, with eclipse.jdt.ls there may be a problem with gradle (the
build tool for java), it results in a diagnostics like this:

    org.gradle.toolingapi/build.gradle|1 col 1| Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.8.1-bin.zip'.

This would be invisible to users unless the user happens to open the
right file. In this case the user would actually never see the error,
because the language server isn't attached to the build configuration
files.

This changes the behaviour to at least store the diagnostics. The other
operations which are more expensive are still skipped.
2020-10-25 14:27:11 -04:00
Björn Linse
c3ef198132
Merge pull request #13077 from tjdevries/tjdevries/buf_apis_1
api: nvim_buf_delete
2020-10-25 18:46:57 +01:00
francisco souza
1f0f92f8ec
lsp: fix fallback for callback in method_unsupported
Missed this #12764. My bad :((
2020-10-25 08:17:34 -04:00
francisco souza
6312792d8a
lsp: only send buf requests to servers that support the request (#12764)
Refactors how required capabilities are detected and validated, and make
sure requests are only sent to clients that support it (and only fail if
no clients support the provided method).

The validation happens at the buf_request level, because we assume that
if someone is sending the request directly through the client, they know
what they're doing. Also, let unknown methods go through.

This is extracted from #12518 and closes #12755.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2020-10-25 00:28:15 -04:00
Rom Grk
ffe1a067df docs: add documentation for Scroll autocmd 2020-10-24 04:57:15 -04:00
Jan Edmund Lazo
932585fd91
Merge pull request #13132 from willelz/markdown
runtime: Patch syntax/markdown.vim
2020-10-23 22:11:10 -04:00
Jan Edmund Lazo
2894649c2e
vim-patch:8.2.0901: formatting CJK text isn't optimal
Problem:    Formatting CJK text isn't optimal.
Solution:   Properly break CJK lines. (closes vim/vim#3875)
e52702f003
2020-10-23 08:57:16 -04:00
Jan Edmund Lazo
d69a8a3fc4
vim-patch:8.2.0952: no simple way to interrupt Vim
Problem:    No simple way to interrupt Vim.
Solution:   Add the SigUSR1 autocommand, triggered by SIGUSR1. (Jacob Hayes,
            closes vim/vim#1718)
be5ee8686a
2020-10-22 18:24:08 -04:00
TJ DeVries
78556aba7d api: nvim_buf_delete 2020-10-22 16:08:32 -04:00
Mathias Fußenegger
df726408d7
lsp: Fix "client has shut down" errors during initializing (#13103)
Language servers can already send log messages to the client while the
server is still being initialized.

This currently leads to "client has shut down" messages which are
confusing to the user as the server is properly starting.

To fix this this changes the `get_client_by_id` method to also return a
client if it is still initializing.
2020-10-22 14:59:17 -04:00
willelz
634315c6f7 markdown.vim: patch runtime to ade0d3946801
vim/vim@ade0d39468
2020-10-22 15:38:18 +09:00
willelz
471e9f53ff markdown.vim: patch runtime/ftplugin to c08ee7476b19
vim/vim@c08ee7476b
2020-10-22 15:37:29 +09:00
Jan Edmund Lazo
3f0850e9f0
vim-patch:8.2.1874: can't do something just before leaving Insert mode
Problem:    Can't do something just before leaving Insert mode.
Solution:   Add the InsertLeavePre autocommand event. (closes vim/vim#7177)
b53e13a91a

N/A patches for version.c:

vim-patch:8.1.1877: graduated features scattered

Problem:    Graduated features scattered.
Solution:   Put graduated and obsolete features together.
ffc0716af8

vim-patch:8.2.1875: warning when building GTK gui

Problem:    Warning when building GTK gui.
Solution:   Add missing function parameter.
3da855c8e2

vim-patch:8.2.1877: test for function list fails

Problem:    Test for function list fails.
Solution:   Move "obsolete" comments one line up.
b8f519e538

vim-patch:8.2.1878: GTK: error for redefining function

Problem:    GTK: error for redefining function. (Tony Mechelynck)
Solution:   Remove "gtk_" prefix from local functions and prepend "gui_" to
            global functions.
8a99e66b4f

vim-patch:8.2.1881: cannot build with GTK3

Problem:    Cannot build with GTK3.
Solution:   Adjust form functions.
692d1a51e7

vim-patch:8.2.1883: compiler warnings when using Python

Problem:    Compiler warnings when using Python.
Solution:   Adjust PyCFunction to also have the second argument.  Use "int"
            return type for some functions.  Insert "(void *)" to get rid of
            the remaining warnings.
4ce5fe4c87
2020-10-21 23:36:56 -04:00