Commit Graph
541 Commits
Author SHA1 Message Date
1889c351fd vim-patch:7344024: runtime(java): Search type and method declarations with "&inc" and "&def"
=============== LIMITATIONS AND OBSERVATIONS ===============

* Remember that external-type names can only be found when
  they match filenames resolvable in "&path" with "import"
  declarations; load the source file of an external type to
  look up its nested types and sibling top types, if any.

* Strive to narrow the search by assigning only relevant
  pathnames for directories *or* an archive to "&path", e.g.
  ":set path-=/usr/include".

* Use "{Visual}gf" on fully-qualified names.

* Accept the fact that "&define" cannot contain end-of-line
  characters (":help definition-search").  A declaration
  whose matchable header is not contained within a line can
  be found iff all of its non-optional components belong to
  the same line; for types, such components are a keyword,
  e.g. "class", followed by a run of blank characters and
  an identifier, e.g. "Test"; for methods: a return type,
  e.g. "String", or a keyword "void", followed by a run of
  blank characters and an identifier, e.g. "toString", that
  is followed by "(".

* The members of the "java.lang" package are usually not
  associated with "import" declarations; to look up their
  declarations, load a source file for a member of that
  package, and then use, on a simple name of interest for
  a member, either "[-Ctrl-d" etc. for local declarations
  or "gf" for external declarations, assuming that "." *or*
  the appropriate pathname for a JDK archive is assigned to
  "&path".

* Follow the above instruction made for the "java.lang"
  members for any type whose simple name is not associated
  with an "import" declaration, i.e. a member type of the
  same package that is declared in another compilation unit.

* Append the "$" character to "&iskeyword" when looking up
  declarations of generated code.

See zzzyxwvut/java-vim#4.

closes: vim/vim#17281

https://github.com/vim/vim/commit/73440245361f3399b88c872236830da3086ad942

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-05-11 10:47:39 +02:00
Christian ClasonandAliaksei Budavei a2c3591720 vim-patch:dc7ed8f: runtime(html): Optionally fold tags with the "expr" method
Tag folding poses a few difficulties.  Many elements, e.g.
"blockquote", are always delimited by start and end tags;
end tags for some elements, e.g. "p", can be omitted in
certain contexts; void elements, e.g. "hr", have no end tag.
Although the rules for supporting omissible end tags are
ad-hoc and involved, they apply to elements in scope.
Assuming syntactical wellformedness, an end tag can be
associated with its nearest matching start tag discoverable
in scope and towards the beginning of a file, whereas all
unbalanced tags and inlined tags can be disregarded.

For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <p>Paragraph vim/vim#1.		<!--  = : 2 -->
    <p>				<!-- >3 : 3 -->
      Paragraph vim/vim#2.		<!--  = : 3 -->
    </p>			<!-- <3 : 3 -->
    <p>Paragraph vim/vim#3.</p>	<!--  = : 2 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

(HTML comments here, "<!-- ... -->", record two values for
each folded line that are separated by ":", a value obtained
from "&foldexpr" and a value obtained from "foldlevel()".)

Innermost foldedable tags will be flattened.  For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre><code>		<!-- >4 : 4 -->
[CODE SNIPPET]			<!--  = : 4 -->
      </code></pre>		<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

No folding will be requested for the "<code>"-"</code>" tag
pair and reflected by "&foldexpr" because such a fold would
have claimed the same lines that the immediate fold of the
"<pre>"-"</pre>" tag already claims.

Run-on folded tags may confuse Vim.  When a file such as:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET vim/vim#1]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
				<!--  = : 3 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET vim/vim#2]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

is reformatted as follows:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET vim/vim#1]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div><div class="block"><pre><code> <!-- <3 : 3 -->
[CODE SNIPPET vim/vim#2]		<!--  = : 2 ? -->
	</code>			<!-- <5 : 2 ? -->
      </pre>			<!-- <4 : 2 ? -->
    </div>			<!-- <3 : 2 ? -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

"&foldexpr" values will not be used as is for the lines
between (and including) "[CODE SNIPPET vim/vim#2]" and "</div>".
(Cf. v9.1.0002.)

Having syntax highlighting in effect, tag folding using the
"fold-expr" method can be enabled with:
------------------------------------------------------------
	let g:html_expr_folding = 1
------------------------------------------------------------

By default, tag folding will be redone from scratch after
each occurrence of a TextChanged or an InsertLeave event.
Such frequency may not be desired, especially for large
files, and this recomputation can be disabled with:
------------------------------------------------------------
	let g:html_expr_folding_without_recomputation = 1
        doautocmd FileType
------------------------------------------------------------

To force another recomputation, do:
------------------------------------------------------------
	unlet! b:foldsmap
	normal zx
------------------------------------------------------------

References:
https://web.archive.org/web/20250328105626/https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
https://en.wikipedia.org/wiki/Dangling_else

closes: vim/vim#17141

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

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-05-11 10:47:39 +02:00
Phạm Bình An fb59188b6d vim-patch:0fb6cea: runtime(lua): update 'path' option in filetype plugin #33876
Problem:  Lua doesn't support importing module in path related to current
          file like JS does (https://www.reddit.com/r/lua/comments/wi0bau/whats_the_correct_way_to_run_a_lua_file_that_uses/)
Solution: Remove `.` from Lua buffer-local option `'path'`

closes: vim/vim#17267

https://github.com/vim/vim/commit/0fb6ceac4ce6c2360a1c45d41ca72779af9f6b2f
2025-05-06 18:02:06 -07:00
Christian ClasonandA4-Tacks 8d6f016345 vim-patch:c3f48e3: runtime(abnf): include ABNF filetype plugin
closes: vim/vim#17239

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

Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
2025-05-02 17:12:18 +02:00
Phạm Bình An 923efaea28 fix(runtime): cpoptions is reset in Lua file #33671
closes #33670
2025-04-27 04:55:15 -07:00
Christian ClasonandEisuke Kawashima 1fed4412e4 vim-patch:e36a931: runtime(groff,nroff): improve ftplugin
- set options in ftplugin but not in syntax
- implement ftplugin/groff.vim (wrapper of ftplugin/nroff.vim)

closes: vim/vim#17174

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

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-25 10:58:49 +02:00
Christian ClasonandKirill Morozov 9e450000d3 vim-patch:32f4973: runtime(gleam): update filetype plugin, include new compiler and syntax script
closes: vim/vim#17172

https://github.com/vim/vim/commit/32f49738d1807b1553d1fbd2f5d1b0b4849dbcb5

Co-authored-by: Kirill Morozov <mail2kirill@gmail.com>
2025-04-25 10:58:49 +02:00
8d68dbf906 vim-patch:229f79c: runtime(yaml): fix wrong order of undo_ftplugin suboptions
This commit fixes the following error message:
```
Compiler not supported: make inc< sw< sts<
```

1. orginal value: `setl com< cms< et< fo<| compiler make inc< sw< sts<`
2. correct value: `setl com< cms< et< fo< inc< sw< sts< | compiler make`

While at it, let's also document the g:yaml_recommended_style variable.

closes: vim/vim#17179

https://github.com/vim/vim/commit/229f79c1683fa52159e692ff8b53449e117a38b2

Co-authored-by: Vincent Law <vlaw@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-23 08:37:36 +02:00
zeertzjqandArnie97 e4516a90b1 vim-patch:54081f0: runtime(nix): set iskeyword and b:match_words in ftplugin (#33541)
closes: vim/vim#17154

https://github.com/vim/vim/commit/54081f0ce087bb3efd2f62fdbbbd5ac812da69f8

Co-authored-by: Arnie97 <arnie97@gmail.com>
2025-04-19 10:59:12 +00:00
Christian ClasonandEisuke Kawashima 34b4df774d vim-patch:fbbaa6e: runtime: set 'cpoptions' for line-continuation in various runtime files
closes: vim/vim#17121

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

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-17 09:25:41 +02:00
Christian ClasonandDoug Kearns 5aa35691ab vim-patch:40daa13: runtime(gleam): Update ftplugin, use recommended_style config variable
Wrap the setting of basic whitespace formatting options in a conditional
block, following the de facto standard.

Setting 'et', 'sts' and 'sw' can be disabled by setting
"gleam_recommended_style" to false.

Follow up to PR vim/vim#17086.

closes: vim/vim#17128

https://github.com/vim/vim/commit/40daa1358cf46cd155b733ffb1e5a3f9f591dedb

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-17 09:25:41 +02:00
Christian ClasonandPierrick Guillaume 287955cfb4 vim-patch:9.1.1299: filetype: mbsyncrc files are not recognized
Problem:  filetype: mbsyncrc files are not recognized
Solution: detect isyncrc and "*.mbsyncrc" files as mbsync filetype,
          include filetype and syntax plugin (Pierrick Guillaume)

mbsync is a command line application which synchronizes mailboxes;
currently Maildir and IMAP4 mailboxes are supported.
New messages, message deletions and flag changes can be propagated both ways;
the operation set can be selected in a fine-grained manner.

References:
mbsync syntax overview: mbsync manual (isync v1.4.4)
https://isync.sourceforge.io/mbsync.html

Upstream support for the mbsync filetype.
Original plugin: https://github.com/Fymyte/mbsync.vim

closes: vim/vim#17103

https://github.com/vim/vim/commit/836b87d6998a1f18783afdc41c90ae1f38c9c3e9

Co-authored-by: Pierrick Guillaume <pguillaume@fymyte.com>
2025-04-14 09:47:56 +02:00
zeertzjqandKirill Morozov 2d6120240d vim-patch:3cbd7f1: runtime(gleam): update Maintainer and filetype options (#33461)
closes: vim/vim#17086

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

Co-authored-by: Kirill Morozov <kirill@robotix.pro>
2025-04-14 15:41:58 +08:00
Christian ClasonandJoe Reynolds 627d0a2b32 vim-patch:f9f53f5: runtime(remind): include remind.vim ftplugin
closes: vim/vim#17085

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

Co-authored-by: Joe Reynolds <joereynolds952@gmail.com>
2025-04-10 09:12:57 +02:00
Phạm Bình AnandChristian Brabandt f908fe4462 vim-patch:0b540c6: runtime(help): add omni completion and 'iskeyword' to filetype plugin (#33398)
Problem:

- Help tags provide a good way to navigate the Vim documentation, but
  many help documents don't use them effectively. I think one of the
  reasons is that help writers have to look up help tags manually with
  `:help` command, which is not very convenient.
- 'iskeyword' is only set for help buffers opened by `:help` command.
  That means if I'm editing a help file, I cannot jump to tag in same
  file using `Ctrl-]` unless I manually set it, which is annoying.

Solution:

- Add omni completion for Vim help tags.
- Set 'iskeyword' for `ft-help`

closes: vim/vim#17073

https://github.com/vim/vim/commit/0b540c6f381c63c2d80cc0aaef76b0df008b9f86

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-10 07:36:30 +08:00
Christian ClasonandAndis Spriņķis ff2cbe8fac vim-patch:7517a8c: runtime(lf): improve syntax script, add filetype plugin
- Greatly improve detection and highlighting of command/shell regions,
  input-device key labels, escape sequences (@joelim-work)
- Add ftplugin for formatoptions, toggling comment areas
  (@andis-sprinkis)
- Add a few missing lf option keywords, rm. old non-working code, misc.
  formatting (@andis-sprinkis)

closes: vim/vim#17078

https://github.com/vim/vim/commit/7517a8cadfd0e70d0422955cbad4767f6a40f29d

Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
2025-04-09 10:14:27 +02:00
zeertzjqandChristian Brabandt 1ffc7d6bf8 vim-patch:2ffb4d0: runtime(lua): fix whitespace style issues in lua ftplugin (#33378)
related: vim/vim#17049

https://github.com/vim/vim/commit/2ffb4d0298426f6c57f3ec3caae4480024e4372d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-08 08:07:26 +08:00
Christian ClasonandKonfekt 1e9e523521 vim-patch:00b927b: runtime(lua): improve foldexpr, add vim9 script version
closes: vim/vim#17049

https://github.com/vim/vim/commit/00b927b295c11e61942d34f7e1c384f1c6af9513

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-04-07 10:19:00 +02:00
5e192dbce2 vim-patch:9cd6d82: runtime(fstab): set formatoptions-=t in filetype plugin
closes: vim/vim#17020

https://github.com/vim/vim/commit/9cd6d82fbb1693aff2878d851571aa0126b3cb38

Co-authored-by: Radu Dineiu <radu.dineiu@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-07 10:19:00 +02:00
Christian Clasonand231tr0n 1867f2a830 vim-patch:9adb310: runtime(svelte): add matchit support to svelte filetype plugin
closes: vim/vim#17052

https://github.com/vim/vim/commit/9adb310cf34be232c8d71a93cabdf76b7f71a9cb

Co-authored-by: 231tr0n <zeltronsrikar@gmail.com>
2025-04-07 10:19:00 +02:00
Christian ClasonandAnarion Dunedain 4983fa45fc vim-patch:9.1.1271: filetype: Power Query files are not recognized
Problem:  filetype: Power Query files are not recognized
Solution: detect '*.pq' as pq filetype, include pq syntax and filetype
          plugin (Anarion Dunedain)

Microsoft Power Query provides a powerful data import experience that
encompasses many features. Power Query works with desktop Analysis
Services, Excel, and Power BI workbooks, in addition to many online
services, such as Fabric, Power BI service, Power Apps, Microsoft 365
Customer Insights, and more. A core capability of Power Query is to
filter and combine, that is, to mash-up data from one or more of a rich
collection of supported data sources. Any such data mashup is expressed
using the Power Query M formula language. The M language is a
functional, case sensitive language similar to F#.

Reference:
- Power Query M formula language overview:
  https://learn.microsoft.com/en-us/powerquery-m/

closes: vim/vim#17045

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

Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
2025-04-04 10:43:18 +02:00
Christian ClasonandAnarion Dunedain 5cdfa3324f vim-patch:9.1.1268: filetype: dax files are not recognized
Problem:  filetype: dax files are not recognized
Solution: detect "*.dax" as dax filetype, include dax filetype and
          syntax plugin (Anarion Dunedain)

Data Analysis Expressions (DAX) is a formula expression language used in
Analysis Services, Power BI, and Power Pivot in Excel. DAX formulas
include functions, operators, and values to perform advanced
calculations and queries on data in related tables and columns in
tabular data models.

DAX language overview:
- https://learn.microsoft.com/en-us/dax/dax-overview

closes: vim/vim#17035

https://github.com/vim/vim/commit/7f518e044fbc60cffdf2c0f611cc8c4dc35c338c

Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
2025-04-03 10:15:11 +02:00
zeertzjqandKonfekt 2322ae403b vim-patch:4ac995b: runtime(rust): set formatprg to rustfmt (#33245)
closes: vim/vim#16967

https://github.com/vim/vim/commit/4ac995bf9366c6624a0724d19b2226f4c95694b3

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-04-01 17:20:11 +08:00
Christian ClasonandDavid Mandelberg 2eddd6f7c0 vim-patch:9.1.1231: filetype: SPA JSON files are not recognized
Problem:  filetype: SPA (single page application) JSON files are not
          recognized (used by pipewire and wireplumber)
Solution: detect pipewire and wireplumber configuration files as spajson
          filetype, include filetype, indent and syntax scripts for this
          new filetype (David Mandelberg).

I looked at all the files found by this command to see if the syntax
highlighting looked reasonable:

```
find {~/.config,/etc,/usr/share}/{pipewire,wireplumber} -type f -name \*.conf
```

References:
*   pipewire config files: https://docs.pipewire.org/page_config.html
*   wireplumber config files:
    https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/conf_file.html
    and
*   https://pipewire.pages.freedesktop.org/wireplumber/daemon/locations.html

closes: vim/vim#16950

https://github.com/vim/vim/commit/4e7b4308fb92628434bd7e07ab92910c33051431

Co-authored-by: David Mandelberg <david@mandelberg.org>
2025-03-23 11:47:42 +01:00
Justin M. Keyes 74fcc9452c fix(runtime): gO always says "Help TOC" #32971
Problem:
gO always says "Help TOC".

Solution:
Use a generic title instead.
2025-03-19 04:17:00 -07:00
17d0420e65 vim-patch:11ab02c: runtime(go): use :term for keywordprg for nvim/gvim
Problem:
- The document from `go doc` can be very long, and you can scroll if
  using `!` to run shell command in Gvim.
- I realize that I didn't fully mimic behavior of default keywordprg
  in Nvim in the last commit.

Solution:
- Use builtin terminal for keywordprg in Gvim
- In Nvim (both TUI and GUI), it should mimic the behavior of Vim
  `:term`, `:Man`, and `:help`

closes: vim/vim#16911

https://github.com/vim/vim/commit/11ab02c819449eaeddc3d8d291f06bc73f428e91

Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-03-19 10:24:51 +01:00
Christian Clason 9177371014 fix(help): remove runnable code virtual text
Problem: Virtual text indicating runnable code examples in help files is
intrusive and non-configurable (and often denotes actually non-working
examples).

Solution: Remove virtual text.
2025-03-18 14:22:08 +01:00
phanium 29a47b39cc fix(runtime): E15: Invalid expression in lua file when gf
Problem:
after https://github.com/neovim/neovim/pull/32719, `gf` error in lua:
```
E15: Invalid expression: "v:lua.require"vim._ftplugin.lua".includeexpr()"
E447: Can't find file "vim._ftplugin.lua" in path
```

Solution:
* use single quote (no idea why there's two pair double quote in
  expression).
* add missing `v:fname`.
2025-03-18 10:10:36 +01:00
Phạm Bình An 08c328b8b0 feat(runtime): Lua ftplugin 'includeexpr' #32719
Problem:
Current `'includeexpr'` in runtime/ftplugin/lua.vim doesn't work with Nvim Lua.

Solution:
Provide an improved 'includeexpr' for Lua in "ftplugin/lua.lua".

Closes: https://github.com/neovim/neovim/issues/32490
2025-03-17 15:41:07 -07:00
Phạm Bình An f5714994bc feat(runtime): Lua ftplugin sets 'omnifunc', 'foldexpr' #32697
Problem:
- Many other ftplugin have defined 'omnifunc', but the Lua one doesn't
  define one, even though there is `vim.lua_omnifunc()`
- Users may want "stupid" completion to fix Lua config with
  `nvim --clean` in case they breaks it
- Nvim doesn't port Lua foldexpr from Vim

Solution:
- Set 'omnifunc' to 'v:lua.vim.lua_omnifunc' in ftplugin/lua.lua
- Set 'foldexpr' to use treesitter
2025-03-15 09:44:53 -07:00
Christian ClasonandNick Jensen 9ef80352b6 vim-patch:96395e1: runtime(cs): Update C# runtime files
closes: vim/vim#16884

https://github.com/vim/vim/commit/96395e15125502e6c29bc93c58d688a2bdc31300

Co-authored-by: Nick Jensen <nickspoon@gmail.com>
2025-03-15 10:26:56 +01:00
zeertzjqandChristian Brabandt fc95cfb3db vim-patch:d49ba7b: runtime(sh): set b:match_skip to ignore matches for matchit (#32812)
related: vim/vim#16801
closes: chrisbra/matchit#50
closes: vim/vim#16834

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

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-03-10 16:47:21 +08:00
8e55a5315a vim-patch:42e498d: runtime(plsql): move fold option from syntax to filetype plugin
closes: vim/vim#16838

https://github.com/vim/vim/commit/42e498d9c41a0260ccddceeb2927c18b508eff54

Co-authored-by: Lee Lindley <lee.lindley@gmail.com>
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-03-10 09:40:42 +01:00
Muntasir Mahmud d4584903f3 vim-patch:9.1.1188: runtime(tera): tera support can be improved (#32799)
Problem:  runtime(tera): tera support can be improved
Solution: update tera filetype plugin, include a tera syntax script
          update the filetype test, update makemenu and synmenu vim scripts
          (MuntasirSZN)

closes: vim/vim#16830

vim/vim@14da0fb
2025-03-09 17:13:52 +08:00
Christian ClasonandPhạm Bình An d5ff0aff27 vim-patch:62e8228: runtime(go): add 'keywordprg' and 'formatprg' to ftplugin
closes: vim/vim#16804

https://github.com/vim/vim/commit/62e822808e364c84e8abfbc4827bf6012e5b32e0

Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
2025-03-08 12:43:53 +01:00
Christian ClasonandMuntasirSZN e46f07b1d2 vim-patch:9.1.1177: filetype: tera files not detected
Problem:  filetype: tera files not detected
Solution: detect '*.tera' files as tera filetype,
          include a simple filetype plugin
          (MuntasirSZN)

closes: vim/vim#16806

https://github.com/vim/vim/commit/5daaf2326800ff0683a5be9a7f475667a4fc09db

Co-authored-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
2025-03-07 00:07:08 +01:00
zeertzjqandKonfekt 9a02906c44 vim-patch:08a410f: runtime(vim): recognize <...> strings (and keys) for 'keywordprg' (#32752)
see :help E499 and :h key-notation

closes: vim/vim#16795

https://github.com/vim/vim/commit/08a410f674a340f137623526bf8159d5a476f729

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-03-06 19:40:47 +08:00
brianhusterandDoug Kearns 47b748af54 vim-patch:0b82054: runtime(lua): Improve 'include' and make '*expr' functions script-local
- Prevent 'include' from matching variable assignments as calls to
  require() and others.
- Use script-local functions for 'includeexpr' and 'foldexpr'.
- Formatting fixes.

closes: vim/vim#16746

https://github.com/vim/vim/commit/0b8205484b703b4a5a569cd1b0ed876bbb13901f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-03-02 06:46:26 +08:00
brianhusteranddkearns 2b0f967b77 vim-patch:00a00f5: runtime(lua): Update lua ftplugin and documentation
Problem:
- The doc says the default `g:lua_subversion` is 2, but in fact it is 3
  (see `runtime/syntax/lua.vim`)
- `includeexpr` doesn't work with module in `init.lua`

Solution:
- Update documentation
- Assign value to option `&include`
- Add function `LuaInclude` and assign it to `l:&includeexpr`

closes: vim/vim#16655

https://github.com/vim/vim/commit/00a00f5d3fc8dcf08e959c207a90f5902abc6a08

Co-authored-by: brianhuster <phambinhanctb2004@gmail.com>
Co-authored-by: dkearns <dougkearns@gmail.com>
2025-03-02 06:46:26 +08:00
zeertzjqandKonfekt 9c43e5cd4a vim-patch:580e457: runtime(vim): make VimKeywordPrg even smarter for regexes
closes: vim/vim#16729

https://github.com/vim/vim/commit/580e457a2a5fa63b9be0bf5f2c81434e157bcc0a

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-02-26 07:31:49 +08:00
6db439ff01 vim-patch:094494b: runtime(vim): improve &keywordprg in ftplugin
- let keywordprg in vim filetype handle context-sensitive help calls by
  detecting the syntax group of the word under the cursor
- reformat whitespace
- add modeline

related: vim/vim#16677
closes: vim/vim#16680

https://github.com/vim/vim/commit/094494bf2eef8d788944b2b00b3361feb545d3ae

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Co-authored-by: Andrew Radev <andrey.radev@gmail.com>
Co-authored-by: "D. Ben Knoble" <ben.knoble+github@gmail.com>
Co-authored-by: Gary Johnson <garyjohn@spocom.com>
Co-authored-by: Tim Pope <code@tpope.net>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-02-26 07:31:03 +08:00
zeertzjqandDavid Mandelberg a31ccc3b1f vim-patch:9.1.1140: filetype: m17ndb files are not detected (#32618)
Problem:  filetype: m17ndb files are not detected
Solution: detect m17ndb files as m17ndb filetype,
          include filetype, syntax and indent files for the
          new filetype (David Mandelberg).

References:

https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
format. https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/ has
examples of the files.

closes: vim/vim#16696

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

Also adjust the xkb parent pattern according to dev_vimpatch.txt.

Co-authored-by: David Mandelberg <david@mandelberg.org>
2025-02-25 09:20:44 +00:00
Justin M. Keyes 2a733ec6cc revert "feat(ftplugin): set 'omnifunc' of Lua to 'v:lua.vim.lua_omnifunc'" #32597
This reverts commit f398e3a61a.
2025-02-23 08:21:24 -08:00
Phạm Bình An f398e3a61a feat(ftplugin): set Lua 'omnifunc' to vim.lua_omnifunc #32491
Problem:
- Many other ftplugin have defined 'omnifunc', but the Lua one doesn't
  define one, even though there is `vim.lua_omnifunc()`
- Users may want "stupid" completion to fix Lua config with
  `nvim --clean` in case they breaks it

Solution:
Set 'omnifunc' to 'v:lua.vim.lua_omnifunc' in ftplugin/lua.lua
2025-02-23 07:57:16 -08:00
Christian ClasonandDavid Mandelberg 90958c3648 vim-patch:61af587: runtime(dockerfile): set comments in filetype plugin
closes: vim/vim#16698

https://github.com/vim/vim/commit/61af587f26f56be7d6b55f77e42cc89504942cc0

Co-authored-by: David Mandelberg <david@mandelberg.org>
2025-02-22 16:17:11 +01:00
phanium e641155b02 fix(runtime): avoid E31 in ftplugin (#32578)
fix: twice nunmap in ftplugin
2025-02-22 14:17:35 +01:00
Christian Clason 2e5b560482 feat(treesitter): table of contents for checkhealth, markdown (#32282)
Problem: It's difficult to navigate large structured text files (vim
help, checkhealth, Markdown).

Solution: Support `gO` for table of contents and `]]`/`[[` for moving
between headings for all these filetypes using treesitter queries.

Refactor: colorization of highlight groups is moved to the `help` ftplugin
while headings-related functionality is implemented in a private
`vim.treesitter` module for possible future use for other filetypes.
2025-02-22 13:07:21 +01:00
Christian ClasonandDavid Mandelberg 3e39250a79 vim-patch:3cb4148: runtime(sieve): set fileformat=dos in filetype plugin
References:
https://datatracker.ietf.org/doc/html/rfc5228#section-2.2

closes: vim/vim#16685

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

Co-authored-by: David Mandelberg <david@mandelberg.org>
2025-02-21 10:03:52 +01:00
Christian ClasonandLucas Eekhof 2b7d9d1900 vim-patch:27f5136: runtime(mail): add commentstring '> %s' to ftplugin
The new native commenting functionality is currently not used when
editing mail. One could reasonably expect it to change the "quote" state
of any given line in the mail (i.e. the preceding ">"), which would be
very handy and feel natural when editing mail. Especially since the
current file already uses "setlocal comments+=n:>".

Solution: Add commentstring to `> %s` to be used in files of type mail.

closes: vim/vim#16669

https://github.com/vim/vim/commit/27f51367613a150877e88d2379409bebdf32052b

Co-authored-by: Lucas Eekhof <105216949+eekhof@users.noreply.github.com>
2025-02-21 10:03:52 +01:00
Christian Clasonanddringsim 40dfc4ebd1 vim-patch:106899e: runtime(dnsmasq): include simple filetype plugin
closes: vim/vim#16671

https://github.com/vim/vim/commit/106899eb21ac0adfa0e31229d921a5f81e6a7e22

Co-authored-by: dringsim <dringsim@qq.com>
2025-02-21 10:03:52 +01:00