Commit Graph

21433 Commits

Author SHA1 Message Date
bfredl
8bbeab9989
Merge pull request #18442 from dundargoc/uncrustify
refactor: upgrade uncrustify configuration to version 0.75
2022-05-06 10:41:51 +02:00
bfredl
e3edcd06e3
Merge pull request #18438 from famiu/feat/api/nvim_parse_cmd
fix(api): make `nvim_parse_cmd` propagate errors
2022-05-06 10:30:48 +02:00
Dundar Goc
544ef994df refactor: upgrade uncrustify configuration to version 0.75 2022-05-06 00:46:30 +02:00
Dundar Goc
eb0cc2a62e refactor: move macro definiton outside of enums
Uncrustify version 0.75 assumes the macro inside the enum is an enum
element, and thus adds a comma after it. This breaks neovim and makes it
impossible to build it.
2022-05-06 00:45:57 +02:00
Mathias Fußenegger
55187de115
fix(lsp): fix rename capability checks and multi client support (#18441)
Adds filter and id options to filter the client to use for rename.
Similar to the recently added `format` function.

rename will use all matching clients one after another and can handle a
mix of prepareRename/rename support. Also ensures the right
`offset_encoding` is used for the `make_position_params` calls
2022-05-05 23:56:00 +02:00
bfredl
d14d308ce8
Merge pull request #18431 from famiu/feat/api/nvim_get_autocmds/group_name
feat(api): add `group_name` to `nvim_get_autocmds`
2022-05-05 20:17:11 +02:00
Famiu Haque
96289f2416 feat(api): add group_name to nvim_get_autocmds 2022-05-05 23:17:36 +06:00
Famiu Haque
511f06a56e fix(api): make nvim_parse_cmd propagate errors
Makes `nvim_parse_cmd` propagate any errors that occur while parsing to
give the user a better idea of what's wrong with the command.
2022-05-05 23:11:57 +06:00
William Boman
94eb72cc44
fix(lsp): make sure to always reset active codelens refreshes (#18331)
This fixes issues where subsequent calls to vim.lsp.codelens.refresh()
would have no effect due to the buffer not getting cleared from the
active_refresh table.

Examples of how such scenarios would occur are:
  - A textDocument/codeLens result yielded an error.
  - The 'textDocument/codeLens' handler was overriden in such a way that
    it no longer called vim.lsp.codelens.on_codelens().
2022-05-05 18:50:12 +02:00
Justin M. Keyes
b2fb3614b0
Revert "ci(bsd): conditional runs for faster builds" #18437
The change has a syntax error.

This reverts commit 3e3e9c3125.
2022-05-05 09:47:53 -07:00
bfredl
d4f47fe17d
Merge pull request #18416 from dundargoc/refactor/remove-char_u
refactor/remove char u
2022-05-05 18:42:00 +02:00
kylo252
3e3e9c3125
ci(bsd): conditional runs for faster builds #18434
sourcehut undocumented feature for conditionally running tasks.

The current condition is based on git's pathspec, see `man gitglossary(7)`, to
skip commits that only changed files under `.github/*`.

refs
- https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec
- https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3C3cd90a91b7ce113bb3c5f07898c77543%40hacktivista.com%3E
- https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/item/worker/tasks.go#L196-198
2022-05-05 09:35:14 -07:00
bfredl
7fa8109881
Merge pull request #18314 from tk-shirasaka/global-statusline-on-ext_messages
fix: display global statusline correctly with ext_messages
2022-05-05 18:33:52 +02:00
Dundar Goc
9a671e6a24 refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
2022-05-05 18:10:46 +02:00
bfredl
1eecea8449
Merge pull request #18417 from famiu/feat/api/nvim_parse_cmd
refactor(api): make `range` in `nvim_parse_cmd` an array
2022-05-05 17:31:02 +02:00
Famiu Haque
7aedcd8feb refactor(api): make range in nvim_parse_cmd an array
Changes the `range` value in `nvim_parse_cmd` into an array to describe
range information more concisely. Also makes `range` and `count` be
mutually exclusive by making count `-1` when command takes a range
instead of a count. Additionally corrects the behavior of `count` for
built-in commands by making the default count `0`.
2022-05-05 20:35:14 +06:00
zeertzjq
82c7a82c35
vim-patch:8.2.4868: when closing help window autocmds triggered for wrong window (#18420)
Problem:    When closing help window autocmds triggered for the wrong window.
Solution:   Figure out the new current window earlier. (closes vim/vim#10348)
2a2707d033
2022-05-05 07:26:42 +08:00
zeertzjq
beb8f48489
vim-patch:8.2.4867: listing of mapping with K_SPECIAL is wrong (#18419)
Problem:    Listing of mapping with K_SPECIAL is wrong.
Solution:   Adjust escaping of special characters. (closes vim/vim#10351)
ac402f4d64

Avoid overshadowing.
Cherry-pick Test_list_mapping() from Vim patches 8.2.{0148,2994}.
Fix rhs_is_noop.
2022-05-05 07:23:27 +08:00
zeertzjq
6798f1fab0
vim-patch:8.2.4865: :startinsert right after :stopinsert may not work (#18418)
Problem:    :startinsert right after :stopinsert does not work when popup menu
            is still visible.
Solution:   Use ins_compl_active() instead of pum_visible(). (closes vim/vim#10352)
cd5dbad184
2022-05-05 06:58:20 +08:00
shirasaka
b5957c3c32 fix: display global statusline correctly with ext_messages 2022-05-05 06:15:09 +09:00
bfredl
e6c71574a0
Merge pull request #18386 from ii14/version_dict_prerelease
feat: add "prerelease" to version dict
2022-05-04 18:49:05 +02:00
Gregory Anders
f98149d87a
Merge pull request #18413 from dundargoc/refactor/remove-char_u-autocmd
refactor/remove char u autocmd
2022-05-04 10:23:21 -06:00
Dundar Goc
f08477789f refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
2022-05-04 17:49:37 +02:00
bfredl
4f17e7e1c3
Merge pull request #18387 from dundargoc/refactor/remove-char_u
refactor: replace char_u variables and functions with char
2022-05-04 17:34:25 +02:00
Dundar Goc
5576d30e89 refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
2022-05-04 15:25:54 +02:00
Famiu Haque
3ec93ca92c
feat(nvim_parse_cmd): add range, count, reg #18383
Adds range, count and reg to the return values of nvim_parse_cmd. Also makes
line1 and line2 be -1 if the command does not take a range. Also moves
nvim_parse_cmd to vimscript.c because it fits better there.
2022-05-04 05:04:01 -07:00
Christian Clason
95b7851f62
build(deps): bump LuaJIT to HEAD - 91bc6b8ad (#18378) 2022-05-04 08:38:07 +02:00
James McCoy
c051ea83dd
refactor(lua): replace hard-coded gsub with vim.pesc() (#18407) 2022-05-04 08:13:01 +02:00
Gregory Anders
815b65d777
fix(filetype): fixup scd filetype detection (#18403) 2022-05-03 23:03:42 +02:00
bfredl
9005ffbe77
Merge pull request #18398 from vigoux/perf/ts_reuse_list
perf(treesitter): use a reuse list for query cursors
2022-05-03 21:11:10 +02:00
Jonas Strittmatter
8ef03188e6
refactor(runtime): convert dist#ft functions to lua (#18247)
Co-authored-by: Christian Clason <christian.clason@uni-due.de>
2022-05-03 12:29:04 -06:00
bfredl
1924883796
Merge pull request #18397 from vigoux/fix/ts_match_limit
fix(treesitter): bump match limit up
2022-05-03 20:18:15 +02:00
Thomas Vigouroux
a0f17fd4d8
perf(treesitter): use a reuse list for query cursors 2022-05-03 19:51:30 +02:00
Thomas Vigouroux
e453b6391e
fix(treesitter): bump match limit up
This avoids ignoring too many match results, and avoid highlighting
being blank in some files.
2022-05-03 19:46:11 +02:00
bfredl
4df11463b2
Merge pull request #15674 from yatli/ui_event_extmark
API/UI: ui_event_extmark
2022-05-03 16:59:24 +02:00
ii14
70e2c5d10d
feat(lsp): add logging level "OFF" (#18379) 2022-05-03 08:49:23 -06:00
Yatao Li
29a6cda3ff feat(api/ui): win_extmarks 2022-05-03 22:26:02 +08:00
dundargoc
73741e9486
feat(lua): vim.deprecate() #18320
This is primarily intended to act as documentation for the developer so
they know exactly when and what to remove. This will help prevent the
situation of deprecated code lingering for far too long as developers
don't have to worry if a function is safe to remove.
2022-05-03 06:42:41 -07:00
Justin M. Keyes
4fb48c5654
feat(server): set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009
PROBLEM
------------------------------------------------------------------------
$NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the
current process should listen on this address") and a descriptor ("the
current process is a child of this address").

This contradiction means the presence of NVIM_LISTEN_ADDRESS is
ambiguous, so child Nvim always tries to listen on its _parent's_
socket. This is the cause of lots of  "Failed to start server" spam in
our test/CI logs:

    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0
    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0

SOLUTION
------------------------------------------------------------------------

1. Set $NVIM to the parent v:servername, *only* in child processes.
   - Now the correct way to detect a "parent" Nvim is to check for $NVIM.
2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes.
3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after
   server init.
4. Open a channel to parent automatically, expose it as v:parent.

Fixes #3118
Fixes #6764
Fixes #9336
Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696
Ref #8696
2022-05-03 06:08:35 -07:00
Jose Alvarez
b5c15ba7e5
fix(lsp): add missing bufnr argument (#18382) 2022-05-03 08:54:49 -04:00
zeertzjq
20aaa59fb3
ci(MinGW): run pacman -Syu twice (#18384) 2022-05-03 20:38:24 +08:00
ii14
b2c92f36e1 feat: add "prerelease" to version dict 2022-05-03 11:33:55 +02:00
bfredl
8ea84eee57
Merge pull request #18345 from dundargoc/refactor/remove-char_u
refactor: replace char_u variables and functions with char
2022-05-03 11:02:04 +02:00
Dundar Goc
b9bdd0f61e refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
2022-05-03 10:33:40 +02:00
Christian Clason
46734cf7c1
vim-patch:8.2.4859: wget2 files are not recognized (#18385)
Problem:    wget2 files are not recognized.
Solution:   Add patterns to recognize wget2. (Doug Kearns)
3a974a8933
2022-05-03 10:23:11 +02:00
zeertzjq
13520aae16
fix(coverity): use xstrndup() instead of vim_strsave() (#18363) 2022-05-03 09:29:55 +08:00
zeertzjq
cf474021ed
Merge pull request #18381 from zeertzjq/vim-8.2.4858
vim-patch:8.2.4858: K_SPECIAL may be escaped twice
2022-05-03 07:30:12 +08:00
zeertzjq
15602a7ce4 test: add more tests for K_SPECIAL escaping in <Cmd> mapping 2022-05-03 06:44:14 +08:00
zeertzjq
27149e0071 vim-patch:8.2.4858: K_SPECIAL may be escaped twice
Problem:    K_SPECIAL may be escaped twice.
Solution:   Avoid double escaping. (closes vim/vim#10340)
db08887f24
2022-05-03 06:21:50 +08:00
bfredl
ddf7bb24f9
Merge pull request #18357 from bfredl/ui_stdin
feat(ui): allow embedder to emulate "cat data | nvim -" behaviour
2022-05-02 23:24:37 +02:00