Commit Graph

15014 Commits

Author SHA1 Message Date
Anmol Sethi afaa062643
man.vim: Update maintainer email 2019-11-24 20:31:46 -05:00
Anmol Sethi 4ce96e4979
man.vim: Hard wrap by default
Closes #11436
2019-11-24 20:31:46 -05:00
Anmol Sethi 078f279691
man.vim: Document how to disable bold highlighting
Closes #11435
2019-11-24 20:31:18 -05:00
Anmol Sethi 526798a941 man.vim: Ensure 'modifiable' in man#init_pager #11450 2019-11-24 17:30:04 -08:00
Ashkan Kiani d5aaad14ec
Followup improvements to LSP (#11430)
Addressing things brought up in https://github.com/neovim/neovim/issues/11389 and beyond.

- Bugfix for empty dictionary serialization.
- Reduce markdown previews of code.
- Refactor method triggers to `lsp.buf.*` methods
- Switch to v:lua and get rid of vim interface.
- Get rid of filetype config in favor of something from https://github.com/neovim/nvim-lsp
- Switch error messages to something which doesn't require `ENTER` because if an LSP goes crazy, it'll block neovim.
- Rename `builtin_callbacks` to `default_callbacks`
- Resolve callback at time of calling using default_callbacks instead of at client creation
- Make hover/signatureHelp preview focusable so you can mess with it.
- Add vim.lsp.util.set_qflist and vim.lsp.util.set_loclist and vim.lsp.util.locations_to_items().
- Add apply_textedit and tests which enables a new class of features.
- Fix column offsets in character and bytes in vim.lsp.buf to be correct.

New methods:
- Add textDocument/references under vim.lsp.buf.references()
- Finish textDocument/rename
- Finish textDocument/rangeFormatting and textDocument/format
2019-11-24 04:44:50 -08:00
Ashkan Kiani a9036502dc Bring vim into local scope 2019-11-24 03:14:03 -08:00
Ashkan Kiani b35f6aa9dd Add support for textDocument/references.
Add set_qflist and set_loclist.
- Also add locations_to_items, which calculates byte offsets for
character positions in files and avoids unnecessary operations.
2019-11-24 03:01:18 -08:00
Ashkan Kiani b78fdd7ce5 Merge branch 'master' into lsp-followup 2019-11-24 02:29:23 -08:00
Ashkan Kiani d0d38fc36e Lua: vim.env, vim.{g,v,w,bo,wo} #11442
- Add vim variable meta accessors: vim.env, vim.{g,v,w,bo,wo}
- Redo gen_char_blob to generate multiple blobs instead of just one
  so that multiple Lua modules can be inlined.
- Reorder vim.lua inclusion so that it can use previously defined C
  functions and utility functions like vim.shared and vim.inspect things.
- Inline shared.lua into nvim, but also keep it available in runtime.
2019-11-24 02:28:48 -08:00
Ashkan Kiani f7c20b94c7 Merge branch 'master' into lsp-followup 2019-11-24 01:22:16 -08:00
Jan Edmund Lazo 222637c341 vim-patch:8.1.1334: respect shortmess=F when buffer is hidden #11443
Problem:    When buffer is hidden "F" in 'shortmess' is not used.
Solution:   Check the "F" flag in 'shortmess' when the buffer is already
            loaded. (Jason Franklin)  Add test_getvalue() to be able to test
            this.
eda652215a

test_getvalue() is not implemented.
It is only used for checking "need_fileinfo" internal variable.
2019-11-23 21:56:58 -08:00
Justin M. Keyes 2aa7b10114
Merge #11431 from janlazo/vim-8.1.1235
vim-patch:8.1.{471,723,1235,1490,1951,2183,2269,2329,2330}
2019-11-23 18:57:24 -08:00
Ashkan Kiani d410812311 UI tweaks.
- Hide diagnostics on client exit
- Stop insert on popup focus.
- Hide popup on insertchar (for signature_help)
2019-11-23 16:14:24 -08:00
Ashkan Kiani 42c53d266a Merge remote-tracking branch 'origin/master' into lsp-followup 2019-11-23 14:28:54 -08:00
Björn Linse 61d2a12743
Merge pull request #11382 from bfredl/extmark_bufhl
use extmark adjustment for bufhl. use vim code for within-line adjustments.
2019-11-23 22:06:43 +01:00
Jan Edmund Lazo 4c532f5469
vim-patch:8.1.0471: some tests are flaky or fail on some systems
Problem:    Some tests are flaky or fail on some systems.
Solution:   Increase waiting time for port number. Use "cmd /c" to execute
            "echo" on win32. (Ken Takata, closes vim/vim#3534)
453ce7c16b
2019-11-23 15:44:41 -05:00
Björn Linse 7d5988feee tests: remove irrelevant timing info 2019-11-23 21:26:16 +01:00
Björn Linse ddf509c2ba test was wrong 2019-11-23 16:46:47 +01:00
Björn Linse 2cc83c961c refactor: use inserted_bytes pattern from vim
This covers all "small" inserts and deletes in insert mode, as well
as a few more cases like small normal mode deletes

vim-patch:8.1.0678: text properties as not adjusted for inserted text
2019-11-23 16:46:47 +01:00
Björn Linse bdebe8516c bufhl: use extmark column adjustment for bufhl
NB: this is not the final implementation. Bufhl should be made a
part of the extmark tree, so that "start" adjustment just works
automatically. But "stop" will still need some ad-hoc trickery,
until extended marks natively support ranges (hopefully sooner than
forever).
2019-11-23 14:50:31 +01:00
Jan Edmund Lazo 7639ccdd0d
vim-patch:8.1.1951: mouse double click test is a bit flaky
Problem:    Mouse double click test is a bit flaky.
Solution:   Add to list of flaky tests.  Update a couple of comments.
f1699968ba
2019-11-22 23:43:01 -05:00
Jan Edmund Lazo cb107d28a0
vim-patch:8.1.2330: vi' does not always work when 'selection' is exclusive
Problem:    vi' does not always work when 'selection' is exclusive.
Solution:   Adjust start position.
94d9f4fa65
2019-11-22 20:10:12 -05:00
Jan Edmund Lazo 3d7d52ee8b
vim-patch:8.1.2329: mouse multiple click test is a bit flaky
Problem:    Mouse multiple click test is a bit flaky.
Solution:   Add it to the list of flaky tests.
44f0bd878a
2019-11-22 20:10:12 -05:00
Jan Edmund Lazo 273ab19452
vim-patch:8.1.2183: running a test is a bit verbose
Problem:    Running a test is a bit verbose.
Solution:   Silence some messages. (Daniel Hahler, closes vim/vim#5070)
ba089307bb
2019-11-22 20:10:12 -05:00
Jan Edmund Lazo a6714cf35c
vim-patch:8.1.1490: when a single test fails the exit code is not set
Problem:    When a single test fails the exit code is not set. (Daniel Hahler)
Solution:   Add an exit command. (closes vim/vim#4506)
4e0bf84627
2019-11-22 20:10:12 -05:00
Jan Edmund Lazo 8969efca8c
vim-patch:8.1.0723: cannot easily run specific test when in src/testdir
Problem:    Cannot run specific test when in src/testdir the same was as in
            the src directory.
Solution:   Move build rule to src/testdir/Makefile.
ec50401e1e

Developer can omit '.res' suffix now.
TEST_FILE=test_syntax make oldtest
or
make -C src/nvim/testdir test_syntax
2019-11-22 20:10:12 -05:00
Jan Edmund Lazo 970329ff8d
vim-patch:8.1.2269: tags file with very long line stops using binary search
Problem:    Tags file with very long line stops using binary search.
Solution:   Reallocate the buffer if needed.
dc9ef26845
2019-11-22 20:10:11 -05:00
Jan Edmund Lazo 0f29deec80
vim-patch:8.1.1235: compiler warnings for using STRLEN() value
Problem:    Compiler warnings for using STRLEN() value.
Solution:   Cast to int. (Christian Brabandt, Mike Williams)
c0af78fa08
2019-11-22 20:10:11 -05:00
Dennis B d5f14b8372 Clear 'cc' in nvim_open_win 'minimal' style #11361 (#11427)
* Clear 'cc' in nvim_open_win 'minimal' style #11361

Add 'colorcolumn' to the list of options that should be cleared when creating
a 'minimal'-style floating window.
2019-11-22 10:55:04 +01:00
Ashkan Kiani 73487f4130 Improve the character_offset code. 2019-11-22 00:31:10 -08:00
Ashkan Kiani 78991ffbf4 Improve performance of util.set_lines + bugfix
Also permit character_offset for col past the end of line (useful in
range formatting).
2019-11-22 00:02:04 -08:00
Ashkan Kiani a3d67dac5f Fix encoding translation in other places. 2019-11-21 16:23:12 -08:00
Ashkan Kiani c055ca00ce Remove comments. 2019-11-21 15:55:45 -08:00
Ashkan Kiani 43d73ee884 Fix position params for encoding. 2019-11-21 15:41:32 -08:00
Ashkan Kiani da07e71b18 Account for character length in jump position. 2019-11-21 15:34:28 -08:00
Ashkan Kiani b4ca07896c lualint 2019-11-21 15:23:43 -08:00
Ashkan Kiani b27965538d Fix hovers staying on bufhidden 2019-11-21 15:20:32 -08:00
Ashkan Kiani bcae04f6c6 Updates
- Use correct implementation of text_edits.
- Send indent options to rangeFormatting and formatting.
- Remove references to vim bindings and filetype from lsp.txt
- Add more examples to docs.
- Add before_init to allow changing initialize_params.
2019-11-21 15:19:06 -08:00
Chuck b5f99a8d73 Fix terminal close error message formatting 2019-11-21 14:56:36 -08:00
Ashkan Kiani 6a51401378 Merge remote-tracking branch 'origin/master' into lsp-followup 2019-11-21 10:04:32 -08:00
Björn Linse cc5487e32f
Merge pull request #11433 from bfredl/lspeol
lsp: transmit "\n" after last line when 'eol' is set
2019-11-21 12:45:52 +01:00
Björn Linse 76e0a8bd93 lsp: transmit "\n" after last line when 'eol' is set
Otherwise some servers like clangd will emit spurious
"no newline at end of file" warnings.
2019-11-21 11:12:57 +01:00
Ashkan Kiani b7170f2d72 Remove resolve_bufnr/lualint 2019-11-20 20:59:52 -08:00
Ashkan Kiani 7bf766ad09 Use the apply_text_edits from util. 2019-11-20 20:59:12 -08:00
Ashkan Kiani 6d9f48ddcf Fix reference in rename. 2019-11-20 20:57:21 -08:00
Ashkan Kiani 6fc409d593 Add full text_edit implementation.
- Implements textDocument/formatting, textDocument/rangeFormatting,
workspace/applyEdit.
TODO:
- still has edge cases around replacement probably. Only tested with
inserts on the same position.
2019-11-20 20:51:44 -08:00
Ashkan Kiani b984f613c1 Extend list_extend to take start/finish. 2019-11-20 17:09:21 -08:00
Ashkan Kiani 9b7f956715 Use err_message in default_callbacks 2019-11-20 16:39:45 -08:00
Ashkan Kiani 4c7ef3754a Satisfy lualint. 2019-11-20 16:37:23 -08:00
Ashkan Kiani 93beae4f31 Fix rename support. 2019-11-20 16:35:11 -08:00