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#15266b5844104ab
Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
Taken from excerpts of the Python ftplugin and adapted,
indent script simply sources the python indent script.
closes: vim/vim#15171fc533c9f06
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Problem: filetype: htmlangular files are not properly detected
Solution: Use the new htmlangular filetype for angular files, because
since angular v17, those are no longer valid HTML files.
(Dennis van den Berg)
Since Angular 17, the new Control Flow Syntax is not valid HTML. This PR
adds a new filetype detection for the HTML templates of Angular.
It first checks the filename. The Angular convention is to use
*.component.html for the template. However, this is not mandatory.
If the filename does not match, it will check the contents of the file
if it contains:
- One of the Control-Flow blocks: @if, @for, @switch, @defer
- A structural directive: *ngIf, *ngFor, *ngSwitch, *ngTemplateOutlet
- Builtin Angular elements: ng-template or ng-content
- String interpolation: {{ something }}
This enables the Angular LSP to attach only to htmlangular filetypes, as
well as language parsers, such as tree-sitter.
closes: vim/vim#151901ad194c0df
Co-authored-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
Problem: filetype: antlr4 files are not recognized
Solution: Detect '*.g4' as antlr4 filetype, include a simple antlr4
syntax and filetype plugin (Yinzuo Jiang)
closes: vim/vim#151914a7a4a3675
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
This one just sources from the SQL ftplugin. Without this, *.mysql
files don't inherit the common SQL settings.
closes: vim/vim#1516601e20902f4
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Kivy uses "#:" for preprocessing commands (like "#:import ...") which
were overridden by the comment syntax. This has been changed, and a
commentstring has been added.
closes: vim/vim#151638906e22df5
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Problem: filetype: zone files are not recognized
(rpdprd)
Solution: Detect '*.zone' files as bindzone filetype
fixes: vim/vim#14222f095539b39
Co-authored-by: Christian Brabandt <cb@256bit.org>
It seems that nvim-treesitter stops treesitter highlight when changing
filetype, so it makes sense for builtin ftplugins to do this as well.
Use :call and v:lua here to allow separation with '|'.
* vim-patch:1ce65e3: runtime(csv): include a simple csv filetype and syntax plugin
fixes: vim/vim#150381ce65e35ac
Co-authored-by: Maxim Kim <habamax@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem:
It's a common practice to set 'signcolumn=yes' (always show) instead of default 'signcolumn=auto' in order to prevent annoying horizontal shifting in editable buffers when using some popular plugins that add/remove signs on the fly. This makes signcolumn always visible and breaks the text flow of pre-formatted man pages, even when no signs are actually defined. Some other options are already tweaked in man.vim to address the issue (e.g. 'nonumber'), but not signcolumn.
Solution:
set 'signcolumn=auto' in ftplugin/man.vim.
By default there is no |signs| in man pages anyway (and I am not aware of any plugins that could define them in man pages), so 'signcolumn=auto' should behave like 'signcolumn=no', i.e. hide the empty column in order to keep buffer width same as terminal width.
In a (rare?) case when user does define some signs in man pages, signcolumn will appear (breaking the text flow).
Problem:
1. multiple `setlocal` commands are spread across the script.
2. several options, apparently, serve the same purpose (hide UI columns) which may not be immediately clear. more options may be required to fullfill the same purpose or they could be removed all together as a group if better solution is found later
3. `setlocal nofoldenable` may be overriden by conditional block later in the script.
Solution:
1. move 'colorcolumn' and 'nolist' to the group of other options at the beginning
2. add an explanatory comment about options that disable UI columns
3. move 'nofoldenable' to the if-else block to keep relevant commands coupled
Problem: no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
existing filetype plugins with the new default value
(Riley Bruins)
closes: vim/vim#148430a0830624a
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Problem: The default commentstring for C/C++ can lead to invalid code
when commenting and does not match the Nvim codebase.
Solution: Change commentstring to `// %s` as used by Neovim. Also
set all commentstrings that derive from the default C string explicitly
(and correctly).
Problem: filetype: rasi files are not recognized
Solution: regonize '*.rasi' files as rasi filetype,
include a filetype and syntax plugin
(Pierrick Guillaume)
ported from: https://github.com/Fymyte/rasi.vimcloses: vim/vim#14821280e5b13ca
Co-authored-by: Pierrick Guillaume <pierguill@gmail.com>
On Windows, '{' is currently not treated as a wildcard char, so another
wildcard char is needed for the pattern to be treated as a wildcard.
It may be worth trying to make '{' always a wildcard char in the future,
but that'll be a bit harder as it'll be necessary to make sure '{' is
escaped at various places.
* Add space in template for 'commentstring'
* Add 'comments' and 'commentstring' support to debcontrol
* debversions: Move Ubuntu releases outside of standard support to unsupported
Although trust, xenial, and bionic are not EOL yet, their standard support period has ended.
Reported-by: Riley Bruins <ribru17@gmail.com>
0076ddc07d
Co-authored-by: James McCoy <jamessan@debian.org>
Co-authored-by: Riley Bruins <ribru17@gmail.com>
runtime(arduino): Add Arduino ftplugin and indent files (vim/vim#14811)
We already have Arduino syntax file, but we didn't have ftplugin and
indent files.
This commit adds a basic ftplugin file and a basic indent file.
Both of them are derived from {ftplugin,indent}/c.vim.
957d903cb7
Co-authored-by: K.Takata <kentkt@csc.jp>
ftplugin(python): E16 fix, async keyword support for define (vim/vim#14751)
This change includes the following changes:
- Fix "E16: Invalid range" when using a count with jump to start/end of class/method
- Update define with optional async keyword
- Update maintainer email
86f6e2c2ee
Co-authored-by: Tom Picton <tom@tompicton.com>
runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out
Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then
:{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into
less when bash's "help" fails. This was introduced by 2f25e40b1
(runtime: configure keywordpg for some file types (vim/vim#5566), 2023-08-23)
and may be present in other files touched by that commit.
Make the "man" invocation sensible by unsetting MANPAGER in the
environment.
Note that changing MANPAGER for `:terminal` is not needed; Vim within
Vim is perfectly fine.
closes: vim/vim#146798d8cb45756
Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Problem: filetype: stylus files not recognized
Solution: Detect '*.styl' and '*.stylus' as stylus filetype,
include indent, filetype and syntax plugin
(Philip H)
closes: vim/vim#146562d919d2744
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
runtime(bp): fix comment definition in filetype plugin (vim/vim#14594)
I somehow messed up the previous patch, I think a copy-paste error when
creating the file.
Blueprint files have C and C++ style comments, not shell-like '#'
comments.
cee034112d
Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
Problem: runtime(uci): No support for uci file types
(Wu, Zhenyu)
Solution: include basic uci ftplugin and syntax plugins
(Colin Caine)
closes: vim/vim#145754b3fab14db
Co-authored-by: Colin Caine <complaints@cmcaine.co.uk>
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
runtime(java): Support "g:ftplugin_java_source_path" with archived files
Also, document for "g:ftplugin_java_source_path" its current
modification of the local value of the 'path' option.
closes: vim/vim#1457036e667ab83
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
compiler(rime_deployer): include new compiler, use it for '*.custom.yaml' files (vim/vim#14460)
8a31de6dd2
Co-authored-by: wzy <32936898+Freed-Wu@users.noreply.github.com>
Problem: filetype: some requirements files are not recognized
Solution: Detect '*-requirements.txt', 'constraints.txt',
'requirements.in', 'requirements/*.txt' and 'requires/*.txt'
as requirements filetype, include pip compiler, include
requirements filetype and syntax plugin
(Wu, Zhenyu, @raimon49)
closes: vim/vim#14379f9f5424d3e
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: raimon <raimon49@hotmail.com>
runtime(java): Recognise non-ASCII identifiers (vim/vim#14543)
* runtime(java): Recognise non-ASCII identifiers
Also:
- Remove the already commented out and less general in its
definition javaFuncDef alternative.
- Stop recognising some bespoke {p,trace} debugging API.
Non-ASCII identifiers have been supported from the outset
of the Java language.
> An _identifier_ is an unlimited-length sequence of _Java
> letters_ and _Java digits_, the first of which must be a
> Java letter. An identifier cannot have the same spelling
> (Unicode character sequence) as a keyword . . . Boolean
> literal . . . or the null literal . . .
> . . . . . . . .
> Letters and digits may be drawn from the entire Unicode
> character set . . .
> . . . . . . . .
> A Java letter is a character for which the method
> Character.isJavaLetter . . . returns true. A Java
> letter-or-digit is a character for which the method
> Character.isJavaLetterOrDigit . . . returns true.
> . . . . . . . .
> The Java letters include . . . for historical reasons, the
> ASCII underscore (_) . . . and dollar sign ($) . . .
(Separate syntax tests will be written when particular parts
now touched will have been further improved.)
Reference:
https://javaalmanac.io/jdk/1.0/langspec.pdf [§3.8]
* Take on the maintenance of Java filetype and syntax files
4052474a1b
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
runtime(vim): don't set compiler, update a comment for vimdoc compiler (vim/vim#14532)
e92ed1b45c
Co-authored-by: Shane-XB-Qian <shane.qian@foxmail.com>
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.
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.
Fixesvim/vim#13047, vim/vim#11307 and vim/vim#9587.
04e5363b82
Co-authored-by: dkearns <dougkearns@gmail.com>
runtime(deb822sources): Add minimal ftplugin (vim/vim#14240)
Set comment related options and avoid automatic line wrapping.
2708c0b585
Co-authored-by: James McCoy <jamessan@jamessan.com>
runtime(r,rhelp,rmd,rnoweb,rrst): Update ftplugin, browsefilter labels (vim/vim#14126)
Use the standard format for browsefilter labels:
"File Description (*.ext1, *.ext2, *.ext3)"
e93afc2e61
Co-authored-by: dkearns <dougkearns@gmail.com>
runtime(sh): Update ftplugin, fixvim/vim#14101 (vim/vim#14102)
Add the 'b' flag to 'comments', so that the shebang line is not detected as comment.
Fixesvim/vim#14101.
e84d2d4432
Co-authored-by: dkearns <dougkearns@gmail.com>
Help outlines, invoked by `gO`, displays the help section titles in the
location list window. This feature is implemented by setting the buffer
lines after opening the window, but this implementation breaks the
assumption that the quickfix window texts are consistently constructed
by the quickfix list items. I think we can use the conceal feature here.
Using conceal here improves interoperability between quickfix plugins,
and also simplifies the outline implementation.
Originally reported at https://github.com/itchyny/vim-qfedit/issues/12