Commit Graph

20137 Commits

Author SHA1 Message Date
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
Stephan Seitz
9c26939f75 perf(treesitter): cache query parsing 2022-01-06 13:20:22 +01:00
f380cedric
d63284e5a6 vim-patch:8.2.3409: reading beyond end of line with invalid utf-8 character
Problem:    Reading beyond end of line with invalid utf-8 character.
Solution:   Check for NUL when advancing.
65b6056659

Dropped the non-test part, since it is only non-utf8 related.
2022-01-06 13:16:04 +01:00
Gregory Anders
09d270bcea
Merge pull request #16942 from gpanders/test-filetype-lua 2022-01-05 13:21:18 -07:00
Michael Lingelbach
ef214e9753
chore: remove lspconfig checkhealth from issue template (#16948) 2022-01-05 12:13:16 -08:00
Gregory Anders
6c86079fa0 fix(filetype): normalize slashes in file paths 2022-01-05 12:26:43 -07:00
Gregory Anders
f1590717ac test(filetype): port test_filetype to Lua
Because filetype.lua is gated behind an opt-in variable, it's not tested
during the "standard" test_filetype.vim test. So port the test into
filetype_spec where we enable the opt-in variable.

This means runtime Vim patches will need to update test_filetype in two
places. This can eventually be removed if/when filetype.lua is made
opt-out rather than opt-in.
2022-01-05 10:41:25 -07:00
Gregory Anders
f40ce34563
fix(filetype): match on <afile> rather than <abuf> (#16943)
Filetype detection runs on BufRead and BufNewFile autocommands, both of
which can fire without an underlying buffer, so it's incorrect to use
<abuf> to determine the file path. Instead, match on <afile> and assume
that the buffer we're operating on is the current buffer. This is the
same assumption that filetype.vim makes, so it should be safe.
2022-01-05 09:50:54 -07:00
Michael Lingelbach
55a59e56ed
feat(lsp): enable default debounce of 150 ms (#16908) 2022-01-05 08:36:35 -08:00
zeertzjq
30547c0d2b vim-patch:8.2.3999: redundant check for NUL byte
Problem:    Redundant check for NUL byte.
Solution:   Remove the check for a NUL byte. (closes vim/vim#9471)
c024ed9233
2022-01-05 22:11:28 +08:00
zeertzjq
bfe11dc8d0 vim-patch:8.2.3414: fullcommand() gives wrong name with buffer-local user command
Problem:    fullcommand() gives the wrong name if there is a buffer-local user
            command. (Naohiro Ono)
Solution:   Use a separate function to get the user command name.
            (closes vim/vim#8840)
80c88eac5a
2022-01-05 22:11:28 +08:00
zeertzjq
6e1a59da6c vim-patch:8.2.2887: crash when passing null string to fullcommand()
Problem:    Crash when passing null string to fullcommand().
Solution:   Check for NULL pointer. (closes vim/vim#8256)
4c8e8c6e19
2022-01-05 22:11:28 +08:00
Axel Dahlberg
f65b0d4236
feat(autocmd): populate v:event in RecordingLeave (#16828) 2022-01-04 18:55:29 -07:00
KillTheMule
a45b578dbe
feat(filetype.lua): add support for txt files (#16926) 2022-01-04 16:06:57 -07:00
Gregory Anders
74a90cf098
chore: ignore unused args in filetype functions (#16927)
Also mark the 'getline' helper function as private to avoid docgen.
2022-01-04 15:24:14 -07:00
Gregory Anders
bb5e03fa4b
test: fix absolute paths in filetype_spec (#16920) 2022-01-04 15:21:36 -07:00
Gregory Anders
60d3bb745d
fix(filetype): set default ft_ignore_pat in filetype.lua (#16917)
This default value is also set in filetype.vim, but if filetype.vim is
disabled the variable is never defined, which causes errors in some of
the dist#ft detection functions.
2022-01-04 15:02:01 -07:00
Robin Gagnon
8ade8009ee
feat(filetype.lua): Add typescript extension to filetype detection (#16923)
port from `filetype.vim`; also add `getline` convenience function
2022-01-04 22:34:55 +01:00
Gregory Anders
39238435db
fix(api): force redefinition of user commands by default (#16918) 2022-01-04 11:51:45 -07:00
dundargoc
0b0c4f7dfa
chore: fix typos (#16816)
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sebastian Volland <seb@baunz.net>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-04 11:07:40 -07:00
Sam McCall
d6f0c9539c
fix(lsp): suppress ContentModified errors from UI (#16904)
Fixes https://github.com/neovim/neovim/issues/16900

If clients receive a ContentModified error, it generally should not
show it in the UI for the end-user. Clients can resend the request if
they know how to do so.

https://microsoft.github.io/language-server-protocol/specifications/specification-current/#implementationConsiderations
2022-01-04 09:28:13 -08:00