1
0
forked from aniani/vim

20690 Commits

Author SHA1 Message Date
Jon Parise
4ce1cb5bf1
runtime(graphql): contribute vim-graphql to Vim core
Contribute the core of my vim-graphql project (ftplugin, indent, syntax)
to the Vim project. This replaces the basic ftplugin support that was
already in the runtime with a more complete set of filetype settings. I
can assume maintainership for all of these files.

I'll continue to maintain the higher-level embedded filetype support
separately (in vim-graphql) for now, because it's fairly complex, but we
can consider integrating that code directly into vim later.

runtime files use the MIT license.

closes: #16273

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-23 09:57:42 +01:00
glepnir
89a107efd1
patch 9.1.0954: popupmenu.c can be improved
Problem:  popupmenu.c can be improved
Solution: slightly refactor the logic
          (glepnir)

closes: #16271

Replace some if blocks and combine user attr abstract to an inline
function.

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0954
2024-12-22 15:16:40 +01:00
Hugo Osvaldo Barrera' via vim_dev
7cb24917a1
patch 9.1.0953: filetype: APKBUILD files not correctly detected
Problem:  filetype: APKBUILD files not correctly detected
Solution: detect 'APKBUILD' files as apkbuild filetype,
          include a apkbuild syntax script (which basically
          just sources the sh.vim syntax file)
          (Hugo Osvaldo Barrera)

Vim plugins (e.g.: ALE, nvim-lspconfig, etc) rely on filetype to
determine which integrations/helpers are applicable. They expect
filetype=apkbuild for APKBUILD files.

On the other hand, plugins also enable bash-specific linters and
functionality when filetype=bash, but APKBUILD files are POSIX sh, not
bash, so these often provide bogus results.

Change the filetype for APKBUILD to a 'apkbuild', so that tools and
ftplugin can properly target these files. This filetype will use the
existing `sh` syntax rules, since these are applicable for them.

Signed-off-by: Hugo Osvaldo Barrera' via vim_dev <vim_dev@googlegroups.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0953
2024-12-22 15:11:50 +01:00
Yegappan Lakshmanan
92195ae72f
patch 9.1.0952: Vim9: missing type checking for any type assignment
Problem:  Vim9: missing type checking for any type assignment
          (Ernie Rael)
Solution: when assigning to a list item, if the type of the LHS item is
          any, then use the list item type (Yegappan Lakshmanan)

fixes: #15208
closes: #16274

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0952
2024-12-22 14:44:35 +01:00
Konfekt
62e3014ab1
patch 9.1.0951: filetype: jshell files are not recognized
Problem:  filetype: jshell files are not recognized
Solution: detect '*.jsh' files as java filetype
          (Konfekt)

closes: #16260

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0951
2024-12-22 10:57:33 +01:00
Christian Brabandt
70881ba195
runtime(dockerfile): do not set commentstring in syntax script
fixes: #16268

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:53:55 +01:00
Wu, Zhenyu
f173f4249f
patch 9.1.0950: filetype: fennelrc files are not recognized
Problem:  filetype: fennelrc files are not recognized
Solution: detect 'fennelrc' files as fennel filetype
          (Wu Zhenyu)

References:
https://github.com/bakpakin/Fennel/issues/193

closes: #16262

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0950
2024-12-20 19:45:06 +01:00
Konfekt
2328a39a54
runtime(netrw): do not double escape Vim special characters
This double escaping was likely introduced because it was the only way
to make :Open work with hashes/percent signs despite shellescape(..., 1)
supposedly taking care of it, but then breaks the gx mapping
on MSYS2 as reported at [0]

Since special characters in the URL following :Open can be escaped,
whereas gx simply breaks and is more common, no longer double escape

[0]: https://github.com/vim/vim/issues/16252

fixes: #16252
closes: #16265

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:41:02 +01:00
Christian Brabandt
fb27cf9cb1
git: ignore reformatting change of netrw plugin
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:37:54 +01:00
shane.xb.qian
c673b805ad
runtime(netrw): more reformating #16248
closes: #16266

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:36:40 +01:00
h-east
af0fed5988
runtime(doc): Add a note about handling symbolic links in starting.txt
closes: #16257

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:51:36 +01:00
Boris Staletic
13c1153eef
patch 9.1.0949: popups inconsistently shifted to the left
Problem:  popups inconsistently shifted to the left
Solution: always shift non-fixed popups to the left when the
          text would be truncated
          (no matter whether 'wrap' is set or not)
          (Boris Staletic)

fixes: #16231
closes: #16247

Signed-off-by: Boris Staletic <boris.staletic@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0949
2024-12-19 20:22:19 +01:00
Christian Brabandt
83029a354e
git: ignore reformatting change of netrw plugin
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:17:17 +01:00
Luca Saccarola
c363ca1ecd
runtime(netrw): change indent size from 1 to 2
closes: #16248

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:16:18 +01:00
zeertzjq
3baf19a2b1
patch 9.1.0948: Missing cmdline completion for :pbuffer
Problem:  Missing cmdline completion for :pbuffer.
Solution: Add cmdline completion for :pbuffer like :buffer.
          (zeertzjq)

fixes: #16250
closes: #16251

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0948
2024-12-19 20:05:28 +01:00
Ken Takata
b183f50280
runtime(tutor): Reformat tutor1
* Fix lesson number.
* Fold a long line.
* Adjust newlines.

  It seems that each lesson is written in 23 lines to fit the 80x25
  monitor.

closes: #16253

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:03:10 +01:00
Yegappan Lakshmanan
59c8880ade
patch 9.1.0947: short-description
Problem:  Coverity comlains about un-initialized var
          (after v9.1.0943)
Solution: initialize variable (Yegappan Lakshmanan)

closes: #16256

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0947
2024-12-19 20:00:31 +01:00
Brandon Maier
cbdc3c1f7a
patch 9.1.0946: cross-compiling fails on osx-arm64
Problem:  cross-compiling fails on osx-arm64
Solution: use vim_cv_timer_create_with_lrt() instead of
          vim_cv_timer_create_works() (Brandon Maier)

Cross-compiling to osx-arm64 fails with the following

  In file included from json.c:17:
  In file included from ./vim.h:457:
  ./macros.h:304:24: error: expected identifier or '('
    304 |      static inline int isnan(double x)
        |                        ^
  .../MacOSX11.0.sdk/usr/include/math.h:165:7: note: expanded from macro 'isnan'
    165 |     ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))
        |       ^

This can be traced back to ./configure incorrectly detecting the
compiler support for `isnan()`, from the config.log:

  configure:14567: checking for isnan()
  configure:14588: arm64-apple-darwin20.0.0-clang <...> -L$PREFIX/lib conftest.c  -lncurses -ltinfo -lrt >&5
  ld: library not found for -lrt
  arm64-apple-darwin20.0: error: linker command failed with exit code 1 (use -v to see invocation)

The `-lrt` linking is added by ./configure script when it detects
compiler support for `timer_create()`. On the osx-arm64 platform
`timer_create()` works but does not link with `-lrt`. This results in
the following settings from config.log:

  vim_cv_timer_create=yes
  vim_cv_timer_create_with_lrt=no
  vim_cv_timer_create_works=yes

But the configure.ac incorrectly uses `timer_create_works` to add
`-lrt`, instead of using `timer_create_with_lrt`.

fixes: https://github.com/conda-forge/vim-feedstock/pull/1664
closes: #16242

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0946
2024-12-18 21:18:01 +01:00
zeertzjq
f25d8f9312
patch 9.1.0945: ComplMatchIns highlight doesn't end after inserted text
Problem:  ComplMatchIns highlight doesn't end after inserted text.
Solution: Handle ComplMatchIns highlight more like search highlight.
          Fix off-by-one error. Handle deleting text properly.
          (zeertzjq)

closes: #16244

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0945
2024-12-18 21:12:25 +01:00
Fredrik
beccb33977
translation(sv): re-include the change from #16240
related: #16240

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 21:09:27 +01:00
Christian Brabandt
b2a8df35e8
patch 9.1.0944: tests: test_registers fails when not run under X11
Problem:  tests: test_registers fails when not run under X11
Solution: filter out warning message

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0944
2024-12-18 20:40:48 +01:00
Yegappan Lakshmanan
d0186c54c2
patch 9.1.0943: Vim9: vim9compile.c can be further improved
Problem:  vim9compile.c can be further improved
Solution: Refactor the compile_lhs function
          (Yegappan Lakshmanan)

closes: #16245

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0943
2024-12-18 20:16:20 +01:00
Christian Brabandt
80d72aa547
runtime(doc): Update README and mention make check to verify
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:13:46 +01:00
Christian Brabandt
116d2787ad
translation(sv): partly revert commit 98874dca6d0b60ccd6fc3a140b3ec
This partly reverts commit 98874dca6d0b60ccd6fc3a140b3ec1cc3e560f95,
but keeps the added changes from #16240, since the re-generated sv.po
file fails the Vim check.vim script in the CI test suite.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:10:33 +01:00
Christian Brabandt
21c37d7f69
runtime(vim): update base-syntax after v9.1.0936
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 21:01:24 +01:00
zeertzjq
d32bf0a067
patch 9.1.0942: a few typos were found
Problem:  a few typos were found
Solution: fix them (zeertzjq)

closes: #16232

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0942
2024-12-17 20:55:13 +01:00
zeertzjq
f4ccada5c3
patch 9.1.0941: ComplMatchIns doesn't work after multibyte chars
Problem:  ComplMatchIns doesn't work after multibyte chars
          (after v9.1.0936)
Solution: Use (ptr - line) instead of wlv.col (zeertzjq).

closes: #16233

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0941
2024-12-17 20:50:19 +01:00
h-east
a977883ef3
runtime(doc): Fix style in fold.txt
closes: #16236

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:48:42 +01:00
Yee Cheng Chin
38281e1b96
ci: Update macOS from macos-14 to macos-15
Make sure to use the latest Xcode (16.2) which contains fixes in the
compiler, as GitHub Actions defaults to using 16.0 still. See #15764.

closes: #16239

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:36:10 +01:00
Fredrik
98874dca6d
translation(sv): Fix typo in Swedish translation
- "kind file" not as opposed to unkind, but two separate columns

- also regenerate sv.po

fixes: #16237
closes: #16240

Signed-off-by: Fredrik <fredrik.oljemark@helsinki.fi>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:32:44 +01:00
zeertzjq
6c3027744e
patch 9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes :normal
Problem:  Wrong cursor shape with "gq" and 'indentexpr' executes :normal
Solution: Update cursor and mouse shape after restoring old_State.
          (zeertzjq)

closes: #16241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Solution: Update cursor and mouse shape after restoring old_State.
v9.1.0940
2024-12-17 20:26:45 +01:00
Christian Brabandt
9c3330de28
runtime(doc): fix some small errors
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:24:24 +01:00
Christian Brabandt
3353833f89
patch 9.1.0939: make installtutor fails
Problem:  make installtutor fails
          (Antonio Giovanni Colombo, after v9.1.0932)
Solution: Fix Makefile rule

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0939
2024-12-17 20:16:58 +01:00
Christian Brabandt
bb95589473
patch 9.1.0938: exclusive selection not respected when re-selecting block mode
Problem:  exclusive selection not respected when re-selecting block mode
          (Matt Ellis)
Solution: advance selection by another character when using
          selection=exclusive and visual block mode

fixes: #16202
closes: #16219

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0938
2024-12-16 22:49:15 +01:00
Christian Brabandt
381ff7726e
patch 9.1.0937: test_undolist() is flaky
Problem:  test_undolist() is flaky
Solution: allow to match one additional optional whitespace char

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0937
2024-12-16 22:28:28 +01:00
glepnir
6a38aff218
patch 9.1.0936: cannot highlight completed text
Problem:  cannot highlight completed text
Solution: (optionally) highlight auto-completed text using the
          ComplMatchIns highlight group (glepnir)

closes: #16173

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0936
2024-12-16 21:56:16 +01:00
Aliaksei Budavei
368ef5a48c
patch 9.1.0935: SpotBugs compiler can be improved
Problem:  SpotBugs compiler can be improved
Solution: runtime(compiler): Improve defaults and error handling for
          SpotBugs; update test_compiler.vim (Aliaksei Budavei)

runtime(compiler): Improve defaults and error handling for SpotBugs

* Keep "spotbugs#DefaultPreCompilerTestAction()" defined but
  do not assign its Funcref to the "PreCompilerTestAction"
  key of "g:spotbugs_properties": there are no default and
  there can only be introduced arbitrary "*sourceDirPath"
  entries; therefore, this assignment is confusing at best,
  given that the function's implementation delegates to
  whatever "PreCompilerAction" is.

* Allow for the possibility of relative source pathnames
  passed as arguments to Vim for the Javac default actions,
  and the necessity to have them properly reconciled when
  the current working directory is changed.

* Do not expect users to remember or know that new source
  files ‘must be’ ":argadd"'d to be then known to the Javac
  default actions; so collect the names of Java-file buffers
  and Java-file Vim arguments; and let users providing the
  "@sources" file-lists in the "g:javac_makeprg_params"
  variable update these file-lists themselves.

* Strive to not leave behind a fire-once Syntax ":autocmd"
  for a Java buffer whenever an arbitrary pre-compile action
  errors out.

* Only attempt to run a post-compiler action in the absence
  of failures for a pre-compiler action.  Note that warnings
  and failures are treated alike (?!) by the Javac compiler,
  so when previews are tried out with "--enable-preview",
  remember about passing "-Xlint:-preview" too to also let
  SpotBugs have a go.

* Properly group conditional operators when testing for key
  entries in a user-defined variable.

* Also test whether "javaExternal" is defined when choosing
  an implementation for source-file parsing.

* Two commands are provided to toggle actions for buffer-local
  autocommands:
  - SpotBugsRemoveBufferAutocmd;
  - SpotBugsDefineBufferAutocmd.

For example, try this from "~/.vim/after/ftplugin/java.vim":
------------------------------------------------------------
if exists(':SpotBugsDefineBufferAutocmd') == 2
	SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
endif
------------------------------------------------------------

And ":doautocmd java_spotbugs User" can be manually used at will.

closes: #16140

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0935
2024-12-16 21:38:47 +01:00
Yinzuo Jiang
a2a2fe841e
patch 9.1.0934: hard to view an existing buffer in the preview window
Problem:  hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)

Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.

`:pbuffer` can also open special buffer, for example terminal buffer.

closes: #16222

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0934
2024-12-16 21:22:09 +01:00
Konfekt
3920bb4356
runtime(doc): document how to minimize fold computation costs
closes: #16224

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:11:55 +01:00
Yegappan Lakshmanan
468db1f8af
patch 9.1.0933: Vim9: vim9compile.c can be further improved
Problem:  Vim9: vim9compile.c can be further improved
Solution: further refactor the compile assignment code
          (Yegappan Lakshmanan)

closes: #16230

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0933
2024-12-16 20:56:56 +01:00
Christian Brabandt
3f7d584e96
patch 9.1.0932: new Italian tutor not installed
Problem:  new Italian tutor not installed
Solution: add Makefile rule, include it into the Filelist
          ("Philip H." <47042125+pheiduck@users.noreply.github.com>),
          update the tutors help file

closes: #16215

Co-authored-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0932
2024-12-16 20:38:31 +01:00
Christian Brabandt
0a4e57f44a
runtime(doc): fix a few minor errors from the last doc updates
1) move the section at :h inclusive-motion-selection-exclusive a few
lines below, so that it doesn't live in between the 2 exceptions.

2) remove the tag :h :!-range. It's not accurate (because it is actually
a filter) and this command is already described at :h :range!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 10:20:51 +01:00
Antonio Giovanni Colombo
b100477190
translation(it): add Italian translation for the interactive tutor
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 21:36:55 +01:00
Antonio Giovanni Colombo
41d6de2974
runtime(doc): update the change.txt help file
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 21:17:49 +01:00
Shougo Matsushita
6fea0a5480
runtime(help): Add Vim lang annotation support for codeblocks
closes: #16215

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 20:52:45 +01:00
h-east
3a3a2c921c
patch 9.1.0931: ml_get error in terminal buffer
Problem:  ml_get error in terminal buffer (user202729)
Solution: call update_topline() in win_enter_ext() for terminal buffers
          (h-east)

fixes: #16024
closes: #16211

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0931
2024-12-15 19:36:11 +01:00
h-east
b34622579c
patch 9.1.0930: tests: test_terminal2 may hang in GUI mode
Problem:  tests: test_terminal2 may hang in GUI mode
Solution: break the loop in gui_mch_update() after at most 99 iterations
          (h-east)

related: #16211

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0930
2024-12-15 19:32:39 +01:00
David Thievon
5a2e0cf5f1
patch 9.1.0929: filetype: lalrpop files are not recognized
Problem:  filetype: lalrpop files are not recognized
Solution: detect '*.lalrpop' files as lalrpop filetype
          (David Thievon)

References:
https://github.com/lalrpop/lalrpop

closes: #16223

Signed-off-by: David Thievon <pdkfan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0929
2024-12-15 19:22:17 +01:00
Christian Brabandt
b48108d58e
patch 9.1.0928: tests: test_popupwin fails because the filter command fails
Problem:  tests: test_popupwin fails because the filter command fails
Solution: add the "e" flag to the :s command to normalize the
          screendumps Last Change header so that it doesn't fail on
          "Pattern not found"

The test might still fail, because the "Last Change" hader should always
be part of the screendump, but at least the filter command should not
cause aborting of the test script.

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0928
2024-12-15 10:38:57 +01:00
Yinzuo Jiang
3c5d782dbc
editorconfig: set trim_trailing_whitespace = false for src/testdir/test*.vim
closes: #16220

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 10:31:19 +01:00