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
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
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
Gregory Anders
3fd454bd4a
feat: filetype.lua ( #16600 )
...
Adds a new vim.filetype module that provides support for filetype detection in
Lua.
2022-01-04 07:28:29 -07:00
Daniel Steinberg
cc62f3d6cb
test: make test for #14040 more stable ( #16911 )
2022-01-04 07:25:28 -07:00
Björn Linse
e79a588937
Merge pull request #16912 from shadmansaleh/enhance/lua_cmd_inspect
...
feat(lua): make :lua =expr print result of expr
2022-01-04 14:34:42 +01:00
shadmansaleh
d44254641f
feat(lua): make =expr print result of expr
2022-01-04 16:08:07 +06:00
Michael Lingelbach
207307d0fa
fix(lsp): explicitly pass bufnr in didSave handler ( #16906 )
...
Addresses a regression introduced by the stricter type checking
in lua api functions from https://github.com/neovim/neovim/pull/16745
2022-01-03 21:03:16 -05:00
James McCoy
efe6485aca
Merge pull request #16903 from dundargoc/ci/install-flake-with-apt
...
ci: install flake8 with apt instead of pip
2022-01-03 16:23:20 -05:00
Dundar Göc
ec615abd1f
ci: install flake8 with apt instead of pip
2022-01-03 21:54:23 +01:00
James McCoy
1036ca846e
Merge pull request #16901 from dundargoc/ci/add-codeowners
...
ci: add jamessan as codeowner for ci related files
2022-01-03 14:50:40 -05:00
Shadman
e402103911
chore(build): compile lua only on release builds ( #16859 )
2022-01-03 12:44:30 -07:00
Gregory Anders
e6c1545b19
fix(lsp): resolve nil bufnr ( #16902 )
...
Related: #16889 , #16745
2022-01-03 12:40:09 -07:00
Dundar Göc
b402cd3315
ci: add jamessan as codeowner for ci related files
...
[skip ci]
2022-01-03 20:27:31 +01:00
Christian Clason
6aeaff1220
vim-patch:8.2.3995: not all sshconfig files are detected as such ( #16899 )
...
Problem: Not all sshconfig files are detected as such.
Solution: Adjust the patterns used for sshconfig detection. (David Auer,
closes vim/vim#9322 )
9acf2d8be9
2022-01-03 19:29:46 +01:00
dundargoc
be255557ce
ci: simplify ci_fold function ( #16874 )
2022-01-03 11:47:11 -05:00
James McCoy
6ed9ddec29
Merge pull request #16895 from dundargoc/ci/fix-shellcheck-warnings
...
ci: fix shellcheck errors introduced in version 0.8.0
2022-01-03 11:40:20 -05:00
dundargoc
297ff97647
fix(lua): stricter type check when calling API function ( #16745 )
...
Solves #13651
Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-01-03 08:00:50 -07:00
Sean Dewar
76435c0cfa
docs(usr_05): fix section numbers ( #16886 )
...
Other refs to 05.3 don't need to be updated as they refer to the simple mappings
section anyway. Seems they weren't updated when the defaults.vim section was
added as 05.3 instead.
2022-01-03 14:52:01 +01:00
Gregory Anders
36662c9612
fix: resolve nil arguments to API functions ( #16889 )
...
As revealed by #16745 , some functions pass a nil value to API functions,
which have been implicitly converted to 0. #16745 breaks this implicit
conversion, so explicitly pass a resolved buffer number to these API
functions.
2022-01-03 06:48:01 -07:00
Dundar Göc
167c10130c
ci: fix shellcheck errors introduced in version 0.8.0
...
Solved following shellcheck warnings:
SC2030
SC2295
SC2015
2022-01-03 12:47:06 +01:00
James McCoy
2f31e7b88b
Merge pull request #16890 from dundargoc/ci/nuke-before-install
...
ci: remove unnecessary before_install script
2022-01-02 20:13:07 -05:00
Dundar Göc
e71fbf2eb0
ci: remove unnecessary before_install script
2022-01-02 23:46:46 +01:00
James McCoy
b0993bdc45
Merge pull request #16853 from jamessan/clint-master-only
...
ci: run lint only on master branch
2022-01-02 14:07:01 -05:00
James McCoy
b823ff9a60
Merge pull request #16883 from dundargoc/ci/remove-watchdog
...
ci: remove watchdog function run_tests_wd
2022-01-02 12:54:42 -05:00
Dundar Göc
64f23c27e2
ci: remove watchdog function run_tests_wd
...
It's only used once for running check-single-includes (which I strongly
suspect it doesn't need anyway), its core logic is incorrect since both the
variables "tempsize" and "prev_temsize" are never defined and parsing ps
is incredibly fragile.
2022-01-02 18:23:28 +01:00
Michael Lingelbach
e42c906597
fix(lsp): always use target bufnr in location handler ( #16876 )
2022-01-02 07:55:16 +01:00
Gregory Anders
838631e29e
fix(diagnostic): improve validation for list arguments ( #16855 )
...
Function arguments that expect a list should explicitly use tbl_islist
rather than just checking for a table. This helps catch some simple
errors where a single table item is passed as an argument, which passes
validation (since it's a table), but causes other errors later on.
2022-01-01 12:58:34 -07:00
Shadman
55c4393e9f
feat(lua): add support for multiple optional types in vim.validate ( #16864 )
2022-01-01 12:35:15 -07:00
dundargoc
f86039de1e
ci: remove outdated travis-specific code ( #16869 )
2022-01-01 12:42:26 -05:00
Christian Clason
302beaa36b
build(deps): bump tree-sitter to v0.20.2 ( #16863 )
2022-01-01 17:59:00 +01:00
James McCoy
603db555a4
Merge pull request #16870 from dundargoc/refactor/pvs/V009
...
refactor(PVS/V009): add special comment at top of file required by PVS
2022-01-01 11:55:27 -05:00
James McCoy
e5f7b61136
Merge pull request #16840 from zeertzjq/ci-clang-13
...
ci: bump clang version to 13 in asan and tsan
2022-01-01 11:43:38 -05:00
Björn Linse
273b5c9282
Merge pull request #16871 from bfredl/luaperf
...
perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap
2022-01-01 17:21:26 +01:00
Björn Linse
9f489f591d
perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap
2022-01-01 16:41:16 +01:00
Dundar Göc
68b23b08a0
refactor(PVS/V009): add special comment at top of file required by PVS
...
More info: https://pvs-studio.com/en/docs/warnings/v009/
2022-01-01 16:23:22 +01:00
zeertzjq
a5eadbaf3c
test: make some tests more stable ( #16860 )
2022-01-01 07:28:52 -07:00