Commit Graph

6906 Commits

Author SHA1 Message Date
Christian Clason
4ca6e08327 vim-patch:9.1.0318: filetype: translate shell config files are not recognized
Problem:  filetype: translate shell config files are not recognized
Solution: Detect 'init.trans', 'translate-shell' and '.trans' files as
          clojure (Wu, Zhenyu)

See: https://github.com/soimort/translate-shell/wiki/Configuration

closes: vim/vim#14499

4b5cd7257e

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-14 13:21:10 +02:00
Christian Clason
391200f198 vim-patch:9.1.0317: filetype: matplotlibrc files are not recognized
Problem:  filetype: matplotlibrc files are not recognized
Solution: Detect 'matplotlibrc' file as yaml filetype
          (Wu, Zhenyu)

See: https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file

closes: vim/vim#14501

55d4f3c006

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-14 13:21:10 +02:00
Christian Clason
737091d234 vim-patch:9.1.0316: filetype: some sh and confini files not recognized
Problem:  filetype: some sh and confini files not recognized
Solution: Detect neofetch, '.xprofile', XDG-User-Dirs files,
          paru and makepkg config files
          (Wu, Zhenyu)

See:
- https://github.com/dylanaraps/neofetch/wiki/Customizing-Info#config-file-location
- https://www.freedesktop.org/wiki/Software/xdg-user-dirs/

closes: vim/vim#14505

5a9f7e6750

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-14 13:21:10 +02:00
Christian Clason
420f130223 vim-patch:9.1.0315: filetype: a few more dosini files are not recognized
Problem:  filetype: a few more dosini files are not recognized
Solution: Detect wakatime, reply config files, flatpak, nfs config files
          and a few more python tools as dosini (or toml)
          (Wu, Zhenyu)

Refer:
- https://packaging.python.org/en/latest/specifications/pypirc/
- https://jorisroovers.com/gitlint/latest/configuration/
- https://pylint.pycqa.org/en/latest/user_guide/usage/run.html#command-line-options
- https://docs.bpython-interpreter.org/en/latest/configuration.html
- https://mypy.readthedocs.io/en/stable/config_file.html#the-mypy-configuration-file
- https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
- https://github.com/wakatime/wakatime-cli?tab=readme-ov-file#usage
- https://metacpan.org/dist/Reply/view/bin/reply#-cfg-~/.replyrc

close: vim/vim#14512

0881329d12

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-14 13:21:10 +02:00
zeertzjq
a928228355
vim-patch:ce06493aeb3d (#28321)
runtime(vim): Update base-syntax, add legacy header folding

Allow for syntax-based folding of Vim9 script legacy header regions.

This is enabled with the "H" flag of the g:vimsyn_folding config variable.

closes: vim/vim#14530

ce06493aeb

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-04-14 07:35:08 +08:00
Christian Clason
b87212e669 vim-patch:5392970921ab
runtime(i3config): Line continuation is not detected for 'set' command (vim/vim#14531)

Problem:  Valid i3config syntax is highlighted as error.
Solution: Skip over line-breaks correctly.

5392970921

Co-authored-by: julio-b <julio.bacel@gmail.com>
2024-04-13 22:41:51 +02:00
Christian Clason
ee18c26f26 vim-patch:122d06858568
runtime(go): fix highlighting import string followed by some comment (vim/vim#14538)

122d068585

Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
2024-04-13 22:41:51 +02:00
Jaehwang Jung
328a237351
fix(defaults): auto-close terminal for &shell with args (#28276)
Problem:
The `:terminal` auto-close logic does not support `&shell` that has
arguments, e.g., `/bin/bash -O globstar`.

Solution:
Join `argv` and match `&shell`. This is not perfect since `&shell` may
contain irregular spaces and quotes, but it seems to be good enough.
2024-04-13 19:41:59 +08:00
zeertzjq
ab1203b2eb vim-patch:0549c503ba20
runtime(dts): include ftplugin support (vim/vim#14522)

0549c503ba

Co-authored-by: wzy <32936898+Freed-Wu@users.noreply.github.com>
2024-04-13 17:28:55 +08:00
zeertzjq
3b639222ff vim-patch:159dc0fcf950
runtime(kconfig): add include to ftplugin (vim/vim#14524)

related: vim/vim#14521

159dc0fcf9

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-13 17:28:39 +08:00
zeertzjq
355c149ba0
vim-patch:9.1.0311: filetype: Some config files are not recognized (#28311)
Problem:  Some config files are not recognized
Solution: Add some patterns for chktex, ripgreprc and ctags config
          files.

See: https://www.nongnu.org/chktex/
See: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file
See: https://docs.ctags.io/en/latest/option-file.html#order-of-loading-option-files

closes: vim/vim#14506

a1dcd76ce7

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-13 09:59:53 +08:00
dundargoc
66220d164a revert: "feat(health): fold successful healthchecks #22866"
This reverts commit 4382d2ed56.

The story for this feature was left in an incomplete state. It was never
the intention to unilaterally fold all information, only the ones that
did not contain relevant information. This feature does more harm than
good in its incomplete state.
2024-04-13 01:18:40 +02:00
zeertzjq
a629978cb6
vim-patch:9.1.0305: filetype: some history files are not recognized (#28300)
Problem:  filetype: some history files are not recognized
Solution: Add some history patterns to filetype.vim
          (Wu, Zhenyu)

closes: vim/vim#14513

da70feabea

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 18:08:54 +08:00
zeertzjq
8c112a8235 vim-patch:9.1.0307: filetype: texdoc config files is not recognized
Problem:  filetype: texdoc config files is not recognized
Solution: Detect 'texdoc.cnf' as conf filetype
          (Wu, Zhenyu)

See: https://github.com/TeX-Live/texdoc/blob/master/texdoc.cnf

closes: vim/vim#14507

7fdbd1bb58

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:22:16 +08:00
zeertzjq
be7d8ff0e4 vim-patch:9.1.0306: filetype: x11vnc config file is not recognized
Problem:  filetype: x11vnc config file is not recognized
Solution: Detect '.x11vncrc' as conf filetype
          (Wu, Zhenyu)

See: https://linux.die.net/man/1/x11vnc

closes: vim/vim#14511

58ce78ad43

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:21:28 +08:00
zeertzjq
7334e9055b vim-patch:9.1.0295: filetype: pip config files are not recognized
Problem:  filetype: pip config files are not recognized
Solution: detect pip.conf as dosini filetype
          (Wu, Zhenyu)

closes: vim/vim#14448

d2b95b8446

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:19:10 +08:00
zeertzjq
60ced890f3 vim-patch:9.1.0293: filetype: lxqt config files are not recognized
Problem:  filetype: lxqt config files are not recognized
Solution: Detect {lxqt,screengrab}/*.conf files as dosini,
          fix failing filetype test for */tex/latex/**.cfg
          (Wu, Zhenyu)

closes: vim/vim#14450

41208884b8

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:17:39 +08:00
zeertzjq
b0ded42680 vim-patch:9.1.0292: filetype: XDG mimeapps.list file is not recognized
Problem:  filetype: XDG mimeapps.list file is not recognized
Solution: Detect mimeapps.list as dosini filetype
          (Wu, Zhenyu)

Refer: https://wiki.archlinux.org/title/XDG_MIME_Applications#Format

closes: vim/vim#14451

efd752ec38

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:15:44 +08:00
zeertzjq
07c5969aa9 vim-patch:9.1.0291: filetype: libreoffice config files are not recognized
Problem:  filetype: libreoffice config files are not recognized
Solution: Detect Libreoffice config fils as xml/dosini
          (Wu, Zhenyu)

closes: vim/vim#14453

73c89bcf79

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:14:43 +08:00
zeertzjq
611cc7de43
vim-patch:9.1.0304: filetype: cgdb config file is not recognized (#28294)
Problem:  filetype: cgdb config file is not recognized
Solution: Detect cgdbrc files as cgdbrc filetype
          (Wu, Zhenyu)

closes: vim/vim#14458

1492fe6903

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:07:24 +08:00
zeertzjq
e4fb3e2007
vim-patch:9.1.0303: filetype: some protocol buffer files not recognized (#28293)
Problem:  filetype: some protocol buffer files not recognized
Solution: Detect '*.textproto', '*.textpb', '*.txtpb' as pbtxt files
          (Bruno Belanyi)

See: https://protobuf.dev/reference/protobuf/textformat-spec/#text-format-files

closes: vim/vim#14463

e54a8e7c73

Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
2024-04-12 17:06:21 +08:00
zeertzjq
a93a045e63
vim-patch:9.1.0302: filetype: blueprint files are not recognized (#28292)
Problem:  filetype: blueprint files are not recognized
Solution: Detect '*.bp' files as blueprint files, add
          a minimal filetype plugin (Bruno Belanyi)

See: https://source.android.com/docs/setup/build

closes: vim/vim#14488

6be7ef5bc7

Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
2024-04-12 17:05:11 +08:00
zeertzjq
da3059b00f
vim-patch:9.1.0290: filetype: xilinx files are not recognized (#28295)
Problem:  filetype: xilinx files are not recognized
Solution: Add a few xilinx specific file patterns,
          inspect lpr files for being xml/pascal
          (Wu, Zhenyu)

closes: vim/vim#14454

614691ceef

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:03:45 +08:00
zeertzjq
5aee587970
vim-patch:9.1.0289: filetype: some TeX files are not recognized (#28291)
Problem:  filetype: some TeX files are not recognized
Solution: Add more patterns for TeX files and inspect
          a few more files for being TeX files
          (Wu, Zhenyu)

closes: vim/vim#14456

61ee833a50

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:02:25 +08:00
zeertzjq
fe42574230
vim-patch:83424105cb42 (#28298)
runtime(doc): mention :argded for :argedit

related: vim/vim#14464

83424105cb

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-12 16:56:22 +08:00
zeertzjq
8cca787155
test: macros in Visual mode without default mappings (#28288) 2024-04-12 09:16:13 +08:00
zeertzjq
c6d1144515
vim-patch:fcbefe74f161 (#28285)
runtime(compiler): add vimdoc

closes: vim/vim#14459

https://github.com/google/vimdoc generates vim help files from vimscript files

fcbefe74f1

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 05:48:25 +08:00
zeertzjq
3b9a152396
vim-patch:3cb2b3776700 (#28283)
runtime(doc): clarify behaviour or :argadd and :argedit

related: vim/vim#14464

3cb2b37767

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-12 05:39:30 +08:00
zeertzjq
55ffca2f9f vim-patch:dbca7d80457d
ftplugin(asm): add Matchit support

closes: vim/vim#14461

Refer https://github.com/vim/vim/blob/master/runtime/ftplugin/masm.vim#L18-L29

dbca7d8045

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-11 18:23:18 +08:00
zeertzjq
d2d4ad4b32 vim-patch:27f17a6d3493
runtime(asm): add basic indent support

closes: vim/vim#14383

27f17a6d34

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-11 18:22:57 +08:00
zeertzjq
245745f9f0 vim-patch:556c62165963
ftplugin(gdb): add matchit support

closes: vim/vim#14462

556c621659

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-11 18:22:32 +08:00
zeertzjq
1746b9234c
vim-patch:6ce07edd600e (#28275)
runtime(compiler): fix inaccuracies in pandoc compiler (vim/vim#14467)

as kindly pointed out by @Freed-Wu

6ce07edd60

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2024-04-11 17:59:29 +08:00
zeertzjq
d627497156
vim-patch:04e5363b8238 (#28268)
runtime(vim): Improve Vim9 and legacy-script comment highlighting (vim/vim#13104)

This is a first-pass attempt to limit matching of Vim9 and legacy-script
comments to the appropriate syntactic contexts.

Vim9-script comments are highlighted at top level in a Vim9-script file,
in all :def functions, and in all :autocmd and :commmand command blocks.
Legacy-script comments are highlighted at top level in a legacy script
file, in all :func functions and in the Vim9-script preamble before the
:vim9script marker command.

Fixes vim/vim#13047, vim/vim#11307 and vim/vim#9587.

04e5363b82

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-04-11 07:41:44 +08:00
zeertzjq
d0afb2dc4e
vim-patch:9.1.0297: Patch 9.1.0296 causes too many issues (#28263)
Problem:  Patch 9.1.0296 causes too many issues
          (Tony Mechelynck, chdiza, CI)
Solution: Back out the change for now

Revert "patch 9.1.0296: regexp: engines do not handle case-folding well"

This reverts commit 7a27c108e0509f3255ebdcb6558e896c223e4d23 it causes
issues with syntax highlighting and breaks the FreeBSD and MacOS CI. It
needs more work.

fixes: vim/vim#14487

c97f4d61cd

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-11 07:40:16 +08:00
zeertzjq
adb70a351d
vim-patch:c9ec20d94ea5 (#28267)
runtime(doc): Update documentation

- Add security e-mail for private bugreports
- Remove mentioning of the voting feature

closes: vim/vim#14483

c9ec20d94e

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-11 07:39:29 +08:00
altermo
00e6651880 fix(treesitter): use tree range instead of tree root node range 2024-04-10 15:54:52 +01:00
Yi Ming
1dacf2ecee
fix(lsp): prevent code-lens refresh from becoming a permanent no-op (#28228)
To avoid repeatedly requesting a buffer multiple times before a request is completed, the current implementation puts the requested buffer into the active_refreshes table before requesting.

But since we only remove the buffer from active_refreshes in the lsp-handler of textDocument/codeLens, this will cause if the user sends a request that cannot trigger lsp-handler (for example, if there is an LSP server attached to the current buffer, and especially when the user creates an autocmd which performs vim.lsp.codelens.refresh after the BufEnter event is triggered like in the document example), this buffer will be put into active_refreshes, and there is no way to remove it, which will result in all subsequent vim.lsp.codelens.refresh not requesting textDocument/codeLens.
2024-04-10 12:27:37 +02:00
Yi Ming
b95b6ed975
fix(lsp): empty commands should not be considered executable (#28216)
According to the LSP specification, the CodeLens.command is optional but the CodeLens.command.command is not optional, which means the correct representation of a display-only code lens is indeed one with a command with a title to display and an empty string as command.
2024-04-10 12:23:47 +02:00
zeertzjq
f49408454d
vim-patch:9.1.0296: regexp: engines do not handle case-folding well (#28259)
Problem:  Regex engines do not handle case-folding well
Solution: Correctly calculate byte length of characters to skip

When the regexp engine compares two utf-8 codepoints case insensitively
it may match an adjacent character, because it assumes it can step over
as many bytes as the pattern contains.

This however is not necessarily true because of case-folding, a
multi-byte UTF-8 character can be considered equal to some single-byte
value.

Let's consider the pattern 'ſ' and the string 's'. When comparing and
ignoring case, the single character 's' matches, and since it matches
Vim will try to step over the match (by the amount of bytes of the
pattern), assuming that since it matches, the length of both strings is
the same.

However in that case, it should only step over the single byte
value 's' so by 1 byte and try to start matching after it again. So for the
backtracking engine we need to ensure:
- we try to match the correct length for the pattern and the text
- in case of a match, we step over it correctly

The same thing can happen for the NFA engine, when skipping to the next
character to test for a match. We are skipping over the regstart
pointer, however we do not consider the case that because of
case-folding we may need to adjust the number of bytes to skip over. So
this needs to be adjusted in find_match_text() as well.

A related issue turned out, when prog->match_text is actually empty. In
that case we should try to find the next match and skip this condition.

fixes: vim/vim#14294
closes: vim/vim#14433

7a27c108e0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-10 07:08:49 +08:00
zeertzjq
7142c5dde9
vim-patch:e43ace558aee (#28258)
runtime(vim): Update base-syntax, no curly-brace names in Vim9 script (vim/vim#14466)

Remove curly-brace name matching for :def functions.  This is not
supported in Vim9 script.

e43ace558a

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-04-10 06:31:10 +08:00
zeertzjq
4946489e2e
vim-patch:9.1.0283: Several small issues in doc and tests (#28249)
Problem:  Wrong doc style for pandoc syntax description,
          Test_diff_eob_halfpage() may fail depending on
          screen size, using braces in highlight.c when
          not necessary
Solution: Fix pandoc documentation, make sure the window
          for the test has 7 lines, remove the braces.

a040019be6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-09 16:42:39 +08:00
Christian Clason
41521658b1 vim-patch:9.1.0276: No pandoc syntax support
Problem:  No pandoc syntax support
Solution: Add pandoc syntax and compiler plugins
          (Wu, Zhenyu, Konfekt)

closes: vim/vim#14389

7005b7ee7f

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-04-09 10:24:49 +02:00
Christian Clason
4a1eec85dd vim-patch:a2385c233499
runtime(cuda): Update cuda keywords, remove uncommonly used enumeration constants

closes: vim/vim#14406

a2385c2334

Co-authored-by: jiangyinzuo <jiangyinzuo@foxmail.com>
2024-04-09 09:54:16 +02:00
Christian Clason
cbe982bbd5 vim-patch:9.1.0278: filetype: zathurarc files not recognized
Problem:  filetype: zathurarc files not recognized
Solution: Detect '.zathurarc' files as zathurarc filetype,
          add zathurarc filetype (Wu, Zhenyu)

closes: vim/vim#14380

72d81a66ed

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-09 09:54:07 +02:00
Christian Clason
2857cde070 vim-patch:9.1.0275: filetype: R history files are not recognized
Problem:  filetype: R history files are not recognized
Solution: Detect '.Rhistory' files as r filetype
          (Wu, Zhenyu)

closes: vim/vim#14440

fc21b6437c

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-09 09:53:58 +02:00
Christian Clason
bef4ad6507 vim-patch:9.1.0279: filetype: roc files are not recognized
Problem:  filetype: roc files are not recognized
Solution: Detect '*.roc' files as roc filetype,
          add a basic filetype plugin (nat-418)

closes: vim/vim#14416

196b6678c5

Co-authored-by: nat-418 <93013864+nat-418@users.noreply.github.com>
2024-04-09 09:53:49 +02:00
zeertzjq
2528093bbe
vim-patch:9.1.0277: Cannot highlight the Command-line (#28244)
Problem:  Cannot highlight the Command-line
Solution: Add the MsgArea highlighting group
          (Shougo Matsushita)

closes: vim/vim#14327

be2b03c6ee

Cherry-pick Test_highlight_User() from patch 8.2.1077.

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-04-09 07:20:49 +08:00
dundargoc
7035125b2b test: improve test conventions
Work on https://github.com/neovim/neovim/issues/27004.
2024-04-08 22:51:00 +02:00
Christian Clason
541c2d3816 vim-patch:9.1.0273: filetype: keymap files are not recognized
Problem:  filetype: keymap files are not recognized
Solution: Detect '*.keymap' files as Device Tree Files
          (0xadk)

closes: vim/vim#14434

b78753db5f

Co-authored-by: 0xadk <0xadk@users.noreply.github.com>
2024-04-08 00:35:38 +02:00
zeertzjq
d32cbef595
vim-patch:9cd9e759ab1e (#28224)
runtime(doc): Normalise builtin-function optional parameter formatting

These should generally be formatted as func([{arg}]) and referenced as
{arg} in the description.

closes: vim/vim#14438

9cd9e759ab

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-04-08 06:11:31 +08:00