Commit Graph

20157 Commits

Author SHA1 Message Date
Gregory Anders
8a27205d09 fix(diagnostic): only set default handler config if unset 2022-01-11 16:44:07 -07:00
Gregory Anders
984270c09f fix(diagnostic): allow setting arbitrary config values 2022-01-11 16:43:47 -07:00
Gregory Anders
fc8af96888 fix(diagnostic): resolve nil opts tables
In functions which allow opts to be optional, ensure that the value
actually resolves to a non-nil value.
2022-01-11 16:39:15 -07:00
Christian Clason
70fe3ce004
vim-patch:8.2.4064: foam files are not detected (#17041)
* vim-patch:8.2.4064: foam files are not detected

Problem:    Foam files are not detected.
Solution:   Detect the foam filetype by the path and file contents. (Mohammed
            Elwardi Fadeli, closes vim/vim#9501)
2284f6cca3

* Port foam ft detection to filetype.lua

Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-01-11 21:02:58 +01:00
Mathias Fußenegger
074b033e7e
refactor(lsp): debounce timer per buf and unify with non-debounce (#17016)
Part of the `pending_change` closure in the `changetracking.prepare` was
a bit confusing because it has access to `bufnr` and `uri` but it could
actually contain pending changes batched for multiple buffers.

(We accounted for that by grouping `pending_changes` by a `uri`, but
it's not obvious what's going on)

This commit changes the approach to do everything per buffer to avoid
any ambiguity.

It also brings the debounce/no-debounce a bit closer together: The
only difference is now whether a timer is used or if it is triggered
immediately
2022-01-11 18:10:29 +01:00
Thomas Vigouroux
43b95b5430
Merge pull request #16962 from f380cedric/vim-8.2.3409
vim-patch:8.2.3409
2022-01-11 14:14:27 +00:00
Christian Clason
e866da12ee
vim-patch:2f0936cb9a2e (#17007)
* vim-patch:2f0936cb9a2e

Update runtime files
2f0936cb9a
2022-01-11 14:14:17 +01:00
Thomas Vigouroux
25eb7692d8
Merge pull request #16961 from f380cedric/vim-8.2.3582
vim-patch:8.2.3582
2022-01-11 06:50:13 +00:00
zeertzjq
c7aa64631d feat(completion): support selecting item via API from Lua mapping 2022-01-11 13:59:39 +08:00
Will Eccles
7165e7770d
fix(man.vim): fix search function on some systems (#13709)
Fixes man.vim's searching on some systems (namely mandoc) where
previously it would not respect the value of b:man_default_sects. It now
properly parses man pages on these systems.
2022-01-10 09:36:46 -07:00
Mathias Fußenegger
3f2fbb824e
fix(lsp): ensure pending changes are flushed on skipped debounce (#17015)
Follow up to https://github.com/neovim/neovim/pull/16881

Document changes could get sent out of order to the server:

    1. on_lines: debounce > 0; add to pending changes; setup timer
    2. on_lines: debounce = 0; send new changes immediately
    3. timer triggers, sending changes from 1.
2022-01-10 17:33:36 +01:00
bfredl
69f1f906a0
Merge pull request #17025 from zeertzjq/compl-k-lua
fix(completion): prevent K_LUA from closing pum
2022-01-10 15:50:37 +01:00
zeertzjq
42e5fd32b0 fix(completion): prevent K_LUA from closing pum 2022-01-10 21:30:32 +08:00
Thomas Vigouroux
2818de8b76
Merge pull request #17006 from vigoux/tree-sitter-alloc
feat(treesitter): set allocator when possible
2022-01-10 10:52:23 +00:00
James McCoy
8f27c4a041
Merge pull request #17013 from dundargoc/ci/continue-on-error
ci: add a continue-on-error to the add-reviewer jobs
2022-01-09 15:24:43 -05:00
bfredl
4b84544d86
Merge pull request #16849 from dundargoc/refactor/pvs/v1048
refactor(PVS/V1048): prevent "variable was assigned the same value" warning
2022-01-09 20:30:47 +01:00
Dundar Göc
f29a4ec553 ci: add a continue-on-error to the add-reviewer jobs
This is to circumvent a limitation in GitHub Actions that requires
special organization access in order to add any reviewers.
2022-01-09 19:57:25 +01:00
Gregory Anders
6ecaba510f
test: use old style test for testing filetype.lua (#17003)
This is a much better solution than #16942 as it doesn't require copying
every new change from test_filetype.vim into filetype_spec.lua (which is
much more maintainable).
2022-01-09 09:11:09 -07:00
Lewis Russell
a34652ee84
fix(api): validate user_command name (#17004)
The name argument of nvim_add_user_command must begin with an uppercase
character. Check that is does.
2022-01-09 08:54:03 -07:00
James McCoy
8d5288889a
Merge pull request #16965 from dundargoc/ci/add-reviewer-based-on-label
ci: add reviewer based on label
2022-01-09 08:57:13 -05:00
Dundar Göc
fd71162428 ci: add reviewer based on label
Also remove CODEOWNERS since this is a superior solution.
2022-01-09 11:30:05 +01:00
Thomas Vigouroux
b1e0aa60f9
feat(treesitter): set allocator when possible
Adds a new cmake check to keep this backwards compatible with the
different versions of tree-sitter.
2022-01-09 10:17:46 +00:00
James McCoy
c7ffe406bc
Merge pull request #16983 from dundargoc/test/add-vimruntime-variable
test: add VIMRUNTIME variable to the clear function
2022-01-08 19:31:37 -05:00
James McCoy
2e5bafa04c
Merge pull request #17000 from dundargoc/ci/use-continue-on-error
ci: use continue-on-error instead of "|| true"
2022-01-08 16:10:47 -05:00
Dundar Göc
adf213e05e refactor(PVS/V1048): ignore "assigned the same value" warning 2022-01-08 21:11:43 +01:00
James McCoy
6c4b9c914b
Merge pull request #16979 from dundargoc/ci/add-tsan-clang-sanitizer
ci: set CLANG_SANITIZER variable to TSAN when running the tsan job
2022-01-08 15:01:27 -05:00
Michael Lingelbach
e41e8b3fda
fix(lsp): only send valid params in executeCommand (#16987) 2022-01-08 10:15:41 -08:00
Michael Lingelbach
11142f6ffe feat(extmarks): add strict option
The strict option, when set to false, allows placing extmarks on
invalid row and column values greater than the maximum buffer row
or line column respectively.

This allows for nvim_buf_set_extmark
to be a drop-in replacement for nvim_buf_set_highlight.
2022-01-08 08:47:20 -08:00
bfredl
9386fca597
Merge pull request #16848 from dundargoc/refactor/prevent-overflow-by-casting
refactor: avoid overflow by explicitly casting operand to a wider type
2022-01-08 16:47:23 +01:00
zeertzjq
e70ea6ea20
test: remove redundant feed_command('terminal') (#16993)
It just types :terminal<CR> into the terminal, which is redundant.
2022-01-08 08:29:32 -07:00
Dundar Göc
559aa4179c ci: use continue-on-error instead of "|| true"
The intention is clearer and doesn't rely on shell-isms.
2022-01-08 15:31:14 +01:00
Dundar Göc
14ec38bcf9 test: add VIMRUNTIME variable to the clear function
Some of the tests will fail if this isn't explicitly set.
2022-01-08 14:40:29 +01:00
bfredl
3088ac71f9
Merge pull request #16991 from bk2204/ex-mode
Make mode() return correct value in ex mode
2022-01-08 13:13:43 +01:00
Michael Lingelbach
b65a23a13a
fix(lsp): resolve bufnr for get_lines (#16986)
Closes https://github.com/neovim/neovim/issues/16985

* get_lines checks if buf_loaded using bufnr 0, which is
  typically used as a sentinel value, but here must be resolved
  to the true bufnr
2022-01-08 11:30:59 +01:00
brian m. carlson
600e7e3b32
fix: make mode() return correct value in ex mode
When the user is in ex mode, a call to mode(1) is documented to return
"cv".  However, it does not currently do so, because the check which
checks for ex mode is nested inside a conditional which is never reached
in ex mode.  Vim uses an explicit check for exmode_active, so let's do
the same thing here.  Add some tests for this case both with a TTY and
in silent mode.
2022-01-08 03:11:50 +00:00
Gregory Anders
e92b816336
fix(filetype): match negative priority patterns after extensions (#16980)
Negative priority patterns are those that act as catch-alls when all
other attempts at matching have failed (typically the patterns that use
the StarSetf functions).
2022-01-07 19:17:07 -07:00
zeertzjq
20122a3590
vim-patch:8.2.4033: running filetype tests leaves directory behind (#16984)
Problem:    Running filetype tests leaves directory behind.
Solution:   Delete the top directory. (closes vim/vim#9483)
a4c96252b1
2022-01-07 19:15:27 -07:00
Dundar Göc
c2b9dea4ba ci: set CLANG_SANITIZER variable to TSAN when running the tsan job 2022-01-07 20:20:02 +01:00
James McCoy
b4fbb9dcf2
Merge pull request #16970 from dundargoc/ci/serialize-labeler-workflow 2022-01-07 10:33:19 -05:00
Dundar Göc
df06c36932 ci: run type-scope job after the triage job
This should prevent the scenario of one job accidentally removing a
relevant label from the other.
2022-01-07 13:32:14 +01:00
Mathias Fußenegger
b680392687
feat(lsp): skip or reduce debounce after idle (#16881)
The idea of the debounce is to avoid overloading a server with didChange
notifications. So far this used a constant value to group changes within
an interval together and send a single notification. A side effect of
this is that when you were idle, notifications are still delayed.

This commit changes the logic to take the time the last notification
happened into consideration, if it has been greater than the debounce
interval, the debouncing is skipped or at least reduced.
2022-01-07 11:56:09 +01:00
Christian Clason
bba679c431
vim-patch:8.2.4014: git and gitcommit file types not properly recognized (#16953)
Problem:    Git and gitcommit file types not properly recognized.
Solution:   Adjust filetype detection. (Tim Pope, closes vim/vim#9477)
c689f8c3d9
2022-01-07 10:27:34 +01:00
zeertzjq
aa5adef969 vim-patch:8.2.4007: session does not restore help buffer properly
Problem:    Session does not restore help buffer properly when "options' is
            missing from 'sessionoptions'.
Solution:   Use a ":help" command to create the help window. (closes vim/vim#9475,
            closes vim/vim#9458, closes vim/vim#9472)
8e7d9db32b
2022-01-07 13:39:52 +08:00
zeertzjq
e58071c92c
vim-patch:8.2.0951: search stat test has leftover from debugging (#16967)
Problem:    Search stat test has leftover from debugging.
Solution:   Remove line that writes a file. (Christian Brabandt, closes vim/vim#6224)
6ba24d8763
2022-01-06 18:51:06 -07:00
Frederick Zhang
b435755452
fix(runtime): check markdownError before syn-clear (#16930)
Avoids `E28: No such highlight group name: markdownError` when using a
foreign markdown syntax.
2022-01-06 11:51:47 -07:00
Shadman
287d3566de
fix(lua): print multiple return values with =expr (#16933) 2022-01-06 11:42:31 -07:00
Gregory Anders
d78e46679d
feat(lua): add notify_once() (#16956)
Like vim.notify(), but only displays the notification once.
2022-01-06 11:10:56 -07:00
f380cedric
c6dddc3464 vim-patch:8.2.3582: reading uninitialized memory when giving spell suggestions
Problem:    Reading uninitialized memory when giving spell suggestions.
Solution:   Check that preword is not empty.
15d9890eee
2022-01-06 18:47:31 +01:00
Björn Linse
2f779e3361
Merge pull request #16591 from shadmansaleh/feat/lua_keymaps2
feat(lua): add support for lua keymaps
2022-01-06 18:35:31 +01:00
Björn Linse
bb7ef83dd3
Merge pull request #16817 from lewis6991/master
vim-patch:8.2.3921: the way xdiff is used is inefficient
2022-01-06 18:26:29 +01:00