| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: deno.lock file not recognized
Solution: detect 'deno.lock' as json filetype
(カワリミ人形)
Reference:
https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files
closes: vim/vim#15333
https://github.com/vim/vim/commit/df77c8ad3974e44df2e588de5f465072371cab69
Co-authored-by: カワリミ人形 <kawarimidoll+git@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the following two issues:
- pyenv root detection issue
When `PYENV_ROOT` environment variable is not set, neovim will detect
pyenv's root via `pyenv root` command, but which will be always fail
because `vim.fn.system()` returns result with additional `\n`. Using
`vim.system` instead prevents this problem. to trim it before check
whether it is exists
- python executable path detection issue
Filter unrelated `python-config` in cases where multiple python versions
are installed, e.g. `python-config`, `python3.10-config`,
`python3.11-config` etc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#29831)
Problem: filetype: OpenGL Shading Language files are not detected
Solution: detect various file extensions as GLSL filetype, include
indent and syntax script, do no longer recognize '*.comp'
as Mason filetype (Gregory Anders)
closes: vim/vim#15317
https://github.com/vim/vim/commit/e4b991ed36f96dd01c6d75e46a04fd1a99180e58
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: pattern detection for Dracula language uses "*lvs" and "*lpe".
as there is no dot, those are not treated as extensions which
they should (judging by 'runtime/syntax/dracula.vim' and
common sense).
Solution: use "*.lvs" and "*.lpe" patterns (Evgeni Chasnovski)
closes: vim/vim#15303
https://github.com/vim/vim/commit/5fb801a74faaf3ef1262c2988b8801500ca71646
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: Prolog detection can be improved
Solution: update the prolog detection regex
(igna_martinoli)
related: vim/vim#10835
related: vim/vim#15206
closes: vim/vim#15253
https://github.com/vim/vim/commit/37853b7de31ef34153fe76aa2b740d517ed0e5d4
N/A patch:
vim-patch:7347642: runtime(filetype): Fix Prolog file detection regex
Problem: filetype: .pro file detection for Prolog is broken
Solution: fixed the regex to only match on the tested
cases (igna_martinoli)
fixes: vim/vim#10835
closes: vim/vim#15206
https://github.com/vim/vim/commit/7347642633eb2de23a78c51a4388c9080440eec4
Co-authored-by: igna_martinoli <ignamartinoli@protonmail.com>
Co-authored-by: clason <c.clason@uni-graz.at>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
docs (#29796)
related: https://github.com/vim/vim/pull/15280#issuecomment-2233771449
closes: vim/vim#15285
https://github.com/vim/vim/commit/eb6d733bef312a0634770e023e8a41f0347f1503
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#29773)
Problem: filetype: Debian devscripts config files are not recognized
Solution: detect devscripts.conf and .devscripts files as sh filetype
(sourced by /bin/sh)
closes: vim/vim#15227
https://github.com/vim/vim/commit/76c19028ffc8b00816df7bc48985c92f7bacbcfb
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#15280
https://github.com/vim/vim/commit/c1b3984a7b3cd6adcd1f43e558cb04fad1af3182
Co-authored-by: Shane Harper <shane@shaneharper.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
When there are multiple inlay hints present at the same position, they
should be rendered in the order they are received in the response from
LSP as per the LSP spec. Currently, this is not respected.
Solution:
Gather all hints for a given position, and then set it in a single
extmark call instead of multiple set_extmark calls. This leads to fewer
extmark calls and correct inlay hints being rendered.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** A query file for something like `html_tags` will not be
given html node completion
**Solution:** Check for parser aliases before offering completions
Co-authored-by: Lewis Russell <me@lewisr.dev>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: *.wl files are not recognized
Solution: Detect '*.wl' files as Mathematica package files
(Jonas Dujava)
closes: vim/vim#15269
https://github.com/vim/vim/commit/c6d7dc039342fbe1cf432c7f8e7e391063de210b
Co-authored-by: Jonas Dujava <jonas.dujava@gmail.com>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#15265
https://github.com/vim/vim/commit/df62c62177bd4dffce880b7a5711594865090953
Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: ocaml runtime files are outdated
Solution: sync those files with the upstream repo,
detect a few more ocaml files
(Yinzuo Jiang)
closes: vim/vim#15260
https://github.com/vim/vim/commit/700cf8cfa1e926e2ba676203b3ad90c2c2083f1d
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: *.pdf_tex files are not recognized
Solution: Detect '*.pdf_tex' files as tex filetype
(Jonas Dujava)
Those files are generated by inkscape, when exporting, see e.g.
https://inkscape.org/doc/inkscape-man.html
closes: vim/vim#15250
https://github.com/vim/vim/commit/28145e005d646cb0477aa26ef69d0f651a9f9d27
Co-authored-by: Jonas Dujava <jonas.dujava@gmail.com>
|
| |\
| | |
| | | |
refactor(filetype): extract some functions, use more cache
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: due to single list of sorted patterns, their matching inside
`vim.filetype.match()` was done very similarly but with extra checks
to stop processing negative priority patterns before extensions.
Solution: create separated sorted lists for patterns with non-negative
and negative priorities. This allows to process them in a single
extracted function making the main codeflow a bit nicer and more
easily expandable.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: cannot specify tab page closing behaviour
(Gianluca Pacchiella)
Solution: Add the 'tabclose' option (LemonBoy).
fixes: vim/vim#5967
closes: vim/vim#15204
https://github.com/vim/vim/commit/5247b0b92e191a046b034171a3b34031e317735f
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot expand paths from 'cdpath' setting
(Daniel Hahler)
Solution: Implement 'cdpath' completion, add the new 'dir_in_path'
completion type (LemonBoy)
fixes vim/vim#374
closes: vim/vim#15205
https://github.com/vim/vim/commit/a20bf69a3b32024cb7809be87af33bf9dc490a19
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: angular ft detection is still problematic
(after 9.1.0551)
Solution: detect htmlangular filetype only by inspecting the content,
do not try to determine it from a generic name like
'*.component.html'
For the reasons mentioned here:
https://github.com/vim/vim/pull/13594#issuecomment-1834465890
related: vim/vim#15190
related: vim/vim#13594
related: vim/vim#13604
https://github.com/vim/vim/commit/c03f631b7b01e672787b222a55898f8dcac8d859
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: *.mcmeta files are not recognized
Solution: Detect '*.mcmeta' files as json filetype
(Tomodachi94)
"pack.mcmeta" was added to the JSON tests because that is the most common
filename with that extension.
There are currently 34,000 instances of this file extension on GitHub:
https://github.com/search?q=path%3A*.mcmeta&type=code&p=2
.zip files with this extension have downloads in the millions on sites
like CurseForge:
https://www.curseforge.com/minecraft/search?page=1&pageSize=20&sortBy=relevancy&class=texture-packs
Further reading about the file extension:
https://minecraft.wiki/w/Tutorials/Creating_a_resource_pack#Creating_a_.MCMETA_file
closes: vim/vim#15189
https://github.com/vim/vim/commit/d33a518025765c4a3530ad6cfb6cab83a30c8f55
Co-authored-by: Tomodachi94 <tomodachi94@protonmail.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#15190
https://github.com/vim/vim/commit/1ad194c0dfd82ca1e7a1b6f2fca89a487794158d
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#15191
https://github.com/vim/vim/commit/4a7a4a3675b6ad90a525524ba4684925df212325
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: No way to get the arity of a Vim function
(Austin Ziegler)
Solution: Enhance get() Vim script function to return the function
argument info using get(func, "arity") (LemonBoy)
fixes: vim/vim#15097
closes: vim/vim#15109
https://github.com/vim/vim/commit/48b7d05a4f88c4326bd5d7a73a523f2d953b3e51
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
| |
| |
| |
| | |
(#29593)
|
| |
| |
| | |
Unlike vim.fn.expand(), vim.fs.normalize() doesn't expand wildcards.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#29596)
Problem: `vim.filetype.match()` tries to match on contents even if there
is no contents (empty buffer or `{''}` explicit contents).
This results in extra avoidable execution duration for cases.
It matters, for example, when trying to match filetype based solely
on file name (which still needs `contents` or `buf` to properly match
earlier in the code path).
Solution: skip matching based solely on contents if it is `{''}`. This
works because:
- Matching solely on content is done after any user-configured
`vim.filetype.add()` hooks.
- All default matching on content might depend on supplied path
*only* if there is non-empty content (like in
`require('vim.filetype.detect').match_from_hashbang()`).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds ftplugin support for tf (TinyFugue). Comment support taken from
[here](https://github.com/kruton/tinyfugue/blob/1e8ac0bb014036c07bb3c679b0292ef20a6a0bb5/src/command.c#L568)
closes: vim/vim#15168
https://github.com/vim/vim/commit/94c1c6638a652cbe21b4d25ae5f26078e2e633d7
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Exiting the insert mode with ctrl-c does not trigger InsertLeave
autocmd. This may lead to nil error in treesitter foldexpr.
Solution:
Check nil. Folds still can be stale after exiting the insert mode with
ctrl-c, but it will be eventually updated correctly.
An alternative solution would be to ensure that exiting the insert mode
always triggers do_foldupdate. This can be done either by "fixing"
ctrl-c or with on_key callback that checks ctrl-c (nvim-cmp does this).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: ldapconf files are not recognized
Solution: Detect '.ldaprc', 'ldap.conf' and 'ldaprc' files as ldapconf
filetype, include a simple ldapconf ftplugin file
(Riley Bruins)
[Specification](https://www.openldap.org/software//man.cgi?query=ldap.conf&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release)
closes: vim/vim#15176
https://github.com/vim/vim/commit/62f31e949918167cb7f50cdf1737f7c28460b62b
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Unused assignment in sign_define_cmd()
Solution: Remove the assignment. Also document the "priority" flag of
sign_define(). (zeertzjq)
closes: vim/vim#15169
https://github.com/vim/vim/commit/fc3f5dba52099d82ccc8bfe309d58a6fac01373d
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#29592)
Problem: not possible to assign priority when defining a sign
(Mathias Fußenegger)
Solution: Add the priority argument for the :sign-define ex command and
the sign_define() function (LemonBoy)
Use the specified value instead of the default one (SIGN_DEF_PRIO) when
no priority is explicitly specified in sign_place or :sign place.
fixes: vim/vim#8334
closes: vim/vim#15124
https://github.com/vim/vim/commit/b975ddfdf96644b8df808415dee36f99abd48753
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: zone files are not recognized
(rpdprd)
Solution: Detect '*.zone' files as bindzone filetype
fixes: vim/vim#14222
https://github.com/vim/vim/commit/f095539b3900d76f5eeaaa0897c6abf970829b31
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#29590)
Problem: signed number detection for CTRL-X/A can be improved
(Chris Patuzzo)
Solution: Add the new "blank" value for the 'nrformat' setting. This
will make Vim assume a signed number only if there is a blank
in front of the sign.
(distobs)
fixes: vim/vim#15033
closes: vim/vim#15110
https://github.com/vim/vim/commit/25ac6d67d92e0adda53b8d44b81c15031643ca1e
Co-authored-by: distobs <cuppotatocake@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch replaces fswatch with inotifywait from inotify-toools:
https://github.com/inotify-tools/inotify-tools
fswatch takes ~1min to set up recursively for the Samba source code
directory. inotifywait needs less than a second to do the same thing.
https://github.com/emcrisostomo/fswatch/issues/321
Also it fswatch seems to be unmaintained in the meantime.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
|
| |
| |
| |
| | |
Use Cmt to evaluate Cond and Elem during match to avoid building the
nested capture structure later.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: Cedar files not recognized
Solution: Detect '*.cedar' files as cedar filetype
(Riley Bruins)
References: https://github.com/cedar-policy
closes: vim/vim#15148
https://github.com/vim/vim/commit/15addb24dd3b2645f5c04d2742ab5eb53444a3a0
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: the code and docs for vim.diagnostic.JumpOpts.float send mixed
signals about what the default should be. When the option is first set,
in the global_diagnostic_options table, the comment clearly says that
the default is false. Later in the code, in goto_diagnostic, there's
a line that sets the default to true if no default is present. Finally,
the docs say that the default is true.
Solution: Change the docs to reflect the new default of false and fix
the goto_diagnostic function.
|
| |
| |
| |
| |
| | |
Lua 5.1 uses a "raw get" to retrieve `__call` from a metatable to
determine if a table is callable. Mirror this behavior in
`vim.is_callable()`.
|