Commit Graph

21586 Commits

Author SHA1 Message Date
zeertzjq
18fbdaeeab
fix(termopen): avoid ambiguity in URI when CWD is root dir (#16988) 2022-05-19 06:47:33 +08:00
bfredl
6f0baa0bb7
Merge pull request #18620 from bfredl/multibar
fix(ui): make winbar work with floats and multigrid
2022-05-18 21:18:34 +02:00
Lewis Russell
3eea66d65a
feat(lsp): option to reuse_win for jump actions (#18577) 2022-05-18 21:03:24 +02:00
bfredl
503d8b0892 refactor(events): remove unnecessary fudging of updating_screen
This was not necessary after the introduction of `resize_events`,
after which ui resizes are not `fast_events` anymore.
2022-05-18 20:16:19 +02:00
bfredl
17758fe7ad fix(ui): make winbar work with floats and multigrid 2022-05-18 20:16:18 +02:00
bfredl
c28192e6f9 refactor: move more grid functions to grid.c. Clean up some variables 2022-05-18 20:16:18 +02:00
Gregory Anders
03a8269e3a
Merge pull request #18507 from gpanders/au-lsp-attached 2022-05-18 11:59:03 -06:00
bfredl
b840b5b6a9
Merge pull request #18624 from famiu/feat/ui/winbar
fix(ui): set correct position on mouse click when 'winbar' is enabled
2022-05-18 19:55:01 +02:00
Gregory Anders
ed93186ee2 feat(lsp): add filter to vim.lsp.get_active_clients()
Allow get_active_clients() to filter on client name, id, or buffer. This
(soft) deprecates lsp.buf_get_clients().
2022-05-18 11:21:00 -06:00
Gregory Anders
2ffafc7aa9 feat(lsp): add LspAttach and LspDetach autocommands
The current approach of using `on_attach` callbacks for configuring
buffers for LSP is suboptimal:

1. It does not use the standard Nvim interface for driving and hooking
   into events (i.e. autocommands)
2. There is no way for "third parties" (e.g. plugins) to hook into the
   event. This means that *all* buffer configuration must go into the
   user-supplied on_attach callback. This also makes it impossible for
   these configurations to be modular, since it all must happen in the
   same place.
3. There is currently no way to do something when a client detaches from
   a buffer (there is no `on_detach` callback).

The solution is to use the traditional method of event handling in Nvim:
autocommands. When a LSP client is attached to a buffer, fire a
`LspAttach`. Likewise, when a client detaches from a buffer fire a
`LspDetach` event.

This enables plugins to easily add LSP-specific configuration to buffers
as well as enabling users to make their own configurations more modular
(e.g. by creating multiple LspAttach autocommands that each do
something unique).
2022-05-18 11:21:00 -06:00
Gregory Anders
8a9ab88945
feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)
Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API
objects) to autocommand callbacks.
2022-05-18 09:51:26 -06:00
Famiu Haque
288819c9cc fix(ui): set correct position on mouse click when 'winbar' is enabled 2022-05-18 21:15:34 +06:00
bfredl
d7dd600716
Merge pull request #18562 from famiu/feat/ui/winbar
feat(ui): add `'winbar'`
2022-05-18 13:08:07 +02:00
bfredl
028329850e refactor: grid->rows and grid->cols 2022-05-18 13:06:02 +02:00
Christian Clason
2d27732029
build(deps): bump libuv to HEAD - 730e07e2f (#18606) 2022-05-18 11:22:46 +02:00
zeertzjq
93d24a63b2
test: fix mksession terminal CWD test again (#18615) 2022-05-18 16:07:16 +08:00
zeertzjq
6e414b698c
test: unskip tests on Windows (#18600)
Remove the command('qall!') from mksession_spec.lua because it prevents
helpers.rmdir() from retrying.

Allow extra trailing spaces when matching terminal lines.
2022-05-18 12:57:04 +08:00
Famiu Haque
e1bdb2a258 feat(ui): add 'winbar'
Adds support for a bar at the top of each window, enabled through the
`'winbar'` option.

Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
2022-05-18 09:27:08 +06:00
Justin M. Keyes
b70856009d
Merge #18605 PVS fixes 2022-05-18 02:32:15 +02:00
zeertzjq
7ded303d68
vim-patch:8.2.4975: recursive command line loop may cause a crash (#18614)
Problem:    Recursive command line loop may cause a crash.
Solution:   Limit recursion of getcmdline().
51f0bfb88a

Cherry-pick e_command_too_recursive from patch 8.2.3957.
2022-05-18 08:21:24 +08:00
Dundar Goc
10868dbf89 fix(PVS/V1044): suppress warning 2022-05-17 22:26:25 +02:00
Dundar Goc
5084b6fb92 fix(PVS/V568): correct placement of ignore directive 2022-05-17 22:26:25 +02:00
Dundar Goc
65f585ce9b fix(PVS/V547): "expression is always false"
Suppress warning in loop.c, the expression can be true if EXITFREE isn't
defined.
2022-05-17 22:26:25 +02:00
Dundar Goc
e75ccc3b3a fix(PVS/V1028): prevent potential overflow 2022-05-17 22:26:25 +02:00
Noval Maulana
38cbca3eea
fix(health): handle non-existent log file #18610
Problem:
    vim.lsp: require("vim.lsp.health").check()
    ========================================================================
      - ERROR: Failed to run healthcheck for "vim.lsp" plugin. Exception:
        function health#check, line 20
        Vim(eval):E5108: Error executing lua ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: attempt to index a nil value
        stack traceback:
        ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: in function 'check'
        [string "luaeval()"]:1: in main chunk

Solution:
Check for nil.

fix #18602
2022-05-17 11:11:14 -07:00
Jonas Strittmatter
7ffa9073a3
refactor(runtime): convert more dist#ft functions to lua (#18430) 2022-05-17 19:48:45 +02:00
bfredl
8a39032fdd
Merge pull request #18554 from kevinhwang91/perf-timerstart
perf(_editor): no need to stop inside vim.defer_fn
2022-05-17 18:59:48 +02:00
zeertzjq
f49699737c
fix(terminal): do not trim whitespace that is actually in the terminal (#16423) 2022-05-17 21:09:28 +08:00
zeertzjq
bbfc4567df
fix(health): correct shada file path #18603 2022-05-17 05:43:35 -07:00
dundargoc
b239db3cb5
feat(lintcommit): remove "chore", add "dist" #18594
"chore" is never necessary, choose "fix" or "feat" if nothing else applies.
2022-05-17 05:42:48 -07:00
Famiu Haque
54b5222fbb
docs(api): update v:errmsg behavior #18593 2022-05-17 05:27:33 -07:00
zeertzjq
6613f58ceb
Merge pull request #18598 from zeertzjq/vim-8.2.4968
vim-patch:8.2.{4121,4968,4969}: invalid memory access
2022-05-17 08:47:45 +08:00
zeertzjq
527e861cbb vim-patch:8.2.4969: changing text in Visual mode may cause invalid memory access
Problem:    Changing text in Visual mode may cause invalid memory access.
Solution:   Check the Visual position after making a change.
7ce5b2b590
2022-05-17 08:16:37 +08:00
zeertzjq
26c906f54d vim-patch:8.2.4968: reading past end of the line when C-indenting
Problem:    Reading past end of the line when C-indenting.
Solution:   Check for NUL.
60ae0e7149
2022-05-17 08:16:31 +08:00
zeertzjq
b8c0eeaa30 vim-patch:8.2.4121: Visual test fails on MS-Windows
Problem:    Visual test fails on MS-Windows.
Solution:   Set 'isprint' so that the character used is not printable.
262898ae43
2022-05-17 08:16:31 +08:00
Gregory Anders
07ade91f21
docs: vim.regex is case sensitive by default (#18595) 2022-05-16 13:30:00 -06:00
bfredl
b9b5577d6d
Merge pull request #18578 from dundargoc/refactor/remove-char_u
refactor: remove char_u
2022-05-16 14:24:29 +02:00
Joshua Cao
14d653b421
feat(man.vim): list command flags in "gO" outline #17558 2022-05-16 04:49:44 -07:00
Dundar Goc
f0148de790 refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
2022-05-16 13:27:06 +02:00
Justin M. Keyes
7adecbcd29
fix(version.c): mark N/A vim patches #18587
vim-patch:8.0.1119: quitting a split terminal window kills the job
N/A, or tracked in https://github.com/neovim/neovim/issues/5431

vim-patch:8.0.1307: compiler warning for ignoring return value
N/A

vim-patch:8.0.1335: writefile() using fsync() may give an error
N/A

vim-patch:8.0.1339: no test for what 8.0.1335 fixes
already merged in 5972ff0056

vim-patch:8.0.1367: terminal test hangs, executing abcde
N/A

vim-patch:8.0.1562: the terminal debugger can't set breakpoint with mouse
we have all :Termdebug changes

vim-patch:8.0.1609: shell commands in the GUI use a dumb terminal
tracked in https://github.com/neovim/neovim/issues/5431

vim-patch:8.0.1616: Win32: shell commands in the GUI open a new console (guioptions="!")
tracked in https://github.com/neovim/neovim/issues/1496

vim-patch:8.0.1706: cannot sent CTRL-\ to a terminal window
already possible via :call chansend()
2022-05-16 03:23:36 -07:00
zeertzjq
cd998f8804
ci(coverity): correct cron job time #18590
The comment says it should be run at 00:10 UTC, and in cron job format
minutes come before hours.
2022-05-16 03:21:55 -07:00
ii14
e501e4ed4b
feat(lua): add traceback to vim.deprecate #18575 2022-05-15 18:07:36 -07:00
Marco Hinz
b2799518c7
feat(terminfo): bump built-in terminfo entries (#18570)
Removes NOLINT, which is pointless for the generated terminfo_defs.h.

Adds `uncrustify:off`, so it is not uncrustify which complains about the same
things (too long lines, no space after comma) instead.
2022-05-16 01:45:34 +02:00
dundargoc
f8af81445b
ci: remove mingw job #18580
Unnecessary CI builds increase the change of spurious failures, which are costly
noise. Of course, we should fix all legitimate bugs, but we also cannot
micro-manage every platform, so there needs to be a clear motivation for the CI
builds that we maintain.

Reasons against maintaining a mingw CI job:
1. The windows mingw build is slow.
2. Failures:
    - https://github.com/neovim/neovim/issues/18494
    - https://github.com/neovim/neovim/issues/18495
3. The mingw artifact is 10x bigger than the windows MSVC artifact:
   https://github.com/neovim/neovim/issues/10560
4. Our releases publish the MSVC (not mingw) artifact for Windows users:
   https://github.com/neovim/neovim/releases
5. Non-MSVCRT has limitations documented by libuv: http://docs.libuv.org/en/v1.x/process.html
   > On Windows file descriptors greater than 2 are available to the child process only if the child processes uses the MSVCRT runtime.

Closes https://github.com/neovim/neovim/issues/18551
2022-05-15 15:59:58 -07:00
Marco Hinz
59ba66d1ab
ci(clint): remove checks for whitespace after comma/semicolon (#18584)
uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
See also https://github.com/neovim/neovim/pull/18563
2022-05-16 00:14:31 +02:00
Oliver Marriott
5e3b16836a
docs(api): nvim_set_hl attributes #18558 2022-05-15 14:06:06 -07:00
deforde
0a3d615b1c
fix(api): nvim_eval_statusline should validate input #18347
Fix #18112

Make an exception for strings starting with "%!".
2022-05-15 13:06:23 -07:00
dundargoc
19da1071dc
ci(clint): remove clint.py line length check #18574
uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
See also https://github.com/neovim/neovim/pull/18563
2022-05-15 12:01:29 -07:00
bfredl
717560d221
Merge pull request #18581 from famiu/refactor/ui/vertsplit
refactor(ui)!: link `VertSplit` to `Normal` by default
2022-05-15 20:01:17 +02:00
Famiu Haque
bbf58e6bbc refactor(ui)!: link VertSplit to Normal by default
Avoids using `gui=reverse` on `VertSplit` and makes window separators
look much nicer by default.
2022-05-15 22:37:35 +06:00