Commit Graph

16662 Commits

Author SHA1 Message Date
James McCoy
86eba08a4b
build: Rename TRAVIS_CI_BUILD variable to CI_BUILD 2020-11-13 13:36:56 -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
Jan Edmund Lazo
5d6ecfa3c7
vim-patch:8.1.0805: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 1.
135059724f
2020-11-12 21:22:06 -05:00
Jan Edmund Lazo
93c18867a0
vim-patch:8.1.0810: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 4.
264b74fa54
2020-11-12 18:12:05 -05:00
Jan Edmund Lazo
f494516ccd
vim-patch:8.1.0809: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 3.
a12a161b8c
2020-11-12 02:11:23 -05:00
Jan Edmund Lazo
e2504d2192
vim-patch:8.1.0806: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 2.
fc3abf47fb
2020-11-12 01:12:58 -05:00
Jan Edmund Lazo
54495c9816
vim-patch:8.1.0811: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, the final chapter.
30276f2beb
2020-11-12 00:40:07 -05:00
Jan Edmund Lazo
4ae31c46f7
Merge pull request #13273 from janlazo/vim-8.2.1972
vim-patch:8.2.{1972,1973,1974}
2020-11-11 23:08:44 -05:00
Jan Edmund Lazo
6d58f1eace
vim-patch:8.2.1973: finding a patch number can be a bit slow
Problem:    Finding a patch number can be a bit slow.
Solution:   Use binary search. (closes vim/vim#7279)
232f4612e2
2020-11-11 14:36:00 -05:00
Jan Edmund Lazo
3013d0edfc
vim-patch:8.2.1972: crash when recreating nested fold
Problem:    Crash when recreating nested fold.
Solution:   Check for empty growarray. (closes vim/vim#7278)
5e1f22ff61

N/A patches for version.c:

vim-patch:8.2.1974: Vim9: test for has('gui_running') fails with VIMDLL

Problem:    Vim9: test for has('gui_running') fails with VIMDLL.
Solution:   Adjust the #ifdef. (Ken Takata, closes vim/vim#7276)
29b281ba8d
2020-11-11 14:17:03 -05:00
Björn Linse
4875db2e56
Merge pull request #11996 from georg3tom/remove_restricted
Removed restricted mode - Fix #11972
2020-11-11 19:39:08 +01:00
georg3tom
7777532ceb Removed restricted mode - Fix #11972 2020-11-11 18:07:58 +01:00
Matthieu Coudron
0a95549d66
options.lua: add short descriptions (#6288)
add one-liner option descriptions in src/nvim/options.lua
They are taken from optwin.vim and should be easier to use in a
programmatic manner, for instance in a "palette", like in telescope
`:Telescope vim_options`.
2020-11-11 00:06:10 +01:00
James McCoy
a4fea2884d
Merge pull request #13266 from jamessan/pvs-check 2020-11-10 12:59:05 -05:00
James McCoy
31366c44c4
Add PVS comment to new source files 2020-11-10 11:19:59 -05:00
James McCoy
088161a945
pvs: Exclude xdiff from analysis and comment munging 2020-11-10 10:00:25 -05:00
James McCoy
65993c444a
Use the free PVS-Studio license
As of release 7.10, PVS Studio requires a license, even for the "check
me" comment based analyzing.
2020-11-10 09:42:28 -05:00
James McCoy
bb7ed42089
Merge pull request #13263 from jamessan/tree-sitter-detect
Align naming of FindTreeSitter cmake file and variables
2020-11-09 23:02:08 -05: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
Matthieu Coudron
e786fb5afb
Merge pull request #13244 from tk-shirasaka/fix/multigrid-click-foldcolumn
ui: Fix click on foldcolumn when ext_multigrid is enabled
2020-11-10 00:54:54 +01:00
James McCoy
1451b14873
Align naming of FindTreeSitter cmake file and variables
`find_package(Foo ...)` expects to find a file FindFoo.cmake and the
resulting variables to be named `Foo_...`.  If those don't all match up,
then the detection does not work properly.

Closes #13262
2020-11-09 15:15:03 -05:00
Shirasaka
5e7626a5c6 Fix alignment issue 2020-11-10 00:36:26 +09: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
Rom Grk
11326761c7 test: update BufModifiedSet to be paranoid 2020-11-09 04:06:53 -05:00
Rom Grk
743f7c8f72 fix: address issues for BufModifiedSet 2020-11-09 04:05:25 -05:00
shirasaka
19bb177512 Add test case for fold on multigrid 2020-11-09 15:05:23 +09:00
Jan Edmund Lazo
4e6f00dd29
gcc/analyzer: fix false positives for NULL (#13248)
Close https://github.com/neovim/neovim/issues/13158
2020-11-08 22:48:17 -05:00
Jan Edmund Lazo
94062831b3
Merge pull request #13255 from janlazo/pvs-547-560
pvs: fix v547, v560 errors
2020-11-08 20:34:01 -05:00
Jan Edmund Lazo
55fb5324ef
pvs/v547: comment out code for 'adjustment == 1'
That code never runs.
Comment it out in case that it is required for debugging marktree.c.

Use 'const' to mark constant variables.
2020-11-08 18:09:28 -05:00
Jan Edmund Lazo
212d4bce48
pvs/v560: decoration item is always truthy 2020-11-08 17:51:12 -05:00
Jan Edmund Lazo
09c46b6c40
pvs/v547: remove useless ternary for string size 2020-11-08 17:48:03 -05:00
Shirasaka
368403a9e6 ui: Fix click on foldcolumn when ext_multigrid is enabled 2020-11-09 02:12:39 +09:00
Thomas Vigouroux
5caaacaafe
Merge pull request #13253 from theHamsta/fix-baselang-order
tree-sitter: Put base languages first in queries
2020-11-08 16:46:25 +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
Rom Grk
45d9f4fe6f test: fix BufModifiedSet 2020-11-07 22:17:18 -05:00
Rom Grk
3628d1ef72 tests: add functional test for BufModifiedSet 2020-11-07 19:18:00 -05:00
Rom Grk
56f842e873 fix: finish renaming to BufModifiedSet 2020-11-07 19:17:43 -05:00
Rom Grk
c3a82fbae5 fix: rename to BufModifiedSet 2020-11-07 19:09:51 -05:00
Rom Grk
24db59ca8f feat: implement BufModified autocmd 2020-11-07 19:02:52 -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
643f4a1787
Merge pull request #13241 from bfredl/decoration
decoration: split out "decoration" from "extmark" module
2020-11-07 15:34:32 +01: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
Björn Linse
8497d4b3ea decoration: split out "decoration" from "extmark" module
Decorations will only grow more complex. move the to a separate
file, so that extmark.c remains about extmarks.
2020-11-07 09:55:17 +01:00
Rom Grk
d7f639d4e8 fix: lint doc-comments 2020-11-07 03:47:52 -05:00
Rom Grk
cedfc1b747 my fight with the linter (tome II) 2020-11-06 23:44:32 -05:00