Commit Graph
4244 Commits
Author SHA1 Message Date
zeertzjq a837f10d17 vim-patch:cba93ca: runtime(doc): clarify the effect of :keeppatterns after v9.1.0677
https://github.com/vim/vim/commit/cba93cab533b5da26b9e4a4338c1dc6e8aa3d409
2024-08-17 06:35:42 +08:00
zeertzjqandGregory Anders a25dbeee10 vim-patch:9.1.0677: :keepp does not retain the substitute pattern
Problem:  :keeppatterns does not retain the substitute pattern
          for a :s command
Solution: preserve the last substitute pattern when used with the
          :keeppatterns command modifier (Gregory Anders)

closes: vim/vim#15497

https://github.com/vim/vim/commit/3b59be4ed8a145d3188934f1a5cd85432bd2433d

Co-authored-by: Gregory Anders <greg@gpanders.com>
2024-08-17 06:34:59 +08:00
Gregory Anders 4199671047 feat(term): support OSC 8 hyperlinks in :terminal (#30050) 2024-08-15 06:09:14 -05:00
zeertzjqandJJCUBER 9d74dc3ac5 vim-patch:dc831db: runtime(doc): add help tags for json + markdown global variables (#30037)
I added help tags for them in the syntax.txt file since this is the only
place they are mentioned.

closes: vim/vim#15486

https://github.com/vim/vim/commit/dc831db6ea3b550e3acb60a0859fcd07fd3f86e6

Co-authored-by: JJCUBER <34446698+JJCUBER@users.noreply.github.com>
2024-08-13 22:42:07 +00:00
Lewis Russell 9b5ab66678 test(lsp): refactor and tidy
- Merge all the top level 'LSP' describe blocks
- Refactor text edit tests
- Fix typing errors
- Add linebreaks between tests
2024-08-11 15:14:14 +01:00
Christian Clason 8df6736ca1 feat(term): enable reflow by default (#21124)
Problem: Contents of terminal buffer are not reflown when Nvim is
resized.

Solution: Enable reflow in libvterm by default. Now that libvterm is
vendored, also fix "TUI rapid resize" test failures there.

Note: Neovim's scrollback buffer does not support reflow (yet), so lines
vanishing into the buffer due to a too small window will be restored
without reflow.
2024-08-10 10:26:07 +02:00
Christian Clason fa79a8ad6d build(deps): vendor libvterm at v0.3.3
Problem: Adding support for modern Nvim features (reflow, OSC 8, full
utf8/emoji support) requires coupling libvterm to Nvim internals
(e.g., utf8proc).

Solution: Vendor libvterm at v0.3.3.
2024-08-10 10:26:07 +02:00
zeertzjq e01ccda1be vim-patch:0cc5dce: runtime(doc): clarify directory of Vim's executable vs CWD
According to :h win32-PATH, "the same directory as Vim" means the same
directory as the Vim executable, not Vim's current directory.  In patch
8.2.4860 these two concepts were mixed up.

closes: vim/vim#15451

https://github.com/vim/vim/commit/0cc5dce5780d39fe621f6146d4fb862318918125
2024-08-09 07:21:59 +08:00
Yi Ming 0a1212ef94 docs(treesitter): generate inline docs for Ranges
docs(treesitter): in-place parameter description

docs(treesitter): remove internal type names

docs(treesitter): add missing private annotation
2024-08-06 18:18:34 +02:00
zeertzjqandLemonBoy 37952bf7b4 vim-patch:8.2.4838: checking for absolute path is not trivial (#29990)
Problem:    Checking for absolute path is not trivial.
Solution:   Add isabsolutepath(). (closes vim/vim#10303)

https://github.com/vim/vim/commit/dca1d40cd0f2af0755519e7028378bd3c8fefd31

vim-patch:8a3b805c6c9c

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-08-06 21:19:12 +08:00
zeertzjqandShougo Matsushita 28fbba2092 vim-patch:9.1.0465: missing filecopy() function (#29989)
Problem:  missing filecopy() function
Solution: implement filecopy() Vim script function
          (Shougo Matsushita)

closes: vim/vim#12346

https://github.com/vim/vim/commit/60c8743ab6c90e402e6ed49d27455ef7e5698abe

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-08-06 12:49:59 +00:00
zeertzjqandChristian Brabandt 9a30abb292 vim-patch:217d3c1: runtime(doc): capitalize correctly
* do not capitalize after a double colon when introducing a list
* Capitalize a header line

closes: vim/vim#15433

https://github.com/vim/vim/commit/217d3c17c6fa8d1223fa8dd39efd8c32897f9441

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-06 06:47:30 +08:00
zeertzjqandJon Parise 58406ab9f0 vim-patch:947f752: runtime(doc): fix typo in syntax.txt (#29974)
closes: vim/vim#15425

https://github.com/vim/vim/commit/947f752a47b107529b5d591e4e24b51237c20497

Co-authored-by: Jon Parise <jon@indelible.org>
2024-08-04 06:09:54 +08:00
Christian Clason 3b58d93aae docs(filetype): consolidate comments in dev_vimpatch.txt 2024-08-03 14:14:42 +02:00
Evgeni Chasnovski 37910f2703 docs(filetype): add note about prefering explicit lists over pattern 2024-08-03 14:14:42 +02:00
zeertzjq 99bb0a10d3 refactor(eval): treat v:lua call as simple function 2024-08-02 12:56:57 +08:00
zeertzjqandBram Moolenaar 582bf4f1e1 vim-patch:9.0.0634: evaluating "expr" options has more overhead than needed
Problem:    Evaluating "expr" options has more overhead than needed.
Solution:   Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
            "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
            'formatexpr', 'indentexpr' and 'charconvert'.

https://github.com/vim/vim/commit/a4e0b9785e409e9e660171cea76dfcc5fdafad9b

vim-patch:9.0.0635: build error and compiler warnings

Problem:    Build error and compiler warnings.
Solution:   Add missing change.  Add type casts.

https://github.com/vim/vim/commit/3292a229402c9892f5ab90645fbfe2b1db342f5b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-08-02 11:56:51 +08:00
zeertzjqandBram Moolenaar f7fde0173a vim-patch:9.0.0632: calling a function from an "expr" option has overhead
Problem:    Calling a function from an "expr" option has too much overhead.
Solution:   Add call_simple_func() and use it for 'foldexpr'

https://github.com/vim/vim/commit/87b4e5c5db9d1cfd6f2e79656e1a6cff3c69d15f

Cherry-pick a call_func() change from patch 8.2.1343.
Add expr-option-function docs to options.txt.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-08-02 11:56:51 +08:00
zeertzjqandBram Moolenaar 48e4589ead vim-patch:8.2.4416: Vim9: using a script-local function requires using "s:" (#29950)
Problem:    Vim9: using a script-local function requires using "s:" when
            setting 'completefunc'.
Solution:   Do not require "s:" in Vim9 script. (closes vim/vim#9796)

https://github.com/vim/vim/commit/1fca5f3e86f08e696058fc7e86dfe41b415a78e6

vim-patch:8.2.4417: using NULL pointer

Problem:    Using NULL pointer.
Solution:   Set offset after checking for NULL pointer.

https://github.com/vim/vim/commit/e89bfd212b21c227f026e467f882c62cdd6e642d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-08-02 02:58:10 +00:00
Christian ClasonandAliaksei Budavei d3019419e7 vim-patch:30a8ad6: runtime(java): Document "g:java_space_errors" and "g:java_comment_strings"
closes: vim/vim#15399

https://github.com/vim/vim/commit/30a8ad675d183c15c47b42e37199e98e2f924d69

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-08-01 10:14:10 +02:00
Christian ClasonandAliaksei Budavei a70371ff00 vim-patch:3749dff: runtime(java): Tidy up the documentation for "ft-java-syntax"
- Reword a few sentences and reformat a few paragraphs.
- Supply absent capitalisation and punctuation.
- Make listed highlighting groups and code stand out.
- Prefix all Java-related global variables with "g:".
- Add spaces around each variable assignment operator.
- Acknowledge that some Javadoc variables are maintained in
  the HTML syntax file.

Also, move the overridable _default_ HTML group links before
the HTML syntax file inclusion in order to implement the
documented diverged settings.

related: vim/vim#15399

https://github.com/vim/vim/commit/3749dff093d8c3ba0cd34cebf42bd4d3d93afe26

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-08-01 10:14:10 +02:00
zeertzjqandChristian Brabandt b7dec93e68 vim-patch:5b07213: runtime(doc): re-format tag example lines, mention ctags --list-kinds (#29938)
https://github.com/vim/vim/commit/5b07213c0b365f2a7fcdd10c7e7cd00aae3560a5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-08-01 08:00:41 +00:00
zeertzjqandBram Moolenaar 2b4049719a vim-patch:partial:f10911e: Update runtime files (#29936)
https://github.com/vim/vim/commit/f10911e5db16f1fe6ab519c5d091ad0c1df0d063

Also cherry-pick E1142 and E1156 tags from Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-08-01 03:50:38 +00:00
Lewis Russell 573a71469d fix(scrollbind): properly take filler/virtual lines into account
Problem:

`'scrollbind'` does not work properly if the window being scrolled
automatically contains any filler/virtual lines (except for diff filler
lines).

This is because when the scrollbind check is done, the logic only
considers changes to topline which are represented as line numbers.

Solution:

Write the logic for determine the scroll amount to take into account
filler/virtual lines.

Fixes #29751
2024-07-31 11:33:32 +01:00
zeertzjqandChristian Brabandt e57598fbef vim-patch:9.1.0645: regex: wrong match when searching multi-byte char case-insensitive
Problem:  regex: wrong match when searching multi-byte char
          case-insensitive (diffsetter)
Solution: Apply proper case-folding for characters and search-string

This patch does the following 4 things:

1) When the regexp engine compares two utf-8 codepoints case
   insensitive 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' 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

   There is one tricky thing for the backtracing engine. We also need to
   calculate correctly the number of bytes to compare the 2 different
   utf-8 strings s1 and s2. So we will count the number of characters in
   s1 that the byte len specified. Then we count the number of bytes to
   step over the same number of characters in string s2 and then we can
   correctly compare the 2 utf-8 strings.

2) A similar 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.

3) 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.

4) When comparing characters using collections, we must also apply case
   folding to each character in the collection and not just to the
   current character from the search string.  This doesn't apply to the
   NFA engine, because internally it converts collections to branches
   [abc] -> a\|b\|c

fixes: vim/vim#14294
closes: vim/vim#14756

https://github.com/vim/vim/commit/22e8e12d9f5034e1984db0c567b281fda4de8dd7

N/A patches:
vim-patch:9.0.1771: regex: combining chars in collections not handled
vim-patch:9.0.1777: patch 9.0.1771 causes problems

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-31 08:03:31 +08:00
Christian ClasonandChristian Brabandt 1dd2bf926d vim-patch:df9f67e: runtime(html): update syntax script to sync by 250 minlines by default
closes: vim/vim#14071

https://github.com/vim/vim/commit/df9f67e10d214e0124f2141f59593529801307a4

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-07-31 00:18:32 +02:00
zeertzjqandYegappan Lakshmanan 0af056ebce vim-patch:49cdd62: runtime(doc): list of new/changed features in version9.txt
closes: vim/vim#13753

https://github.com/vim/vim/commit/49cdd629a39d7e40e7349e65cb177e2442871a04

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-07-30 12:18:44 +08:00
Riley Bruins 1af55bfcf2 feat(treesitter): allow get_node to return anonymous nodes
Adds a new field `include_anonymous` to the `get_node` options to allow
anonymous nodes to be returned.
2024-07-29 17:15:46 +02:00
Riley Bruins bd3b6ec836 feat(treesitter): add node_for_range function
This is identical to `named_node_for_range` except that it includes
anonymous nodes. This maintains consistency in the API because we
already have `descendant_for_range` and `named_descendant_for_range`.
2024-07-29 17:15:46 +02:00
zeertzjqandh-east fe5030c05e vim-patch:partial:52e7cc2: runtime(doc): tweak documentation style a bit (#29897)
closes: vim/vim#15371

https://github.com/vim/vim/commit/52e7cc26d81c61fff1b2e3b32e8b9b04347be1d3

Co-authored-by: h-east <h.east.727@gmail.com>
2024-07-29 00:02:31 +00:00
Christian Clason 5aa1a9532c docs(treesitter): don't quote metadata 2024-07-28 16:13:11 +02:00
zeertzjq aee4254b76 Merge pull request #29876 from glepnir/vim-patch
vim-patch:9.1.{0618,0619,0629}: cannot mark deprecated attributes in completion menu
2024-07-27 22:12:30 +08:00
zeertzjq b8b0e9db3f vim-patch:9.1.0629: Rename of pum hl_group is incomplete
Problem:  Rename of pum hl_group is incomplete in source.
Solution: Also rename the test function.  Rename to user_hlattr in code
          to avoid confusion with pum_extra.  Add test with matched text
          highlighting (zeertzjq).

closes: vim/vim#15348

https://github.com/vim/vim/commit/4100852e099133a0c9603e1087e5dc6d82001ce7
2024-07-27 21:56:44 +08:00
glepnir f132f8e9d4 vim-patch:9.1.0618: cannot mark deprecated attributes in completion menu
Problem:  cannot mark deprecated attributes in completion menu
Solution: add hl_group to the Dictionary of supported completion fields
          (glepnir)

closes: vim/vim#15314

https://github.com/vim/vim/commit/508e7856ec4afc9d6038b14bb6893668268dccab

Co-authored-by: glepnir <glephunter@gmail.com>
2024-07-27 18:05:37 +08:00
zeertzjqandKen Takata 60967cd9aa vim-patch:9.1.0616: filetype: Make syntax highlighting off for MS Makefiles (#29874)
Problem:  filetype: Make syntax highlighting off for MS Makefiles
Solution: Try to detect MS Makefiles and adjust syntax rules to it.
          (Ken Takata)

Highlighting of variable expansion in Microsoft Makefile can be broken.
E.g.:
https://github.com/vim/vim/blob/2979cfc2627d76a9c09cad46a1647dcd4aa73f5f/src/Make_mvc.mak#L1331

Don't use backslash as escape characters if `make_microsoft` is set.
Also fix that `make_no_comments` was not considered if `make_microsoft`
was set.

Also add description for `make_microsoft` and `make_no_comments` to the
documentation and include a very simple filetype test

closes: vim/vim#15341

https://github.com/vim/vim/commit/eb4b903c9b238ebcc1d14cfcb207129b4931a33d

Co-authored-by: Ken Takata <kentkt@csc.jp>
2024-07-27 16:48:29 +08:00
108d2bf74b vim-patch:e73e5b8: runtime(java): Optionally highlight the :: token for method references
This token will be highlighted, similar to the arrow of
lambda expressions, whenever "g:java_highlight_functions" is
defined.

Also:

- Improve the recognition of _switch-case_ labels
  (D-Cysteine).
- Remove insignificant empty statements in syntax test
  files.

closes: vim/vim#15322

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.13
https://github.com/fleiner/vim/pull/1

https://github.com/vim/vim/commit/e73e5b889b52675a9ea58cf154235c7f25d107d5

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Co-authored-by: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com>
2024-07-25 10:01:35 +02:00
zeertzjqandDoug Kearns 0cdeb06db0 vim-patch:ddbb6fe: runtime(vim): Update base-syntax, improve :set highlighting (#29850)
- Match bang, "all" and "termcap" options, and trailing command
  separator "|".
- Highlight set assignment operators.
- Match multiline :set and multiline option values.
- Mention the newer "0o" octal prefix at :help :set=.

closes: vim/vim#15329

https://github.com/vim/vim/commit/ddbb6fe2d0344e93436c5602b7a06169f49a9b52

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-07-25 09:55:59 +08:00
Christian Clason 80eda9726f docs(lua): clarify assumptions on luajit vs. puc lua
Problem: Plugin authors and distribution packagers are confused about
the role of LuaJIT vs. PUC Lua.

Solution: Clarify that LuaJIT is preferred but not required (extensions
should not be assumed but checked for) and that vanilla Lua 5.1 should
be used without language extensions such as `goto`.
2024-07-21 16:11:28 +02:00
zeertzjq f73904f9d6 vim-patch:eb6d733: runtime(doc): fix more inconsistencies in assert function docs (#29796)
related: https://github.com/vim/vim/pull/15280#issuecomment-2233771449

closes: vim/vim#15285

https://github.com/vim/vim/commit/eb6d733bef312a0634770e023e8a41f0347f1503
2024-07-19 04:12:13 +00:00
Evgeni Chasnovski f61efe3fe7 perf(filetype): implement parent pattern pre-matching (#29660)
Problem: calling `vim.filetype.match()` has performance bottleneck in
  that it has to match a lot of Lua patterns against several versions of
  input file name. This might be the problem if users need to call it
  synchronously a lot of times.

Solution: add "parent pattern pre-matching" which can be used to quickly
  reject several potential pattern matches at (usually rare) cost of
  adding time for one extra Lua pattern match.

  "Parent pattern" is a manually added/tracked grouping of filetype
  patterns which should have two properties:
    - Match at least the same set of strings as its filetype patterns.
      But not too much more.
    - Be fast to match.

  For them to be effective, group should consist from at least three
  filetype patterns.

  Example: for a filetpye pattern ".*/etc/a2ps/.*%.cfg", both "/etc/"
  and "%.cfg" are good parent patterns (prefer the one which can group
  more filetype patterns).

  After this commit, `vim.filetype.match()` on most inputs runs ~3.4
  times faster (while some inputs may see less impact if they match
  many parent patterns).
2024-07-18 10:26:27 -05:00
zeertzjqandShane Harper 18f1a3aaa5 vim-patch:c1b3984: runtime(doc): minor updates. (#29778)
closes: vim/vim#15280

https://github.com/vim/vim/commit/c1b3984a7b3cd6adcd1f43e558cb04fad1af3182

Co-authored-by: Shane Harper <shane@shaneharper.net>
2024-07-18 08:08:56 +08:00
Christian ClasonandAvidSeeker 8e590cae83 vim-patch:9.1.0593: filetype: Asymptote files are not recognized
Problem:  filetype: Asymptote files are not recognized
Solution: detect '*.asy' files as asy filetype, include
          ftplugin and syntax plugin (AvidSeeker).

Reference: https://asymptote.sourceforge.io/

closes: vim/vim#15252

https://github.com/vim/vim/commit/3088ef094da721dac8c0363a6c9e14eaf9313929

Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
2024-07-17 11:11:58 +02:00
Christian Clasonandmarkmacode 5d8220bda0 vim-patch:3e07d5a: runtime(go): add recommended indent options to ftplugin
related: vim/vim#15264

https://github.com/vim/vim/commit/3e07d5aef19ac34a61b9d58c2e0698351d392f52

Co-authored-by: markmacode <code@mamo.aleeas.com>
2024-07-17 11:11:58 +02:00
Christian Clasonandmarkmacode c146580e9d vim-patch:6a54dcb: runtime(gdscript): add recommended indent options to ftplugin
related: vim/vim#15264

https://github.com/vim/vim/commit/6a54dcbbd68e70ee067348d1d9c1898befc56972

Co-authored-by: markmacode <code@mamo.aleeas.com>
2024-07-17 11:11:58 +02:00
Christian ClasonandAvidSeeker 61ea466591 vim-patch:9.1.0592: runtime: filetype: Mediawiki files are not recognized
Problem:  filetype: Mediawiki files are not recognized
Solution: detect "*.mw" and "*.wiki" as mediawiki filetype,
          include basic syntax and filetype plugins.
          (AvidSeeker)

closes: vim/vim#15266

https://github.com/vim/vim/commit/b5844104ab1259e061e023ea6259e4eb002e7170

Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
2024-07-17 11:11:58 +02:00
altermo 118ae7e5ed fix(tohtml): support ranges again 2024-07-16 15:07:40 +02:00
Christian ClasonandGregory Anders a0fd51c1e2 vim-patch:1cc4cae: runtime(typst): Add typst runtime files
closes: vim/vim#15234

https://github.com/vim/vim/commit/1cc4cae961a7b49608ef7bd56837cc723d49db4d

Co-authored-by: Gregory Anders <greg@gpanders.com>
2024-07-16 09:43:57 +02:00
zeertzjqandDominique Pellé c2b51e6c41 vim-patch:df62c62: runtime(doc): grammar fixes in options.txt (#29729)
closes: vim/vim#15265

https://github.com/vim/vim/commit/df62c62177bd4dffce880b7a5711594865090953

Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
2024-07-15 22:24:02 +00:00
Maria José Solano 8703e7bd12 docs(lpeg): merge upstream changes 2024-07-15 21:16:29 +01:00
04c158fbec docs: misc (#29622)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-07-15 06:54:45 +08:00