Commit Graph

31386 Commits

Author SHA1 Message Date
Christian Clason
65b9499e4a vim-patch:9.1.0840: filetype: idris2 files are not recognized
Problem:  filetype: idris2 files are not recognized
Solution: detect '*.idr' files as idris2, '*.lidr' files as lidris2
          and '*.ipkg' files as ipkg filetype (Serhii Khoma)

closes: vim/vim#15987

c04bc64ba6

Co-authored-by: Serhii Khoma <srghma@gmail.com>
2024-11-05 08:31:32 +01:00
Christian Clason
baf74ef975 vim-patch:59834ba: runtime(matchparen): Add matchparen_disable_cursor_hl config option
Set the "matchparen_disable_cursor_hl" config variable to disable
highlighting the cursor with the MatchParen highlighting group.

closes: vim/vim#15984

59834ba6df

Co-authored-by: Matteo Landi <matteo@matteolandi.net>
2024-11-05 08:31:19 +01:00
Christian Clason
fc8e786dae vim-patch:19bc76c: runtime(cook): include cook filetype plugin
References:
https://github.com/cooklang/spec?tab=readme-ov-file#comments

closes: vim/vim#15989

19bc76c929

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-11-05 08:31:19 +01:00
Christian Clason
9ee1c87591 vim-patch:9dadfe7: runtime(debversions): Update Debian versions
- Move mantic to unsupported
- Reorder names to maintain alphabetic order
- Bump date to submit upstream

closes: vim/vim#15991

9dadfe7a52

Co-authored-by: James McCoy <jamessan@jamessan.com>
2024-11-05 08:31:19 +01:00
zeertzjq
f5b84c1a44
vim-patch:9.1.0841: tests: still preferring python2 over python3 (#31083)
Problem:  tests: still preferring python2 over python3
Solution: prefer Python 3 when picking a Python program in Vim tests,
          by checking for the more specific python version first and
          only when python3 not found, check for the python binary
          (Yee Cheng Chin)

Most OSes have Python 3 mapped to `python3` instead of `python`. Vim
tests should prioritize using that instead of Python 2 in case that is
still installed on the host system.

closes: vim/vim#15986

cef8ab2c75

Cherry-pick test changes from patch 8.2.{2824,4684}.

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2024-11-04 23:26:33 +00:00
Famiu Haque
cbc9a03f58
refactor(options): remove fileformat macros 2024-11-05 02:36:51 +06:00
Yochem van Rosmalen
079e5f4f9b
feat(defaults): unimpaired empty line below/above cursor #30984 2024-11-04 06:06:18 -08:00
Famiu Haque
a27419f3fc
feat(options)!: disallow setting hidden options #28400
Problem:
There are three different ways of marking an option as hidden, `enable_if
= false`, `hidden = true` and `immutable = true`. These also have different
behaviors. Options hidden with `enable_if = false` can't have their value
fetched using Vim script or the API, but options hidden with `hidden = true` or
`immutable = true` can. On the other hand, options with `hidden = true` do not
error when trying to set their value, but options with `immutable = true` do.

Solution:
Remove `enable_if = false`, remove the `hidden` property for options, and use
`immutable = true` to mark an option as hidden instead. Also make hidden option
variable pointers always point to the default value, which allows fetching the
value of every hidden option using Vim script and the API. This does also mean
that trying to set a hidden option will now give an error instead of just being
ignored.
2024-11-04 05:00:12 -08:00
bfredl
04d178053f
Merge pull request #30608 from bfredl/cchar2
feat(editor): handle new multibyte sequences in normal mode replacement
2024-11-04 13:59:24 +01:00
bfredl
23290e7676 feat(editor): handle new multibyte sequences in normal mode replacement
while the implementation is not tied to screen chars, it is a reasonable
expectation to support the same size. If nvim is able to display a
multibyte character, it will accept the same character as input,
including in normal mode commands like r{char}
2024-11-04 13:12:33 +01:00
Lewis Russell
6e68fed374 feat(lsp): multi-client support for signature_help
Signatures can be cycled using `<C-s>` when the user enters the floating
window.
2024-11-04 11:55:39 +00:00
dundargoc
0da4d89558
ci: work around flaky python tests (#31063)
It's the same workaround as 88ed9ffcd1,
which was later removed in f707ce76ac
after it turned out to be stable after a while.
2024-11-03 23:00:18 +08:00
zeertzjq
76643a1c0d
Merge pull request #31059 from zeertzjq/vim-9.1.0832
vim-patch:9.1.{0832,0835}
2024-11-03 17:46:02 +08:00
zeertzjq
fe565ca382 vim-patch:9.1.0835: :setglobal doesn't work properly for 'ffu' and 'tsrfu'
Problem:  :setglobal doesn't work properly for 'ffu' and 'tsrfu' when
          the local value is set (after v9.1.0831)
Solution: Check os_flags instead of buffer option variable (zeertzjq).

closes: vim/vim#15980

6eda269600
2024-11-03 17:04:34 +08:00
zeertzjq
981fa11c91 vim-patch:9.1.0832: :set doesn't work for 'cot' and 'bkc' after :setlocal
Problem:  :set doesn't work for 'cot' and 'bkc' after :setlocal.
Solution: clear the local flags when using :set (zeertzjq).

closes: vim/vim#15981

46dcd84d24
2024-11-03 16:58:22 +08:00
zeertzjq
99acc9de55
fix(treesitter): close InspectTree/EditQuery window on BufUnload (#31036)
Problem:  The window opened :InspectTree or :EditQuery isn't closed when
          the source buffer is unloaded, even though it is closed when
          the buffer is hidden.
Solution: Also close the window on BufUnload.
2024-11-03 11:28:31 +08:00
zeertzjq
3075c69ff0
vim-patch:9.1.0831: 'findexpr' can't be used as lambad or Funcref (#31058)
Problem:  'findexpr' can't be used for lambads
          (Justin Keyes)
Solution: Replace the findexpr option with the findfunc option
          (Yegappan Lakshmanan)

related: vim/vim#15905
closes: vim/vim#15976

a13f3a4f5d

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-11-03 10:06:41 +08:00
zeertzjq
ed3fb1bb9a
vim-patch:9.1.0830: using wrong highlight group for spaces for popupmenu (#31054)
Problem:  using wrong highlight group for spaces for popupmenu
Solution: use original attribute instead of combined attributed
          (glepnir)

closes: vim/vim#15978

bc10be7a40

Co-authored-by: glepnir <glephunter@gmail.com>
2024-11-03 08:27:15 +08:00
zeertzjq
f3606416f0
vim-patch:a95d6a3: runtime(doc): remove stray sentence in pi_netrw.txt (#31053)
closes: vim/vim#15971

a95d6a3d64

Co-authored-by: S. B. Tam <cpplearner@outlook.com>
2024-11-03 07:19:57 +08:00
Christian Clason
2e3f1069f4 fix(health): better layout of vim.treesitter health check
Problem: Long lists of available parsers make it hard to see WASM
status.

Solution: Add separate headings for "treesitter features" (ABI, WASM)
and "treesitter parsers". Also add minimum supported ABI version.
2024-11-02 23:51:00 +01:00
Christian Clason
db46b58569 vim-patch:9.1.0826: filetype: sway files are not recognized
Problem:  filetype: sway files are not recognized
Solution: detect '*.sw' files as sway filetype, include
          a filetype plugin (Riley Bruins)

References:
 https://github.com/FuelLabs/sway.

Comments taken from their syntax documentation. File extension taken
from the same documentation/GitHub's own recognition of these file types

closes: vim/vim#15973

84b5b1c660

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-11-02 23:33:38 +01:00
Christian Clason
f5933d196b vim-patch:d181baf: runtime(typst): synchronize updates from the upstream typst.vim
2 commits included from the upstream:

- 2a4a0e0662
- 50e89f4811

d181bafd0b

Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-11-02 23:33:25 +01:00
Famiu Haque
86e54734bf refactor(options): remove get_option_value_strict
Problem: `get_option_value_for` can perfectly replace `get_option_value_strict`, making the latter redundant.

Solution: Remove `get_option_value_strict`
2024-11-02 15:53:49 +00:00
zeertzjq
3688a33354
fix(lua): show stacktrace for error in vim.on_key() callback (#31021) 2024-11-02 10:11:06 +08:00
zeertzjq
b25ae5d328
vim-patch:26113e5: runtime(doc): Include netrw-gp in TOC (#31032)
closes: vim/vim#7627

26113e5ae3

Co-authored-by: Ernesto Elsäßer <ernesto.elsaesser@me.com>
2024-11-02 07:11:15 +08:00
Famiu Haque
ec0c53b3da
refactor(options): unify put_set(num|bool|string) (#30993)
Problem:
There are three separate functions for printing the `:set` command for
an setting an option to a file descriptor. These functions are used when
creating the session file for an option. Having a function for each type
increase code duplication and also makes it harder to add logic for new
option types.

Solution:
Replace `put_set(num|bool|string)` with a single `put_set` function
which works for all option types, this reduces code duplication and also
makes it trivial to add support for more option types in the future.
2024-11-02 06:44:56 +08:00
zeertzjq
7bf3a616e1
vim-patch:b5e7da1: runtime(doc): mention 'iskeyword' at :h charclass() (#31026)
fixes: vim/vim#15965

b5e7da1f27

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-11-01 18:22:08 +08:00
zeertzjq
cbd8b2c162
vim-patch:9.1.0824: too many strlen() calls in register.c (#31022)
Problem:  too many strlen() calls in register.c
Solution: refactor code, add string_T struct to keep track
          of string lengths (John Marriott)

closes: vim/vim#15952

79f6ffd388

Co-authored-by: John Marriott <basilisk@internode.on.net>
2024-11-01 09:34:19 +00:00
Lewis Russell
9b357e30fd feat(lsp)!: remove client-server handlers from vim.lsp.handlers
- Partition the handlers in vim.lsp.handlers as:
  - client to server response handlers (RCS)
  - server to client request handlers (RSC)
  - server to client notification handlers (NSC)

  Note use string indexes instead of protocol.methods for improved
  typing in LuaLS (tip: use hover on RCS, RSC or NSC).
2024-11-01 09:17:39 +00:00
nikolightsaber
f54266dbed
fix(lsp): hover border type can be string (#31013)
Border type can also be a string as defined in `api-win_config`

Co-authored-by: Nikolai Devolder <nikolai.devolder@yamabiko.eu>
2024-11-01 10:03:09 +01:00
errael
b34e137e43
feat(lua): allow vim.on_key() callback to consume the key (#30939) 2024-11-01 09:11:15 +08:00
Lewis Russell
8585183ba2
Merge pull request #31011 from lewis6991/refactor/loader 2024-10-31 16:06:18 +00:00
Lewis Russell
be04bbf781 refactor(loader): format annotations 2024-10-31 15:20:29 +00:00
Lewis Russell
086e598a6e refactor(loader): use the term stat instead of hash 2024-10-31 15:20:29 +00:00
Lewis Russell
8d68d883a9 refactor(loader): remove Loader table and use locals 2024-10-31 15:20:29 +00:00
Lewis Russell
4a0010e267 refactor(loader): rename types 2024-10-31 15:20:29 +00:00
Lewis Russell
7ccdd9235a refactor(loader): inline Loader.load into Loader.loadfile 2024-10-31 15:20:29 +00:00
Lewis Russell
ab2f2461b5 refactor(loader): simplify Loader.loader_lib 2024-10-31 15:20:27 +00:00
Lewis Russell
53536be62a refactor(loader): simplify Loader.write/read 2024-10-31 15:02:12 +00:00
Lewis Russell
f8fc6cb157 perf(loader): reduce calls to Loader.cache_file 2024-10-31 15:02:08 +00:00
Lewis Russell
03118c46ab refactor(loader): remove unused _topmods 2024-10-31 14:15:09 +00:00
Lewis Russell
1d4ba8c1ed fix: another round of type annotation fixes 2024-10-31 11:55:23 +00:00
zeertzjq
0ab4d36254
Merge pull request #31008 from zeertzjq/vim-3d7e567
vim-patch: netrw fixes
2024-10-31 19:28:24 +08:00
zeertzjq
9f79360b92 vim-patch:4d61800: runtime(netrw): fix E874 when browsing remote directory which contains ~ character
closes: vim/vim#15964

4d618006ec

Co-authored-by: Tom Benham <tom.benham13@gmail.com>
2024-10-31 19:00:06 +08:00
zeertzjq
35e07a24a3 vim-patch:8b0fa7a: runtime(netrw): make :Launch/Open autoloadable
fixes: vim/vim#15959
closes: vim/vim#15962

8b0fa7a565

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-10-31 18:59:49 +08:00
zeertzjq
d618fd3921 vim-patch:9f32069: runtime(netrw): fix regression with x mapping on Cygwin
related: vim/vim#13687

9f32069b8c

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
2024-10-31 18:59:27 +08:00
zeertzjq
65abfc86e4 vim-patch:aa2ce6f: runtime(netrw): fix filetype detection for remote files
fixes: vim/vim#15961

while at it, remove the Decho comments in the s:NetrwOptionsRestore()
function

aa2ce6f580

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-10-31 18:59:01 +08:00
zeertzjq
122cd35e4d vim-patch:d69ffbe: runtime(netrw): add missing change for s:redir()
Somehow, that change got lost in commit 70197885

d69ffbe4bc

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-10-31 18:56:02 +08:00
zeertzjq
2ce26010a6 vim-patch:7019788: runtime(netrw): improve netrw's open-handling further
closes: vim/vim#15956

70197885a8

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2024-10-31 18:55:48 +08:00
zeertzjq
64bca57dc6 vim-patch:7c96776: runtime(netrw): fix syntax error in netrwPlugin.vim
7c96776729

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-10-31 18:55:26 +08:00