Commit Graph

5671 Commits

Author SHA1 Message Date
Lewis Russell
fba18a3b62
fix(treesitter): do not calc folds on unloaded buffers
Fixes #23423
2023-05-02 10:07:18 +01:00
Lewis Russell
26cc946226
fix(treesitter): foldexpr tweaks
Some small general fixes found working on developing async parsing.
2023-05-01 10:32:29 +01:00
Christian Clason
37dd818722
vim-patch:9.0.1503: Luau files are not recognized (#23412)
Problem:    Luau files are not recognized.
Solution:   Add a patter for Luau files. (Amaan Qureshi, closes vim/vim#12317)

2dcfe9ae1d

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-05-01 10:55:51 +02:00
Mathias Fußenegger
5e31f53457
docs(lsp): remove vim.lsp.sync (#23416)
The module is used internally and not intended to be used by plugins or
users.
2023-05-01 10:54:37 +02:00
jdrouhard
edf05b005f
perf(lsp): process semantic tokens response in a coroutine that yields every 5ms (#23375) 2023-05-01 07:15:32 +02:00
Lewis Russell
19a793545f
fix(treesitter): redraw added/removed injections properly (#23287)
When injections are added or removed make sure to:
- invoke 'changedtree' callbacks for when new trees are added.
- invoke 'changedtree' callbacks for when trees are invalidated
- redraw regions when languagetree children are removed
2023-04-30 17:11:38 +02:00
luukvbaal
064bf39c46
docs: fix erroneous nvim_buf_set_extmark example (#23404) 2023-04-30 14:36:54 +02:00
JP
4f3f81ed86
docs(api): document nvim_buf_add_highlight vs nvim_buf_set_extmark (#23310) 2023-04-30 11:02:38 +02:00
Christian Clason
668f16bac7
feat(treesitter): upstream query omnifunc from playground (#23394)
and set by default in `ftplugin/query.lua`
2023-04-30 11:01:54 +02:00
Gregory Anders
2d54f5e903
Merge pull request #23382 from gpanders/iter-benchmark
Add vim.iter benchmark to benchmark test suite
2023-04-29 20:33:27 -06:00
Stephan Seitz
c194acbfc4
feat(treesitter): add query_linter from nvim-treesitter/playground (#22784)
Co-authored-by: clason <clason@users.noreply.github.com>
Co-authored-by: lewis6991 <lewis6991@users.noreply.github.com>
2023-04-29 18:22:26 +02:00
zeertzjq
4bcf8c15b3 vim-patch:8.2.0578: heredoc for interfaces does not support "trim"
Problem:    Heredoc for interfaces does not support "trim".
Solution:   Update the script heredoc support to be same as the :let command.
            (Yegappan Lakshmanan, closes vim/vim#5916)

6c2b7b8055
2023-04-29 09:20:52 +08:00
Gregory Anders
ef1801cc7c perf(iter): reduce number of table allocations
Packing and unpacking return values impairs performance considerably.
In an attempt to avoid creating tables as much as possible we can
instead pass return values between functions (which does not require
knowing the number of values a function might return). This makes the
code more complex, but improves benchmark numbers non-trivially.
2023-04-28 15:38:50 -06:00
zeertzjq
715587f8e4
vim-patch:8.2.3509: undo file is not synced (#23371)
Problem:    Undo file is not synced. (Sami Farin)
Solution:   Sync the undo file if 'fsync' is set. (Christian Brabandt,
            closes vim/vim#8879, closes vim/vim#8920)

340dd0fbe4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-28 21:07:00 +08:00
Lewis Russell
eb4676c67f
fix: disallow removing extmarks in on_lines callbacks (#23219)
fix(extmarks): disallow removing extmarks in on_lines callbacks

decor_redraw_start (which runs before decor_providers_invoke_lines) gets
references for the extmarks on a specific line. If these extmarks are
deleted in on_lines callbacks then this results in a heap-use-after-free
error.

Fixes #22801
2023-04-27 17:30:22 +01:00
Christian Clason
4b3fdf321c
docs(lsp): remove obsolete lsp-extension example (#23346)
This example is made obsolete by the addition of `vim.lsp.start()` and
`vim.fs` (whose use is already documented in `:h lsp-quickstart`).
2023-04-27 13:05:26 +02:00
bfredl
45bcf83869 refactor(build): include lpeg as a library 2023-04-27 11:40:00 +02:00
zeertzjq
191e8b4062
vim-patch:9.0.1485: no functions for converting from/to UTF-16 index (#23318)
Problem:    no functions for converting from/to UTF-16 index.
Solution:   Add UTF-16 flag to existing funtions and add strutf16len() and
            utf16idx(). (Yegappan Lakshmanan, closes vim/vim#12216)

67672ef097

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-26 09:50:37 +08:00
zeertzjq
8af97ecefa
vim-patch:8.2.3314: behavior of exists() in a :def function is unpredictable (#23317)
Problem:    Behavior of exists() in a :def function is unpredictable.
Solution:   Add exists_compiled().

267359902c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-26 08:37:22 +08:00
Gregory Anders
cacc2dc419
Merge pull request #23303 from gpanders/more-vim-iter
Create iter_spec and vim.iter module
2023-04-25 09:17:46 -06:00
ii14
7e70ca0b48
feat(lua): vim.keycode (#22960)
Using nvim_replace_termcodes is too verbose, add vim.keycode for
translating keycodes.

Co-authored-by: ii14 <ii14@users.noreply.github.com>
2023-04-25 16:52:44 +02:00
Gregory Anders
1e73891d69 refactor(iter): move helper functions under vim.iter
vim.iter is now both a function and a module (similar to vim.version).
2023-04-25 08:23:16 -06:00
zeertzjq
bfa92d3861
vim-patch:8.2.5019: cannot get the first screen column of a character (#23312)
Problem:    Cannot get the first screen column of a character.
Solution:   Let virtcol() optionally return a list. (closes vim/vim#10482,
            closes vim/vim#7964)

0f7a3e1de6

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-04-25 22:22:26 +08:00
zeertzjq
43c49746d9
vim-patch:9.0.0335: checks for Dictionary argument often give a vague error (#23309)
Problem:    Checks for Dictionary argument often give a vague error message.
Solution:   Give a useful error message. (Yegappan Lakshmanan, closes vim/vim#11009)

04c4c5746e

Cherry-pick removal of E922 from docs from patch 9.0.1403.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-25 21:32:12 +08:00
Christian Clason
e3f36377c1
vim-patch:71badf9547e8 (#23285)
Update runtime files

71badf9547

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-23 15:22:55 +02:00
Christian Clason
f17bb4f411
vim-patch:9.0.1478: filetypes for *.v files not detected properly (#23282)
* vim-patch:9.0.1478: filetypes for *.v files not detected properly

Problem:    Filetypes for *.v files not detected properly.
Solution:   Use the file contents to detect the filetype. (Turiiya,
            closes vim/vim#12281)

80406c2618

Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com>
Co-authored-by: Jonas Strittmatter <40792180+smjonas@users.noreply.github.com>
2023-04-23 14:15:52 +02:00
zeertzjq
1cb46abff1
vim-patch:9.0.1475: busted configuration files are not recognized (#23266)
Problem:    Busted configuration files are not recognized.
Solution:   Recognize busted configuration files as Lua. (Craig MacEachern,
            closes vim/vim#12209)

Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
2023-04-22 23:51:53 +08:00
T727
d9f78b6336
docs(powershell): use tee.exe instead of Tee-Object
Problem: Tee-Object does not create a file if it does not receive input
for example when :grep does not find matches.
and so nvim tries to open a nonexistent errorfile causing an error.

Solution: use tee.exe instead of Tee-Object
2023-04-22 12:04:05 +02:00
Jon Huhn
e9b85acfbb
feat(lsp): enable workspace/didChangeWatchedFiles by default (#23190) 2023-04-22 09:37:38 +02:00
Gregory Anders
f68af3c3bc
refactor(iter): use metatable as packed table tag (#23254)
This is a more robust method for tagging a packed table as it completely
eliminates the possibility of mistaking an actual table key as the
packed table tag.
2023-04-21 16:13:39 -06:00
bfredl
702892270d refactor(build): move the last generator from scripts/ to src/nvim/generators
This one generates a runtime/ file instead of a source file.
But otherwise it works the same like all other generators.
It has the same prerequisites (shared and mpack modules, etc), and,
importantly, it uses results from the source generators.

The odd location makes it easy to overlook when refactoring generators
(like I did last time, lol)
2023-04-21 16:46:35 +02:00
Justin M. Keyes
824766612d refactor(lua): simplify vim.gsplit impl 2023-04-21 13:50:22 +02:00
Justin M. Keyes
622b1ae38a fix(lua): vim.split may trim inner empty items
Problem:
`vim.split('a:::', ':', {trimempty=true})` trims inner empty items.
Regression from 9c49c10470

Solution:
Set `empty_start=false` when first non-empty item is found.
close #23212
2023-04-21 13:50:22 +02:00
William
ab2811746e
fix(treesitter playground): fix the wrong range of a node displayed i… (#23209)
fix(treesitter playground): wrong range of a node displayed in playground

The call parameters order of the function `get_range_str` is flipped for the last two arguments compared to the declaration.
2023-04-20 07:42:49 -06:00
bfredl
e81331c2b0
Merge pull request #23106 from bfredl/nlua0
refactor(build): use vendored versions of mpack and luabitop
2023-04-19 21:11:12 +02:00
Gregory Anders
0ad5237162
Merge pull request #23198 from gpanders/iter-fix
fix(iter): allow table values in iterator pipelines
2023-04-19 08:23:42 -06:00
Gregory Anders
9489406879 fix(iter): remove special case totable for map-like tables
This was originally meant as a convenience but prevents possible
functionality. For example:

  -- Get the keys of the table with even values
  local t = { a = 1, b = 2, c = 3, d = 4 }
  vim.iter(t):map(function(k, v)
    if v % 2 == 0 then return k end
  end):totable()

The example above would not work, because the map() function returns
only a single value, and cannot be converted back into a table (there
are many such examples like this).

Instead, to convert an iterator into a map-like table, users can use
fold():

  vim.iter(t):fold({}, function(t, k, v)
    t[k] = v
    return t
  end)
2023-04-19 07:52:04 -06:00
Gregory Anders
6b96122453 fix(iter): add tag to packed table
If pack() is called with a single value, it does not create a table; it
simply returns the value it is passed. When unpack is called with a
table argument, it interprets that table as a list of values that were
packed together into a table.

This causes a problem when the single value being packed is _itself_ a
table. pack() will not place it into another table, but unpack() sees
the table argument and tries to unpack it.

To fix this, we add a simple "tag" to packed table values so that
unpack() only attempts to unpack tables that have this tag. Other tables
are left alone. The tag is simply the length of the table.
2023-04-19 07:04:49 -06:00
bfredl
1e60e8c040 refactor(build): use vendored versions of mpack and luabitop 2023-04-19 10:44:25 +02:00
Christian Clason
cff02e993d
vim-patch:9.0.1467: Jenkinsfiles are not recognized as groovy (#23195)
Problem:    Jenkinsfiles are not recognized as groovy.
Solution:   Add a pattern for Jenkinsfiles. (closes vim/vim#12236)

142ffb024d

Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-04-19 10:19:33 +02:00
Christian Clason
6d9f5b6bf0
vim-patch:9.0.1464: strace filetype detection is expensive (#23175)
Problem:    Strace filetype detection is expensive.
Solution:   Match with a cheap pattern first. (Federico Mengozzi,
            closes vim/vim#12220)

6e5a9f9482

Co-authored-by: Federico Mengozzi <19249682+fedemengo@users.noreply.github.com>
2023-04-19 09:41:26 +02:00
zeertzjq
85c61d6716 vim-patch:9.0.1007: there is no way to get a list of swap file names
Problem:    There is no way to get a list of swap file names.
Solution:   Add the swapfilelist() function.  Use it in the test script to
            clean up.  Remove deleting individual swap files.

c216a7a21a

vim-patch:9.0.1005: a failed test may leave a swap file behind

Problem:    A failed test may leave a swap file behind.
Solution:   Delete the swap file to avoid another test to fail.  Use another
            file name.

d0f8d39d20

Cherry-pick test_window_cmd.vim changes from patch 8.2.1593.
Remove FUNC_ATTR_UNUSED from eval functions as fptr is always unused.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-19 11:29:35 +08:00
Gregory Anders
ab1edecfb7
feat(lua): add vim.iter (#23029)
vim.iter wraps a table or iterator function into an `Iter` object with
methods such as `filter`, `map`, and `fold` which can be chained to
produce iterator pipelines that do not create new tables at each step.
2023-04-17 12:54:19 -06:00
Jon Huhn
6cc76011ca
fix(watchfiles): skip Created events when poll starts (#23139) 2023-04-17 18:50:05 +02:00
Isak Samsten
07b60efd80
feat(diagnostic): specify diagnostic virtual text prefix as a function
- vim.diagnostic.config() now accepts a function for the virtual_text.prefix
  option, which allows for rendering e.g., diagnostic severities differently.
2023-04-17 12:53:34 +01:00
zeertzjq
79a6933768 vim-patch:partial:6f4754b9f725
Update runtime files

6f4754b9f7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-17 15:46:24 +08:00
JingMatrix
7f94a032e1
fix(checkhealth): shell_error and cpanm module
shell_error is a function, the code missed parentheses

The actual module for perl module version is App::cpanminus::script, not
App::cpanminus::fatscript.
2023-04-16 12:39:48 +02:00
dundargoc
b0978fca6b
fix(checkhealth): fix crash due to incorrect argument type 2023-04-16 12:26:13 +02:00
Raphael
2f779b94e7
fix(lua): inspect_pos respect bufnr when get syntax info (#23098) 2023-04-16 17:50:32 +08:00
Christian Clason
d9e9dc3a06
vim-patch:9.0.1455: C++ 20 modules are not recognized (#23124)
Problem:    C++ 20 modules are not recognized.
Solution:   Add patterns to recognize C++ 20 modules as "cpp". (Ben Jackson,
            closes vim/vim#12261)

732d69e191

Co-authored-by: Ben Jackson <puremourning@gmail.com>
2023-04-16 10:59:04 +02:00
zeertzjq
f39b33ee49 vim-patch:9.0.0411: only created files can be cleaned up with one call
Problem:    Only created files can be cleaned up with one call.
Solution:   Add flags to mkdir() to delete with a deferred function.
            Expand the writefile() name to a full path to handle changing
            directory.

6f14da15ac

vim-patch:8.2.3742: dec mouse test fails without gnome terminfo entry

Problem:    Dec mouse test fails without gnome terminfo entry.
Solution:   Check if there is a gnome entry. Also fix 'acd' test on
            MS-Windows. (Dominique Pellé, closes vim/vim#9282)

f589fd3e10

Cherry-pick test_autochdir.vim changes from patch 9.0.0313.
Cherry-pick test_autocmd.vim changes from patch 9.0.0323.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:41 +08:00
zeertzjq
335bef0c21 vim-patch:9.0.0390: cannot use a partial with :defer
Problem:    Cannot use a partial with :defer.
Solution:   Add the partial arguments before the other arguments.  Disallow
            using a dictionary.

86d87256c4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:41 +08:00
zeertzjq
0167649ce4 vim-patch:9.0.0379: cleaning up after writefile() is a hassle
Problem:    Cleaning up after writefile() is a hassle.
Solution:   Add the 'D' flag to defer deleting the written file.  Very useful
            in tests.

806a273f3c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:41 +08:00
zeertzjq
b75634e55e vim-patch:9.0.0370: cleaning up afterwards can make a function messy
Problem:    Cleaning up afterwards can make a function messy.
Solution:   Add the :defer command.

1d84f7608f

Omit EX_EXPR_ARG: Vim9 script only.
Make :def throw E319 to avoid confusing behavior.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 15:04:40 +08:00
zeertzjq
68ca16c376 vim-patch:8.2.3783: confusing error for using a variable as a function
Problem:    Confusing error for using a variable as a function.
Solution:   If a function is not found but there is a variable, give a more
            useful error. (issue vim/vim#9310)

2ef9156b42

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 10:15:15 +08:00
zeertzjq
f4d3e279e8 vim-patch:8.2.2977: crash when using a null function reference
Problem:    Crash when using a null function reference. (Naohiro Ono)
Solution:   Check for an invalid function name. (closes vim/vim#8367)

22db0d549f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-16 10:15:15 +08:00
dundargoc
c08b030761
refactor: deprecate checkhealth functions
The following functions are deprecated and will be removed in
Nvim v0.11:

- health#report_start()
- health#report_info()
- health#report_ok()
- health#report_warn()
- health#report_error()
- vim.health.report_start()
- vim.health.report_info()
- vim.health.report_ok()
- vim.health.report_warn()
- vim.health.report_error()

Users should instead use these:

- vim.health.start()
- vim.health.info()
- vim.health.ok()
- vim.health.warn()
- vim.health.error()
2023-04-15 23:40:48 +02:00
zeertzjq
8c6f97bef8
fix(health): properly use the value of $PYENV_VERSION (#23109) 2023-04-16 00:16:50 +08:00
zeertzjq
e9b4f51051 vim-patch:9.0.0303: it is not easy to get information about a script
Problem:    It is not easy to get information about a script.
Solution:   Make getscriptinf() return the version.  When selecting a specific
            script return functions and variables. (Yegappan Lakshmanan,
            closes vim/vim#10991)

2f892d8663

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-15 21:06:17 +08:00
zeertzjq
bcc971de15 vim-patch:9.0.0269: getscriptinfo() does not include the version
Problem:    getscriptinfo() does not include the version.  Cannot select
            entries by script name.
Solution:   Add the "version" item and the "name" argument. (Yegappan
            Lakshmanan, closes vim/vim#10962)

520f6ef60a

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-15 21:06:16 +08:00
zeertzjq
57221e0d11 vim-patch:b59ae59a5870
Update runtime files

b59ae59a58

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:13:58 +08:00
zeertzjq
9f1d333072 vim-patch:3f32a5f1601a
Update runtime files and translations

3f32a5f160

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:05:58 +08:00
zeertzjq
f2a9097d76 vim-patch:partial:d899e5112079
Update runtime files

d899e51120

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:02:52 +08:00
zeertzjq
29efd54e02 vim-patch:8.2.4934: string interpolation fails when not evaluating
Problem:    String interpolation fails when not evaluating.
Solution:   Skip the expression when not evaluating. (closes vim/vim#10398)

70c41241c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 19:01:19 +08:00
zeertzjq
bacb5021d4 vim-patch:8.2.4883: string interpolation only works in heredoc
Problem:    String interpolation only works in heredoc.
Solution:   Support interpolated strings.  Use syntax for heredoc consistent
            with strings, similar to C#. (closes vim/vim#10327)

2eaef106e4

Cherry-pick Test_Debugger_breakadd_expr() from Vim.

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-04-15 17:59:32 +08:00
zeertzjq
3ad8c08acc vim-patch:8.2.4770: cannot easily mix expression and heredoc
Problem:    Cannot easily mix expression and heredoc.
Solution:   Support  in heredoc. (Yegappan Lakshmanan, closes vim/vim#10138)

efbfa867a1

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-15 17:40:31 +08:00
zeertzjq
e36806666f
vim-patch:8.2.2138: Vim9: "exit_cb" causes Vim to exit (#23087)
Problem:    Vim9: "exit_cb" causes Vim to exit.
Solution:   Require white space after a command in Vim9 script. (closes vim/vim#7467)
            Also fix that Vim9 style heredoc was not always recognized.

b5b9480ee9

Omit EX_NONWHITE_OK, E1143, E1144: Vim9 script only.
Cherry-pick test_vimscript.vim changes from patch 8.2.2141.
Cherry-pick E1145 tag from Vim runtime.

N/A patches for version.c:

vim-patch:8.2.2140: build failure with tiny features

Problem:    Build failure with tiny features.
Solution:   Add #ifdef.

2a3cd3af45

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-14 20:35:46 +08:00
zeertzjq
d6e2804ab4 vim-patch:8.2.1794: no falsy Coalescing operator
Problem:    No falsy Coalescing operator.
Solution:   Add the "??" operator.  Fix mistake with function argument count.

92f26c256e

Cherry-pick tv2bool() into eval/typval.c.
Cherry-pick *??* tag from Vim runtime.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-14 18:04:09 +08:00
NAKAI Tsuyoshi
7caf0eafd8
feat(lua)!: add stricter vim.tbl_islist() and rename old one to vim.tbl_isarray() (#16440)
feat(lua)!: add stricter vim.tbl_islist(), rename vim.tbl_isarray()

Problem: `vim.tbl_islist` allows gaps in tables with integer keys
("arrays").

Solution: Rename `vim.tbl_islist` to `vim.tbl_isarray`, add new
`vim.tbl.islist` that checks for consecutive integer keys that start
from 1.
2023-04-14 12:01:08 +02:00
Christian Clason
4d04feb662
feat(lua): vim.tbl_contains supports general tables and predicates (#23040)
* feat(lua): vim.tbl_contains supports general tables and predicates

Problem: `vim.tbl_contains` only works for list-like tables (integer
keys without gaps) and primitive values (in particular, not for nested
tables).

Solution: Rename `vim.tbl_contains` to `vim.list_contains` and add new
`vim.tbl_contains` that works for general tables and optionally allows
`value` to be a predicate function that is checked for every key.
2023-04-14 10:39:57 +02:00
Gregory Anders
bfb28b62da
refactor: remove modelines from Lua files
Now that we have builtin EditorConfig support and a formatting check in
CI, these are not necessary.
2023-04-13 23:29:13 +02:00
Lewis Russell
66c66d8db8
fix(loader): reset hashes when running the loader 2023-04-13 17:34:47 +01:00
bfredl
231e1988ed
Merge pull request #23054 from bfredl/nobehave
feat(ex_cmds)!: remove :behave
2023-04-13 12:39:05 +02:00
bfredl
e4a136f713 feat(ex_cmds)!: remove :behave
just use the individual options instead.

   set selection=exclusive
   set selectmode=mouse,key
   set mousemodel=popup
   set keymodel=startsel,stopsel
2023-04-13 12:15:30 +02:00
dundargoc
5ccec143d8
refactor: remove bugreport.vim
We already have :checkhealth that essentially supersedes it with more
useful error checking.
2023-04-12 23:38:56 +02:00
zeertzjq
1013aba462
docs: add vim.lsp.buf.formatting_sync() to deprecated.txt (#23045) 2023-04-12 22:52:06 +08:00
Mathias Fußenegger
37011bc45e
fix(diagnostic): rename buffer → bufnr in type annotation (#23042)
See `:h diagnostic-structure`, the property name is `bufnr`, not
`buffer`.
2023-04-12 15:16:15 +02:00
Christian Clason
f5231d61a5
fix(runtime): add commentstring for C# ftplugin (#23039)
Problem: No commentstring is set for C# buffers after removing the
default C-style commentstring

Solution: Add `ftplugin/cs.lua` with C-style commentstring
2023-04-12 13:59:11 +02:00
dundargoc
2b35de386e
refactor: remove :CheckHealth
Using :CheckHealth invokes an error, and many of the features from :checkhealth
doesn't even work such as calling only a specific check. Users should use
:checkhealth instead.
2023-04-12 00:01:34 +02:00
dundargoc
880f7d12fe
feat!: remove vimballs (#22402)
Vimball is an outdated feature that is rarely used these days. It is not
a maintenance burden on its own, but it is nonetheless dead weight and
something we'd need to tell users to ignore when they inevitably ask
what it is.

See: https://github.com/neovim/neovim/pull/21369#issuecomment-1347615173
2023-04-11 19:10:36 +02:00
NAKAI Tsuyoshi
9e86f473e0
feat(lua): vim.region accepts getpos() arg (#22635) 2023-04-11 16:28:46 +02:00
Scott Ming
ccc0980f86
fix(treesitter): Use the correct replacement args for #gsub! directive (#23015)
fix(treesitter): use the correct replacement args for #gsub! directive
2023-04-11 10:26:03 +02:00
zeertzjq
7ffe450173
fix(health): check for _host_prog variables properly (#23014) 2023-04-11 10:20:25 +08:00
zeertzjq
c8d1d8b254
fix(man.lua): don't continue on command error (#23009)
Fix #21169
2023-04-11 09:35:01 +08:00
Gregory Anders
03a021f378
fix(health): combine python and virtualenv healthchecks (#23004)
fix(health): combine python and virtualenv health checks
2023-04-10 15:46:22 -06:00
Gregory Anders
cde4892b49
fix(health): fix typo in function name 2023-04-10 22:37:25 +02:00
dundargoc
bd98ef6ac6
refactor: rewrite perl healthcheck in lua
This is required to remove the vimscript checkhealth functions.
2023-04-10 15:59:50 +02:00
dundargoc
b5c0e7137c
refactor: rewrite node healthcheck in lua
This is required to remove the vimscript checkhealth functions.
2023-04-10 15:26:22 +02:00
bfredl
436e0147f4
Merge pull request #22865 from MunifTanjim/issue-20370
fix(api): do not re-apply win_config.style when missing
2023-04-10 14:29:23 +02:00
dundargoc
7801ffc38a
refactor: rewrite ruby healthcheck in lua
This is required to remove the vimscript checkhealth functions.
2023-04-10 14:06:10 +02:00
Munif Tanjim
da979ae04b fix(api): do not re-apply win_config.style when missing 2023-04-10 16:26:42 +06:00
dundargoc
5ed7ede1f5
refactor: rewrite virtualenv healthcheck in lua
This is required to remove the vimscript checkhealth functions.
2023-04-10 11:28:42 +02:00
dundargoc
71225228fc
refactor: rewrite python provider healthcheck in Lua
This is required to remove the vimscript checkhealth functions.
2023-04-09 22:28:00 +02:00
dundargoc
41b7586cbb
refactor: rewrite clipboard provider healthchecks in Lua
This is required to remove the vimscript checkhealth functions.
2023-04-09 20:46:53 +02:00
Evgeni Chasnovski
99c86bae15
docs: add hl-DiagnosticDeprecated and hl-DiagnosticUnnecessary 2023-04-08 20:19:39 +03:00
zeertzjq
747264320c
refactor(mappings)!: remove #n as a notation for a function key (#17318)
This notation is hardly used and makes the behavior of the from_part
argument of nvim_replace_termcodes confusing.
2023-04-08 20:29:23 +08:00
zeertzjq
e6d3f87dfd
fix(termdebug): handle partial lines passed to callback (#22950)
Problem:
Job callbacks in termdebug cannot handle partial lines.

Solution:
Add a wrapper function that handles partial lines and only passes full
lines to the real callback.

Fix #22929.
2023-04-08 19:27:58 +08:00
Gregory Anders
d675bd01b1
feat(lua): allow vim.F.if_nil to take multiple arguments (#22903)
The first argument which is non-nil is returned. This is useful when
using nested default values (e.g. in the EditorConfig plugin).

Before:

  local enable = vim.F.if_nil(vim.b.editorconfig, vim.F.if_nil(vim.g.editorconfig, true))

After:

  local enable = vim.F.if_nil(vim.b.editorconfig, vim.g.editorconfig, true)
2023-04-07 08:22:47 -06:00
Christian Clason
82cfedab50
docs(news): create new news, rename old news (#22922) 2023-04-07 16:11:02 +02:00
bfredl
040f145984 NVIM v0.9.0
For a summary of notable changes, see runtime/doc/news.txt or run `:help news` within nvim.

BREAKING CHANGES
- Remove hardcopy
- Make iconv a non-optional dep
- Remove has("debug") (#22060)
- Make libintl a required dependency
- Rename vim.pretty_print => vim.print
- Rename sanitizer options from CLANG_* to ENABLE_*
- Remove the .deb release (#22773)
- **column**: Ensure 'statuscolumn' works with virtual and wrapped lines
- **cscope**: Remove
- **defaults**: Change default 'commentstring' value to empty (#22862)
- **edit**: Remove old c implementation of hebrew keymap
- **editorconfig**: Change editorconfig_enable to editorconfig
- **exepath**: Prefers extensionless for powershell
- **health**: Remove deprecated health.lua
- **lsp**: Add rule-based sem token highlighting (#22022)
- **lua**: Execute Lua with "nvim -l"
- **messages**: Graduate the 'msgsep' feature
- **options**: Deprecate paste, remove pastetoggle (#22647)
- **rpc**: Preseve files when stdio channel is closed (#22137)
- **runtime**: Remove filetype.vim (#20428)
- **treesitter**: Remove g:ts_highlight_lua (#22257)
- **treesitter**: Remove silent option from language.add()
- **treesitter**: Consolidate query util functions
- **treesitter**: Remove deprecated show_tree func
- **treesitter**: Deprecate top level indexes to modules (#22761)
- **treesitter**: Rename help parser to vimdoc

FEATURES
- Added support for @generic to lua2dox.lua
- Added support for optional params to lua2dox
- Added support for specifying types for lua2dox
- Mention ":help news" in intro #20674
- ":write ++p" creates parent dirs #20835
- Add vim.secure.read()
- `vim.inspect_pos`, `vim.show_pos`, `:Inspect`
- $NVIM_APPNAME #22128
- Try to recover from missing tempdir #22573
- Add `vim.filetype.get_option()`
- Add `vim.treesitter.language.get_filetypes()` (#22643)
- Allow function passed to defaulttable to take an argument (#22839)
- **api**: Nvim_select_popupmenu_item support cmdline pum (#20652)
- **api**: Add command name to Lua command callback opts
- **api**: Show more exception info
- **api**: More fields in nvim_list_uis
- **api**: Add filetype option nvim_get_option_value
- **api**: Add nvim_get_hl (#22693)
- **api**: Nvim_exec2(), deprecate nvim_exec() #19032
- **api**: Evaluate 'statuscolumn' with nvim_eval_statusline()
- **api**: Set statuscolumn line number in nvim_eval_statusline()
- **aucmd_win**: Allow crazy things with hidden buffers (#21250)
- **checkhealth**: Improve treesitter report
- **checkhealth**: Check runtime ($VIMRUNTIME)
- **checkhealth**: Use "help" syntax, avoid tabpage #20879
- **clipboard**: Copy to system clipboard in tmux when supported (#20936)
- **clipboard**: Added wayclip support (#21091)
- **diagnostic**: Add `suffix` option to `open_float()` (#21130)
- **diagnostic**: Add `suffix` option to `virt_text` config (#21140)
- **diagnostic**: Don't open quickfix/loclist if no diagnostics #21397
- **diagnostic**: Vim.diagnostic.is_disabled() #21527
- **diagnostic**: Add support for tags
- **docs**: Nested lists in HTML, update :help parser
- **docs**: Format parameters as a list #20485
- **docs**: Update parser, HTML gen #20720
- **docs-html**: Try to use tags for ToC headings
- **editorconfig**: Add builtin EditorConfig support
- **editorconfig**: Add editorconfig syntax file
- **editorconfig**: Allow editorconfig to be toggled dynamically
- **exrc**: Use vim.secure.read() for 'exrc' option
- **exrc**: Support .nvim.lua (#21436)
- **extmarks**: Allow preventing spellchecking with spell = false
- **extmarks**: Extend nvim_buf_get_extmarks()
- **filetype**: Fall back to file extension when matching from hashbang (#22140)
- **float**: Open float relative to mouse #21531
- **fs**: Add opts argument to vim.fs.dir()
- **gen_help_html.lua**: Remove old AWK scripts
- **health**: Detect tmux RGB support via `client_termfeatures`
- **help**: Highlighted codeblocks
- **highlight**: Add DiagnosticOk (and associated) highlight groups (#21286)
- **highlight**: Define the concept of altfont as a (c)term rendering attribute
- **l10n**: Update Turkish translations (#20444)
- **l10n**: Update zh_CN translations (#21085)
- **lsp**: Add bufnr option to lsp.start (#20473)
- **lsp**: Support window/showDocument (#19977)
- **lsp**: Run handler in coroutine to support async response (#21026)
- **lsp**: Support set title in lsp relate floatwindow (#21110)
- **lsp**: Support willSave & willSaveWaitUntil capability (#21315)
- **lsp**: Initial support for semantic token highlighting
- **lsp**: Highlight semantic token modifiers (#21390)
- **lsp**: Add function to get semantic tokens at cursor
- **lsp**: Add function to clear codelens (#21504)
- **lsp**: Show active clients in :checkhealth vim.lsp (#21670)
- **lsp**: Add triggerKind option for vim.lsp.buf.code_action (#21905)
- **lsp**: Implement workspace/didChangeWatchedFiles (#21293)
- **lsp**: Implement workspace/didChangeWatchedFiles (#22405)
- **lsp**: Overwrite omnifunc/tagfunc set by ftplugin #22267
- **lsp**: Render markdown in docs hover #22766
- **lsp**: Create default link from @lsp.type.comment to Comment (#22888)
- **lua**: Send "--" literally to Lua "-l" script
- **lua**: Exit 1 on Lua "-l" script error
- **lua**: Execute stdin ("-") as Lua
- **lua**: Store "nvim -l" scriptname in _G.arg[0]
- **lua**: Low-level interpreter mode (nvim -ll)
- **lua**: Make sure require'bit' always works, even with PUC lua 5.1
- **lua**: Add semver api
- **lua**: Omnifunc for builting lua interpreter
- **lua**: Use vim.empty_dict() for empty return value in new api functions  (#22737)
- **lua**: Allow `:=expr` as a shorter version of `:lua =expr`
- **lua**: Add `vim.loader`
- **lua-api**: Avoid unnecessary allocations (#19877)
- **man**: Add health check
- **man.lua**: Support spaces in manpage names
- **message**: Avoid spam on failed os_msg
- **packaging**: Add start menu and desktop shortcuts on Windows
- **provider**: Add support for Yarn node modules on Windows (#21246)
- **secure**: Add `:trust` command  and vim.secure.trust() (#21107)
- **spell**: Support nospell in treesitter queries
- **spell**: Also source `spell/LANG.lua` when setting `spelllang` (#22111)
- **test**: Add Lua forms for API methods (#20152)
- **treesitter**: Add vim.treesitter.show_tree() (#21322)
- **treesitter**: Add 'lang' option to show_tree() (#21341)
- **treesitter**: Show filetype associated with parser (#17633)
- **treesitter**: Allow capture text to be transformed
- **treesitter**: Add metadata option for get_node_text
- **treesitter**: Respect metadata[id].range for offset!
- **treesitter**: Playground improvements
- **treesitter**: Add filetype -> lang API
- **treesitter**: Upstream foldexpr from nvim-treesitter
- **treesitter**: Expand the API
- **treesitter**: Add :InspectTree command (#22477)
- **treesitter**: Bundle query parser and queries (#22483)
- **treesitter**: Use upstream format for injection queries
- **tui**: Run TUI as external process
- **tui**: Graduate the +tui feature
- **tui**: Support altfont mode in tui.c
- **ui**: Add support to display a title in the border of a float (#20184)
- **ui**: Add 'statuscolumn' option
- **ui**: Restore has('gui_running')
- **ui**: Add scroll_delta to win_viewport event #19270
- **vim-patch**: Mention original author #20772
- **vim.diff**: Allow passing an integer for linematch
- **vim.fs**: Pass path to find() predicate, lazy evaluate #22378
- **vim.fs**: Improve normalize
- **vim.gsplit**: Gain features of vim.split
- **vim.version**: More coercion with strict=false
- **web**: Syntax highlighting via highlight.js
- **window/ui**: Add splitkeep option (#19243)
- **windows**: Show icon in terminal titlebar, taskbar #20607

PERFORMANCE
- **column**: Only build fold/sign column when present in 'statuscolumn'
- **completion**: Use one call to globpath() for .vim and .lua #21942
- **diagnostic**: Use api variable and improve validate (#21111)
- **lsp**: Update semantic tokens algorithm for parsing modifiers (#21383)
- **lsp**: Only redraw the windows containing LSP tokens
- **lsp**: Better binary search mid calculation in semantic token (#22607)
- **statuscolumn**: Only fill click defs array once per redraw (#21884)
- **statusline**: UI elements are always redrawn on K_EVENT
- **treesitter**: Smarter languagetree invalidation
- **treesitter**: More efficient foldexpr
- **ui**: Mitigate redraw latency regression from TUI refactor

BUG FIXES
- Make_filter_cmd for :! powershell
- :! pwsh redirection for `command not found`
- Find multibyte file name in line (#20519)
- Change did_emsg back to int
- 'scroll' is not set correctly for floats with 'splitkeep'
- Setting tabline option not redrawing tabline
- Avoid unsigned overflow in home_replace() (#20854)
- Add lfs to luarc.json (#20979)
- Vim.ui.input always calls callback #21006
- Don't disable compositor widgets when a GUI with multigrid attaches
- Pvs warnings (#21145)
- Clang warnings (#21247)
- Vim.opt_local:append ignoring global option value (#21382)
- Issues with command line if ui elements are externalized
- Properly close builtin popup in ext_popupmenu
- Failing XDG test on Windows CI
- Pass value instead of pointer to isalpha (#21898)
- Use correct number for INT_MAX (#21951)
- Add manifest file to correctly determine Windows version (#21953)
- Uv_tty_set_mode failed in Windows #22264
- Lsp github issue template example (#22285)
- Remove "Features" section from --version/:version (#22315)
- Remove "Compiled by:" from :version/--version (#22316)
- Add missing void as function argument (#22317)
- Windows assertion failure due to incorrect path length (#22324)
- Resolve error from -Werror=maybe-uninitialized
- Address -Wmaybe-uninitialized warnings (#22436)
- Pasting in terminal buffer on windows #22566
- Invalid buffer size argument to snprintf #22729
- Snprintf buffer overflow detected by -D_FORTIFY_SOURCE=3 (#22780)
- **MSVC**: Set the active code page to utf-8 (#22384)
- **Windows**: Restore console title at exit #21922
- **api**: Dynamically allocate line buffer for nvim_out_write (#20537)
- **api**: Nvim_buf_get_text regression (#21071)
- **api**: Nvim_win_set_cursor redraw cursorcolumn for non-current window (#21072)
- **api**: Set correct curbuf when temporarily changing curwin (#21371)
- **api**: "emsg_silent" should imply "silent" in nvim_cmd (#21438)
- **api**: Nvim_create_autocmd crash on invalid types inside pattern array
- **api**: Avoid memory leak with click functions in nvim_eval_statusline() (#21845)
- **api**: Don't allow hiding aucmd_win from another tabpage (#21975)
- **api**: Allow empty Lua table for nested dicts #22268
- **api**: Set script context when setting usercmd or option (#22624)
- **api**: Vim.filetype.get_option() (#22753)
- **api**: Make nvim_get_hl return 'cterm' attrs properly
- **api**: Use local LastSet structure in nvim_get_option_info (#22741)
- **api**: Return both link and attributes with nvim_get_hl (#22824)
- **api**: Avoid double hit-enter prompt with nvim_err_writeln (#22879)
- **autocmd**: Handle recursion for force set (#22820)
- **buffer_updates**: Save and restore current window cursor (#16732)
- **build**: "make clean" fails
- **build**: Duplicate version string "v0.8.0-v0.8.0" #20578
- **build**: Fix invalid use of EXITFREE
- **chansend**: Sending lines to terminal in reverse order on Windows #19315
- **ci**: Skip test on windows (#21502)
- **ci/release/winget**: Bump action version
- **client**: Wait for session to exit
- **clint**: Disable whitespace/newline #20619
- **clipboard**: Prefer xsel #20918
- **clipboard**: Update version regex pattern (#21012)
- **clipboard**: Show provider warning when not during batch changes #21451
- **column**: Avoid drawing columns for virt_lines_leftcol
- **column**: Estimate 'statuscolumn' width appropriately
- **column**: No longer reset nrwidth_line_count for 'statuscolumn'
- **column**: Cmdwin cursor is offset with 'statuscolumn' (#22445)
- **column**: Issues with 'statuscolumn' width (#22542)
- **column**: Rebuild status column when sign column is invalidated (#22690)
- **column**: Invalidate statuscolumn width when UPD_NOT_VALID (#22723)
- **completion**: Set pum_size even if ext_popupmenu is used (#20648)
- **completion**: Correct what modes support fuzzy completion
- **completion**: Include lua syntaxes in :ownsyntax completion (#21941)
- **coverity/433537**: Don't call kv_concat_len() when read_size is 0 (#21664)
- **decoration**: Redraw correctly when re-using ids
- **decoration**: Call providers in win_update() earlier
- **decoration**: Do not reset must_redraw after calling providers (#21459)
- **decoration**: Don't show signcolumn for non-sign_text extmark (#22135)
- **diagnostic**: Correct type annotations; add Diagnostic type (#21120)
- **diagnostic**: Clear stale cache on reset (#21454)
- **diagnostic**: Sort diagnostics by column (#21457)
- **diagnostic**: Revert notification on missing diagnostics (#21632)
- **diagnostic**: Use correct field name for tags (#22835)
- **diff**: Remove size_t underflow (#20929)
- **diff**: Fix a crash in diff mode with linematch enabled (#21070)
- **diff**: Handle long lines without crashing (#21389)
- **diff**: Avoid restoring invalid 'foldcolumn' value (#21650)
- **diff**: "nvim -d" should only diff arglist files #21829
- **diff**: Adjust extmarks after diffput/diffget (#22440)
- **diff**: Add NULL check
- **diff**: Trigger on_bytes only once after diffget/diffput
- **diff.c**: Regression in diffgetput (#20843)
- **docs**: Missing "(" in :help HTML
- **docs**: Nil as viable argument for goto_prev (#20852)
- **docs-html**: Keycodes, taglinks, column_heading #20498
- **docs-html**: Update parser
- **docs-html**: Misaligned tabs after conceal #20690
- **edit**: Don't subtract msg_scrolled when removing double quote (#22630)
- **editorconfig**: Do not highlight unknown properties as errors (#21673)
- **embed**: Handle stdio in server properly
- **eval**: Make error number of charidx() same as Vim
- **eval**: Change some tv_dict_add() usages back to hash_add()
- **events**: Save v:event for cmdline autocommands separately (#21316)
- **events**: Skip WinScrolled for newly-created float windows (#21333)
- **ex_cmds**: Fix a mistake in the porting of Vim patch 8.1.0306 (#21096)
- **exit**: The TUI should not ui_flush() itself (#21625)
- **exit**: Skip unnecessary steps in TUI preserve_exit() (#21897)
- **extmarks**: Adjust extmarks when inserting prompt prefix
- **extmarks**: Problems with folded virtual lines (#21930)
- **extmarks**: Don't leak memory on error (#22507)
- **fileio**: Use first available directory in backupdir for backupcopy (#20655)
- **fileio.c**: Don't use uninitialized memory (#22031)
- **filetype**: Don't pass empty string to detect (#20766)
- **filetype**: Correctly detect tex files
- **filetype**: Make vim.filetype.match() work with contents only (#22181)
- **filetype**: Avoid recursive FileType autocmds (#22813)
- **filetype**: Make recursive work...again (#22826)
- **float**: Make closing float in another tab return to correct window
- **float**: Fix ml_get error with bufpos
- **float**: Fix crash with bufpos and non-existent window (#21319)
- **float**: Remove -1 in height clamp
- **folds**: Fix fold marker multibyte comparison (#20439)
- **folds**: Use long for number of folded lines (#21447)
- **folds**: Cursorline highlight is not always applied on closed folds (#22242)
- **folds**: Handle visual blockwise indent insertion correctly (#22898)
- **fs**: Duplicate path separator #21509
- **health**: Correct tmux rgb verification (#20868)
- **health**: Fix `tmux_esc_time` comparison
- **health**: Iterate using ipairs correctly (#22119)
- **health**: Stop using deprecated ts.language.inspect_language() (#22850)
- **help**: Force tree reparse after local addition insertion
- **helpers**: Restore channel id after a call to WITH_SCRIPT_CONTEXT
- **highlight**: Link more treesitter groups by default (#20711)
- **highlight**: Properly deal with underline mask when listing (#22057)
- **highlight**: Avoid ORing underline flags (#22372)
- **highlight**: Use winhl=Foo:Bar even when Bar is empty
- **inspect**: Alwasy resolve full treesitter lang hl groups
- **intro**: Omit patch version in ":help news" item #20713
- **intro**: Make :help news line easier to translate (#21974)
- **lintcommit**: Capitalized description #22282
- **loader**: Disable profiling by default
- **lsp**: Reporting bogus capabilities in CodeActionKind #20678
- **lsp**: Ignore hover and signatureHelp responses on buffer change (#21121)
- **lsp**: Render <pre>{lang} code blocks and set separator default to false (#21271)
- **lsp**: Remove workspaceFolders field (#21284)
- **lsp**: Call show_document with correct args
- **lsp**: Ensure open_logfile is safe for fast events (#21288)
- **lsp**: Followup fixes for semantic tokens support (#21357)
- **lsp**: Correct some type annotations (#21365)
- **lsp**: Fix get_active_clients bufnr parameter (#21366)
- **lsp**: Ignore null responses for semanticTokens request (#21364)
- **lsp**: Token_edit.data might be null on deletion (#21462)
- **lsp**: Adjust gravity of semantic tokens extmarks (#21574)
- **lsp**: Fix nil client access in get_active_clients (#21524)
- **lsp**: Change vim.lsp.get_active_clients.filter name annotation to string (#21624)
- **lsp**: Correct callHierarchy capability to fix lsp.buf.incoming_calls() (#21665)
- **lsp**: Fix `removed` param value in add_workspace_folder (#21915)
- **lsp**: Assert workspace/applyEdit receives params (#21945)
- **lsp**: Check method is supported when range formatting (#21970)
- **lsp**: Check if the buffer is a directory before w! it (#22289)
- **lsp**: Wrong format of bufnr and client order in error message (#22336)
- **lsp**: Fix some type annotations (#22397)
- **lsp**: CallHierarchy methods also require the callHierarchyProvider (#22427)
- **lsp**: Use buffer scheme for files not stored on disk (#22407)
- **lsp**: Only fire LspDetach for attached buffers (#22468)
- **lsp**: Don't monitor files if workspace_folders is nil (#22531)
- **lsp**: Change LspTokenUpdate to use buffer instead of pattern (#22559)
- **lsp**: Prevent lsp tests from picking up local user config (#22606)
- **lsp**: Send didClose on buffer rename (#22623)
- **lsp**: Use line start/end for visual line selection (#22632)
- **lsp**: Remove_workspace_folders fails if client has no workspace_folders #22633
- **lsp**: Vim.lsp.util.apply_text_edits cursor validation #22636
- **lsp**: Kill buffers after renaming a directory #22618
- **lsp**: Avoid switching buffers on lsp attach (#22689)
- **lsp**: Jump to tag locations reliably when :ltag is used (#22750)
- **lsp**: Add missing silent check in lsp hover handler (#22763)
- **lsp/window_showDocument**: Correctly handle external resources #20867
- **lua**: Properly configure luacheck and remove `local vim = ...` lines (#20551)
- **lua**: Assert failure with vim.regex() error inside :silent! (#20555)
- **lua**: On_yank error with blockwise multibyte region #20162
- **lua**: Pesc, tbl_islist result types #20751
- **lua**: Make `vim.deepcopy` work with `vim.NIL`
- **lua**: Always return nil values in vim.tbl_get when no results
- **lua**: Mark some eval functions that can run in API-fast
- **lua**: Vim.deprecate() shows ":help deprecated" #22677
- **luado**: Get old_line length before executing Lua code
- **man**: Support MacOS 13
- **man**: Handle absolute paths as `:Man` targets (#20624)
- **man**: Use italics for `<bs>_` (#22086)
- **man.lua**: Set modifiable before writing page (#20914)
- **man.lua**: Use `env` command (#21007)
- **man.lua**: Open in current window if it's already a man page (#21987)
- **man.lua**: Tests, naming
- **mappings**: Use all buckets in second round of unmap (#21534)
- **mappings**: Fix check for cpo-B inverted in completion
- **mappings**: Make "<" escaping in completion match Vim
- **mark**: Do not restore view in op-pending mode (#20889)
- **memline**: Use long instead of linenr_T for db_line_count
- **memory**: Fix memory alignment for dynamic allocation
- **messages**: Reset msg_grid_scroll_discount when redrawing (#21000)
- **messages**: Don't set cmdline_row when messages have scrolled (#21015)
- **mouse**: Ensure no scrolling with "ver:0" in 'mousescroll' (#20861)
- **mouse**: Statusline click registered as statuscolumn (#21748)
- **options**: No matter what is said, 'cmdheight' is tab-local (susy baka)
- **options**: Fix local 'sidescrolloff' doesn't work for mouse (#21162)
- **options**: Restore exists() behavior for options (#21510)
- **paste**: Feed keys as typed in cmdline mode (#20959)
- **path**: Don't remove trailing slash when getting absolute path (#20853)
- **powershell**: Wrong length allocation for ":%w !" #20530
- **qflist**: Avoid read of uninitialized memory (#20709)
- **rbuffer**: Handle edge case where write_ptr has wrapped around
- **redraw**: Get the line again after evaluating something
- **remote**: Don't leak memory on failure to connect to server (#21931)
- **rpc**: Don't free args on error in rpc_send_event
- **rpc**: Don't parse msgpack if buflen is 0 (#21899)
- **rpc**: Ignore redraw events when not in UI client (#21892)
- **rpc**: Ignore redraw events when exiting (#22184)
- **runtime**: Properly rely on t_Co for colorschemes (#20602)
- **runtime**: Use `g:terminal_color_{0-15}` in colorschemes (#20637)
- **screen**: Correctly draw background and eob with 'rightleft' (#22640)
- **screen**: Redraw the ruler for a current floating window
- **secure**: Crash when hitting escape in prompt (#21283)
- **shell**: On Windows :make does not echo #22728
- **showcmd**: Assert failure with cmdheight=0 (#21536)
- **sleep**: Correct cursor placement (#22639)
- **spell**: Fix wrong cast (#20810)
- **spell**: Properly source spell/LANG.{vim,lua} (#22716)
- **startup**: Support .exrc or .nvimrc with init.lua (#21181)
- **status**: Handle unprintable chars in the statusline
- **statuscolumn**: Fix crashes and clang/PVS warnings (#21725)
- **statuscolumn**: Fix sign column highlights (#21727)
- **statuscolumn**: Foldcolumn buffer is too small (#21761)
- **statuscolumn**: Make %l/%r respect 'number'/'relativenumber' (#21747)
- **statuscolumn**: Always fill click defs array (#21878)
- **statusline**: Don't show showcmd when not enough space (#21550)
- **statusline**: Make nvim_eval_statusline() work with %S (#21553)
- **statusline**: Don't leak memory with zero-width click labels
- **statusline**: Don't leak memory with truncated click labels
- **stdpath**: Default to /tmp if stdpath('run') cannot be created #20952
- **syntax**: Correct conceal for annotated code blocks (#21272)
- **tabline**: Avoid memory leak in tabline click definitions (#21847)
- **terminal**: Fix 'mousescroll' not respected in terminal mode (#21415)
- **test**: Unset XDG_CONFIG_HOME when running oldtest
- **test**: Fix issues detected by running unittests in ASAN/UBSAN
- **test**: Fix C imports on macOS arm64
- **tests**: Only get the color map once, even for multiple test files
- **tests**: Initialize Screen.colors in API highlight tests
- **tests**: Use -l mode for lsp tests
- **tests**: Fixes for using vim.mpack and more ASAN
- **tests**: Adapt treesitter/highlight_spec priority test
- **treesitter**: Properly restore `'syntax'` (#21358)
- **treesitter**: Really restore syntax
- **treesitter**: Validate language name
- **treesitter**: Fix most diagnostics
- **treesitter**: Don't trample parsers when filetype!=lang
- **treesitter**: Make params optional
- **treesitter**: Fixup language invalidation (#22381)
- **treesitter**: Remove virtual text from playground
- **treesitter**: Ipairs -> pairs
- **treesitter**: Fixup for health
- **treesitter**: Maintain cursor position when toggling anonymous nodes
- **treesitter**: Disallow empty filetypes
- **treesitter**: Typos in _range.lua
- **treesitter**: Break early from loop when match is found (#22499)
- **treesitter**: Raise ts_match_limit to 256 (#22497)
- **treesitter**: Is_in_node_range (#22582)
- **treesitter**: Correct include_bytes arg for parse()
- **treesitter**: Do not error on empty filetype
- **treesitter**: Better lang handling of get_parser()
- **treesitter**: Foldexpr (#22652)
- **treesitter**: InspectTree does not respect 'splitright' #22692
- **treesitter**: Annotations
- **treesitter**: Add missing deprecate
- **treesitter**: Update queries from nvim-treesitter
- **treesitter**: Use capture metadata range if exists
- **treesitter**: Disable folding in inspect_tree() (#22885)
- **treesitter**: Do not track ranges of the root tree (#22912)
- **ts**: Check buffer is loaded when restoring options (#21419)
- **tui**: Resume main thread if suspending isn't implemented (#20523)
- **tui**: Set cursor color param as string when required #21407
- **tui**: More work in the TUI
- **tui**: Do not set ui_client_termname if it is already set (#21607)
- **tui**: Make a copy of data->params before unibi_format() (#21643)
- **tui**: Do not invoke loop recursively for pad()
- **tui**: Set stdin as "blocking" on exit (#21973)
- **tui**: Detach/attach on suspend/resume (#22040)
- **tui**: Exit on input eof
- **tui**: Set taskbar, icon in Windows #22270
- **tui**: Only forward stdin_fd on first attach (#22293)
- **tui**: Properly check if stdin is a tty (#22321)
- **tui**: Avoid stack-use-after-scope with cursor color (#22435)
- **tutor**: Failing to get buf name #20933
- **ui**: Msg_ext_set_kind for nvim_echo (#20476)
- **ui**: Setting 'cmdheight' with global statusline (#20515)
- **ui**: Send grid_resize events before triggering VimResized (#20760)
- **ui**: Fix some cases of stale highlight definitions
- **ui**: Allow resize commands to set 'cmdheight' to 0
- **ui**: Fix fragile UI_CALL macro invocation (#21656)
- **ui**: Convert title_pos string in nvim_win_get_config
- **ui**: Set stc to empty in floatwin with minimal style (#21720)
- **ui**: Command line issues with external messages (#21709)
- **ui**: Re-organize tty fd handling and fix issues
- **ui**: Make sure screen is valid after resizing
- **ui**: Recording change doesn't trigger statusline redraw
- **ui**: Ruler is not redrawn in cmdline with redrawstatus
- **ui-ext**: Correct message kind in history before vim.ui_attach()
- **ui-ext**: Log and clear error in ui_comp_event (#21147)
- **ui-ext**: Force cursor update after resize in char-based UI
- **unittest**: Delete unused duplicated code
- **unittests**: Do not consider process crash to be a success
- **unittests**: Fix TUI broken test previously ignored
- **vim-patches**: Ensure libfuse is installed
- **vim.diff**: Correctly apply hunk offsets with linematch (#20931)
- **vim.diff**: Fix fastforward off-by-1 (#20937)
- **vim.ui.input**: Return empty string when inputs nothing (#20883)
- **vim.version**: Incorrect version.cmp()
- **vim.version**: Prerelease compare
- **win_close**: Remove float grid after closing buffer (#21551)
- **win_update**: Don't use unintialized memory in edge case (#22266)
- **windows**: Set console icon later in startup
- **windows**: Consistent normalization in fs.find

BUILD SYSTEM!
- Remove unused variable CMAKE_C_COMPILER_ARG1
- Remove code for cross-compilation
- Remove url for 32-bit winyank
- Remove unnecessary translation-related code
- Rely on builtin cmake downloading rather than custom script
- Define EP_PREFIX property
- Only generate compilation database for the nvim target (#20449)
- Remove EXITFREE for debug builds
- Generate compilation database for older cmake versions
- Add clang-tidy configuration file (#15601)
- Fix incorrect clang-tidy identifier rules (#20650)
- Rely on default cmake installation if possible
- Give example on complex regexes
- Preprocess vim patches with uncrustify #20786
- Copy each treesitter parser library individually #20797
- Fix plural messages missing from .po files (#20830)
- Make update-po support optwin.vim (#20840)
- Remove python linting #20851
- Add EXCLUDE option to add_glob_target
- Always ignore user's cmake preset (#20935)
- Allow IWYU to fix includes for all .c files
- Restrict `git describe` to top level source directory (#20993)
- Fix help tags generation when SHELL=fish (#21562)
- Add git sha to version when built with nix flake (#21210)
- Remove workaround for old luajit versions
- Remove workaround for ancient clang versions
- Use modern cmake (#21589)
- Include our libraries before system libraries (#21746)
- Enable iwyu with target properties instead of variables (#21797)
- Exclude tui/terminfo_defs.h from lintc-clint (#21822)
- Enable cmake workflow presets (#21860)
- Remove nvim as a dependency of unittests (#21903)
- Various cmake fixes (#21902)
- Bump MSVC warning to level two (#21890)
- Use CMAKE_POSITION_INDEPENDENT_CODE instead of -fPIC (#21947)
- Make generated source files reproducible #21586
- Remove unnecessary unit test code (#21940)
- Use cmake for all platforms for unibilium and libtermkey (#21926)
- Simplify treesitter installation (#21969)
- Use upstream CMakeLists.txt for unibilium (#21976)
- Delete pthreads import (#21732)
- Remove GNU make check (#21977)
- Remove tests for libtermkey (#21983)
- Use cmake to build treesitter on all platforms (#21984)
- Introduce default build variables (#21991)
- Use cmake to build libvterm on all platform (#21986)
- Check if libvterm version meets requirement (#22010)
- Find unibilium without relying on libfindmacros (#22015)
- Fix dependencies in find modules (#22017)
- Enable ccache by default if available (#22020)
- Enable ccache project-wide (#22045)
- Add uninstall make target (#22059)
- Remove unnecessary file generation (#22099)
- Update release data
- Stop relying on CMAKE_BUILD_TYPE to determine the build type (#22051)
- Unbreak building neovim with multi-config generators (#22104)
- Don't build libnvim when running the CI (#22149)
- Remove duplicate INTERFACE keyword (#22106)
- Prefer -D <variable>=<value> over -D<variable>=<value> (#22164)
- Replace check-single-includes with clang-tidy (#22061)
- Remove unused function get_test_target (#22176)
- Reuse source files with interface library (#22177)
- Create test/CMakeLists.txt and move test-related code (#22179)
- Remove codecov related files (#20859)
- Mark uninteresting variables as advanced (#22208)
- Enable MSVC level 3 warnings (#21934)
- Don't check environment variable to detect CI (#22234)
- Treat clang-tidy warnings as errors (#22238)
- Remove ENABLE_COMPILER_SUGGESTIONS option (#22249)
- Only use HOSTNAME_PRG if HOSTNAME is undefined (#22288)
- Use custom command to create single versiondef (#22290)
- Use libuv config file (#22209)
- Test multi-config generator (#22310)
- Build all dependencies in parallel (#22329)
- Remove unused dependency penlight (#22334)
- Build luajit in parallel (#22327)
- Set libtermkey project language to C (#22410)
- Remove pkgconfig-related code (#22422)
- Remove libfindmacros library (#22423)
- Cmake cleanup (#22251)
- Unset variables ending with "URL" if USE_EXISTING_SRC_DIR is ON
- Show build type specific compiler flags when using --version
- Fix unknown pragma warning with mingw (#22533)
- Consistently use the provided option paths
- Fix USE_EXISTING_SRC_DIR option
- Silence git describe error output
- Remove workaround for incorrectly packaged libluv
- Enable unit testing on release builds (#22554)
- Fix build warning when using gcc 4.9.2
- Explicitly add dependency include dir for header generation
- Sanitizers for gcc
- Set CMAKE_C_STANDARD to 99 for all dependencies
- Drop curl.exe on Windows
- Download wintools executables separately
- Cmake cleanup
- **MSVC**: Enable assertions on RelWithDebInfo build type (#22326)
- **Windows**: Fix redoing version generation (#21880)
- **Windows**: Make bundling nvim-qt optional (#21866)
- **Windows**: Allow building without custom md5sum
- **bump_deps.lua**: Run command -v in shell (#22030)
- **ci**: Let ASAN print tracebacks for more errors (SIGABORT, SIGILL)
- **cmake**: Add modelines to enable syntax highlighting
- **deps**: Restore support for USE_EXISTING_SRC_DIR (#20491)
- **deps**: Add build type for libuv (#20575)
- **deps**: Disable shared library for libvterm. (#20566)
- **deps**: Bump tree-sitter to v0.20.8 (#22663)
- **deps**: Bump luarocks to v3.9.2
- **deps**: Bump coxpcall to 1.17.0-1
- **deps**: Bump luacheck to 1.1.0-1
- **deps**: Bump mpack to 1.0.10
- **deps**: Bump lua parser to v0.0.14 (#20897)
- **deps**: Switch vim parser to maintained fork (#22896)
- **deps**: Bump vimdoc parser to v2.0.0 (#22870)
- **deps**: Set query parser to release (#22603)
- **deps**: Bump libvterm to v0.3.1
- **deps**: Bump msgpack-c to v6.0.0 (#22522)
- **deps**: Bump win32yank to v0.1.1 (#22700)
- **deps**: Bump actions/stale from 7 to 8
- **deps**: Switch to Launchpad for libvterm and libtermkey (#22811)
- **editorconfig**: Set indent_size to 4 for python files (#21135)
- **lint**: Remove clint.py rules for braces #20880
- **lint**: Add more shell scripts to lintsh
- **lintsh**: Double quote to prevent word splitting (#21571)
- **luarocks**: Update busted version to v2.1.1 (#22029)
- **nix**: Change the pkgs to final, add new version of libvterm (#20410)
- **nix**: Update nixpkgs
- **nix**: Clean up nix flake (#21565)
- **nix**: Remove pylint as it has been removed (#21572)
- **nix**: Fixed build (#22918)
- **vim-patch.sh**: Handle added/removed files properly
- **vim-patch.sh**: Checkout files with path for uncrustify (#20863)
- **windows**: Export extern symbols for use in FFI #22756
- **windows**: Specify Windows 8 as the minimum version (#22173)
- **windows**: Work around luarocks not finding its own md5sum

DOCUMENTATION
- Refer to vim.lsp.start() in LSP issue template #20422
- Fix incorrect :help tag (#20511)
- Added proper annotations to functions in shared.lua
- Fix typos
- Fix/remove invalid URLs #20647
- "supported platforms" matrix #19615
- Update vimdoc parser #20747
- ":che" is ":checkhealth" #20147
- .git-blame-ignore-revs (#20820)
- Swap CursorLineFold and CursorLineSign (#20875)
- Add language annotation to Nvim manual
- Add missing docs from some Vim patches (#21296)
- Dark/light color/accessibilty pass for generated html docs #21345
- Add links to extmarks and namespaces (#21378)
- Remove "How-to disable mouse" menu item #21394
- Add security policy (#17338)
- Fix order of numbers in syntax.txt (#21581)
- Clarify line about converse of lua-heredoc (#21592)
- Fix treesitter parsing errors
- Add 'statuscolumn' docstrings (#21717)
- Builtin TUI is no longer channel 0 (#21794)
- Treesitter.add_directive, add_predicate #21206
- Docs: use codeblocks in runtime/doc/options.txt (#21919)
- Clarify :runtime behavior without [where] again (#22003)
- Clarify "pipe" mode for sockconnect
- Reword news.txt to ensure a consistent style (#22215)
- Remove mentions of 'balloonexpr' #22049
- Remove the test badge from the README (#22350)
- Mention getmousepos() for click execute function label
- Naming conventions, guidelines
- Fix more treesitter parsing errors
- Use build/bin/nvim instead of nvim in gen_vimdoc (#22398)
- Fix vim.treesitter tags
- Lua2dox.lua debugging
- Module-level docstrings (@defgroup) #22498
- Add missing highlight groups for floats
- Add removed features in news.txt
- Fix g:terminal_color_x terminal colors #22746
- More details about vim.region (#21116)
- How to debug TUI using gdb/lldb #22771
- Add vim.treesitter.query.get_query() to deprecated.txt
- **README**: Add Kotlin as a language which can use the API (#21567)
- **README**: Fix CI status badge (#22308)
- **api**: Pattern is not expanded for autocommands (#20812)
- **api**: Fix treesitter parsing errors
- **api**: Tweak data arg for nvim_create_autocmd (#22008)
- **api**: Link to nvim_set_hl_ns from nvim_set_hl (#22678)
- **dev-style**: Remove rule about variable declarations (#20446)
- **dev-style**: Remove rules covered by uncrustify
- **diagnostic**: Number → integer (#22512)
- **docstrings**: Fix runtime type annotations
- **editorconfig**: Update news.txt
- **editorconfig**: Add editorconfig.txt
- **editorconfig**: Number → integer (#22514)
- **filetype**: Number → integer (#22516)
- **gen**: Support language annotation in docstrings
- **gitignore**: Correct oldtest path
- **help**: Consistent headers for local additions
- **highlight**: Fix type annotations (#22272)
- **html**: Render @see items as a list #22675
- **inspect**: Number → integer (#22511)
- **lsp**: Add formatting APIs to deprecated.txt (#20487)
- **lsp**: Update buf_notify and rpc.notify params types (#21753)
- **lsp**: Fix type annotation on convert_input_to_markdown_lines (#21772)
- **lsp**: Format arguments to start_client() (#21980)
- **lsp**: Update cmd_env description (#22438)
- **lsp**: Change type annotations from number → integer (#22510)
- **lsp**: Type annotation for lsp.client (#22509)
- **lsp**: More precise type annotations (#22621)
- **lsp**: Opt-out of default LSP "gq" #22615
- **lua**: Add clarifications for fs.find() and fs.normalize() (#21132)
- **lua**: Correct the tags for vim.opt_local and vim.opt_global (#21138)
- **lua**: Correct vim.spell.check example (#21311)
- **lua**: Add guide to using Lua in Neovim (#21137)
- **lua**: Add `vim.json` (#21538)
- **lua**: Fix treesitter parsing errors
- **lua**: Adjust some type annotations
- **lua**: Lua-guide: <Nop> is for rhs of vim.keymap.set(), not lhs (#21814)
- **lua**: Use luaref tag instead of www.lua.org #21813
- **lua**: Number → integer (#22517)
- **luvref**: Fix treesitter parsing errors
- **luvref**: Update to version bump
- **maintain**: CI strategy #20778
- **maintain**: Add note on updating luvref.txt
- **manual**: Fix treesitter parsing errors
- **news**: Add news.txt and link from README (#20426)
- **options**: Remove mentions of 'imactivatefunc' and 'imstatusfunc'
- **shell**: Mention "&" for piping with powershell #20459
- **support**: Update tested versions (#21126)
- **test**: Using cmake directly (without make) #22781
- **treesitter**: Fix predicate syntax (#21016)
- **treesitter**: Change links for `eq?` and `set!` to codeblocks  (#21047)
- **treesitter**: Use full function names in tags (#21321)
- **treesitter**: Fix parse errors
- **treesitter**: Number → integer (#22513)
- **treesitter**: Add query injections
- **tutor**: Fix TODO line demo (#21965)
- **uri**: Number → integer (#22515)
- **usr**: Make usr_05.txt more coherent with Nvim changes (#22428)
- **usr_05**: Update sentence about Nvim default behavior of Q (#20817)
- **vim.fs**: Normalize Windows example was incorrect (#21966)
- **website**: Soft wrap code blocks #21644

REFACTOR
- Remove char_u type and replace with char, uint8_t, etc
- remove STRNCMP (#21208) and STRLCPY (#21235)
- Remove clint error suppression as all errors has been fixed #21782
- Explicitly convert HANDLE to intptr_t for _open_osfhandle()
- Clang-tidy fixes to silence clangd warning (#20683)
- Fix uncrustify lint errors
- Move do_mouse() and its helpers to mouse.c (#20895)
- Fix clang-tidy warnings
- Click definition functions #20923
- Remove stray emsg check after #20992 (#20996)
- Move tabline code to statusline.c (#21008)
- Convert drawline.c draw states to enum (#21067)
- Remove __STDC_ISO_10646__ check
- Deprecate 'secure' option
- Remove old TODO comments that aren't relevant anymore (#21144)
- Maybe suppress a PVS warning
- Rework parameter validation in vim.secure.trust() (#21223)
- Buffer_ensure_loaded()
- Move ex_retab() to indent.c
- Remove COMMA (#21260)
- Make sure getting a callback doesn't modify argument
- Rename mch_msg => os_msg
- Rename mch_get_acl => os_get_acl
- Eliminate os_unix.c #21621
- Extract code to open stdin for reading
- Eliminate bump-deps.sh using "nvim -l"
- Fix IWYU mapping file and use IWYU (#21802)
- Format with stylua (#21821)
- Remove E5500, adjust tests
- Fix sign conversion warning from gcc (#21833)
- Use uint8_t for blobs and ga_append() (#21916)
- Use flexible arrays instead of the length-of-one trick (#22072)
- Reduce scope of locals as per the style guide (#22206)
- Move init_default_autocmds to lua
- Rename show_tree => inspect_tree #22474
- Move ga_loaded to runtime.c (#22626)
- Do more in TRY_WRAP
- Add const and remove unnecessary casts (#22841)
- Use bool type for global variables (#22842)
- Rename local API alias from a to api
- Make error message definitions const
- Remove use of reserved c++ keywords
- **PVS**: Suppress false positive V547 in drawline.c (#21875)
- **PVS/V1048**: Remove unnecessary assignment (#21870)
- **PVS/V1048**: Remove redundant assignment (#21871)
- **PVS/V1048**: Remove duplicated assignments (#21873)
- **PVS/V581**: Merge identical if statements (#22390)
- **api**: Do not allocate temporaries for internal events
- **api**: VALIDATE macros #22187 #22256 #22262
- **build**: Remove unused stdlib function and include checks
- **build**: Graduate HAVE_LOCALE_H feature
- **build**: Graduate libtreesitter features which are 1+ years old
- **build**: Graduate msgpack-c FLOAT32 "feature" since forever
- **build**: Graduate unibilium VAR_FROM feature from 2017
- **build**: Graduate -Wvla, -fno-common and -Og "features"
- **build**: Make installation of runtime/ more effective
- **checkhealth**: Convert "nvim" check to Lua
- **clint**: Convert short to int16_t (#20815)
- **column**: Remove unused build_statuscol_str() arguments
- **completion**: Don't add and remove '^' for Lua (#22702)
- **diagnostic**: Remove deprecated function (#20423)
- **diagnostic**: DRY for loop #21521
- **diff.c**: Reduce scope of variables (#20781)
- **diff.c**: Break up ex_diffgetput()
- **diff.c**: Allocate hunks directly in ga_array
- **diff.c**: Factor out hunk extraction
- **diff.c**: Factor out hunk processing
- **diff.c**: Simplify diff_buf_idx()
- **diff.c**: Internal does not need diffstyle
- **diff.c**: Factor out diffblock deletion
- **diff.c**: Copy lines via memmove
- **drawline.c**: Leadcol/trailcol
- **drawline.c**: Move number column helpers function together
- **drawscreen.c**: Reduce scopes of locals (#20668)
- **eval**: Make get_lval() explicitly check for v:lua
- **eval.c**: Factor out get_number_tv() (#21893)
- **exit**: Pass error message to preserve_exit() (#22097)
- **extmarks**: Some minor internal API changes
- **f_has**: Remove wrong comment (#21561)
- **fileio.c**: Reduce scope of locals
- **fileio.c**: Refactor match_file_path()
- **fileio.c**: Refactor vim_rename()
- **fileio.c**: Refactor buf_write_bytes
- **fileio.c**: Refactor buf_write_bytes (2)
- **fileio.c**: Remove HAS_BW_FLAGS
- **fileio.c**: Factor out autocmd handling from buf_write()
- **fileio.c**: More bools
- **fileio.c**: Reduce scope of locals
- **fileio.c**: Do not use macros for error handling
- **fileio.c**: Factor out buf_write post autocmds
- **fileio.c**: Factor out file info calc
- **fileio.c**: Make unreadable expression readable
- **fileio.c**: Factor out backup creation
- **fileio.c**: Remove HAVE_ACL ifdefs
- **fileio.c**: Normalize ifdefs
- **fs**: Replace vim.fn/vim.env in vim.fs (#20379)
- **highlight**: Rename FloatBorderTitle #20988
- **highlight**: Reshape the HL_UNDER* bits into a 3-bit integer mask
- **highlight_group.c**: Reduce scope of locals
- **intro**: Avoid Coverity warning (#22000)
- **loader**: Use vim.fs
- **loader**: Remove BufWritePost autocmd
- **loader**: Add typing for package.loaders
- **loader**: Simplify tracking logic
- **loader**: Cache hash information
- **log**: Reduce compile time LOG_LEVEL granularity
- **lsp**: Remove deprecated lsp functions (#20421)
- **lsp**: Extract a _create_server method in lsp_spec
- **lsp**: Remove deprecated vim.lsp.buf_get_clients calls (#21337)
- **lsp**: Remove workaround for missing bit module (#22373)
- **lsp**: Remove deprecated code (#22389)
- **lsp**: Remove _resolve_capabilities_compat (#22628)
- **lsp**: Do not parse verbose output when overwriting options (#22810)
- **lua**: Move _G.arg init to nlua_init()
- **lua**: Get all marks instead of iterating over namespaces
- **lua2dox**: Format with stylua
- **main.c**: Remove unreachable use_builtin_ui conditions (#22338)
- **man**: Pass env directly to spawn() (#20591)
- **man**: Add type annotations
- **memory**: Simplify new alignment logic
- **option.c**: Reduce scope of locals
- **option.c**: Add get_varp_from and get_varp_scope_from
- **option.c**: De-nest set_option_value
- **option.c**: Use intermediate for options ref
- **option.c**: Add do_set_num
- **option.c**: Add do_set_bool
- **option.c**: Simplify do_set_string
- **option.c**: Factor out common skip check
- **option.c**: Factor out loop code from do_set()
- **option.c**: Remove goto
- **option.c**: Change nextchar to uint8_t
- **option.c**: Use skiptowhite_esc
- **option.c**: Factor out set op parsing
- **option.c**: Factor out option prefix parsing
- **option.c**: Factor out option name parsing
- **option.c**: Factor out opt_idx validation
- **option.c**: De-nest code in do_set_option
- **option.c**: Move bool prefix check
- **option.c**: Add do_set_option_value
- **option.c**: Factor out some nextchar checks
- **option.c**: Factor out string option special case handling
- **options**: Don't pass negative number to illegal_char() (#21999)
- **optionstr.c**: Reduce scope of locals
- **optionstr.c**: Break up did_set_string_option 1-52
- **optionstr.c**: Remove some simple did_set_* functions
- **optionstr.c**: Add did_set_string_option_for
- **optionstr.c**: Break up did_option_listflags
- **optionstr.c**: Remove some redundant parens
- **optionstr.c**: Break up did_set_expropt
- **optionstr.c**: Move handling of formatlistpat
- **optionstr.c**: Align comments (#22070)
- **params**: Open -s and -w script files after parsing commands
- **pty**: Remove old logic for inheriting termios from host terminal
- **redraw**: No type argument in update_screen()
- **redraw**: Various simplifications
- **redraw**: Make cursor position redraw use the "redraw later" pattern
- **runtime**: Use vim.version to compare versions #22550
- **runtime.c**: Factor out find_script_by_name() (#22620)
- **screen**: Screen.c delenda est
- **sleep**: Simplify rube goldberg implementation of :sleep
- **spell**: Use uint8_t for "byts" variables (#22519)
- **statusline**: Move statusline defs to statusline_defs.h
- **tag**: Remove return type from do_tag()
- **test**: Create an lsp-specific helpers.lua file
- **tests**: Lift retry() into assert_log()
- **tests**: Run unittests using main nvim binary in interpreter mode
- **tests**: Move lua-client into core and use it for functionaltests
- **treesitter**: Add vim.treesitter.get_node() (#22360)
- **treesitter**: Use string.format to create lines
- **treesitter**: Simplify some range functions
- **treesitter**: Delegate region calculation to treesitter (#22553)
- **treesitter**: Use byte ranges from treesitter (#22589)
- **treesitter**: Add Range type aliase for Range4|Range6
- **treesitter**: Delegate region calculation to treesitter (#22576)
- **treesitter**: Move inspect_tree impl
- **tui**: Use nvim_echo() for verbose terminfo
- **tui/input.c**: Remove unused multithreading code (#22342)
- **ui**: Statusbar invalidation to win_set_inner_size()
- **ui**: Devirtualize the ui layer
- **ui**: Cleanup 'redrawdebug', introduce "flush" mode
- **ui**: Don't reimplement redrawing in focus gained handling
- **ui**: Remove some superfluous ui_flush() calls
- **ui**: Ui_log() can now just be a function
- **uncrustify**: Move macros definitions to enable formatting
- **uncrustify**: Improved formatting rules
- **vim.gsplit**: Remove "keepsep"
- **vim.version**: Cleanup
- **vim.version**: Use lazy.nvim semver module
- **vim.version**: Use lazy.nvim semver module
- **win_close**: Remove "force", don't pass on "free_buf" (#21921)
- **win_line**: Rename attr to vi_attr (#21487)
- **win_line**: Move some variables into a struct (#22490)
- **window**: Remove aucmd_win check from one_window() (#21972)
- **window.c**: Reduce scope of locals (#20301)
- **windows**: Move os_icon_xx functions

TESTING
- Introduce skip() #21010
- Remove skip for 32-bit MSVC (#21030)
- Don't skip parser_spec on windows (#20294)
- Add a Lua test for swap file created before boot
- Fix failing tui_spec.lua tests (#21117)
- Use isCI to simplify CI detection (#21134)
- Simplify platform detection (#21020)
- Adding/removing winbar should not cause win_pos events (#21226)
- Use luv.os_uname for fast platform detection (#21157)
- Add more tests for float window bufpos (#21318)
- Convert another test in test_matchadd_conceal.vim to Lua (#21353)
- Remove unused variable (#21552)
- Add test cases for command line issues
- Add more tests for Unicode
- Avoid consecutive mouse input at different positions (#21781)
- Align Test_shell_options, Test_shellslash with Nvim default
- Avoid noise in NVIM_LOG_FILE
- Exepath() returns correct path with cmd.exe, powershell #21928
- Remove unused field ext_float (#22243)
- Make expect_unchanged() less confusing (#22255)
- Make {MATCH:} behave less unexpectedly in screen:expect()
- Don't search entire repo for files
- Move oldtests to test directory (#22536)
- Use a wider screen in the rightleft winhl test (#22641)
- Unskip working Windows tests (#22537)
- Re-bundle cat on windows (#21255)
- Windows not detected in msys shells #22671
- Use exec_capture() in more places (#22787)
- Fix flaky watchfiles tests (#22637)
- Replace lfs with luv and vim.fs
- Improve editor/fold_spec.lua and editor/put_spec.lua (#22916)
- **Windows**: Normalize paths for test summary
- **api**: Migrate screenchar() test in in window API to screen test
- **editorconfig**: Add editorconfig tests
- **exit_spec**: Make sure that autocommands are triggered (#22188)
- **fileio_spec**: Avoid expect_exit() without calling clear() (#21810)
- **float_spec**: Add missing sum_scroll_delta #22648
- **help**: Drop treesitter parse error to 0
- **highlight_spec**: Fix warning in Visual highlight test (#22719)
- **legacy/prompt_buffer_spec**: Align script with oldtest more (#22354)
- **lsp**: Call clear() before willSave tests (#21336)
- **lsp**: Add a screen:expect() between insert() and feed_command() (#21577)
- **lua/diagnostic_spec**: Remove unnecessary after_each()
- **lua/fs_spec**: Fix vim.fs.dir() test (#21503)
- **lua/ui_spec**: Fix Ctrl-C test flakiness (#21039)
- **old**: Test_lambda.vim garbagecollect() -> test_garbagecollect_now()
- **old**: Remove stray test42 files (#20966)
- **old**: Make Test_help_tagjump() test order match upstream
- **old**: Add missing lines from Vim patch 8.2.0522 (#21048)
- **old**: Make ":h local-additions" work properly in test_help.vim
- **old**: Skip Vim9 script with less divergence
- **old**: Change $TMPDIR from Xtest-tmpdir to X-test-tmpdir (#21346)
- **old**: Make test_signs.vim closer to upstream (#21479)
- **old**: Run some part of 'cpoptions' tests
- **old**: Make getting an unused PID work (#22529)
- **old**: Move memfile_test.c to test/old/ (#22567)
- **old**: Unskip working tests on Windows (#22650)
- **shada**: Fix shada syntax definitions test
- **statuscolumn**: Add more tests for wrapped lines (#21718)
- **statuscolumn**: %l should follow default wrap behavior (#21766)
- **statuscolumn_spec**: Remove unnecessary feed('lh')
- **statusline**: UI elements are not redrawn on K_EVENT unnecessarily
- **syn_attr_spec**: Add more information (#21912)
- **termxx_spec**: Fix TermClose bdelete test flakiness (#22463)
- **treesitter/parser_spec**: Correct time unit (#22471)
- **tui_spec**: Don't use nested terminal for resize at startup (#21583)
- **tui_spec**: Avoid race between nvim_paste and nvim_input (#21639)
- **tui_spec**: Improve cursor_address test (#21700)
- **tui_spec**: Doesn't use Unicode in cursor_address test (#21703)
- **tui_spec**: Make rapid resize test test what it wants to test (#21933)
- **tui_spec**: Don't expect exact screen in rapid resize test (#21935)
- **tui_spec**: Remove unnecessary arguments for remote UI
- **tui_spec**: Use RPC request to setup autocommands
- **ui**: Wait for another success with failure after success
- **undo_spec**: Add more tests for writing in Insert mode
- **unit**: Use file:close() properly (#21505)
- **vim.fs.normalize**: Enable test on Windows
2023-04-07 13:26:29 +02:00
bfredl
b395f6069f
Merge pull request #22907 from luukvbaal/evalstc
feat(api): set statuscolumn line number in nvim_eval_statusline()
2023-04-07 10:11:48 +02:00
Luuk van Baal
25dfed6e01 feat(api): set statuscolumn line number in nvim_eval_statusline()
Having the user set `v:lnum` before calling `nvim_eval_statusline()` is
unnecesarily fragile. Redraws inbetween setting `v:lnum` and the
`nvim_eval_statusline()` call will overwrite `v:lnum`.
2023-04-07 03:27:44 +02:00
Lewis Russell
e29bc03c04
fix(treesitter): do not track ranges of the root tree (#22912)
Fixes #22911
2023-04-06 15:16:44 +01:00
C.D. MacEachern
2dfb51a2be
docs: add vim.treesitter.query.get_query() to deprecated.txt 2023-04-05 22:19:30 +02:00
Lewis Russell
34ac75b329
refactor: rename local API alias from a to api
Problem:
  Codebase inconsistently binds vim.api onto a or api.

Solution:
  Use api everywhere. a as an identifier is too short to have at the
  module level.
2023-04-05 17:19:53 +01:00
bfredl
63bffae9e0
Merge pull request #22859 from luukvbaal/evalstc
feat(api): evaluate 'statuscolumn' with nvim_eval_statusline()
2023-04-05 15:02:22 +02:00
Michal Liszcz
999cb36c2b
refactor(lsp): do not parse verbose output when overwriting options (#22810) 2023-04-05 14:02:08 +02:00
Luuk van Baal
f0ac91c58b feat(api): evaluate 'statuscolumn' with nvim_eval_statusline() 2023-04-05 12:36:47 +02:00
Lewis Russell
9e7426718b
feat(vim.diff): allow passing an integer for linematch 2023-04-04 23:59:39 +01:00
dundargoc
e826d09c18
fix(windows): consistent normalization in fs.find
vim.fs.find(".luacheckrc")

```
c:\\projects\\neovim/.luacheckrc # before

c:/projects/neovim/.luacheckrc   # after
```

Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
2023-04-04 23:37:46 +02:00
github-actions[bot]
872a534f6e
docs: regenerate 2023-04-04 23:10:17 +02:00
dundargoc
743860de40
test: replace lfs with luv and vim.fs
test: replace lfs with luv

luv already pretty much does everything lfs does, so this duplication
of dependencies isn't needed.
2023-04-04 21:59:06 +02:00
Lewis Russell
b1de4820b7 refactor(treesitter): move inspect_tree impl 2023-04-04 20:47:15 +01:00
dundargoc
a5c572bd44
docs: fix typos
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
Co-authored-by: himanoa <matsunoappy@gmail.com>
2023-04-04 19:07:33 +02:00
Lewis Russell
b75acd2f94
fix(treesitter): disable folding in inspect_tree() (#22885) 2023-04-04 14:07:27 +02:00
Lewis Russell
090ade4af6
refactor(treesitter): delegate region calculation to treesitter (#22576) 2023-04-04 13:58:16 +02:00
danilax999
469e6bfc56
fix(treesitter): use capture metadata range if exists
use `treesitter.get_range` instead of inline expression
2023-04-04 12:26:21 +01:00
Christian Clason
e30cc8be19
vim-patch:9.0.1438: .fs files are falsely recognized as forth files (#22871)
Problem:    .fs files are falsely recognized as forth files.
Solution:   Check 100 lines for something that looks like forth. (Johan
            Kotlinski, closes vim/vim#12219, closes vim/vim#11988)

065088d554

Co-authored-by: Johan Kotlinski <kotlinski@gmail.com>
2023-04-03 16:27:49 +02:00
bfredl
f34b849a22
Merge pull request #22847 from luukvbaal/redrstatus
fix(ui): ruler is not redrawn in cmdline with redrawstatus
2023-04-03 16:02:44 +02:00
bfredl
f28da92b46
Merge pull request #22783 from luukvbaal/inspect
refactor(lua): get all extmarks instead of iterating over namespaces
2023-04-03 13:08:28 +02:00
Luuk van Baal
a930245557 refactor(lua): get all marks instead of iterating over namespaces
Inspector now also includes highlights set in anonymous namespaces.

Close #22732
2023-04-02 19:14:23 +02:00
zeertzjq
269dd747b6
refactor(defaults)!: change default 'commentstring' value to empty (#22862) 2023-04-02 23:01:48 +08:00
Luuk van Baal
c8a28b847e fix(ui): ruler is not redrawn in cmdline with redrawstatus 2023-04-02 15:24:55 +02:00
bfredl
da6a42cdaf
Merge pull request #22778 from luukvbaal/getext
feat(extmarks): extend nvim_buf_get_extmarks()
2023-04-02 12:00:32 +02:00
Christian Clason
9084948893
Merge pull request #22832 from clason/bump-Luv
build(deps): bump luv to HEAD
docs(luvref): update to version bump
2023-04-01 18:07:11 +02:00
Christian Clason
4720f0a662 docs(luvref): update to version bump 2023-04-01 17:26:09 +02:00
Gregory Anders
643c0ed571
feat: allow function passed to defaulttable to take an argument (#22839)
Pass the value of the key being accessed to the create function, to
allow users to dynamically generate default values.
2023-04-01 08:02:58 -06:00
Sizhe Zhao
6a4ebf894f
fix(health): stop using deprecated ts.language.inspect_language() (#22850) 2023-04-01 15:47:20 +02:00
Christian Clason
438c3419df docs(treesitter): add query injections 2023-04-01 15:07:16 +02:00
Christian Clason
d7f7450017 refactor(treesitter)!: rename help parser to vimdoc 2023-04-01 15:07:16 +02:00
Luuk van Baal
2a10f64e25 feat(extmarks): extend nvim_buf_get_extmarks()
Problem:    Can not get all extmarks in a buffer. Properties are missing
            from the details array.
Solution:   Allow getting all extmarks in a buffer by supplying a -1
            "ns_id". Add missing properties to the details array.
2023-04-01 13:59:03 +02:00
Christian Clason
2a298f2e48 fix(treesitter): update queries from nvim-treesitter
remove self-injection for C preprocessor macros (can be very slow)
2023-04-01 12:19:15 +02:00
Christian Clason
90fdaf55c9 fix(tests): adapt treesitter/highlight_spec priority test
Still relied on the old `@Foo`->`Foo` capture to highlight mechanism;
use capture with default highlight instead.
2023-04-01 12:19:15 +02:00
Lewis Russell
83bfd94d1d
refactor(loader): cache hash information
Whenever we run fs_stat() on a path, save this information in the loader
so it can be re-used.

- Loader.loadfile: Remove arguments `hash` as it is no longer needed.

- Loader.loader: Use _G.loadstring instead of Loader.load
  This allows plugins to wrap loadstring to inspection and profiling

- factor out read file logic
2023-03-31 13:05:22 +01:00
Sindre T. Strøm
b34097fe6d
fix(api): return both link and attributes with nvim_get_hl (#22824)
Problem: No way to get the actual highlight attributes for a linked
group through |nvim_get_hl()| (not the attributes from the link target).
Solution: Return the actual attributes as well as the link target name.
2023-03-31 12:52:53 +02:00
Akin
ed10e4ef60
fix(diagnostic): use correct field name for tags (#22835)
LSP tags are added to the diagnostic as "tags" but referred to as "_tags"
in the diagnostic underline handler
2023-03-31 11:23:19 +01:00
Lewis Russell
4cff3aceea
fix(loader): disable profiling by default 2023-03-31 09:43:13 +01:00
Lewis Russell
226a6c3eae
feat(diagnostic): add support for tags
The LSP spec supports two tags that can be added to diagnostics:
unnecessary and deprecated. Extend vim.diagnostic to be able to handle
these.
2023-03-30 14:49:58 +01:00
Lewis Russell
8fa7d833cf
Merge pull request #22791 from lewis6991/refactor/loadermisc
refactor(loader): changes
2023-03-30 13:57:59 +01:00
Lewis Russell
61e54f2636
feat: add vim.treesitter.language.get_filetypes() (#22643) 2023-03-30 10:26:28 +01:00
Christian Clason
196f69909d
vim-patch:9.0.1430: Livebook files are not recognized (#22808)
Problem:    Livebook files are not recognized.
Solution:   Add a pattern for Livebook files. (Mathias Jean Johansen,
            closes vim/vim#12203)

6400203517

Co-authored-by: Mathias Jean Johansen <mathias@mjj.io>
2023-03-29 10:23:52 +02:00
Michal Liszcz
b7748662ed
fix(api): Use local LastSet structure in nvim_get_option_info (#22741)
fix(api): use local LastSet structure in nvim_get_option_info

* nvim_get_option_info is deprecated.
  It is always using the global LastSet information as reported in #15232.
* nvim_get_option_info2 is added.
  The new function additionally accepts an 'opts' table {scope, buf, win}
  allowing to specify the option scope and query local options from another
  buffer or window.
2023-03-29 09:59:01 +02:00
Lewis Russell
fd70a9dca1 refactor(loader): simplify tracking logic 2023-03-26 14:11:43 +01:00
Lewis Russell
25fa051fa1 feat(vim.fs): improve normalize
- Add options argument with an option to expand env vars
- Resolve '//' -> '/'
- Use in vim.loader
2023-03-26 13:30:11 +01:00
Lewis Russell
ffd8cd1a96 refactor(loader): add typing for package.loaders 2023-03-26 12:51:56 +01:00
Lewis Russell
fab8dab6b6 refactor(loader): remove BufWritePost autocmd 2023-03-26 12:47:06 +01:00
Lewis Russell
3c82ce0d62 refactor(loader): use vim.fs 2023-03-26 12:46:24 +01:00
Folke Lemaitre
2257ade3dc
feat(lua): add vim.loader
feat: new faster lua loader using byte-compilation
2023-03-26 11:42:15 +01:00
zeertzjq
4863ca6b89
test: use exec_capture() in more places (#22787)
Problem:
Using `meths.exec2("code", { output = true })` is too verbose.

Solution:
Use exec_capture() in more places.
2023-03-26 10:49:32 +08:00
Evgeni Chasnovski
fe9cbcb3a5
feat(api): nvim_exec2(), deprecate nvim_exec() #19032
Problem:
The signature of nvim_exec() is not extensible per ":help api-contract".

Solution:
Introduce nvim_exec2() and deprecate nvim_exec().
2023-03-25 09:58:48 -07:00
Roberto Pommella Alegro
257d894d75
feat(lsp): render markdown in docs hover #22766
Problem:
LSP docs hover (textDocument/hover) doesn't handle HTML escape seqs in markdown.

Solution:
Convert common HTML escape seqs to a nicer form, to display in the float.
closees #22757

Signed-off-by: Kasama <robertoaall@gmail.com>
2023-03-25 12:46:07 -04:00
Micah Halter
36ee10057a
fix(lsp): add missing silent check in lsp hover handler (#22763)
Fixup to #21531.
2023-03-25 21:01:39 +08:00
Jakub Łuczyński
42876ddc7a
docs: more details about vim.region (#21116) 2023-03-25 16:28:59 +08:00
Lewis Russell
ac7397f4a0
fix(treesitter): add missing deprecate 2023-03-24 16:31:30 +00:00
Lewis Russell
cbbf8bd666
feat(treesitter)!: deprecate top level indexes to modules (#22761)
The following top level Treesitter functions have been moved:
  - vim.treesitter.inspect_language() -> vim.treesitter.language.inspect()
  - vim.treesitter.get_query_files() -> vim.treesitter.query.get_files()
  - vim.treesitter.set_query() -> vim.treesitter.query.set()
  - vim.treesitter.query.set_query() -> vim.treesitter.query.set()
  - vim.treesitter.get_query() -> vim.treesitter.query.get()
  - vim.treesitter.query.get_query() -> vim.treesitter.query.get()
  - vim.treesitter.parse_query() -> vim.treesitter.query.parse()
  - vim.treesitter.query.parse_query() -> vim.treesitter.query.parse()
  - vim.treesitter.add_predicate() -> vim.treesitter.query.add_predicate()
  - vim.treesitter.add_directive() -> vim.treesitter.query.add_directive()
  - vim.treesitter.list_predicates() -> vim.treesitter.query.list_predicates()
  - vim.treesitter.list_directives() -> vim.treesitter.query.list_directives()
  - vim.treesitter.query.get_range() -> vim.treesitter.get_range()
  - vim.treesitter.query.get_node_text() -> vim.treesitter.get_node_text()
2023-03-24 14:43:14 +00:00
Christian Clason
ee5008f878
vim-patch:9.0.1425: "wat" and "wast" files are one filetype (#22774)
Problem:    "wat" and "wast" files are one filetype.
Solution:   Add a separate filetype for "wat" files. (Amaan Qureshi,
            closes vim/vim#12165)

3ea62381c5

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-03-24 14:06:04 +01:00
Lewis Russell
4e4203f71b
fix(treesitter): annotations
- Begin using `@package` in place of `@private` for functions
that are accessed internally but outside their defined class.

- Rename Node -> TSP.Node
2023-03-23 11:23:51 +00:00
Null Chilly
c0fe6c040e
feat(api): add nvim_get_hl (#22693)
Problem: no way of getting all highlight group definitions in a namespace.

Solution: add `nvim_get_hl()`, deprecate `nvim_get_hl_by_name()` and `nvim_get_hl_by_id()`.
2023-03-23 10:31:39 +01:00
meredith
ea0b66d208
fix(lsp): Jump to tag locations reliably when :ltag is used (#22750) 2023-03-23 08:27:53 +01:00
Justin M. Keyes
410dc3349f
Merge #22736 from justinmk/gsplit
feat(vim.gsplit): gain features of vim.split
2023-03-22 20:12:40 -04:00
Lewis Russell
28cfcf5126
fix(api): vim.filetype.get_option() (#22753)
- Fix a bug in the cache
- Set some buffer options on the dummy buffer
2023-03-22 16:49:04 +00:00
Justin M. Keyes
e51139f5c1 refactor(vim.gsplit): remove "keepsep"
string.gmatch() is superior, use that instead.
2023-03-22 17:46:01 +01:00
Justin M. Keyes
8a70adbde0 fix(vim.version): prerelease compare
Problem:
semver specifies that digit sequences in a prerelease string should be
compared as numbers, not lexically: https://semver.org/#spec-item-11
> Precedence for two pre-release versions with the same major, minor,
> and patch version MUST be determined by comparing each dot separated
> identifier from left to right until a difference is found as follows:
> 1. Identifiers consisting of only digits are compared numerically.
> 2. Identifiers with letters or hyphens are compared lexically in ASCII sort order.
> 3. Numeric identifiers always have lower precedence than non-numeric identifiers.
> 4. A larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal.
Example:
1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.

Solution:
cmp_prerel() treats all digit sequences in a prerelease string as
numbers. This doesn't _exactly_ match the spec, which specifies that
only dot-delimited digit sequences should be treated as numbers...
2023-03-22 17:46:01 +01:00
Justin M. Keyes
9c49c10470 feat(vim.gsplit): gain features of vim.split
Problem:
- vim.split has more features than vim.gsplit.
- Cannot inspect the "separator" segments of vim.split or vim.gsplit.

Solution:
- Move common implementation from vim.split into vim.gsplit.
  - TODO: deprecate vim.split in favor of vim.totable(vim.gsplit())?
- Introduce `keepsep` parameter.

Related: 84f66909e4
2023-03-22 17:46:01 +01:00
bfredl
c45b5e2c5b
Merge pull request #22743 from bfredl/luaequals
feat(lua): allow `:=expr` as a shorter version of `:lua =expr`
2023-03-22 10:59:38 +01:00
Amaan Qureshi
48ce2ef912
vim-patch:9.0.{1419,1421,1422,1423}: some files are not recognized (#22749)
vim-patch:9.0.1419: Lean files are not recognized

Problem:    Lean files are not recognized.
Solution:   Add a pattern for Lean files. (Amaan Qureshi, closes vim/vim#12177)

4a5c39fc52

vim-patch:9.0.1421: Nu files are not recognized

Problem:    Nu files are not recognized.
Solution:   Add a pattern for Nu files. (Amaan Qureshi, closes vim/vim#12172)

8aa2a37f89

vim-patch:9.0.1422: Sage files are not recognized

Problem:    Sage files are not recognized.
Solution:   Add a pattern for Sage files. (Amaan Qureshi, closes vim/vim#12176)

d0639d717b

vim-patch:9.0.1423: WebAssembly Interface Type files are not recognized

Problem:    WebAssembly Interface Type files are not recognized.
Solution:   Add a pattern for WIT files. (Amaan Qureshi, closes vim/vim#12173)

890c772036
2023-03-22 16:19:56 +08:00
bfredl
a92b38934a feat(lua): allow :=expr as a shorter version of :lua =expr
existing behavior of
  :=
and
  :[range]=

are unchanged. `|` is still allowed with this usage.

However,
   :=p
and similar are changed in a way which could be construed as a breaking
change. Allowing |ex-flags| for := in the first place was a mistake as
any form of := DOES NOT MOVE THE CURSOR. So it would print one line number
and then print a completely different line contents after that.
2023-03-22 09:10:04 +01:00
Evgeni Chasnovski
434f3d6a03
docs: fix g:terminal_color_x terminal colors #22746
Based on this source code:
e789d65297/src/nvim/terminal.c (L271)
it only respects `vim.g.terminal_color_{i}` for i from 0 to 15 inclusive.
2023-03-21 05:43:40 -07:00
Christian Clason
0c9ed19af3 vim-patch:9.0.1417: ESDL files are not recognized
Problem:    ESDL files are not recognized.
Solution:   Add a pattern for ESDL files. (Amaan Qureshi, closes vim/vim#12174)

a1fa8b3ac2

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-03-20 21:08:31 +01:00
Christian Clason
d11986171b vim-patch:9.0.1415: Crystal files are not recognized
Problem:    Crystal files are not recognized.
Solution:   Add a pattern for Crystal files. (Amaan Qureshi, closes vim/vim#12175)

7c4516fe93

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-03-20 21:07:46 +01:00
Justin M. Keyes
a40eb7cc99 feat(vim.version): more coercion with strict=false
Problem:
"tmux 3.2a" (output from "tmux -V") is not parsed easily.

Solution:
With `strict=false`, discard everything before the first digit.

- rename Semver => Version
- rename vim.version.version() => vim.version._version()
- rename matches() => has()
- remove `opts` from cmp()
2023-03-20 13:40:38 +01:00
Justin M. Keyes
a715e6f87e refactor(vim.version): use lazy.nvim semver module
Now the Nvim version string "v0.9.0-dev-1233+g210120dde81e" parses
correctly.
2023-03-20 13:40:38 +01:00
Justin M. Keyes
990c481551 refactor(vim.version): use lazy.nvim semver module
Use semver code from https://github.com/folke/lazy.nvim
License: Apache License 2.0

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-03-20 13:36:55 +01:00
Lewis Russell
e5641df6d3 feat: add vim.filetype.get_option() 2023-03-20 10:06:32 +00:00
Lewis Russell
e1db0e35e4 feat(api): add filetype option nvim_get_option_value
- Also adjust the expr-mapping behaviour so normal commands and text
  changes are allowed in internal dummy buffers.
2023-03-20 10:00:52 +00:00
Enan Ajmain
ecc4d0e435
fix(shell): on Windows :make does not echo #22728
Problem:
On Windows, :make does not display the output of the program it runs.
The cause is the default 'shellpipe'.  On Linux, nvim uses `tee` to redirect the
output to both stdout and the error file.  In Windows, for both cmd.exe and
powershell, the output is only redirected to the error file.

Solution:
- On Windows, change the 'shellpipe' default to "2>&1| tee".
    - Nvim includes `tee` in its Windows package.
- Document recommended defaults for powershell.

Fixes #12910
2023-03-19 14:25:12 -07:00
Amaan Qureshi
66ba81a6f7
vim-patch:9.0.1412: Pony files are not recognized (#22721)
Problem:    Pony files are not recognized.
Solution:   Add a pattern for Pony files. (Amaan Qureshi, closes vim/vim#12155)

6e377eca8d
2023-03-18 17:34:31 +08:00
Christian Clason
86c164d2a1
Merge pull request #22699 from clason/vim-9.0.1406
vim-patch:9.0.{1406,1407,1408,1409}: some files are not recognized
2023-03-17 13:40:15 +01:00
Yochem van Rosmalen
2720d2c793
fix(treesitter): InspectTree does not respect 'splitright' #22692
Problem:
vim.treesitter.inspect_tree() and :InspectTree does not respect 'splitright'.

Solution:
- Change the default `command` from `topleft 60vnew` to `60vnew`.
- Change :InspectTree to respect command mods (`:vertical`, count, etc.).

Closes #22656
2023-03-17 04:41:57 -07:00
August Masquelier
6162269fa3
fix(lsp): avoid switching buffers on lsp attach (#22689) 2023-03-17 12:26:13 +01:00
Christian Clason
571b50be16 vim-patch:9.0.1409: racket files are recognized as scheme
Problem:    Racket files are recognized as scheme.
Solution:   Recognize rackets files separately. (Gabriel Kakizaki,
            closes vim/vim#12164, closes vim/vim#12162)

d11ac403db

Co-authored-by: Gabriel Kakizaki <gkakizaki@gmail.com>
2023-03-17 10:06:56 +01:00
Christian Clason
f83d8ea279 vim-patch:9.0.1408: QMLdir files are not recognized
Problem:    QMLdir files are not recognized.
Solution:   Add a pattern for QMLdir files. (Amaan Qureshi, closes vim/vim#12161)

1505bef5c4

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-03-17 10:06:56 +01:00
Christian Clason
d7746b6ef1 vim-patch:9.0.1407: TableGen files are not recognized
Problem:    TableGen files are not recognized.
Solution:   Add a pattern for TableGen files. (Amaan Qureshi, closes vim/vim#12156)

b8ef029ee4

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-03-17 09:41:54 +01:00
Christian Clason
43d33c5d1a vim-patch:9.0.1406: ILE RPG files are not recognized
Problem:    ILE RPG files are not recognized.
Solution:   Add patterns for ILE RPG files. (Andreas Louv, issue vim/vim#12152)

e202ec8a0c

Co-authored-by: Andreas Louv <andreas@louv.dk>
2023-03-17 09:41:12 +01:00
ii14
320cb344c1
docs(api): link to nvim_set_hl_ns from nvim_set_hl (#22678) 2023-03-16 09:31:37 +01:00
Justin M. Keyes
210120dde8
fix(lua): vim.deprecate() shows ":help deprecated" #22677
Problem:
vim.deprecate() shows ":help deprecated" for third-party plugins. ":help
deprecated" only describes deprecations in Nvim, and is unrelated to any
3rd party deprecations.

Solution:
If `plugin` is specified, don't show  ":help deprecated".

fix #22235
2023-03-15 05:56:13 -07:00
Justin M. Keyes
21eacbfef3
docs(html): render @see items as a list #22675
Needed for "flow" HTML layout.

Flow layout before:
    See also:
    https://github.com/kikito/inspect.lua https://github.com/mpeterv/vinspect
Flow layout after:
    See also:
    - https://github.com/kikito/inspect.lua
    - https://github.com/mpeterv/vinspect
2023-03-15 04:51:44 -07:00
Ivan
4f7879dff0
fix(lsp): kill buffers after renaming a directory #22618
Problem:

When LSP client renames a directory, opened buffers in the edfitor are not
renamed or closed. Then `:wall` shows errors.

https://github.com/neovim/neovim/blob/master/runtime/lua/vim/lsp/util.lua#L776
works correctly if you try to rename a single file, but doesn't delete old
buffers with `old_fname` is a dir.

Solution:
Update the logic in runtime/lua/vim/lsp/util.lua:rename()

Fixes #22617
2023-03-14 05:08:37 -07:00
hrsh7th
8dde7c907c
fix(lsp): vim.lsp.util.apply_text_edits cursor validation #22636
Problem
Using wrong variable when checking the cursor position is valid or not in
vim.lsp.util.apply_text_edits.

Solution
Use the correct variable.
2023-03-14 04:59:43 -07:00
Zoltán Reegn
06e3ff6671
docs(lsp): opt-out of default LSP "gq" #22615
close #22611
2023-03-14 03:42:27 -07:00
Christian Clason
9ab814eafa docs(help): consistent headers for local additions 2023-03-13 20:17:31 +01:00
Dan Strokirk
f01f18cdf4
fix(lsp): remove_workspace_folders fails if client has no workspace_folders #22633
When a client has no workspace_folders, (e.g., copilot), `pairs`
code would crash.
2023-03-13 06:01:34 -07:00
Christian Clason
4e99cc1217
Merge pull request #22627 from nullchilly/highlight-cleanup
refactor!: remove deprecated functions
2023-03-13 13:59:38 +01:00
Lewis Russell
35799a6629
fix(treesitter): foldexpr (#22652)
The ranges passed to foldinfo.remove_range were in the wrong order.
2023-03-13 10:44:43 +00:00
ii14
2daf0b37db
feat(options)!: deprecate paste, remove pastetoggle (#22647)
we cannot remove 'paste'. It is very common in plugins and configs.

'pastetoggle' can and should be removed though, it's a total waste of everyone's time because it generates bug reports and doesn't work well, and is useless because bracketed-paste works better.
2023-03-13 10:29:11 +08:00
Justin M. Keyes
673d2b52fa refactor!: rename vim.pretty_print => vim.print
Problem:
The function name `vim.pretty_print`:
1. is verbose, which partially defeats its purpose as sugar
2. does not draw from existing precedent or any sort of convention
   (except external projects like penlight or python?), which reduces
   discoverability, and degrades signaling about best practices.

Solution:
- Rename to `vim.print`.
- Change the behavior so that
  1. strings are printed without quotes
  2. each arg is printed on its own line
  3. tables are indented with 2 instead of 4 spaces
- Example:
  :lua ='a', 'b', 42, {a=3}
  a
  b
  42
  {
    a = 3
  }

Comparison of alternatives:
- `vim.print`:
  - pro: consistent with Lua's `print()`
  - pro: aligns with potential `nvim_print` API function which will
    replace nvim_echo, nvim_notify, etc.
  - con: behaves differently than Lua's `print()`, slightly misleading?
- `vim.echo`:
  - pro: `:echo` has similar "pretty print" behavior.
  - con: inconsistent with Lua idioms.
- `vim.p`:
  - pro: very short, fits with `vim.o`, etc.
  - con: not as discoverable as "echo"
  - con: less opportunity for `local p = vim.p` because of potential shadowing.
2023-03-13 01:25:09 +01:00
Matthias Deiml
fd2ece278b
feat(ui): add scroll_delta to win_viewport event #19270
scroll_delta contains how much the top line of a window moved since the
last time win_viewport was emitted. It is expected to be used to
implement smooth scrolling. For this purpose it only counts "virtual" or
"displayed" so folds should count as one line. Because of this it
adds extra information that cannot be computed from the topline
parameter.

Fixes #19227
2023-03-12 15:58:46 -07:00
Mathias Fußenegger
d15abd1be4
fix(lsp): use line start/end for visual line selection (#22632)
Fixes https://github.com/neovim/neovim/issues/22629
2023-03-12 09:45:28 +01:00
nullchilly
2ae54cef6e docs: add removed features in news.txt 2023-03-12 10:30:46 +07:00
Lewis Russell
b55b8ddf81
Merge pull request #22613 from lewis6991/feat/tsqueryutil 2023-03-11 17:13:20 +00:00
Lewis Russell
58bbc2ea0b refactor(treesitter): add Range type aliase for Range4|Range6 2023-03-11 16:38:18 +00:00
Jaehwang Jung
0ce626b783
docs(lsp): more precise type annotations (#22621) 2023-03-11 14:50:53 +01:00
Mathias Fußenegger
23dc2a59b6
fix(lsp): send didClose on buffer rename (#22623)
Subset of https://github.com/neovim/neovim/pull/22407 that was reverted
in https://github.com/neovim/neovim/pull/22604

If a buffer is renamed sending `didClose` for the old buffer helps
ensure the language server doesn't keep a stale document in memory.
2023-03-11 14:50:14 +01:00
Raphael
865d8d4720
refactor(lsp): remove _resolve_capabilities_compat (#22628) 2023-03-11 14:49:53 +01:00
nullchilly
36ca082a11 refactor(health)!: remove deprecated health.lua 2023-03-11 17:59:26 +07:00
nullchilly
71eebd28d1 refactor(treesitter)!: remove deprecated show_tree func 2023-03-11 17:59:26 +07:00
nullchilly
c2f7f8d61c refactor(highlight)!: remove deprecated functions
vim.highlight.create/link
2023-03-11 17:59:06 +07:00
Mathias Fußenegger
236c20795e
revert: "fix(lsp): use buffer scheme for files not stored on disk" (#22604)
Although using `buffer://` for unsaved file buffers fixes issues with
language servers like eclipse.jdt.ls or ansible-language-server, it
breaks completion and signature help for clangd.

A regression is worse than a fix for something else, so this reverts
commit 896d672736.

The spec change is also still in dicussion, see
https://github.com/microsoft/language-server-protocol/pull/1679#discussion_r1130704886
2023-03-11 07:35:23 +01:00
Michal Liszcz
674e23f19c
vim-patch:9.0.0244: cannot easily get the list of sourced scripts (#22596)
Problem:    Cannot easily get the list of sourced scripts.
Solution:   Add the getscriptinfo() function. (Yegappan Lakshmanan,
            closes vim/vim#10957)

f768c3d19c

Cherry-pick usr_41.txt change from a later runtime update.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-03-11 11:22:22 +08:00
zeertzjq
8cb5b995b6
vim-patch:9.0.1397: highlight for popupmenu kind and extra cannot be set (#22619)
Problem:    Highlight for popupmenu kind and extra cannot be set.
Solution:   Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel
            highlight groups and use them. (Gianmaria Bajo, closes vim/vim#12114)

6a7c774920

Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
2023-03-11 10:05:47 +08:00
Lewis Russell
9d70fe062c feat(treesitter)!: consolidate query util functions
- And address more type errors.
- Removed the `concat` option from `get_node_text` since it was applied
  inconsistently and made typing awkward.
2023-03-10 16:35:06 +00:00
Lewis Russell
762a06c6bc
feat!(treesitter): do not return changes from LanguageTree:parse()
Never return the changes an only notify them using the `on_changedtree`
callback.

It is not guaranteed for a plugin that it'll be the first one to call
`tree:parse()` and thus get the changes.

Closes #19915
2023-03-10 16:16:49 +00:00
Lewis Russell
845efb8e12
Merge pull request #22594 from lewis6991/perf/treefold 2023-03-10 13:35:07 +00:00
Null Chilly
75537768ef
perf(lsp): better binary search mid calculation in semantic token (#22607)
This commit replaces the usage of math.floor((lo + hi) / 2) with the faster and equivalent bit.rshift(lo + hi, 1) for calculating the midpoint in binary search.
2023-03-10 14:10:38 +01:00
Lewis Russell
46b73bf22c perf(treesitter): more efficient foldexpr 2023-03-10 11:51:33 +00:00
Lewis Russell
c5b9643bf1 fix(treesitter): better lang handling of get_parser() 2023-03-10 10:43:35 +00:00
Lewis Russell
adfa9de8eb fix(treesitter): do not error on empty filetype
Ignore instead
2023-03-10 10:41:19 +00:00
Jaehwang Jung
0ecb4d725e
docs(lsp): type annotation for lsp.client (#22509)
* Also fix newly found type mismatch.
* Note that it generates new warnings about using @private client
  methods. A proper fix would be to revamp the lsp client documentation
  altogether.
2023-03-09 21:17:08 +00:00
Amaan Qureshi
68aa2857dd
vim-patch:9.0.1393: Cairo files are not recognized (#22578)
Problem:    Cairo files are not recognized.
Solution:   Add a pattern for Cairo files. (Amaan Qureshi, closes vim/vim#12118)

ff226d49fe
2023-03-09 18:13:44 +01:00
Lewis Russell
ae263aff95
refactor(treesitter): use byte ranges from treesitter (#22589) 2023-03-09 16:09:39 +00:00
Michal Liszcz
9ef7297ef1
feat(lsp): overwrite omnifunc/tagfunc set by ftplugin #22267
Problem:
Some built-in ftplugins set omnifunc/tagfunc/formatexpr which causes
lsp.lua:set_defaults() to skip setup of defaults for those filetypes.
For example the C++ ftplugin has:
    omnifunc=ccomplete#Complete
          Last set from /usr/share/nvim/runtime/ftplugin/c.vim line 30
so the changes done in #95c65a6b221fe6e1cf91e8322e7d7571dc511a71
will always be skipped for C++ files.

Solution:
Overwrite omnifunc/tagfunc/formatexpr options that were set by stock
ftplugin.

Fixes #21001
2023-03-09 06:12:56 -08:00
Justin M. Keyes
ce0fddf5ae
feat: try to recover from missing tempdir #22573
Problem:
If vim_tempdir mysteriously goes missing (typically by "antivirus" on
Windows), any plugins using tempname() will be broken for the rest of
the session. #1432 #9833 https://groups.google.com/g/vim_use/c/ef55jNm5czI
Steps:
    mkdir foo
    TMPDIR=./foo nvim
    :echo tempname()
    !rm -r foo
    :echo tempname()
    tempname() still uses the foo path even though it was deleted.

Solution:
- Don't assume that vim_tempdir exists.
- If it goes missing once, retry vim_mktempdir and log (silently) an error.
- If it goes missing again, retry vim_mktempdir and show an error.

Rejected in Vim for performance reasons:
  https://groups.google.com/g/vim_use/c/qgRob9SWDv8/m/FAOFVVcDTv0J
  https://groups.google.com/g/vim_dev/c/cogp-Vye4oo/m/d_SVFXBbnnoJ
But, logging shows that `vim_gettempdir` is not called frequently.

Fixes #1432
Fixes #9833
Fixes #11250
Related: stdpath("run") f50135a32e
2023-03-09 05:07:36 -08:00
Evgeni Chasnovski
e17581fa53
docs: add missing highlight groups for floats 2023-03-09 10:54:39 +01:00
zeertzjq
89a525de9f
fix(buffer_updates): save and restore current window cursor (#16732)
When a buffer update callback is called, textlock is active so buffer
text cannot be changed, but cursor can still be moved. This can cause
problems when the buffer update is in the middle of an operator, like
the one mentioned in #16729. The solution is to save cursor position and
restore it afterwards, like how cursor is saved and restored when
evaluating an <expr> mapping.
2023-03-09 10:19:00 +08:00
Lewis Russell
be0461e3c2
fix(treesitter): is_in_node_range (#22582)
TS ranges are end column exclusive, so fix is_in_node_range
to account for that.
2023-03-08 23:45:43 +00:00
Amaan Qureshi
ae70e946ee
vim-patch:9.0.1395: Odin files are not recognized (#22580)
Problem:    Odin files are not recognized.
Solution:   Add a pattern for Odin files. (Amaan Qureshi, closes vim/vim#12122)

638388b8ef
2023-03-09 00:19:18 +01:00
Amaan Qureshi
6dd9770baf
vim-patch:9.0.1394: Unx Tal files are not recognized (#22579)
Problem:    Unx Tal files are not recognized.
Solution:   Add a pattern for Unx Tal files. (Amaan Qureshi, closes vim/vim#12117)

cde1f8714e
2023-03-09 00:19:10 +01:00
Lewis Russell
b9f19d3e28
Revert "refactor(treesitter): delegate region calculation to treesitter" (#22575)
Revert "refactor(treesitter): delegate region calculation to treesitter (#22553)"

This reverts commit 276b647fdb.
2023-03-08 17:59:45 +00:00
Lewis Russell
276b647fdb
refactor(treesitter): delegate region calculation to treesitter (#22553) 2023-03-08 17:22:28 +00:00
Lewis Russell
ddd257f753
feat(treesitter): use upstream format for injection queries 2023-03-08 11:03:11 +00:00
bfredl
e0e474a4bb
Merge pull request #22561 from bfredl/cmakeinstall
refactor(build): make installation of runtime/ more effective
2023-03-07 21:15:20 +01:00
bfredl
30632dd21a refactor(build): make installation of runtime/ more effective
Currently files to install in runtime/ is detected by recursive glob
pattern which has two problems:

- cmake needs to do a of work at config time and
  build/runtime/cmake_install.cmake becomes HUGE (2.5MB, biggest config file)
- we need to explicitly specify each file suffix used in the entire
  runtime, which is duplication of information.

These globs specify every single file in a subdirectory.
Thus, we can just install every runtime/ subdirectory as a single
install command. Furthermore, at the top-level, only .vim and .lua files
need to be installed.

Further possible refactor: we could move files which does not belong
in $PREFIX/runtime out of $REPO/runtime. Then runtime could be installed
with a single install_helper(DIRECTORY ...) command.
2023-03-07 20:16:52 +01:00
jdrouhard
4385f8a743
fix(lsp): change LspTokenUpdate to use buffer instead of pattern (#22559) 2023-03-07 17:35:12 +01:00
Justin M. Keyes
32ef36cb87
Merge #22503 from eriks47/man-spaces
feat(man.lua): support spaces in manpage names
2023-03-07 09:38:35 -05:00
Justin M. Keyes
04e8e1f9ea
refactor(runtime): use vim.version to compare versions #22550
TODO:
Unfortunately, cannot (yet) use vim.version for tmux version comparison,
because `vim.version.parse(…,{strict=false})` does not coerce tmux's
funny "tmux 3.3a" version string.
6969d3d749/runtime/autoload/provider/clipboard.vim (L148)
2023-03-07 06:28:53 -08:00
Justin M. Keyes
304477ff35 fix(man.lua): tests, naming 2023-03-07 15:23:06 +01:00
Eriks Muhins
160a019ffa feat(man.lua): support spaces in manpage names
Problem:
:Man command errors if given more than two arguments. Thus, it is
impossible to open man pages that contain spaces in their names.

Solution:
Adjust :Man so that it tries variants with spaces and underscores, and
uses the first found.
2023-03-07 15:19:24 +01:00
zeertzjq
7a462c10d5
Merge pull request #22558 from zeertzjq/vim-8.2.3969 2023-03-07 21:23:40 +08:00
dundargoc
1637bcce7b
build!: make libintl a required dependency
Libintl being an optional dependency is not by design, but a workaround
as it didn't use work on all platforms. That should be fixed by now.
2023-03-07 09:39:08 +01:00
Jaehwang Jung
706bcab75e
docs(lsp): change type annotations from number → integer (#22510) 2023-03-07 07:17:52 +01:00
zeertzjq
08d0f99ae1 vim-patch:partial:944697ae196
Update runtime files

944697ae19

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-07 11:41:35 +08:00
zeertzjq
2882b1543a vim-patch:8.2.3969: value of MAXCOL not available in Vim script
Problem:    Value of MAXCOL not available in Vim script.
Solution:   Add v:maxcol. (Naohiro Ono, closes vim/vim#9451)

56200eed62

The variable is always 2147483647, but introducing it makes functions
easier to document.

Co-authored-by: naohiro ono <obcat@icloud.com>
2023-03-07 11:33:23 +08:00
bfredl
39096f48f0
Merge pull request #13834 from bfredl/omnilua
omnifunc for builtin lua
2023-03-07 00:28:53 +01:00
Björn Linse
79571b92ce feat(lua): omnifunc for builting lua interpreter
also make implicit submodules "uri" and "_inspector" work with completion

this is needed for `:lua=vim.uri_<tab>` wildmenu completion
to work even before uri or _inspector functions are used.
2023-03-06 23:12:21 +01:00
swarn
1cc23e1109
feat(lsp)!: add rule-based sem token highlighting (#22022)
feat(lsp)!: change semantic token highlighting

Change the default highlights used, and add more highlights per token.

Add an LspTokenUpdate event and a highlight_token function.

:Inspect now shows any highlights applied by token highlighting rules,
default or user-defined.

BREAKING CHANGE: change the default highlight groups used by semantic
token highlighting.
2023-03-06 19:03:13 +01:00
Justin M. Keyes
74ffebf8ec fix(vim.version): incorrect version.cmp()
Problem:
If major<major but minor>minor, cmp_version_core returns 1

Solution:
- Fix logic in cmp_version_core
- Delete most eq()/gt()/lt() tests, they are redundant.
2023-03-06 15:36:25 +01:00
Justin M. Keyes
e31e49a8e3 refactor(vim.version): cleanup
- version.cmp(): assert valid version
- add test for loading vim.version (the other tests use shared.lua in
  the test runner)
- reduce test scopes, reword test descriptions
2023-03-06 14:51:56 +01:00
Kelly Lin
0e7196438d feat(lua): add semver api 2023-03-06 13:45:59 +01:00
Lewis Russell
f9a46391ab
refactor(treesitter): simplify some range functions 2023-03-06 10:57:14 +00:00
Justin M. Keyes
533d671271
docs: module-level docstrings (@defgroup) #22498
Problem:
gen_vimdoc.py / lua2dox.lua does not support @defgroup or \defgroup
except for "api-foo" modules.

Solution:
Modify `gen_vimdoc.py` to look for section names based on `helptag_fmt`.

TODO:
- Support @module ?
  https://github.com/LuaLS/lua-language-server/wiki/Annotations#module
2023-03-05 15:15:29 -08:00