Commit Graph

17146 Commits

Author SHA1 Message Date
Chris Kipp
1a4d380b5a
LSP: Add in clientInfo to initalize_params. (#13757)
* Add in clienInfo to initalize_params.

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

microsoft.github.io/language-server-protocol/specification#initialize
2021-01-18 10:13:26 +01:00
Michael Lingelbach
6d659bb338
lsp: add client/registerCapability handler (#13780)
Until we support dynamicRegistration, we should handle the client/registerCapability in core. There are still some language servers that send this request despite dynamicRegistration not being registered client-side (we got an upstream fix for the node ones, but this depends on them bumping vscode-languageserver-node).
2021-01-18 10:11:19 +01:00
Linda_pp
41eea59dcf
doc: Add link to Homebrew formula in README (#13782)
The page is useful because it contains:

    How to install it
    Package information (e.g. current version)
    List of dependencies
    Analytics (how many people are using it)
2021-01-18 09:41:25 +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
Jan Edmund Lazo
702208daa6
Merge pull request #13775 from janlazo/vim-8.2.2353
vim-patch:8.2.{2353,2355,2360,2361,2366,2368}
2021-01-17 15:01:22 -05:00
Jan Edmund Lazo
7cced24e93
vim-patch:8.2.2368: insufficient tests for setting options
Problem:    Insufficient tests for setting options.
Solution:   Add a few tests. (Dominique Pellé, closes vim/vim#7695)
85773bf32b

Cherry-pick some test cases for Test_set_error()
from patches v8.2.0540, v8.2.0551.
2021-01-17 14:17:40 -05:00
Jan Edmund Lazo
78620dbd28
ci(GHA): install perl on osx
Fix missing header files in system perl.
2021-01-17 12:42:28 -05:00
Jan Edmund Lazo
402f2bda13
vim-patch:8.2.2361: Vim9: no highlight for "s///gc" when using 'opfunc'
Problem:    Vim9: no highlight for "s///gc" when using 'opfunc'.
Solution:   Reset 'lazyredraw' temporarily. (closes vim/vim#7687)
7c886db915
2021-01-17 12:42:28 -05: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
abcd982bf0
vim-patch:8.2.2360: test leaves file behind
Problem:    Test leaves file behind.
Solution:   Delete the right file. (Dominique Pellé, closes vim/vim#7689)
a3b494d6af
2021-01-17 12:42:27 -05:00
Jan Edmund Lazo
562877c135
vim-patch:8.2.2355: stray test failure on Appveyor
Problem:    Stray test failure on Appveyor.
Solution:   Finish insert command.
97c6943e11
2021-01-17 12:42:27 -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
James McCoy
0f2d37f11f
Merge pull request #13774 from mjlbach/log_warn_cache
log.c: warn instead of error on failed stdpath('cache') creation
2021-01-16 23:40:36 -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
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
2390a0d3c4
Merge pull request #13752 from vigoux/ts-buffer-always-curbuf
fix(treesitter): use source() method on attach
2021-01-14 13:18:11 +01: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
Jan Edmund Lazo
bd02e29443
vim-patch:8.2.2329: not all ways Vim can be started are tested
Problem:    Not all ways Vim can be started are tested.
Solution:   Add a test for different program names. (Dominique Pellé,
            closes vim/vim#7651)
df4c9af7e7
2021-01-13 09:35:00 -05: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
0c0c3ee330
Merge pull request #13735 from jamessan/brew-failures 2021-01-11 10:25:28 -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
James McCoy
6d67cf8647
ci(gha): brew unlink gcc@8/@9 to fix upgrade issues 2021-01-11 00:01:37 -05:00
James McCoy
0f03b3f3aa
ci(gha): brew upgrade before installing 2021-01-10 23:40:30 -05:00
James McCoy
0af5a56e47
Merge pull request #13733 from jupblb/patch-release-2
Do not delete the nightly release
2021-01-10 22:18:52 -05:00
ffanzhang
0860d9c164
Use uv_os_homedir and current directory as backup when $HOME is not set (#13657)
Close https://github.com/neovim/neovim/issues/8614

Use uv_os_homedir and current directory as backup if HOME env is not set.
Allocate homedir only if var is not NULL.
2021-01-10 19:46:25 -05:00
Michał Kiełbowicz
3d41ce90df
Do not delete the nightly release 2021-01-10 23:29:34 +01:00
Matthieu Coudron
635930dcd7
Merge pull request #13704 from teto/fix-fold-list
screen.c: fix last character on foldtext
2021-01-10 22:44:23 +01: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
87afc90317 screen.c: fix an issue with wrap and folds
Before this commit, a folded line would display a trailing character
with
bin/nvim -u ~/test.vim --cmd "hi NonText ctermbg=3" --cmd "hi Search ctermbg=2" --cmd "set listchars+=extends:X nowrap list"  ~/test.txt
2021-01-07 21:58:57 +01: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
Matthieu Coudron
b419e39a2a screen.c: fix last character on foldtext
Last character on a folded line was sometimes highlighted with the
"Search" highlight. Solves this along with some remaining "curwin".
2021-01-06 21:02:40 +01:00
Matthieu Coudron
2ea3127697
screen.c: fix display of signcolumn=auto in diffs (#13688)
sign_id was not reset when filler lines were involved, thus causing a
bad alignment between columns.

You could check that before this commit,

    bin/nvim -u NORC  --cmd "setglobal signcolumn=yes:4" --cmd "set diffopt+=foldcolumn:0" -d ../test1.txt ../test2.txt

would result in an irregular column width.
2021-01-05 21:23:35 +01: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
Michael Lingelbach
0efc713136
contrib: update nix flake to use flake-utils (#13685) 2021-01-05 21:12:21 +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
Jan Edmund Lazo
5b897acfc1
test/old: restore test_backspace_opt.vim
Porting it to test/functional/legacy/backspace_opt_spec.lua
was a mistake.
Tests pass after commenting out some lines for Vi compatibility.

File is copied from Vim as of patch v8.2.0540.
Patch v8.2.0540 cannot be fully ported yet.
This file is a prequisite for future v8.2.x patches.
2021-01-05 09:47:38 -05:00
Jan Edmund Lazo
4f53ebaceb
vim-patch:8.2.0050: after deleting a file mark it is still in viminfo
Problem:    After deleting a file mark it is still in viminfo.
Solution:   When a file mark was deleted more recently than the mark in the
            merged viminfo file was updated, do not store the mark. (Pavol
            Juhas, closes vim/vim#5401, closes vim/vim#1339)
8cd6cd8087

Neovim's ShaDa is incompatible with Vim's "viminfo"
so "viminfo" tests fail.

N/A patches for version.c:

vim-patch:8.1.1731: command line history not read from viminfo on startup

Problem:    Command line history not read from viminfo on startup.
Solution:   Get history length after initializing it.
26b654a5df

vim-patch:8.1.1764: ":browse oldfiles" is not tested

Problem:    ":browse oldfiles" is not tested.
Solution:   Add a test.
5328cb8986

vim-patch:8.1.2111: viminfo file not sufficiently tested

Problem:    Viminfo file not sufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5009)
2a8d3b8997

vim-patch:8.1.2126: viminfo not sufficiently tested

Problem:    Viminfo not sufficiently tested.
Solution:   Add more test cases.  Clean up comments. (Yegappan Lakshmanan,
            closes vim/vim#5032)
6bd1d77067
2021-01-05 09:47:38 -05:00
Björn Linse
adbf2dd86b
Merge pull request #13687 from paddor/master
remove trailing tabs
2021-01-05 07:59:39 +01:00
Patrik Wenger
6d5626f355 remove trailing tabs 2021-01-04 20:10:34 +01:00
Björn Linse
9223d1450d
Merge pull request #13590 from bfredl/tsquery
treesitter: simplify query reading logic
2021-01-04 16:17:34 +01:00
Björn Linse
5fcc247c6e
Merge pull request #11906 from bfredl/moreblock
consider "-- more --" state to be blocking
2021-01-04 11:14:07 +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
Björn Linse
4cdc8b1efd input: consider "-- more --" state to be blocking, fixes #11899 2021-01-04 09:41:25 +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