Commit Graph

4992 Commits

Author SHA1 Message Date
Jlll1
9d2a6cd11e
docs(treesitter): change links for eq? and set! to codeblocks (#21047) 2022-11-15 10:23:56 +01:00
zeertzjq
2685d27cd6
vim-patch:9.0.0883: a silent mapping may cause dots on the command line (#21061)
Problem:    A silent mapping may cause dots on the command line.
Solution:   Don't show dots for completion if they are not going to be removed
            again. (closes vim/vim#11501)

698a00f55d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-15 07:23:57 +08:00
Max
e15f61b1bd fix(lua): make vim.deepcopy work with vim.NIL
style: changed double quotes to single quotes

feat: add tests

fix tests
2022-11-14 21:14:27 +01:00
zeertzjq
849394e4e2
vim-patch:9.0.0863: col() and charcol() only work for the current window (#21038)
Problem:    col() and charcol() only work for the current window.
Solution:   Add an optional winid argument. (Yegappan Lakshmanan,
            closes vim/vim#11466, closes vim/vim#11461)

4c8d2f02b3

Cherry-pick test_functions.vim change from patch 8.2.0633.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-13 08:29:05 +08:00
zeertzjq
7abe8ef422
vim-patch:9.0.0862: default value of 'endoffile' is wrong (#21032)
Problem:    Default value of 'endoffile' is wrong.
Solution:   The default must be 'noendoffile'.

0aad88f073

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-12 23:31:17 +08:00
Steven Arcangeli
b3f781ba91
fix: vim.ui.input always calls callback #21006
Followup to #20883
Related: #18144

This patch changes the behavior of the default `vim.ui.input` when the user
aborts with `<C-c>`. Currently, it produces an error message + stack and causes
`on_confirm` to not be called. With this patch, `<C-c>` will cause `on_confirm`
to be called with `nil`, the same behavior as when the user aborts with `<Esc>`.
I can think of three good reasons why the behavior should be this way:

1. Easier for the user to understand** It's not intuitive for there to be two
   ways to abort an input dialog that have _different_ outcomes. As a user,
   I would expect any action that cancels the input to leave me in the same
   state. As a plugin author, I see no value in having two possible outcomes for
   aborting the input. I have to handle both cases, but I can't think of
   a situation where I would want to treat one differently than the other.

2. Provides an API that can be overridden by other implementations** The current
   contract of "throw an error upon `<C-c>`" cannot be replicated by async
   implementations of `vim.ui.input`. If the callsite wants to handle the case
   of the user hitting `<C-c>` they need to use `pcall(vim.ui.input, ...)`,
   however an async implementation will instantly return and so there will be no
   way for it to produce the same error-throwing behavior when the user inputs
   `<C-c>`. This makes it impossible to be fully API-compatible with the
   built-in `vim.ui.input`.

3. Provides a useful guarantee to the callsite** As a plugin author, I want the
   guarantee that `on_confirm` will _always_ be called (only catastrophic errors
   should prevent this). If I am in the middle of some async thread of logic,
   I need some way to resume that logic after handing off control to
   `vim.ui.input`. The only way to handle the `<C-c>` case is with `pcall`,
   which as already mentioned, breaks down if you're using an alternative
   implementation.
2022-11-12 06:57:35 -08:00
Lewis Russell
07eb4263ca feat(spell): support nospell in treesitter queries 2022-11-12 10:19:03 +00:00
Justin M. Keyes
4d2373f5f6
feat(checkhealth): use "help" syntax, avoid tabpage #20879
- If Nvim was just started, don't create a new tab.
- Name the buffer "health://".
- Use "help" syntax instead of "markdown". It fits better, and
  eliminates various workarounds.
- Simplfy formatting, avoid visual noise.
- Don't print a "INFO" status, it is noisy.
- Drop the ":" after statuses, they are already UPPERCASE and highlighted.
2022-11-11 18:33:31 -08:00
zeertzjq
eee9560516
vim-patch:9.0.0861: solution for "!!sort" in closed fold is not optimal (#21027)
Problem:    Solution for "!!sort" in closed fold is not optimal.
Solution:   Use a different range instead of the subtle difference in handling
            a range with an offset. (issue vim/vim#11487)

9954dc39ea

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-12 07:43:36 +08:00
Sean Dewar
befae73044
vim-patch:76db9e076318 (#21013)
Update runtime files

76db9e0763

- `col()`'s example was changed to use `:echowin` so that the message can be
  seen with `showmode`. Use "\n" to force a hit-enter instead as `:echowin`
  isn't ported.
- Replace interpolated string usage in syntax/modula3.vim (not ported).
- Add a space after the `wincmd =` examples in `*CTRL-W_=*` so that the inlined
  code is highlighted properly when followed by a full stop.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-10 09:05:25 +00:00
James Trew
61d152779d
docs(treesitter): fix predicate syntax (#21016) 2022-11-10 09:12:28 +01:00
euclidianAce
0faf007a23
fix(man.lua): use env command (#21007)
Previously man.lua would use the `env` field in the parameters of
`vim.loop.spawn` to override things like MANPAGER. This caused issues on
NixOS since `spawn` will _override_ the environment rather than _append_
to it (and NixOS relies on a heavily modified environment). Using the
`env` command to append to the environment solves this issue.
2022-11-09 23:26:02 +00:00
Gregory Anders
ef1d291f29
fix(clipboard): update version regex pattern (#21012)
Building tmux from source uses a 'next-' prefix, so account for that.
Also handle failures to match more gracefully.
2022-11-09 16:21:54 -07:00
Eduard Baturin
a122406be4
docs: swap CursorLineFold and CursorLineSign (#20875) 2022-11-10 06:34:02 +08:00
Jongwook Choi
59ff4691f6
fix(vim.ui.input): return empty string when inputs nothing (#20883)
fix(vim.ui.input): return empty string when inputs nothing

The previous behavior of `vim.ui.input()` when typing <CR> with
no text input (with an intention of having the empty string as input)
was to execute `on_confirm(nil)`, conflicting with its documentation.

Inputting an empty string should now correctly execute `on_confirm('')`.
This should be clearly distinguished from cancelling or aborting the
input UI, in which case `on_confirm(nil)` is executed as before.
2022-11-08 08:15:15 +08:00
Christian Clason
050b0e30b9
vim-patch:9.0.0843: VHS tape files are not recognized (#20995)
Problem:    VHS tape files are not recognized.
Solution:   Add a filetype pattern. (Carlos Alexandro Becker, closes vim/vim#11452)

1756f4b218

Co-authored-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-07 22:28:28 +01:00
bfredl
059dfda0ca
Merge pull request #20991 from famiu/feat/api/nvim_cmd/command-name
feat(api): add command name to Lua command callback opts
2022-11-07 18:00:21 +01:00
Famiu Haque
c022140ec6 feat(api): add command name to Lua command callback opts
Adds a `name` key to the opts dict passed to Lua command callbacks
created using `nvim_create_user_command()`. This is useful for when
multiple commands use the same callback.

Note that this kind of behavior is not as strange as one might think,
even some internal Neovim commands reuse the same internal C function,
differing their behavior by checking the command name. `substitute`,
`smagic` and `snomagic` are examples of that.

This will also be useful for generalized Lua command preview functions
that can preview a wide range of commands, in which case knowing the
command name is necessary for the preview function to actually be able
to execute the command that it's supposed to preview.
2022-11-07 22:27:37 +06:00
Raphael
3435cdfb94
refactor(highlight): rename FloatBorderTitle #20988
requested in https://github.com/neovim/neovim/pull/20184
2022-11-07 04:02:00 -08:00
Lewis Russell
31ffc360f2
docs(news): add linematch (#20927) 2022-11-07 10:22:16 +00:00
zeertzjq
2ed2c04aa5 docs(options): remove mentions of 'imactivatefunc' and 'imstatusfunc' 2022-11-07 14:25:32 +08:00
zeertzjq
42e44d6d33 vim-patch:8.2.3751: cannot assign a lambda to an option that takes a function
Problem:    Cannot assign a lambda to an option that takes a function.
Solution:   Automatically convert the lambda to a string. (Yegappan
            Lakshmanan, closes vim/vim#9286)

6409553b6e

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 14:25:32 +08:00
wzy
b042f6d902
fix(clipboard): prefer xsel #20918
Problem:
xclip is not actively maintained compared to xsel, and it has a bug:

    $ touch a
    $ xsel -ib < a
    $ xsel -ob
    $ xclip -o -selection clipboard
    Error: target STRING not available

Years ago, the situation was reversed.
We originally preferred xsel 46bd3c0f77
but then swapped to xclip 799d9c3215
to work around https://github.com/neovim/neovim/issues/7237#issuecomment-443440633

Solution:
Prefer xsel again.

close #20862
ref #9302
ref https://github.com/astrand/xclip/issues/38
2022-11-06 19:46:58 -08:00
Victor Blanchard
d337814906
feat: ":write ++p" creates parent dirs #20835
- `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if
   they do not exist
    - Note: `:foo ++…` is usually for options. No existing options have
      a single-char abbreviation (presumably by design), so it's safe to
      special-case `++p` here.
- Same for `writefile(…, 'foo/bar/baz.txt', 'p')`
- `BufWriteCmd` can see the ++p flag via `v:cmdarg`.

closes #19884
2022-11-06 19:31:50 -08:00
erw7
10fbda508c
fix(tutor): failing to get buf name #20933
Error detected while processing function tutor#TutorCmd[38]..BufReadPost Autocommands for "*":
    Error executing lua callback: ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:21: Error ex
    ecuting lua: ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:22: Vim(let):E158: Invalid bu
    ffer name: .
    stack traceback:
            [C]: in function 'nvim_cmd'
            ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:22: in function <...llar/neovim/HE
    AD-cc5b736/share/nvim/runtime/filetype.lua:21>
            [C]: in function 'nvim_buf_call'
            ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:21: in function <...llar/neovim/HE
    AD-cc5b736/share/nvim/runtime/filetype.lua:10>
    stack traceback:
            [C]: in function 'nvim_buf_call'
            ...llar/neovim/HEAD-cc5b736/share/nvim/runtime/filetype.lua:21: in function <...llar/neovim/HE
    AD-cc5b736/share/nvim/runtime/filetype.lua:10>


Closes https://github.com/neovim/neovim/issues/20920
2022-11-06 19:18:30 -08:00
Shougo
4fd876271a
vim-patch:9.0.0756 #20680
Problem:    No autocmd event for changing text in a terminal window.
Solution:   Add TextChangedT. (Shougo Matsushita, closes vim/vim#11366)

4ccaedfcd7
2022-11-06 19:02:29 -08:00
zeertzjq
84881674fd vim-patch:9.0.0389: crash when 'tagfunc' closes the window
Problem:    Crash when 'tagfunc' closes the window.
Solution:   Bail out when the window was closed.

ccfde4d028

Add docs for E1299 from Vim runtime.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-07 08:24:48 +08:00
zeertzjq
1e4adf4b56 vim-patch:8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Problem:    Cannot use a lambda for 'completefunc' and 'omnifunc'.
Solution:   Implement lambda support. (Yegappan Lakshmanan, closes vim/vim#9257)
8658c759f0

Comment out Vim9 script in tests.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 08:24:48 +08:00
zeertzjq
1508618d4c vim-patch:8.2.3712: cannot use Vim9 lambda for 'tagfunc'
Problem:    Cannot use Vim9 lambda for 'tagfunc'.
Solution:   Make it work, add more tests. (Yegappan Lakshmanan, closes vim/vim#9250)
05e59e3a9f

Omit Vim9 script in code and comment out in tests.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 08:24:48 +08:00
zeertzjq
900dd2bdab vim-patch:8.2.3665: cannot use a lambda for 'tagfunc'
Problem:    Cannot use a lambda for 'tagfunc'.
Solution:   Use 'tagfunc' like 'opfunc'. (Yegappan Lakshmanan, closes vim/vim#9204)
19916a8c89

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 08:24:48 +08:00
Raphael
1af4bd04f9
feat(ui): add support to display a title in the border of a float (#20184)
add "title" and "title_pos" keys to win config dict.
2022-11-06 11:59:43 +01:00
zeertzjq
850d7146fc
fix(paste): feed keys as typed in cmdline mode (#20959) 2022-11-06 12:43:05 +08:00
Gregory Anders
5b8d8a4c99
docs(news): add news blurb for tmux clipboard change (#20950) 2022-11-05 16:48:13 -06:00
zeertzjq
e0ec83a970 vim-patch:8.2.4882: cannot make 'breakindent' use a specific column
Problem:    Cannot make 'breakindent' use a specific column.
Solution:   Add the "column" entry in 'breakindentopt'. (Christian Brabandt,
            closes vim/vim#10362, closes vim/vim#10325)

e7d6dbc572

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-11-05 19:35:56 +08:00
zeertzjq
b92ed35a0b vim-patch:8.2.4093: cached breakindent values not initialized properly
Problem:    Cached breakindent values not initialized properly.
Solution:   Initialize and cache formatlistpat. (Christian Brabandt,
            closes vim/vim#9526, closes vim/vim#9512)
c53b467473

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-11-05 19:35:56 +08:00
zeertzjq
8e868d699a vim-patch:8.2.4679: cannot have expandcmd() give an error message for mistakes
Problem:    Cannot have expandcmd() give an error message for mistakes.
Solution:   Add an optional argument to give errors. Fix memory leak when
            expanding files fails. (Yegappan Lakshmanan, closes vim/vim#10071)
2b74b6805b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-05 18:06:00 +08:00
zeertzjq
781616bee5 vim-patch:8.2.2606: strchars() defaults to counting composing characters
Problem:    strchars() defaults to counting composing characters.
Solution:   Add strcharlen() which ignores composing characters.

70ce8a1561

Use docs from latest Vim instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:06:00 +08:00
zeertzjq
b84666d2a0 vim-patch:8.2.4978: no error if engine selection atom is not at the start
Problem:    No error if engine selection atom is not at the start.
Solution:   Give an error. (Christian Brabandt, closes vim/vim#10439)

360da40b47

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-11-05 16:09:22 +08:00
zeertzjq
48405df046 vim-patch:8.2.3919: Vim9: wrong argument for append() results in two errors
Problem:    Vim9: wrong argument for append() results in two errors.
Solution:   Check did_emsg.  Also for setline().  Adjust the help for
            appendbufline().

8b6256f6ec

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 14:44:26 +08:00
zeertzjq
02f80d9a8a vim-patch:8.2.1631: test_fails() does not check the context of the line number
Problem:    test_fails() does not check the context of the line number.
Solution:   Use another argument to specify the context of the line number.

9bd5d879c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:45:43 +08:00
zeertzjq
0d8293364f vim-patch:8.2.1479: Vim9: error for list index uses wrong line number
Problem:    Vim9: error for list index uses wrong line number.
Solution:   Set source line number. (closes vim/vim#6724)  Add a way to assert the
            line number of the error with assert_fails().

1d634542cf

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:41:20 +08:00
zeertzjq
8b0c5de4e0 vim-patch:partial:8.2.1183: assert_fails() checks the last error message
Problem:    assert_fails() checks the last error message.
Solution:   Check the first error, it is more relevant.  Fix all the tests
            that rely on the old behavior.

9b7bf9e98f

Skip test_listener.vim, test_textprop.vim, test_viminfo.vim.
Skip test_python2.vim: affected line fails and hasn't been ported.
Skip test_python3.vim: affected lines fail and haven't been ported.
Skip CHECK_LIST_MATERIALIZE.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:27:45 +08:00
Gregory Anders
81722896e4
feat(clipboard): copy to system clipboard in tmux when supported (#20936)
Since version 3.2 tmux has had the ability to read/write buffer contents
from/to the system clipboard, if the underlying terminal emulator
supports it. Enable this feature when we can detect that tmux supports
it.
2022-11-04 20:43:11 -06:00
zeertzjq
e30929cda5 vim-patch:8.2.0644: insufficient testing for invalid function arguments
Problem:    Insufficient testing for invalid function arguments.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5988)

99fa721944

Omit test_listener.vim: changed again in patch 8.2.1183.
Omit test_textprop.vim: changed again in patch 8.2.1183.
Cherry-pick quickfix feature checks from patch 8.1.2373.
Omit Test_saveas() change: duplicate and removed in patch 8.2.0866.
2022-11-05 09:25:31 +08:00
zeertzjq
24fa5f70ed
vim-patch:8.2.0448: various functions not properly tested (#20926)
Problem:    Various functions not properly tested.
Solution:   Add more tests, especially for failures. (Yegappan Lakshmanan,
            closes vim/vim#5843)

0e05de4622

Cherry-pick test changes from patch 8.2.0427 and skip Test_has().
Cherry-pick Test_complete_wildmenu() change from patch 8.2.4339.
2022-11-04 18:17:26 +08:00
Jonathon
04fbb1de44
Enable new diff option linematch (#14537)
Co-authored-by: Lewis Russell <me@lewisr.dev>
2022-11-04 09:07:22 +00:00
Kevin Hwang
cc5b7368d6
fix(man.lua): set modifiable before writing page (#20914) 2022-11-03 09:13:29 +08:00
dundargoc
4716a578ae docs: fix typos 2022-11-02 21:45:26 +08:00
zeertzjq
41f308feab
vim-patch:9.0.0826: if 'endofline' is set CTRL-Z may be written in a wrong place (#20903)
Problem:    If 'endofline' is set the CTRL-Z may be written in the wrong
            place.
Solution:   Write CTRL-Z at the end of the file.  Update the help to explain
            the possibilities better. (Ken Takata, closes vim/vim#11486)

3af982196b

Co-authored-by: K.Takata <kentkt@csc.jp>
2022-11-02 08:02:52 +08:00
Christian Clason
582c044dbe
build(deps): bump lua parser to v0.0.14 (#20897) 2022-11-01 13:38:47 +01:00
zeertzjq
c46d46e9f1
vim-patch:8.2.2343: Vim9: return type of readfile() is any (#20896)
Problem:    Vim9: return type of readfile() is any.
Solution:   Add readblob() so that readfile() can be expected to always
            return a list of strings. (closes vim/vim#7671)

c423ad77ed

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-01 20:21:48 +08:00
Justin M. Keyes
cc7c378bf3 feat(checkhealth): check runtime ($VIMRUNTIME)
Move man/health.lua into the "runtime" check.

fix #20696
2022-10-30 16:23:58 +01:00
Justin M. Keyes
3213bc36c5 refactor(checkhealth): convert "nvim" check to Lua 2022-10-30 15:50:59 +01:00
Justin M. Keyes
c7a88a470f feat(checkhealth): improve treesitter report 2022-10-30 15:50:59 +01:00
lvimuser
e0dff29adc
fix(lsp/window_showDocument): correctly handle external resources #20867
- since cmd is a list, it runs directly ('no shell') and we shouldn't
  escape.
- typo: shellerror -> shell_error
2022-10-30 02:35:22 -07:00
zeertzjq
feabc1c98c vim-patch:9.0.0816: CTRL-Z at end of file is always dropped
Problem:    CTRL-Z at end of file is always dropped.
Solution:   Add the 'endoffile' option, like the 'endofline' option.
            (closes vim/vim#11408, closes vim/vim#11397)

Cherry-pick test_fixeol.vim changes from patch 8.2.1432.
Cherry-pick 'endoffile' changes from latest Vim runtime update.

fb0cf2357e

vim-patch:f0b567e32a46

Revert unintended Makefile change

f0b567e32a

vim-patch:72c8e3c070b3

Fix wrong struct access for member.

72c8e3c070

vim-patch:3f68a4136eb9

Add missing entry for the 'endoffile' option.

3f68a4136e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-30 08:07:50 +08:00
Barrett Ruth
2817411b7d
fix(health): correct tmux rgb verification (#20868)
Current RGB verification parses `tmux server-info`. Despite it being a tmux default alias to `tmux show-messages -JT`, it may be unavailable. Use `tmux show-messages -JT` directly instead.
2022-10-30 07:37:47 +08:00
Christian Clason
6884f017b5
vim-patch:partial:6ebe4f970b8b (#20860)
Update runtime files

6ebe4f970b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-29 17:41:22 +02:00
Martin Kunz
356244d50b
fix(docs): nil as viable argument for goto_prev (#20852)
Added `nil` as a possible option to `vim.diagnostics.goto_prev` in the
docs
2022-10-28 17:13:27 -06:00
zeertzjq
3c0ad25854 vim-patch:8.2.1716: options window has duplicate translations
Problem:    Options window has duplicate translations.
Solution:   Make one entry for "global or local to buffer".  Fix wrong text.
            (closes vim/vim#6983)

b5cfff0b34

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-28 23:26:41 +08:00
zeertzjq
fc6afdcf53 vim-patch:8.2.1663: options window entries cannot be translated
Problem:    Options window entries cannot be translated.
Solution:   Use AddOption() for all explanations. (closes vim/vim#6800)

14944c04bd

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-28 23:26:41 +08:00
zeertzjq
4dcc6409a8 vim-patch:8.2.1652: cannot translate lines in the options window
Problem:    Cannot translate lines in the options window.
Solution:   Use the AddOption() function to split descriptions where indicated
            by a line break. (issue vim/vim#6800)

a953b5cf4f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-28 22:57:44 +08:00
zeertzjq
08b1055c09 vim-patch:8.2.1642: otions test fails
Problem:    Otions test fails.
Solution:   Correct call to OptionG().

4507f6ada5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-28 22:48:59 +08:00
zeertzjq
a7912b190d vim-patch:8.2.1639: options window cannot be translated
Problem:    Options window cannot be translated.
Solution:   Get the translation for "local to" texts once and use them in many
            places. Fix that 'whichwrap' is not a local option. (issue vim/vim#6800)

64075b0ab1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-28 22:48:12 +08:00
zeertzjq
bbbcd5393d vim-patch:8.2.1585: messages in globals.h not translated
Problem:    Messages in globals.h not translated, xgettext on MS-Windows not
            fully supported.
Solution:   Add globals.h to list of input files.  Update MS-Windows makefiles
            to improve message translations. (Ken Takata, closes vim/vim#6858)

fa57335e53

Also update gettext() docs to match latest Vim.
2022-10-28 08:04:57 +08:00
zeertzjq
5568267ccb vim-patch:8.2.1544: cannot translate messages in a Vim script
Problem:    Cannot translate messages in a Vim script.
Solution:   Add gettext().  Try it out for a few messages in the options
            window.

0b39c3fd4c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-28 08:03:31 +08:00
Christian Clason
f44ad75380
docs(api): pattern is not expanded for autocommands (#20812)
Problem: Unlike `:autocmd`, `nvim_create_autocommand()` does not expand
environment variables in the `pattern`, which is unexpected.

Solution: Add a note to the documentation explaining this and suggesting
using `expand()` explicitly.
2022-10-27 22:31:58 +02:00
Christian Clason
dab07be4d1
build(deps): bump vimdoc parser to v1.2.5 (#20829) 2022-10-27 09:16:16 +02:00
Raffaele Mancuso
c86371258c
docs(usr_05): update sentence about Nvim default behavior of Q (#20817)
While the user guide correctly describes the mapping in Vim, the default
behaviour in NeoVim seems to be the one described here.
2022-10-27 07:43:50 +08:00
NAKAI Tsuyoshi
4573cfa3ad
fix(lua): pesc, tbl_islist result types #20751
Problem:
- pesc() returns multiple results, it should return a single result.
- tbl_islist() returns non-boolean in some branches.
- Docstring: @generic must be declared first

Solution:
Constrain docstring annotations.
Fix return types.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-24 05:53:53 -07:00
Christian Clason
29fe3348ba
build(deps): bump vimdoc parser and queries to v1.2.4 (#20788) 2022-10-24 09:35:00 +02:00
ii14
7718241286
docs: ":che" is ":checkhealth" #20147 2022-10-23 04:04:23 -07:00
dundargoc
1887d8d7d0
docs: fix typos (#20724)
Co-authored-by: Marco Lehmann <m99@posteo.de>
2022-10-23 09:45:39 +08:00
Christian Clason
8371907203
vim-patch:9.0.0814: aws config files are not recognized (#20769)
vim-patch:436e5d395fd6 (since upstream tagged the wrong commit)

Problem:    Aws config files are not recognized.
Solution:   Use "confini" for aws config files. (Justin M. Keyes,
            closes vim/vim#11416)
436e5d395f
2022-10-21 16:36:43 +02:00
dundargoc
a11e96edfc docs(dev-style): remove rules covered by uncrustify
There's no reason for contributors to learn rules that can be automated
away.
2022-10-21 16:23:33 +02:00
Christian Clason
e554f5c545
fix(filetype): don't pass empty string to detect (#20766)
Problem: `*.db` files use empty string as default filetype, which is
inconsistent with the rest of the code which uses `nil` instead.
Solution: don't pass a default empty string
2022-10-21 14:04:53 +02:00
Christian Clason
45ae5c6dc5
vim-patch:9.0.0808: jsonnet filetype detection has a typo (#20753)
Problem:    jsonnet filetype detection has a typo.
Solution:   Change "libjsonnet" to "libsonnet". (Maxime Brunet, closes vim/vim#11412)
6c8bc37a10
2022-10-20 22:49:22 +02:00
Justin M. Keyes
e6917306f6
docs: update vimdoc parser #20747
Remove the user-manual ToC from help.txt, because:
1. it duplicates usr_toc.txt
2. it is not what most readers are looking for in the main help page.

fix https://github.com/neovim/tree-sitter-vimdoc/issues/49
fix https://github.com/neovim/tree-sitter-vimdoc/issues/50
fix https://github.com/neovim/tree-sitter-vimdoc/issues/51
2022-10-20 06:20:02 -07:00
zeertzjq
3b0777cfa5
docs(news): mention 'splitkeep' #20744 2022-10-20 03:04:32 -07:00
ObserverOfTime
fad558b6af
vim-patch:9.0.0798: clang format configuration files are not recognized (#20741)
Problem:    Clang format configuration files are not recognized.
Solution:   Use yaml for Clang format configuration files. (Marwin Glaser,
            closes vim/vim#11398)
3c708c4390
2022-10-19 11:08:01 -06:00
Christian Clason
228a04070e
vim-patch:9.0.0779: lsl and lm3 file extensions are not recognized (#20704)
Problem:    lsl and lm3 file extensions are not recognized.
Solution:   Add *.lsl and *.lm3 patterns. (Doug Kearns, closes vim/vim#11384)
4ac8e7948c
2022-10-18 20:05:50 +02:00
Christian Clason
aa2f08a050
fix(highlight): link more treesitter groups by default (#20711)
Problem: Captures used by bundled parsers are not highlighted by default
Solution: Add links to default groups

A link is added for a capture if
* there is a default group of the same name (e.g., `@tag` -> `Tag`)
* it's used in a bundled query and doesn't have a reasonable fallback
  (e.g., `@text.literal`)

Also add all linked groups to the treesitter docs.
2022-10-18 18:46:09 +02:00
Justin M. Keyes
ef4c339fb9
feat(docs): update parser, HTML gen #20720
Note: although the tolerance in help_spec.lua increased, the actual
error count with the new parser decreased by about 20%. The difference
is that the old ignore_parse_error() ignored many more errors with the
old parser.

fix https://github.com/neovim/tree-sitter-vimdoc/issues/37
fix https://github.com/neovim/tree-sitter-vimdoc/issues/44
fix https://github.com/neovim/tree-sitter-vimdoc/issues/47
2022-10-18 07:18:44 -07:00
Christian Clason
e427313545
vim-patch:9.0.0782: OpenVPN files are not recognized (#20702)
Problem:    OpenVPN files are not recognized.
Solution:   Add patterns for OpenVPN files. (closes vim/vim#11391)
4bf67ec52e
2022-10-17 18:36:10 +02:00
C.D. MacEachern
b9632e58e3
fix(runtime): use g:terminal_color_{0-15} in colorschemes (#20637) 2022-10-17 15:24:37 +01:00
zeertzjq
637ab296cb
feat(api): nvim_select_popupmenu_item support cmdline pum (#20652) 2022-10-17 21:00:50 +08:00
Mahmoud Al-Qudsi
39911d76be
fix(man): handle absolute paths as :Man targets (#20624)
* fix(man): handle absolute paths as :Man targets

Previously, attempting to provide `:Man` with an absolute path as the name would
cause neovim to return the following error:

```
Error detected while processing command line:
/usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil)
Press ENTER or type command to continue
```

..because it would try to validate the existence of a man page for the provided
name by executing `man -w /some/path` which (on at least some Linux machines
[0]) returns `/some/path` instead of the path to the nroff files that would be
formatted to satisfy the man(1) lookup.

While man pages are not normally named after absolute paths, users shouldn't be
blamed for trying. Given such a name/path, neovim would **not** complain that
the path didn't have a corresponding man file but would error out when trying
to call the tag function for the null-propagated name-and-section `nil(nil)`.
(The same underlying error existed before this function was ported to lua, but
did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()`
would fail and error out.)

With this patch, we detect the case where `man -w ...` returns the same value as
the provided name to not only prevent invoking the tag function for a
non-existent/malformed name+sect but also to properly report the non-existence
of a man page for the provided lookup (the absolute path).

While man(1) can be used to directly read an nroff-formatted document via `man
/path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so
no functionality is lost in case the provided path _was_ an nroff file.

[0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu
18.04 installation.

* test: add regression test for #20624

Add a functional test to `man_spec.lua` to check for a regression for #20624 by
first obtaining an absolute path to a random file and materializing it to disk,
then attempting to query `:Man` for an entry by that same name/path.

The test passes if nvim correctly reports that there is no man page
correspending to the provided name/path and fails if any other error (or no
error) is shown.
2022-10-17 10:37:44 +01:00
Christian Clason
042eb74ff1
feat(runtime)!: remove filetype.vim (#20428)
Made obsolete by now graduated `filetype.lua` (enabled by default).

Note that changes or additions to the filetype detection still need to
be made through a PR to vim/vim as we port the _logic_ as well as tests.
2022-10-17 08:52:40 +02:00
Christian Clason
9701c9dc9f
vim-patch:3c053a1a5ad2 (#20679)
Update runtime files
3c053a1a5a
2022-10-17 08:19:48 +02:00
Jonas Strittmatter
d44f088834
vim-patch:9.0.0771: cannot always tell the difference beween tex and … (#20687)
vim-patch:9.0.0771: cannot always tell the difference beween tex and rexx files

Problem:    Cannot always tell the difference beween tex and rexx files.
Solution:   Recognize tex by a leading backslash. (Martin Tournoij,
            closes vim/vim#11380)
bd053f894b
2022-10-17 08:18:57 +02:00
dundargoc
8617101b6b
docs: "supported platforms" matrix #19615
Inspired by libuv's own SUPPORTED_PLATFORMS.md:
https://github.com/libuv/libuv/blob/v1.x/

https://neovim.io/doc/user/support.html
2022-10-16 15:31:51 -07:00
David Hotham
8f31a730c0
fix(lsp): reporting bogus capabilities in CodeActionKind #20678
Problem:
LSP client provides bogus capabilities in CodeActionKind.
LSP logs show this in the "initialize" message:
    codeActionKind = { valueSet = { "Empty", "QuickFix",
    "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite",
    "Source", "SourceOrganizeImports", "", "quickfix", "refactor",
    "refactor.extract", "refactor.inline", "refactor.rewrite", "source",
    "source.organizeImports" }

Solution:
Only the values from the CodeActionKind table should be presented, not also the
keys.

fix #20657
2022-10-16 15:24:39 -07:00
zeertzjq
19eb7054ff vim-patch:9.0.0761: cannot use 'indentexpr' for Lisp indenting
Problem:    Cannot use 'indentexpr' for Lisp indenting.
Solution:   Add the 'lispoptions' option.
49846fb1a3

vim-patch:9.0.0762: build failure

Problem:    Build failure.
Solution:   Add missing change.
4b082c4bd0
2022-10-16 08:34:55 +08:00
zeertzjq
433818351b
Merge pull request #20663 from zeertzjq/vim-9.0.0753
vim-patch:partial:{3e79c97c18c5,9da17d7c5707,9.0.0753}
2022-10-15 19:07:30 +08:00
kylo252
9cb2a69039
docs(dev-style): remove rule about variable declarations (#20446)
The other style rules such as "initialize variables in the declaration" should already take care of this rule automatically.
2022-10-15 11:55:55 +02:00
zeertzjq
09b0f7cd08 vim-patch:partial:9.0.0753: some Ex commands are not in the help index
Problem:    Some Ex commands are not in the help index.
Solution:   Add the missing commands.  Add a script to check all Ex commands
            are in the help index. (Yee Cheng Chin, closes vim/vim#11371)
b77bdce120

Only port index.txt docs for :star and :horizontal.
2022-10-15 17:44:56 +08:00
zeertzjq
6f5426edf6 vim-patch:partial:9da17d7c5707
Update runtime files
9da17d7c57

Only port index.txt, syntax.txt and uganda.txt.
2022-10-15 17:42:45 +08:00
zeertzjq
3e5e12482c vim-patch:partial:3e79c97c18c5
Update runtime files; use compiled functions
3e79c97c18

Only port uganda.txt.
2022-10-15 17:39:32 +08:00
Christian Clason
e26b48bde6
vim-patch:9.0.0752: Rprofile files are not recognized (#20658)
Problem:    Rprofile files are not recognized.
Solution:   Recognize Rprofile files as "r". (closes vim/vim#11369)
7e120ffccb
2022-10-15 10:12:25 +02:00
Justin M. Keyes
e5cb3104d0
docs: fix/remove invalid URLs #20647 2022-10-14 08:01:13 -07:00
Daniel Zhang
81986a7349
fix(lua): on_yank error with blockwise multibyte region #20162
Prevent out of range error when calling `str_byteindex`.
Use `vim.str_byteindex(bufline, #bufline)` to cacluate utf length of `bufline`.
fix #20161
2022-10-14 02:12:46 -07:00
Lewis Russell
9931db2e3f
Merge pull request #20545 from lewis6991/remove_cscope 2022-10-14 09:53:15 +01:00
Justin M. Keyes
d339b4aad7
build(deps): bump vimdoc (help) parser to v1.2.1 #20642 2022-10-13 18:36:25 -07:00
Lewis Russell
288208257c feat(cscope)!: remove 2022-10-13 16:37:23 +01:00
dundargoc
eb123b565e
docs: fix typos (#20509)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-10-13 21:18:48 +08:00
Enan Ajmain
730228f6db
feat(windows): show icon in terminal titlebar, taskbar #20607
closes #20071
2022-10-13 05:48:12 -07:00
zeertzjq
06dfedc87a
vim-patch:9.0.0738: cannot suppress completion "scanning" messages (#20633)
Problem:    Cannot suppress completion "scanning" messages.
Solution:   Add the "C" flag in 'shortmess'. (Bjorn Linse, closes vim/vim#11354)
91ccbad5de
2022-10-13 20:46:23 +08:00
zeertzjq
34c7007c32
vim-patch:9.0.0727: help in the repository differs from patched version too much (#20627)
Problem:    Help in the repository differs from patched version too much.
Solution:   Make a patch for a few help files.
7c6cd44375
2022-10-13 07:49:48 +08:00
Christian Clason
4f305fba14
vim-patch:9.0.0731: clang-tidy configuration files are not recognized (#20620)
Problem:    clang-tidy configuration files are not recognized.
Solution:   Recognize clang-tidy files as yaml. (closes vim/vim#11350)
af40f9af33
2022-10-12 15:23:42 +02:00
Christian Clason
45cc5fd765
fix(runtime): properly rely on t_Co for colorschemes (#20602)
Problem: check for available colors failed
Solution: simply trust t_Co, which is always available
2022-10-11 23:35:35 +02:00
Lewis Russell
b126b11840 fix(man): support MacOS 13
MacOS 13 has changed its version of `man` to an version that doesn't
properly support `man -w` (without arguments). In order to workaround
this we simply fallback to $MANPATH.

Fixes #20579
2022-10-11 15:38:15 +01:00
Lewis Russell
cba05c541d
refactor(man): pass env directly to spawn() (#20591) 2022-10-11 13:25:42 +01:00
Christian Clason
8781213f00
vim-patch:9.0.0711: SubStation Alpha files are not recognized (#20577)
Problem:    SubStation Alpha files are not recognized.
Solution:   Add patterns for SubStation Alpha files. (closes vim/vim#11332)
084f2620ec
2022-10-10 17:51:31 +02:00
Lewis Russell
4ccc57fd7a feat(man): add health check
Fixes #20432
2022-10-10 15:58:44 +01:00
Justin M. Keyes
a7a83bc4c2 fix(docs-html): update parser
- Improve generated HTML by updating parser which includes fixes for
  single "'" and single "|":
  https://github.com/neovim/tree-sitter-vimdoc/pull/31
- Updated parser also fixes the conceal issue for "help" highlight
  queries https://github.com/neovim/tree-sitter-vimdoc/issues/23 by
  NOT including whitespace in nodes.
  - But this means we need to restore the getws() function which scrapes
    leading whitespace from the original input (buffer).
2022-10-10 01:05:18 +02:00
Justin M. Keyes
09dffb9db7
docs: various #12823
- increase python line-length limit from 88 => 100.
- gen_help_html: fix bug in "tag" case (tbl_count => tbl_contains)

ref #15632
fix #18215
fix #18479
fix #20527
fix #20532

Co-authored-by: Ben Weedon <ben@weedon.email>
2022-10-09 05:21:52 -07:00
Folke Lemaitre
8c2226fc30
fix(lua): properly configure luacheck and remove local vim = ... lines (#20551) 2022-10-09 12:40:56 +02:00
Christian Clason
93117b3587
docs(news): add news.txt and link from README (#20426) 2022-10-08 17:49:09 +02:00
ObserverOfTime
b05e10ef72
vim-patch:9.0.0692: PoE filter files are not recognized (#20542)
Problem:    PoE filter files are not recognized.
Solution:   Add a pattern to detect PoE filter files. (closes vim/vim#11305)
b7f52f5659
2022-10-08 17:46:31 +02:00
lvimuser
0773a9ee3a
feat(lsp): support window/showDocument (#19977) 2022-10-08 10:22:25 +02:00
Folke Lemaitre
1da7b4eb69 feat: added support for specifying types for lua2dox 2022-10-06 15:42:21 +01:00
Folke Lemaitre
24a1c7f556 feat: added support for optional params to lua2dox 2022-10-06 15:38:28 +01:00
Folke Lemaitre
c8d1b9a2d6 docs: added proper annotations to functions in shared.lua 2022-10-06 15:38:27 +01:00
Justin M. Keyes
f7b175e049
fix(docs-html): keycodes, taglinks, column_heading #20498
Problem:
- Docs HTML: "foo ~" headings (column_heading) are not aligned with
  their table columns/contents because the leading whitespace is not
  emitted.
- taglinks starting with hyphen like |-x| were not recognized.
- keycodes like `<foo>` and `CTRL-x` were not recognized.
- ToC is not scrollable.

Solution:
- Add ws() to the column_heading case.
- Update help parser to latest version
  - supports `keycode`
  - fixes for taglink, argument
- Update .toc CSS. https://github.com/neovim/neovim.github.io/issues/297

fix https://github.com/neovim/neovim.github.io/issues/297
2022-10-06 06:16:00 -07:00
dundargoc
2c08ab5369
docs: fix incorrect :help tag (#20511)
vim.lsp.format() doesn't exist, which causes functionaltest to fail.
Change to vim.lsp.buf.format().
2022-10-06 19:00:13 +08:00
Steve Thorne
de47b4b901
docs(lsp): add formatting APIs to deprecated.txt (#20487)
Add vim.lsp.buf.formatting() to deprecated.txt.
Add vim.lsp.buf.range_formatting() to deprecated.txt.
2022-10-06 10:07:04 +02:00
luukvbaal
5acf52e19b
feat(window/ui): add splitkeep option (#19243)
vim-patch:9.0.0445: when opening/closing window text moves up/down

Problem:    When opening/closing window text moves up/down.
Solution:   Add the 'splitscroll' option.  When off text will keep its
            position as much as possible.
29ab524358

vim-patch:9.0.0455: a few problems with 'splitscroll'

Problem:    A few problems with 'splitscroll'.
Solution:   Fix 'splitscroll' problems. (Luuk van Baal, closes vim/vim#11117)
5ed391708a

vim-patch:9.0.0461: 'scroll' is not always updated

Problem:    'scroll' is not always updated.
Solution:   Call win_init_size() at the right place.
470a14140b

vim-patch:9.0.0465: cursor moves when cmdwin is closed when 'splitscroll' is off

Problem:    Cursor moves when cmdwin is closed when 'splitscroll' is off.
Solution:   Temporarily set 'splitscroll' when jumping back to the original
            window. (closes vim/vim#11128)
e697d48890

vim-patch:9.0.0469: cursor moves if cmdwin is closed when 'splitscroll' is off

Problem:    Cursor moves if cmdwin is closed when 'splitscroll' is off.
Solution:   Skip win_fix_cursor if called when cmdwin is open or closing.
            (Luuk van Baal, closes vim/vim#11134)
3735f11050

vim-patch:9.0.0478: test for 'splitscroll' takes too much time

Problem:    Test for 'splitscroll' takes too much time.
Solution:   Only test some of the combinations. (Luuk van Baal, closes vim/vim#11139)
594f9e09cd

vim-patch:9.0.0486: text scrolled with 'nosplitscroll', autocmd win and help

Problem:    Text scrolled with 'nosplitscroll', autocmd win opened and help
            window closed.
Solution:   Skip win_fix_scroll() in more situations. (Luuk van Baal,
            closes vim/vim#11150)
d5bc762dea

vim-patch:9.0.0505: various problems with 'nosplitscroll'

Problem:    Various problems with 'nosplitscroll'.
Solution:   Fix 'nosplitscroll' problems. (Luuk van Baal, closes vim/vim#11166)
faf1d412f5

vim-patch:9.0.0555: scrolling with 'nosplitscroll' in callback changing curwin

Problem:    Scrolling with 'nosplitscroll' in callback changing curwin.
Solution:   Invalidate w_cline_row in the right place. (Luuk van Baal,
            closes vim/vim#11185)
20e58561ab

vim-patch:9.0.0603: with 'nosplitscroll' folds are not handled correctly

Problem:    With 'nosplitscroll' folds are not handled correctly.
Solution:   Take care of closed folds when moving the cursor. (Luuk van Baal,
            closes vim/vim#11234)
7c1cbb6cd4

vim-patch:9.0.0605: dump file missing

Problem:    Dump file missing.
Solution:   Add the missing dump file. (issue vim/vim#11234)
439a2ba174

vim-patch:9.0.0647: the 'splitscroll' option is not a good name

Problem:    The 'splitscroll' option is not a good name.
Solution:   Rename 'splitscroll' to 'splitkeep' and make it a string option,
            also supporting "topline". (Luuk van Baal, closes vim/vim#11258)
13ece2ae1d

vim-patch:9.0.0667: ml_get error when 'splitkeep' is "screen"

Problem:    ml_get error when 'splitkeep' is "screen". (Marius Gedminas)
Solution:   Check the botline is not too large. (Luuk van Baal,
            closes vim/vim#11293, closes vim/vim#11292)
346823d3e5
2022-10-06 14:57:52 +08:00
bfredl
6ae4a6e071
Merge pull request #20374 from bfredl/notype
screen: refactor old curwin-heavy logic and graduate "msgsep" feature
2022-10-05 21:50:12 +02:00
bfredl
6ae144a921 feat(messages)!: graduate the 'msgsep' feature
The old behaviour (e.g. via `set display-=msgsep`) will not be available.
Assuming that messages always are being drawn on msg_grid
(or not drawn at all, and forwarded to `ext_messages` enabled UI)
will allows some simplifcations and enhancements moving forward.
2022-10-05 20:12:59 +02:00
Elizabeth Paź
548a4e2587 docs(docstrings): fix runtime type annotations 2022-10-05 15:25:03 +02:00
Justin M. Keyes
18afacee1d
feat(docs): format parameters as a list #20485
Problem:
The {foo} parameters listed in `:help api` and similar generated docs,
are intended to be a "list" but they aren't prefixed with a list symbol.
This prevents parsers from understanding the list, which forces
generators like `gen_help_html.lua` to use hard-wrapped/preformatted
layout instead of a soft-wrapped "flow" layout.

Solution:
Modify gen_vimdoc.py to prefix {foo} parameters with a "•" symbol.
2022-10-05 05:15:55 -07:00
Christian Clason
06f4edc864
vim-patch:partial:f269eabc6c4f (#20470)
Update runtime files
f269eabc6c
2022-10-05 10:56:53 +02:00
zeertzjq
ddc363dce9 vim-patch:9.0.0656: cannot specify another character to use instead of '@'
Problem:    Cannot specify another character to use instead of '@' at the end
            of the window.
Solution:   Add "lastline" to 'fillchars'. (Martin Tournoij, closes vim/vim#11264,
            closes vim/vim#10963)
4ba5f1dab6

Use latest code in drawscreen.c instead.
2022-10-05 06:59:05 +08:00
August Masquelier
b075f49d92
feat(lsp): add bufnr option to lsp.start (#20473) 2022-10-04 20:44:19 +02:00
Justin M. Keyes
03bc23de36 feat(gen_help_html.lua): remove old AWK scripts
These files are no longer needed since gen_help_html.lua is working
fairly well.

ref https://github.com/neovim/neovim/pull/11967
2022-10-04 16:49:17 +02:00
Justin M. Keyes
088abbeb6e feat(docs): nested lists in HTML, update :help parser
- Docs HTML: improvements in https://github.com/neovim/tree-sitter-vimdoc
  allow us to many hacks in `gen_help_html.lua`.
- Docs HTML: support nested lists.
- Docs HTML: avoid extra newlines (too much whitespace) in old
  (preformatted) layout.
- Docs HTML: disable golden-grid for narrow viewport.
- Workaround for https://github.com/neovim/neovim/issues/20404

closes https://github.com/neovim/neovim/issues/20404
2022-10-04 16:49:17 +02:00
Enan Ajmain
51d379d40d
docs(shell): mention "&" for piping with powershell #20459
New behaviour since PR #19438
2022-10-03 13:14:18 -07:00
zeertzjq
cb310d2901 vim-patch:9.0.0622: matchaddpos() can get slow when adding many matches
Problem:    matchaddpos() can get slow when adding many matches.
Solution:   Update the next available match ID when manually picking an ID and
            remove check if the available ID can be used. (idea by Rick Howe)
9f573a8df0
2022-10-02 07:28:38 +08:00
zeertzjq
85c7d4f7a9 vim-patch:9.0.0620: matchaddpos() can only add up to 8 matches
Problem:    matchaddpos() can only add up to 8 matches.
Solution:   Allocate the array of positions. (closes vim/vim#11248)
50faf02f43
2022-10-02 07:28:38 +08:00
Justin M. Keyes
01721aaa66
Merge #19438 from 3N4N/fix/pwsh
Reverts #16271
Fixs #15913

Problem:
Since #16271, `make_filter_cmd` uses `Start-Process` cmdlet to execute the user
provided shell command for `:%!`. `Start-Process` requires the command to be
split into the shell command and its arguments. This was implemented in #19268
by parsing (splitting the user-provided command at the first space) which didn't
handle cases such as --
  - commands with escaped space in their filepath
  - quoted commands with space in their filepath

Solution: Use piping.

The total shell command formats (excluding noise of unimportant parameters):

1. Before #16271
    ```powershell
    pwsh -C "(shell_cmd) < tmp.in | 2>&1 Out-File -Encoding UTF8 <tmp.out>"
    # not how powershell commands work
    ```
2. Since #16271
    ```powershell
    pwsh -C "Start-Process shell_cmd -RedirectStandardInput <tmp.in> -RedirectStandardOutput <tmp.out>"
    # doesn't handle executable path with space in it
    # doesn't write error to <tmp.out>
    ```
3. This PR
    ```powershell
    pwsh -C "& { Get-Content <tmp.in> | & 'path\with space\to\shell_cmd.exe' arg1 arg2 } 2>&1 | Out-File -Encoding UTF8 <tmp.out>"
    # also works with forward slash in the filepath
    # also works with double quotes around shell command
    ```

After this PR, the user can use the following formats:

    :%!c:\Program` Files\Git\usr\bin\sort.exe
    :%!'c:\Program Files\Git\usr\bin\sort.exe'
    :%!"c:\Program Files\Git\usr\bin\sort.exe"
    :%!"c:\Program` Files\Git\usr\bin\sort.exe"

They can even chain different commands:

    :%!"c:\Program` Files\Git\usr\bin\sort.exe" | sort.exe -r

But if they want to call a stringed executable path, they have to provide the
Invoke-Command operator (&). In fact, the first stringed executable path also
needs this & operator, but this PR adds that behind the scene.

    :%!"c:\Program` Files\Git\usr\bin\sort.exe" | sort.exe -r | & 'c:\Program Files\Git\usr\bin\sort.exe'

## What this PR solves

- Having to parse the user-provided bang ex-command (for splitting into shell
  cmd and its args).
- Removes a lot of human-unreadable `#ifdef` blocks.
- Accepting escaped spaces in executable path.
- Accepting quoted string of executable path.
- Redirects error and exception to tmp.out (exception for when `wrong_cmd.exe
  not found`)

## What this PR doesn't solve

- Handling wrongly escaped path to executable, which the user may pass because
  of cmdline tab-completion. #18592

## Edge cases
- (Not handled) If the user themself provides the `&` sign (means `call
  this.exe` in powershell)
- (Not handled) Use `-Encoding utf8` parameter for `Get-Content`?
- (Handled) Doesn't write to tmp.out if shell command is not found.
    - fix: use anonymous function (`{wrong_cmd.exe}`).

## Changes other than `make_filter_cmd()` function

- Encoding for piping to external executables. See BOM-less UTF8:
  https://github.com/PowerShell/PowerShell/issues/4681
2022-10-01 17:29:15 -04:00
Raphael
a5e347ce1d
refactor(diagnostic): remove deprecated function (#20423) 2022-10-01 09:36:11 -06:00
Mathias Fußenegger
e54541f7f9
refactor(lsp): remove deprecated lsp functions (#20421) 2022-10-01 11:35:36 +02:00
bfredl
d367ed9b23 NVIM v0.8.0
BREAKING CHANGES
- Remove 'insertmode' 'remap' and 'terse' options
- highlight: Rename attributes to match Vim (#19159)
- highlight: Error on invalid names and allow '.' and '@'
- terminal: Drop winpty, require Windows 10 #18253
- treesitter: Use @foo.bar style highlight groups
- treesitter: Do not merge queries by default (#20105)

FEATURES
- runtime: Enable filetype.lua by default (#19216)
- Add `undo!`
- Add "prerelease" to version dict
- Click support for 'statusline', 'winbar' #18650
- Add preview functionality to user commands
- allow cmdheight=0 (EXPERIMENTAL) #16251
- Stdpath('run'), /tmp/nvim.user/ #18993
- Add 'mousescroll' option (#12355)
- Allow :wincmd to accept a count (#19815)
- Multibuffer preview support for inccommand
- Man: Port to Lua (#19912)
- api: Ui options relevant for remote TUI
- api: Add `nvim_parse_cmd` And `nvim_cmd`
- api: Support handling stdin stream in remote ui
- api: Add `group_name` to `nvim_get_autocmds`
- api: Enable nvim_exec_autocmds to pass arbitrary data (#18613)
- api: Support pattern array for exec_autocmds
- api: Add `unsilent` to command APIs
- api: Add replace_keycodes to nvim_set_keymap (#19598)
- api: Add support for :horizontal modifier
- api: Add "move" to nvim_input_mouse
- api/ui: "ui_watched" option for ui-side extmarks
- build: Add_glob_target runs only on changed files #19070
- checkhealth: Check for slow shell #17829
- defaults: Session data in $XDG_STATE_HOME #15583
- defaults: Search selection by * and # in visual mode (#18538)
- defaults: Nnoremap & :&&<CR> #19365
- defaults: enable mouse by default (set mouse=nvi)  #19290
- diagnostic: Pass diagnostics as data to DiagnosticChanged autocmd (#20173)
- docs: Gen_help_html.lua
- edit: Insert an unsimplified key using CTRL-SHIFT-V
- treesitter: Full support for spelling
- filetype: Convert more patterns to filetype.lua
- filetype: Remove side effects from vim.filetype.match (#18894)
- filetype: Expand environment variables in filetype patterns (#20145)
- fs: Add vim.fs functions: parents() dirname() basename() dir() find() normalize()
- highlight: Implement CurSearch highlight
- highlight: Support scoped @spam.eggs.baked_beans groups
- input: Delay all simplifications
- l10n: Turkish translations #19441
- l10n: Improve zh_CN translations (#19483)
- lsp: Remove capabilities sanitization (#17814)
- lsp: Show feedback on empty hover response (#18308)
- lsp: Options to filter and auto-apply code actions (#18221)
- lsp: Add vim.lsp.buf.format (#18193)
- lsp: Add logging level "OFF" (#18379)
- lsp: Add LspAttach and LspDetach autocommands
- lsp: Add filter to vim.lsp.get_active_clients()
- lsp: Option to reuse_win for jump actions (#18577)
- lsp: Add a start function (#18631)
- lsp: Send didChangeConfiguration after init (#18847)
- lsp: Defaults: tagfunc, omnifunc, formatexpr (#19003, #19677)
- lsp: Allow passing custom list handler to LSP functions that return lists (#19213)
- lsp: Provide feedback if server can't compute rename result (#19546)
- lsp: Add range option to code_action; deprecate range_code_action (#19551)
- lsp: Disable exit_timeout by default (#19672)
- lsp: Add tcp support
- lua: Vim.deprecate() #18320
- lua: Vim.cmd() with kwargs acts like nvim_cmd() #18523
- lua: Allow some vim script functions to run in fast callbacks
- lua: Measure require in --startuptime
- lua: Allow vim.cmd to be indexed (#19238)
- lua: Print source locations of lua callbacks (#19597)
- lua: Add vim.iconv (#18286)
- lua: Vim.ui_attach to get ui events from lua (EXPERIMENTAL)
- man.vim: List command flags in "gO" outline #17558
- mappings: Do not replace existing mapping for simplified form
- mappings: Allow special keys and modifiers in <Cmd> mapping
- mapset: Support restoring "replace_keycodes" and "desc"
- mapset: Support restoring Lua callback (#20024)
- marks: Restore viewport on jump #15831
- nvim_create_user_command: Pass structured modifiers to commands
- pum: Pretend 'mousemoveevent' is set when showing right-click menu
- server: Set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009
- server: Instance "name", store pipes in stdpath(state)
- term: Add support for libvterm >= 0.2
- terminal: Implement <c-\><c-o> for terminal mode
- terminal: Recognize underdouble and undercurl
- terminfo: Bump built-in terminfo entries (#18570)
- treesitter: Allow customizing language symbol name
- treesitter: Add ability to retreive a tree/node given a range
- treesitter: Upstream node methods from nvim-treesitter
- treesitter: Include language in invalid query error (#14053)
- treesitter: Bundle Lua parser and queries
- treesitter: Add viml parser and queries
- treesitter: Add injections
- treesitter: Add vim.treesitter.start(), enable for Lua
- treesitter: Bundle :help parser and queries
- tui: Query terminal for CSI u support (#18181)
- tui: Recognize keypad keys when using kitty keyboard protocol
- tui: Try terminfo for [re]set_cursor_color OSC #19255
- tui: Allow grid and host to disagree on ambiguous-width chars (#19686)
- tui: Recognize sidescroll events (#19992)
- tui: Support 'mousemoveevent'
- ui: Add `'winbar'`
- ui: Clear message history explicitly with msg_history_clear event
- ui: Make right-click menu work properly with ext_multigrid
- ui: Allow to set the highlight namespace per window
- ui: Use msg_grid based implementation for cmdheight=0
- ui-ext: Make 'mousemoveevent' a ui_option
- eval: Make Lua Funcref work as method and in substitute() (#20217)
- eval: Input() support any type for "cancelreturn" in a dict (#19357)

BUG FIXES
- Show autocmd output when F is in shortmess (#18251)
- Has() should preserve v:shell_error #18280
- Suppress "is a directory" messages with shortmess 'F' (#18296)
- Display global statusline correctly with ext_messages
- Correct nlua_wait error message #18867
- Right-click in clickable statusline #19252
- Remote UI may get invalid 'pumblend' value #19379
- Assertion failure when requiring missing module in autocmd
- api: Nvim_eval_statusline should validate input #18347
- api: Check error after getting win/buf handle (#19052)
- api: Check for inclusive buffer line index out of bounds correctly (#19056)
- api: Change default value of 'pattern' in nvim_exec_autocmds (#19115)
- api: Do not switch win/buf if getting option in current win/buf (#19383)
- api: Make nvim_set_hl(ns=0, ...) redraw screen properly
- api: Nvim_set_hl bail out on invalid group name (#20021)
- api: Notify dict watchers on nvim_set_var and vim.g setter
- api/command: Fargs behavior when no arguments are passed (#19862)
- autocmds: Separate command from desc (#18617)
- buffer: Disable buffer-updates before removing from window #18933
- build: Missing definitions for sizeof macros #16393
- build: Only pass -municode if MINGW #19049
- build: Strip trailing newline from variable (#19084)
- build: Don't disable byte precompilation on debug builds
- build: Fails if git is missing #19366
- charclass: Make behavior with empty str match latest Vim (#19749)
- checkhealth: Skip vim.health #18816
- ci: Remove 2000ms blocking wait in many plugin/lsp_spec.lua tests
- cmd: Make :-tabmove work with modifiers (#18447)
- cmdheight=0: Various issues part3 #19816
- cmdline: Fix passing -1 as char
- cmdline: Trigger CmdlineEnter and ModeChanged earlier (#19474)
- cmdline: Do not trigger completion at wrong time (#19920)
- cmdline: Don't send invalid cursor with incsearch and cmdheight=0
- column: Move sign sentinel after inserting/deleting lines (#20400)
- completion: Remove wrong FUNC_ATTR_NONNULL_ALL (#19627)
- diagnostic: Use nvim_exec_autocmds to trigger DiagnosticChanged (#18188)
- diagnostic: Check for negative column value (#18868)
- diagnostic: Remove buf from cache on `BufWipeout` (#20099)
- diagnostic: Populate data key in DiagnosticChanged autocmd in reset (#20207)
- docs: Correct obsolete note about 'writedelay' in dev docs
- docs: Remove internal function from docs
- edit.c: Indentkeys double indent after "!" #12894
- eval: Check for v:lua when calling callback (#19855)
- eval/f_getmatches: Return empty list for invalid win argument (#18893)
- events: Make CursorHold behave as documented
- ex_cmds: Correct flags for :const (#19387)
- exceptions: Restore `did_throw` (#20000)
- exmode: Do not throttle messages when pressing enter to print line
- extmarks: Make virt_lines always start at 0 virtcol
- filetype: Fix and improve filetype patterns
- fillchars: Change fallback after setcellwidths()
- float: Make `screen*()` functions respect floating windows
- float: Fix glitch when making float window with border a split
- float: Fix mouse drag position if float window turned to a split
- folds: Fix fold regression with :move (#18685)
- folds: Fix fold remains when :delete makes buffer empty (#19673)
- ftdetect: Source plugins in autogroup (#18237)
- gen_vimdoc.py: Handle missing luajit
- getchar: Flush screen before doing a blocking wait
- handlers: More specific error messages (#16772)
- health: Correct shada file path #18603
- health: Handle non-existent log file #18610
- highlight: Use ctermbg/fg instead of bg/fg when use_rgb=false #18982
- highlight: Add missing 'nocombine' to nvim_get_hl apis (#19586)
- highlight: Set the window namespace when redrawing statusline
- hl: Set Normal hl group sg_attr value #18820
- hl: Return cterm fg/bg even if they match Normal #18981
- inccommand: Do not try to preview an ambiguous command (#18827)
- inccommand: Avoid crash if callback changes inccommand option (#18830)
- inccommand: Clear cmdpreview state if preview is not shown (#18923)
- inccommand: Skip split window if not enough room #18937
- inccommand: Never preview if parsing command failed (#18944)
- inccommand: Parse the command to check if it is previewable
- inccommand: Deal with unsynced undo (#20041)
- input: Allow Ctrl-C to interrupt a recursive mapping even if mapped (#18885)
- input: Fix macro recording with ALT and special key (#18917)
- input: Use correct grid when restoring cursor for <expr> mapping (#19047)
- input: Do no reinterpret mouse keys with ALT modifiers
- input: Use click number of last click for mouse drag (#20300)
- inspect: Escape identifiers that are lua keywords (#19898)
- keywordprg: Default to :help if set to empty string (#19983)
- l10n: Improve zh_CN and zh_TW translations (#19969)
- log: Back even again
- logging: Skip recursion, fix crash #18764
- logging: Make logmsg() thread-safe again
- logging: Try harder to resolve Nvim "name" #19016
- lsp: Unify progress message handling (#18040)
- lsp: Fix unnecessary buffers being added on empty diagnostics (#18275)
- lsp: Fix infinite loop in resolved_capabilities deprecation message (#18333)
- lsp: Add missing bufnr argument (#18382)
- lsp: Fix rename capability checks and multi client support (#18441)
- lsp: Detach spawned LSP server processes (#18477)
- lsp: Perform client side filtering of code actions (#18392)
- lsp: Only send diagnostics from current buffer in code_action() (#18639)
- lsp: Respect global syntax setting in open float preview (#15225)
- lsp: Include cancellable in progress message table (#18809)
- lsp: Adjust offset encoding in lsp.buf.rename() (#18829)
- lsp: Set buflisted before switching to buffer (#18854)
- lsp: Fix multi client handling in code action (#18869)
- lsp: Small bugs in snippet-parser #18998
- lsp: Pcall nvim_del_augroup_by_name (#19302)
- lsp: Abort pending changes after flush when debouncing (#19314)
- lsp: Don't attach a client in lsp.start() if there is none (#19328)
- lsp: Account for initializing servers in vim.lsp.start (#19329)
- lsp: Move augroup define to if statement (#19406)
- lsp: Set workspace.configuration capability (#19548)
- lsp: Send didOpen if name changes on write (#19583)
- lsp: Prevent unexpected position jumps (#19370)
- lsp: Avoid  ^M character in hover window on Windows (#19640)
- lsp: Set end_col in formatexpr (#19676)
- lsp: Handle multiple clients with incremental sync (#19658)
- lsp: Fix some type annotations in lsp.rpc (#19714)
- lsp: Avoid pipe leaks if lsp cmd isn't executable (#19717)
- lsp: Handle nil client in onexit callback (#19722)
- lsp: Fix nil value error in get_group (#19735)
- lsp: Clean the diagnostic cache when buffer delete (#19449)
- lsp: When buffer detach remove buffer from client attached buffers (#20081)
- lsp: Schedule removal of client object (#20148)
- lsp: Support `false` result in handlers (#20252)
- lsp: Out of bounds error in lsp.util.apply_text_edits (#20137)
- lsp: Use correct function name in deprecated message (#20308)
- lsp: Create missing directory before creating file (#19835)
- lua: Don't mutate opts parameter of vim.keymap.del (#18227)
- lua: Stop pending highlight.on_yank timer, if any (#18824)
- lua: Highlight.on_yank can close timer in twice #18976
- lua: Clear got_int when calling vim.on_key() callback (#18979)
- lua: Don't leak memory on error
- lua: Double entries in :lua completion #19410
- lua: Make it possible to cancel vim.wait() with Ctrl-C (#19217)
- lua: Make ui_attach()/ui_detach() take effect immediately (#20037)
- lua: Make vim.str_utfindex and vim.str_byteindex handle NUL bytes
- lua: Free vim.ui_attach callback before lua close (#20205)
- lua: Fix architecture-dependent behavior in usercmd "reg" (#20384)
- mac: Use same $LANG fallback mechanism as Vim
- mac: Add CoreServices to flake.nix #18358
- man.vim: Q in "$MANPAGER mode" does not quit #18443
- maparg: Remove double allocation (#20033)
- mappings: Fix double-free when unmapping simplifiable Lua mapping
- mapset: Remove existing abbreviation of same lhs (#20320)
- mark: Set mark fnum from buffer (#19195)
- mark: Mark without a view restores at topline #19224
- mark: Fix unexpected cursor movements (#19253)
- mark: Give correct error message when mark is in another buffer (#19454)
- menu: Make :menu still print header when there are no menus
- messages: Add color when showing nvim_echo in :messages history
- messages: Do not crash on cmdheight=0 and g< redisplay
- messages: Validate msg_grid before silent! message with cmdheight=0
- mksession: Don't store floats in session #18635
- mouse: Click on global statusline with splits (#19390)
- mouse: Fix using uninitialized memory with K_MOUSEMOVE (#19480)
- mpack: Make sure a `bool` always is a `bool`
- normal: Fix segfault with bracket command jumping to a mark
- options: Properly free string options (#19510)
- options: Mark `winhighlight` as list style  (#19477)
- packaging: Remove excess forward slash in Wix Patch (#18121)
- paste: Ignore mappings in Cmdline mode (#18114)
- path: Path_is_url returns false for "foo:/" #19797
- powershell: Filter ":!" commands with args #19268
- pum: Make right drag in anchor grid to select work in multigrid UI (#19382)
- query: Fix unnatural order for inherits in treesitter queries (#20298)
- redraw: Make sure :redraw! redraws command line
- redraw: Handle switching to a tabpage with larger p_ch value
- redraw: Avoid unnecessary redraws and glitches with floats+messages
- redraw: Make redrawdebug=nodelta handle all the cases
- rpc: Break nvim_error_event feedback loop between two nvim instances
- runtime/genvimvim: Omit s[ubstitute] from vimCommand #18480
- screen: Restart win_update() if a decor provider changes signcols (#18768)
- screen: Check for col instead of vcol when drawing fold (#19572)
- session: Respect sessionoptions=terminal #19497
- shared: Avoid indexing unindexable values in vim.tbl_get() (#18337)
- signs: Priority of extmark signs (#19718)
- source: Make changing 'shellslash' change expand() result
- source: Fix expand('<sfile>') no longer works for Lua
- spell: Make setting 'encoding' clear word list
- spell: Correct spell move behavior without "noplainbuffer" (#20386)
- startup: Nvim with --clean should not load user rplugins
- substitute: Subtract number of backslashes later
- tabpage: Check if ROWS_AVAIL changed for resize (#19620)
- terminal: Invalid pointer comparison #18453
- terminal: Do not trim whitespace that is actually in the terminal (#16423)
- terminal: Scrollback delete lines immediately #18832
- terminal: Coverity USE_AFTER_FREE #18978
- terminal: Crash if TermClose deletes own buffer #19222
- terminal: Avoid reading over the end of cell.chars (#19580)
- terminal: Skip aucmd_win when checking terminal size (#19668)
- terminal: Adopt altscreen test for libvterm 0.2 changes
- terminfo: Disable smglr for vtpcon and conemu (#18855)
- termopen: Avoid ambiguity in URI when CWD is root dir (#16988)
- tests: Fix some screen.lua warnings
- tests: Fix some issues with ui/inccommand_spec.lua causing slowness
- tests: Unreliable parser_spec #18911
- tests: Check for EOF on exit of nvim properly
- tests: Missing clear() #18927
- tests: Remove misleading $TEST_PATH segment #19050
- tests: Remove irrelevant usage of display-=msgsep
- tests: Use pending_c_parser when needed
- tests: Indicate in test logs when nvim exit times out
- tmpdir: Invalid tempname() if username has slashes #19323
- treesitter: Create new parser if language is not the same as cached parser (#18149)
- treesitter: Bump match limit up
- treesitter: Offset directive associates range with capture (#18276)
- treesitter: Correct region for string parser (#18794)
- treesitter: New iter if folded
- treesitter: Don't error when node argument of predicate is nil (#19355)
- treesitter: Free memory on removing parser (#19933)
- treesitter: More efficient node:root()
- treesitter: Make it get_captures_at_position
- treesitter: Do not link @error by default
- treesitter: Don't support legacy syntax in start()
- treesitter: Use the right loading order for base queries (#20117)
- treesitter: Prevent endless loop on self-inheritence
- treesitter: Return full metadata for get_captures_at_position (#20203)
- ts: Do not clobber spelloptions (#20095)
- tui: Update modifyOtherKeys reporting (#18158)
- tui: Disable extended keys before exiting alternate screen (#18318)
- tui: Piping nodejs to nvim breaks input handling #18932
- tui: Resize at startup #17795
- tui: Add fixups for hterm family #19078
- tui: Handle padding requirements for visual bell (#20238)
- ui: Require window-local value to show winbar on floating windows (#18773)
- ui: Do not call showmode() when setting window height (#18969)
- ui: Set redraw_cmdline when setting window height (#19630)
- ui: Don't allow decor provider with ns_id==0
- ui: Ui compositor does not correctly free event callbacks
- ui: Allow redrawing statusline when msgsep is used (#20337)
- ui: Redraw end of buffer if last line is modified (#20354)
- unittests: Coredump when running unit tests #18663
- usercmd: Also check for whitespace after escaped character (#19942)
- version.c: Mark N/A vim patches #18587
- vim.ui.input: Accept nil or empty "opts"  #19109
- window: Close floats first when closing buffer in other tab (#20284)
- window: Fix equalization with cmdheight=0 (#20369)
- windows: Stdpath("state") => "nvim-data" #18546
- windows: Exepath, stdpath return wrong slashes #19111
- winhl: Do not crash when unsetting winhl in just opened window
- Make :undo! notify buffer update callbacks (#20344)
- eval: Make Vim functions return inner window width and height (#19743)

BUILD SYSTEM
- Bump Doxyfile to minimum required version 1.9.0 #18118
- Bump msgpack to 4.0.0
- Enable EXITFREE on Debug builds (#17783)
- Add formatting targets for c and lua files (#19488)
- clang-format: Align with project style #18192
- clint: Remove all python2-isms with pyupgrade
- clint: Remove "function size is too large" warning
- clint: Remove rules for includes, whitespace, tabs #18611
- cmake: Simplify and speed up the uninstall target
- cmake: Simplify def_cmd_target function
- cmake: Use glob_wrapper instead of file(GLOB in main CMakeLists
- cmake: Fix static `libintl` test on macOS
- deps: Bump LuaJIT, Luv and libuv
- deps: Support universal builds on macOS
- deps: Bump tree-sitter to v0.20.7 (#20067)
- deps: Bump tree-sitter parsers
- deps: Bump required libvterm to v0.3 (#20222)
- deps: Require libtermkey version 0.22
- deps: update neovim-qt, win32tools.zip

PERFORMANCE
- Only redraw for CurSearch when it is currently in use
- highlight: Allocate permanent names in an arena for fun and cache locality
- highlight: Use binary search to lookup RGB color names
- map: Visit only one hash bucket instead of all, like an actual hash table
- memory: Get rid of extraneous heap allocations
- memory: implement arena memory allocation with a shared freelist
- memory: Use an arena for RPC decoding and some API return values
- messages: Don't call ui_flush() per message line in various places
- treesitter: Use a reuse list for query cursors
- ui: Reduce allocations when encoding and decoding "redraw" events
- ui: Avoid ui_flush() work in headless mode

REFACTOR
- checkhealth: Rename to vim.health, move logic to Lua #18720
- Add pure attribute to pure functions
- Replace char_u variables and functions with char
- Enable -Wconversion warning for all Nvim source files
- Add warnings for deprecated functions (#18662)
- Change type of linenr_T from long to int32_t
- Use nvim_get/set_option_value for vim.{b,w}o
- Remove functions marked for deprecation in 0.8 (#19299)
- Rename function prefix mb to the more accurate utf_cp (#19590)
- Remove some unused includes
- Change remaining sourcing_name/sourcing_lnum to exestack
- Change FALSE/TRUE to false/true
- api: Use a hashy hash for looking up api method and event names
- api: Use a unpacker based on libmpack instead of msgpack-c
- api: restructure api/vim.c and api/private/helpers.c code in separate files
- api: Remove redundant fields of CmdParseInfo
- aucmd: Call define_autocmd() directly for default autocmds
- ci: Cleanup release.yml #19132
- cmd: Format do_one_cmd()
- cmd: Hoist out some code into functions
- cmd: Unify execute_cmd with do_one_cmd
- decor: Use decor levels properly
- drawline.c: Factor out utf8 multibyte check
- eval: Use Hashy McHashFace instead of gperf
- eval.c: Resolve all clint issues (#19774)
- eval/funcs.c: Resolve all clint errors
- events: Remove unnecessary fudging of updating_screen
- ex_cd: Add an early return to fix clint warning
- ex_docmd.c: Resolve most clint errors (#19775)
- filetype: Allow vim.filetype.match to accept buf and filename (#19114)
- highlight: Make hlattrs2dict always use pre-allocated dict
- log: Simplify log_path_init #18898
- log: Use msg_schedule_semsg #18950
- lsp: Remove redundant client cleanup (#18744)
- lsp: Make the use of local aliases more consistent
- lsp: Use autocmd api (#19407)
- lsp: Factor out read_loop function
- lsp: Encapsulate rpc uv handle
- lsp: Extract rpc client from rpc.start
- lua: Replace hard-coded gsub with vim.pesc() (#18407)
- lua: Reformat with stylua 0.14.0 (#19264)
- lua: Git-blame-ignore stylua update PR (#19273)
- lua: Replace vim.cmd use with API calls (#19283)
- map: Simplify free_all_mem handling
- map: Statically initialize maphash array
- map: Simplify add_map params
- normal: Convert function comments to doxygen format
- object: Get rid of redundant FIXED_TEMP_ARRAY
- ops: Doxygen docstrings #17743
- option: DRY get/set option value #19038
- plines: Use a struct for chartabsize state
- provider: Use list comprehension #19027
- regexp_nfa.c: Match where Vim calls fopen() (#18778)
- runtime: Convert dist#ft functions to lua (#18247)
- runtime: Convert more dist#ft functions to lua (#18430)
- runtime: Convert the remaining dist#ft functions to lua (#18623)
- runtime: Port remaining patterns from filetype.vim to filetype.lua (#18814)
- runtime: Refactor filetype.lua (#18813)
- runtime: Port scripts.vim to lua (#18710)
- setcellwidths: Use TV_LIST_ITEM_NEXT properly
- signs: Handle non-sign attrs separately (#19784)
- tests: Introduce testprg()
- treesitter: Get_{nodes,captures}_at_{position,cursor}
- typval: Change FC_CFUNC abstraction into FC_LUAREF
- ui: Simplify stdin handling
- uncrustify: Format all c code under /src/nvim/
- vim.opt: Remove del arg
- vim.opt: Unify vim.bo/wo building
- vim.opt: Optimize append/prepend/remove
- Format runtime with stylua
2022-09-30 17:15:13 +02:00
Enan Ajmain
b4d42bb905 fix: make_filter_cmd for :! powershell
Problem:
`Start-Process` requires the command to be split into the shell
command and its arguments. Previously it was done by parsing, which
didn't handle cases such as
  - commands with escaped space in their filepath
  - quoted commands with space in their filepath

Solution:
Use
  - `pwsh -Command` instead of `Start-Process`
  - `Get-Content` instead of `-RedirectStandardInput`
  - `Out-File` instead of `-RedirectStandardOutput`
2022-09-30 21:07:45 +06:00
bfredl
b414e9fdbb
Merge pull request #20364 from zeertzjq/parse-cmd-omit
fix(api)!: nvim_parse_cmd omit "count" "range" "reg" if not supported
2022-09-30 09:59:45 +02:00
dundargoc
df646572c5
docs: fix typos (#20394)
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: smjonas <jonas.strittmatter@gmx.de>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-09-30 09:53:52 +02:00
bfredl
9cf252e121
Merge pull request #20387 from famiu/feat/nvim_cmd/buffer-args
feat(nvim_cmd)!: allow using first argument as count
2022-09-30 09:43:18 +02:00
zeertzjq
cb62592bcb fix(api)!: nvim_parse_cmd omit "count" "range" "reg" if not supported 2022-09-30 11:24:23 +08:00
Jonas Strittmatter
33dd917d7f
fix(filetype): add missing return to changelog detection function (#20403) 2022-09-29 16:26:19 +02:00
Sergey Berezhnoy
94718e479d
fix(query): fix unnatural order for inherits in treesitter queries (#20298)
close #20297
2022-09-29 16:25:07 +02:00