Problem: Health check floating window gets closed when pressing 'gO' to show TOC because LSP floating preview system auto-closes on BufEnter events triggered by :lopen.
Solution: Temporarily disable BufEnter event for the current window during TOC operations and adjust window layout to prevent overlap.
last `unmap` can cause the error "E31: No such mapping" when
`doaudocmd FileType go` if appending other commands to `b:undo_ftplugin` i.e.
the space and the next bar as `let b:undo_ftplugin .= ' | setl ...'`.
closes: vim/vim#17664f9d87fa6ba
Co-authored-by: ichizok <gclient.gaap@gmail.com>
Problem: filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
brightscript filetype, include filetype plugins (Riley Bruins)
closes: vim/vim#1756603e5ee25fd
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Problem: still some problem with the new tutors filetype plugin
Solution: refactor code to enable/disable tutor mode into
tutor#EnableInteractive() function, include a test
(Phạm Bình An)
I find it annoying that Tutor's interactive mode is always on (or debug
mode is off) even when I open a tutor file with :edit command.
I think it makes more sense to make this "interactive mode":
- Always on when it is opened with :Tutor command
- Off otherwise
For more references, see `:help` feature, it is a much better than
:Tutor, since I don't have to run `:let g:help_debug = 1` just to be able
to edit and save a help file
Therefore, I remove `g:tutor_debug`
closes: vim/vim#1729913bea589a2
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
- Set g:tutor_debug on startup if it doesn't exist so that users can get
cmdline completion when interactively setting it.
- set b:undo_ftplugin in filetype plugin
- set default runtime file headers
closes: vim/vim#172743704b5b58a
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
=============== 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#172817344024536
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
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-tagshttps://en.wikipedia.org/wiki/Dangling_elsecloses: vim/vim#17141dc7ed8f946
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
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#17179229f79c168
Co-authored-by: Vincent Law <vlaw@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
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#1712840daa1358c
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
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.vimcloses: vim/vim#17103836b87d699
Co-authored-by: Pierrick Guillaume <pguillaume@fymyte.com>
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#170730b540c6f38
Co-authored-by: Christian Brabandt <cb@256bit.org>
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#17045e74ec3f523
Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
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-overviewcloses: vim/vim#170357f518e044f
Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
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#1691111ab02c819
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>