Commit Graph

29572 Commits

Author SHA1 Message Date
zeertzjq ca735c7554
vim-patch:cb3691811be9 (#28684)
runtime(spec): add new items to scripts section in syntax plugin

- %generate_buildrequires — added in RPM 4.15
- %conf — added in RPM 4.18

closes: vim/vim#14723

Ref: https://rpm-software-management.github.io/rpm/manual/spec.html#build-scriptlets

cb3691811b

Co-authored-by: Maxwell G <maxwell@gtmx.me>
2024-05-10 06:12:09 +08:00
Christian Clason a7a9b205b5 vim-patch:ce2ad9ffd79f
runtime(netrw): Remove hardcoded private.ppk logic from netrw

closes: vim/vim#14739

ce2ad9ffd7

Co-authored-by: Nir Lichtman <nir@lichtman.org>
2024-05-10 00:05:52 +02:00
dundargoc c18d7941ef build: allow sccache as compiler cache
Also enable caching for dependencies.

Closes https://github.com/neovim/neovim/issues/28670
2024-05-09 16:39:45 +02:00
Gregory Anders d3fa88b70f
vim-patch:9.1.0396: filetype: jj files are not recognized (#28672)
Problem:  jj files are not recognized
Solution: recognize '*.jjdescription' files as jj filetype
          (Gregory Anders)

See: https://github.com/martinvonz/jj

closes: vim/vim#14733

6a4ea471d2
2024-05-08 18:39:18 -05:00
Christian Clason 9b1628da98 vim-patch:1e34b95e4402
runtime(netrw): Remove and cleanup Win9x legacy from netrw

closes: vim/vim#14732

1e34b95e44

Co-authored-by: Nir Lichtman <nir@lichtman.org>
2024-05-09 00:15:08 +02:00
zeertzjq e4e230a0cd
vim-patch:9.1.0397: Wrong display with 'smoothscroll' when changing quickfix list (#28674)
Problem:  Wrong display with 'smoothscroll' when changing quickfix list.
Solution: Reset w_skipcol when replacing quickfix list (zeertzjq).

closes: vim/vim#14730

c7a8eb5ff2
2024-05-09 06:11:56 +08:00
zeertzjq 064f3e42e8
refactor(change): check all tabpages in changed_lines_invalidate_buf() (#28666)
This most likely doesn't matter as all windows are redrawn when
switching tabpages and w_valid is reset is entering window, but still
check all tabpages for consistency with changed_common().
2024-05-08 14:00:45 +08:00
Christian Clason 17c89eac1a vim-patch:c5def6561d56
runtime(cpp): Fix digit separator in syntax script for octals and floats

Also fix the incorrect rendering of floats that start with ".".

closes: vim/vim#14724

c5def6561d

Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
2024-05-07 23:23:04 +02:00
Justin M. Keyes 69bd611d2d
Merge #28637 more support for vim.lsp.ListOpts.loclist 2024-05-07 12:56:39 -07:00
tom-anders 5c40f3e86a feat(lsp): support vim.lsp.ListOpts.loclist in location_handler() 2024-05-07 21:34:28 +02:00
tom-anders b0cc85c005 docs(lsp): document vim.lsp.ListOpts.loclist 2024-05-07 21:27:21 +02:00
tom-anders 80d108eeee refactor(lsp): use vim.cmd instead of api.nvim_command
As suggested in
https://github.com/neovim/neovim/pull/28483#discussion_r1586878457 and
https://github.com/neovim/neovim/pull/28483#discussion_r1586878226
2024-05-07 21:27:18 +02:00
tom-anders cdc0974063 docs(lsp): fix type annotations in response_to_list(...) 2024-05-07 20:20:35 +02:00
tom-anders 6ffc209a8a refactor(lsp): move repeated table construction into a variable
As suggested in https://github.com/neovim/neovim/pull/28483#discussion_r1581712828
2024-05-07 20:20:35 +02:00
Jongwook Choi e14e750998
fix(lsp): rename LspProgress data.result => data.params #28632
Rename the field `result` to `params` in the `data` table for
`LspProgress` autocmds. This aligns with LspNotify.

The previous name was chosen because the initial handler implementation
mistakenly had a parameter name `result` instead of `params` for the
`$/progress` LSP "notification" handler. However, `params` would be a
more appropriate name that is more consistent with the underlying LSP
type (`ProgressParams`).

See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress
2024-05-07 11:09:27 -07:00
tom-anders 3da251efc6 refactor(lsp): use vim.is_callable() 2024-05-07 19:55:09 +02:00
tom-anders 4e5086a67e refactor(lsp): s/options/opts for parameters in vim.lsp.buf
See https://github.com/neovim/neovim/pull/28483#discussion_r1583344120
2024-05-07 19:55:09 +02:00
Jaehwang Jung e7f50f43c8 fix(treesitter): clip end row early
Problem:
UINT32_MAX + 1 passed to vim._foldupdate.

Solution:
Clip the end row from treesitter asap to avoid such issues.
2024-05-07 14:36:55 +01:00
Jaehwang Jung 4caf71af58 refactor(fold): avoid coverity false-positive
Also add some more argument checks.
2024-05-07 14:36:55 +01:00
James Trew 93940af1d4 docs(luacats): support backtick captured generic type
Problem:
While LuaCATS's generics system are still considered WIP by luals, they
currently support type captured generics.

See "Capture with Backtick" example:
https://luals.github.io/wiki/annotations/#generic

Solution:
Add support for it in the LuaCATS grammar
2024-05-07 14:33:14 +01:00
Yi Ming c3c673cdec
fix(lsp): enable() does not activate inlay hints on open buffers #28629
Problem:
inlay_hint `enable(<no args>)` does not activate inlay hints on open
buffers. If a buffer does not have a corresponding `bufstate` in
`bufstates`, then `enable` all buffers will not take effect on it.

Solution:
Make the effective range determined by the loaded buffers.

Fix #28624
2024-05-07 02:30:19 -07:00
zeertzjq d8deb91819
vim-patch:8d8cb45756cb (#28657)
runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out

Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then
:{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into
less when bash's "help" fails. This was introduced by 2f25e40b1
(runtime: configure keywordpg for some file types (vim/vim#5566), 2023-08-23)
and may be present in other files touched by that commit.

Make the "man" invocation sensible by unsetting MANPAGER in the
environment.

Note that changing MANPAGER for `:terminal` is not needed; Vim within
Vim is perfectly fine.

closes: vim/vim#14679

8d8cb45756

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2024-05-07 17:05:55 +08:00
Christian Clason d40b0a96c4 build(deps): bump tree-sitter-query to v0.3.0
add support for supertype nodes (used in Haskell)
2024-05-07 00:24:25 +02:00
Gregory Anders bb032d952b
revert: default LSP mappings (#28649)
Revert the default LSP mappings before the 0.10 release as these might
need some further consideration. In particular, it's not clear if "c"
prefixed maps in Normal mode are acceptable as defaults since they
interfere with text objects or operator ranges.

We will re-introduce default mappings at the beginning of the 0.11
release cycle, this reversion is only for the imminent 0.10 release.
2024-05-06 08:13:50 -05:00
Justin M. Keyes 783c1e596c
refactor(snippet): rename exit() => stop() #28628 2024-05-06 04:42:30 -07:00
zeertzjq b024643ca7
vim-patch:53753f6a4925 (#28647)
runtime(doc): Fix typos in help documents

closes: vim/vim#14720

53753f6a49

Co-authored-by: h-east <h.east.727@gmail.com>
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2024-05-06 06:43:01 +08:00
Christian Clason 3d4eb9d544 fix(treesitter): update queries 2024-05-05 23:22:11 +02:00
Christian Clason 97b7ddc376 build(deps): bump tree-sitter to v0.22.6 2024-05-05 23:22:11 +02:00
dundargoc 3d3717de4e build: use libvterm commit with generated *.inc files
This allows us to skip generating them during our build process.
2024-05-05 21:38:36 +02:00
Evgeni Chasnovski 5e98439f6d
fix(defaults): diagnostic mappings descriptions #28646 2024-05-05 07:45:47 -07:00
Maria José Solano efb44e0cad
docs: fix lua type warnings (#28633) 2024-05-05 06:08:17 +08:00
zeertzjq e948d7feba
vim-patch:ad4881cb3c04 (#28636)
runtime(doc): correct getscriptinfo() example (vim/vim#14718)

When "sid" is specified, it returns a List with a single item.

ad4881cb3c
2024-05-04 15:53:42 +08:00
Riley Bruins 3a8265266e
fix(treesitter): escape "\" in :InspectTree #28613
Some parsers for, e.g., LaTeX or PHP have anonymous nodes like `"\"` or `"\text"` that behave wonkily (especially the first example) in the `InspectTree` window, so this PR escapes them by adding another backslash in front of them
2024-05-03 09:34:02 -07:00
dundargoc d50596e1e3 docs: deduplicate information in deprecated.txt
Refer to `deprecated.txt` in `news.txt` in the deprecated section and
order `deprecated.txt` according to which version a feature was
deprecated in.
2024-05-03 18:31:43 +02:00
dundargoc 383018dbb8 build: simplify policy-setting for dependencies
Passing `CMAKE_POLICY_DEFAULT_CMP0092=NEW` to all dependencies is
simpler than setting it manually in each file.
2024-05-03 18:22:20 +02:00
Yi Ming 52823616bc
fix(lsp): replace bug-prone ternary operation #28627
ref #28624
2024-05-03 07:18:55 -07:00
dundargoc ca243f06dd build: remove `lintdoc` from `lint` target
`lintdoc` takes too long to be part of `lint`. It may be reintroduced
once it's possible to only run lintdoc on files that have been changed.
2024-05-03 15:18:09 +02:00
zeertzjq e15991c811
fix(vim.json): properly treat luanil options as booleans (#28622)
Note: Upstream doesn't have this. It's an Nvim addition.
2024-05-03 19:26:56 +08:00
Justin M. Keyes 40ce857797
fix(vim.ui)!: change open() to return `result|nil, errmsg|nil` #28612
reverts e0d92b9cc2 #28502

Problem:
`vim.ui.open()` has a `pcall()` like signature, under the assumption
that this is the Lua idiom for returning result-or-error. However, the
`result|nil, errmsg|nil` pattern:
- has precedent in:
  - `io.open`
  - `vim.uv` (`:help luv-error-handling`)
- has these advantages:
  - Can be used with `assert()`:
    ```
    local result, err = assert(foobar())
    ```
  - Allows LuaLS to infer the type of `result`:
    ```
    local result, err = foobar()
    if err then
      ...
    elseif result then
      ...
    end
    ```

Solution:
- Revert to the `result|nil, errmsg|nil` pattern.
- Document the pattern in our guidelines.
2024-05-03 03:20:03 -07:00
zeertzjq d44ed3a885
perf(extmarks): better track whether namespace has extmarks (#28615)
This avoids redraw when adding/removing an empty namespace for a window.

This also avoids marktree traversal when clearing a namespace that has
already been cleared, which is added as a benchmark.
2024-05-03 18:02:25 +08:00
luukvbaal cf9f002f31
fix(api): use correct buffer for "range" in nvim__redraw (#28614) 2024-05-03 10:35:32 +08:00
dundargoc 01e4a70d66 build: improve git-cliff CHANGELOG output
- Sort sections according to custom preference instead of
  alphabetically. It is ordered according to "most relevant" to "least
  relevant" to users.
- Sort commits alphabetically
- Don't uppercase the first letter of the commit message
2024-05-02 22:57:07 +02:00
Justin M. Keyes e5c69df679
Merge #28101 nvim__redraw 2024-05-02 07:49:07 -07:00
Yi Ming 350d818564
feat(lsp): inlay_hint.is_enabled({filter}) #28523
vim.diagnostic.enable and vim.diagnostic.is_enabled() use the same pattern.
2024-05-02 07:26:07 -07:00
Luuk van Baal 037ea6e786 feat(api): add nvim__redraw for more granular redrawing
Experimental and subject to future changes.
Add a way to redraw certain elements that are not redrawn while Nvim is waiting
for input, or currently have no API to do so. This API covers all that can be
done with the :redraw* commands, in addition to the following new features:
- Immediately move the cursor to a (non-current) window.
- Target a specific window or buffer to mark for redraw.
- Mark a buffer range for redraw (replaces nvim__buf_redraw_range()).
- Redraw the 'statuscolumn'.
2024-05-02 15:57:06 +02:00
Luuk van Baal 7b14eb543d refactor: add win_T argument to setcursor_mayforce() 2024-05-02 15:46:15 +02:00
Yi Ming d5063f4b29
feat(lsp): vim.lsp.inlay_hint.enable(nil) applies to all buffers #28543
Problem:
Inlay hints `enable()` does not fully implement the `:help dev-lua` guidelines:

    Interface conventions ~
    - When accepting a buffer id, etc., 0 means "current buffer", nil means "all
      buffers".  Likewise for window id, tabpage id, etc.
      - Examples: |vim.lsp.codelens.clear()| |vim.diagnostic.enable()|

Solution:
Implement globally enabling inlay hints.
* refactor(lsp): do not rely on `enable` to create autocmds
* refactor(lsp): make `bufstates` a defaulttable
* refactor(lsp): make `bufstate` inherit values from `globalstate`
* feat(lsp): `vim.lsp.inlay_hints` now take effect on all buffers by default
* test(lsp): add basic tests for enable inlay hints for all buffers
* test(lsp): add test cases cover more than one buffer
2024-05-02 06:16:20 -07:00
Christian Clason 2becec289c vim-patch:9.1.0390: filetype: inko files are not recognized
Problem:  filetype: inko files are not recognized
Solution: Detect '*.inko' as ink filetype
          (Yorick Peterse)

See:
- https://github.com/inko-lang/inko.vim
- https://inko-lang.org/

closes: vim/vim#14699

a01968448a

Co-authored-by: Yorick Peterse <git@yorickpeterse.com>
2024-05-02 14:14:56 +02:00
Christian Clason ebf8237af8 vim-patch:9.1.0389: filetype: templ files are not recognized
Problem:  filetype: templ files are not recognized
Solution: Detect '*.templ' files as filetype templ
          (Tristan Knight)

See:
- https://github.com/a-h/templ
- https://templ.guide/

closes: vim/vim#14697

54e79157c5

Co-authored-by: tris203 <admin@snappeh.com>
2024-05-02 14:14:56 +02:00
zeertzjq cb2a36bb5f
docs(CONTRIBUTING): mention process of changing ft detection (#28598) 2024-05-02 20:11:58 +08:00