| Age | Commit message (Collapse) | Author | Files |
|
Problem: filetype: some Beancount files are not recognized
Solution: Detect *.bean files as beancount filetype
(Bruno Belanyi)
closes: vim/vim#20037
https://github.com/vim/vim/commit/521eac1877355d408c8c57bc31947cc86f31f41d
Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
|
|
Problem: filetype: ghostty config files are not recognized
Solution: Detect ghostty configuration files as ghostty filetype,
include a simple ghostty filetype plugin (Bez Hermoso)
closes: vim/vim#20002
https://github.com/vim/vim/commit/b30803b231beea13e2efa42fefc04be71a4e9bb5
Co-authored-by: Bez Hermoso <bezalelhermoso@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: filetype: PklProject files are not recognized
Solution: Detect PklProject files as pkl filetype
(Nihaal Sangha).
Reference:
https://pkl-lang.org/
https://github.com/apple/pkl
https://github.com/apple/pkl-pantry
closes: vim/vim#19948
https://github.com/vim/vim/commit/871e6c6cf9835b1f266461f3eb6c7bf07e841779
Co-authored-by: Nihaal Sangha <nihaal.git@gmail.com>
|
|
Problem: filetype: buf.lock files are not recognized
Solution: Detect buf.lock files as yaml filetype
(Stefan VanBuren)
Reference:
https://buf.build/docs/configuration/v2/buf-lock/
closes: vim/vim#19935
https://github.com/vim/vim/commit/c2734dc03cd9ee437d25a6940e8c37ac7873b01d
Co-authored-by: Stefan VanBuren <svanburen@buf.build>
|
|
- `_get_known_filetypes` may be useful for other internal code, so move
it to an internal function.
- Use a set instead of a list, for performance.
|
|
Problem: No way of inspecting the (user-added) filetype detection rules.
Solution: Add `vim.filetype.inspect()` returning copies of the internal
`extension`, `filename`, `pattern` tables. Due to the dynamic nature of
filetype detection, this will in general not allow getting the list of
known filetypes, but at least one can see if a given extension is known.
|
|
(#38731)
Problem: filetype: not all ObjectScript routines are recognized
Solution: Also detect "%RO" and "iris" patterns inside *.rtn files
(Hannah Kimura)
closes: vim/vim#19873
https://github.com/vim/vim/commit/863e85e00ad45f3e1f939cf9774c33b0570b9948
Co-authored-by: Hannah <hannah.kimura@intersystems.com>
|
|
Problem: filetype: ObjectScript routines are not recognized
Solution: Add ObjectScript routines detection for .mac, .int, and .inc
files (Hannah Kimura)
Reference:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GORIENT_ch_intro#GORIENT_intro_routines
closes: vim/vim#19805
https://github.com/vim/vim/commit/25f6539645d805295b11253c7bd8632aa20604f4
Co-authored-by: Hannah Kimura <hannah.kimura@intersystems.com>
|
|
Problem: filetype: wks files are not recognized.
Solution: Detect *.wks, *.wks.in and *.wks.inc as wks filetype,
include a filetype and syntax plugin (Anakin Childerhose)
The OpenEmbedded Image Creation tool, `wic` uses wic kickstarter files
to define image partition and bootloader layouts.
wks files can end with .wks, .wks.in for templated wks files, and
.wks.inc for including in other .wks files.
The autocmd for *.wks.inc needs to come before *.inc in
runtime/ftdetect.vim
Reference:
https://docs.yoctoproject.org/ref-manual/kickstart.html#openembedded-kickstart-wks-reference
https://git.openembedded.org/openembedded-core/tree/scripts/lib/wic/canned-wks
closes: vim/vim#19796
https://github.com/vim/vim/commit/8c116bbe79eab7337bb5c979468d3b0cb5933d07
|
|
Problem: filetype: cto files are not recognized
Solution: Detect *.cto as concerto filetype (Jamie Shorten)
Add filetype detection for the Concerto Modelling Language. Concerto
is a schema language by the Accord Project for defining data models
used in smart legal contracts and business networks.
Reference:
Language spec: https://concerto.accordproject.org
Tree-sitter grammar: https://github.com/accordproject/concerto-tree-sitter
closes: vim/vim#19760
https://github.com/vim/vim/commit/68f9dedba46b4e6625459d94342a2e2c7f5b17b7
Co-authored-by: Jamie Shorten <jamie@jamieshorten.com>
|
|
Problem: filetype: cps files are not recognized
Solution: Detect *.cps files as json filetype (Guillaume Barbier).
Reference:
https://github.com/cps-org/cps
https://cps-org.github.io/cps/
closes: vim/vim#19758
https://github.com/vim/vim/commit/53884ba7a8fb22de006689a6feb88fb8f0bd7db9
Co-authored-by: Guillaume Barbier <barbier.guillaume60@gmail.com>
|
|
Problem: filetype: Wireguard config files not recognized
Solution: Detect /etc/wireguard/*.conf files as dosini filetype
(Furkan Sahin).
closes: vim/vim#19751
https://github.com/vim/vim/commit/cc8798e71982de485cf00b2630d01285ca045008
Co-authored-by: Furkan Sahin <furkan-dev@proton.me>
|
|
Problem: filetype: ObjectScript are not recognized
Solution: Add ObjectScript filetype detection for *.cls files
(Hannah Kimura)).
Reference:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_intro
closes: vim/vim#19668
https://github.com/vim/vim/commit/b11c8efbe6981076194e00323737780330cfd0a1
Co-authored-by: Hannah <hannah.kimura@intersystems.com>
|
|
Problem: filetype: neon files are not recoginzed
Solution: Detect *.neon files as neon filetype
(przepompownia)
Reference:
https://doc.nette.org/en/neon/format
https://github.com/fpob/nette.vim
closes: vim/vim#19496
https://github.com/vim/vim/commit/ddd90672f2ddc170cb8f035e42302468f02d341a
Co-authored-by: przepompownia <przepompownia@users.noreply.github.com>
|
|
Problem: filetype: sh filetype used for env files
Solution: Detect *.env and .env.* files as env filetype,
detect .envrc and .envrc.* as sh filetype,
include a simple env syntax script (DuckAfire)
Previously, .env files were handled by the shell syntax. While
functional, this limited the ability to support specific .env
implementations, such as CodeIgniter4 which allows dots in keys
(e.g., "foo.bar=0").
The new dedicated 'env' filetype and syntax script improves legibility
and prevents highlighting from breaking when encountering spaces.
Currently, the syntax does not support indentation; fields, variables,
and comments must start at the beginning of the line.
closes: vim/vim#19260
https://github.com/vim/vim/commit/d0fa375629b1bfdb8dc054894ca81d7473268455
Co-authored-by: DuckAfire <155199080+duckafire@users.noreply.github.com>
|
|
Problem: filetype: yara files are not recognized
Solution: Detect *.yara and *.yar files as yara filetype
(Thomas Dupuy).
Reference:
- https://github.com/VirusTotal/yara
- https://github.com/VirusTotal/yara-x
closes: vim/vim#19460
https://github.com/vim/vim/commit/7d93ae57f0dc9da7eee8d582dd0d5a22922ffed8
Co-authored-by: Thomas Dupuy <thom4s.d@gmail.com>
|
|
Problem: filetype: cshtml incorrectly recognized, razor files are not
recognized
Solution: Detect *.cshtml and *.razor files as razor filetype
(tris203)
Reference:
https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-10.0
closes: vim/vim#19207
https://github.com/vim/vim/commit/68dbb58d5189d1293b0f8e032af6bcb84101bd86
Co-authored-by: tris203 <admin@snappeh.com>
|
|
Problem: filetype: cel files are not recognized
Solution: Detect *.cel files as cel filetype (Stefan VanBuren).
Reference:
https://cel.dev/
https://github.com/google/cel-java/blob/e36c49febc36bcb16ef4f07274fcc8873c1eee59/testing/src/test/resources/expressions/coverage_test_case/simple_expression.cel
https://github.com/elastic/mito/blob/d0d2dbabae5c563dd943c61fd52992acb655942d/example.cel
closes: vim/vim#19381
https://github.com/vim/vim/commit/fb5777fa209785db6aa439b712cab814264e05ca
Co-authored-by: Stefan VanBuren <svanburen@buf.build>
|
|
Although powerful -- especially with chained modifiers --, the
readability (and therefore maintainability) of `fnamemodify()` and its
modifiers is often worse than a function name, giving less context and
having to rely on `:h filename-modifiers`. However, it is used plenty in
the Lua stdlib:
- 16x for the basename: `fnamemodify(path, ':t')`
- 7x for the parents: `fnamemodify(path, ':h')`
- 7x for the stem (filename w/o extension): `fnamemodify(path, ':r')`
- 6x for the absolute path: `fnamemodify(path, ':p')`
- 2x for the suffix: `fnamemodify(path, ':e')`
- 2x relative to the home directory: `fnamemodify(path, ':~')`
- 1x relative to the cwd: `fnamemodify(path, ':.')`
The `fs` module in the stdlib provides a cleaner interface for most of
these path operations: `vim.fs.basename` instead of `':t'`,
`vim.fs.dirname` instead of `':h'`, `vim.fs.abspath` instead of `':p'`.
This commit refactors the runtime to use these instead of fnamemodify.
Not all fnamemodify calls are removed; some have intrinsic differences
in behavior with the `vim.fs` replacement or do not yet have a
replacement in the Lua module, i.e. `:~`, `:.`, `:e` and `:r`.
|
|
Problem: filetype: skhd files are not recognized
Solution: Detect .skhdrc and skhdrc as skhd filetype,
include a syntax and filetype plugin, add syntax tests
(Kiyoon Kim)
Add syntax highlighting for skhd (simple hotkey daemon for macOS)
configuration files. Includes filetype detection for skhdrc and
.skhdrc files.
Reference:
- https://github.com/asmvik/skhd
closes: vim/vim#19235
https://github.com/vim/vim/commit/e5f61842b509acea91c63923e60987ad7ae123dd
Co-authored-by: Kiyoon Kim <kiyoon@users.noreply.github.com>
|
|
Problem: filetype: NetLinx fires are not recognized
Solution: Detect *.axs and *.axi as netlinx filetype
(kb).
Reference:
- https://www.amx.com/en/site_elements/amx-language-reference-guide-netlinx-programming-language
- https://kielthecoder.com/2021/06/11/netlinx-getting-started/
closes: vim/vim#19249
https://github.com/vim/vim/commit/6963e3b8bf46893f8d09e7ea556c37581248e777
Co-authored-by: kb <kim@simple.industries>
|
|
Problem: filetype: tiltfiles are not recognized
Solution: Detect Tiltfiles.* and *.tiltfiles as tiltfile filetype.
(Luis Davim)
Reference:
- https://docs.tilt.dev/api.html
fixes: vim/vim#19214
closes: vim/vim#19218
https://github.com/vim/vim/commit/ff0e5d994ca4b533f3c9c43a7a154276b0fa08fb
Co-authored-by: Luis Davim <luis.davim@gmail.com>
|
|
Problem: filetype: tiger files are not recognized
Solution: Detect *.tig files as tiger filetype
(Christian Clason).
Reference:
- https://www.cs.princeton.edu/~appel/modern/
closes: vim/vim#19202
https://github.com/vim/vim/commit/eb53ed5de01cfc4effc1825ad710999172c138ab
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
|
|
Follow-up to #37278.
Not sure how I missed the typo. I even remember checking the PR twice...
|
|
Problem: filetype: djot files are not recognized
Solution: Detect *.dj and *.djot files as djot filetype
(Hoang Nguyen).
Reference:
- https://djot.net/
closes: vim/vim#19105
https://github.com/vim/vim/commit/8d0fcff002d1198f0a6cfe211f6bdcd91466e70f
Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
Problem: filetype: Koka files are not recognized
Solution: Detect *.kk files as koka filetype (Hoang Nguyen).
Reference:
- https://koka-lang.github.io/koka/doc/index.html
closes: vim/vim#19104
https://github.com/vim/vim/commit/969a4a0ba5dc53a8745e9ece10df13f98572603b
Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
Problem: filetype: Rasi include files are not recognized
Solution: Detect *.rasinc as rasi filetype (Hoang Nguyen)
Reference:
- https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#file-extension
closes: vim/vim#19103
https://github.com/vim/vim/commit/b084b8f1db40cba2971db3bdb4528770556e7ddc
Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
Problem: filetype: Nickel files are not recognized
Solution: Detect *.ncl files as nickel filetype
(Hoang Nguyen)
Reference:
- https://nickel-lang.org/getting-started/
- https://github.com/tweag/nickel/tree/master/examples
closes: vim/vim#19102
https://github.com/vim/vim/commit/88f3ac34ea465dc6e74835e0c367220815f76a32
Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
Problem: filetype: systemd quadlet files are not recognized
Solution: Detect additional patterns as systemd filetype
(Ac5000)
Reference:
- https://docs.podman.io/en/latest/markdown/podman.1.html
- https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
- https://docs.podman.io/en/latest/markdown/podman-quadlet.1.html
fixes: vim/vim#15078
closes: vim/vim#19057
https://github.com/vim/vim/commit/0f93c988e97325bfc54654bc2cf4178fb11ba865
Co-authored-by: Ac5000 <15003210+Ac5000@users.noreply.github.com>
|
|
Problem: filetype: kos files are not reconized
Solution: Detect *.kos files as kos filetype
(Chris Dragan)
Reference:
- https://github.com/kos-lang/kos
closes: vim/vim#19056
https://github.com/vim/vim/commit/96a1caac6b39b523a32d0554cb95e92dbb81e17f
Co-authored-by: Chris Dragan <chris@dragan.dev>
|
|
(#37178)
Problem: filetype: Fennel fnlm files are not recognized
(Alexei Mozaidze, after v9.1.2034)
Solution: Detect *.fnlm files as fennel filetype, revert detecting
*.fnml files
related: vim/vim#19047
https://github.com/vim/vim/commit/ea189a6f4d2a1f4a1f2822cbd2aed0a584ecceea
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: filetype: Fennel fnml files are not recognized
(Alexei Mozaidze)
Solution: Detect *.fnml files as fennel filetype
Reference:
- https://fennel-lang.org/changelog#160--2025-10-13
fixes: vim/vim#19047
https://github.com/vim/vim/commit/9c87af5c3cf5dc483c64d54f2677c4906d0545fa
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
(#37130)
Problem: filetype: bicep filetype used for 2 bicep file types
Solution: Detect *.bicepparam files as bicep-param filetype, include
new bicep-params and bicep filetype plugin
(Scott McKendry)
The bicep language server handles parameter files differently than
regular bicep files. Treating them the same at the editor level leads to
false positive diagnostics in the editor.
References:
Bicep Language Constants:
- https://github.com/Azure/bicep/blob/51392d32ca2c8b94b1bb7a255e78e1d559d12573/src/Bicep.Core/LanguageConstants.cs#L23
VS Code Extension definition:
- https://github.com/Azure/bicep/blob/51392d32ca2c8b94b1bb7a255e78e1d559d12573/src/vscode-bicep/package.json#L47
closes: vim/vim#19026
https://github.com/vim/vim/commit/4e722fdfdd987c11136e3533bd65d0ed4d15f829
Co-authored-by: Scott McKendry <me@scottmckendry.tech>
|
|
Problem: filetype: fluent files are not recognized
Solution: Detect *.ftl files as fluent filetype (ners)
References:
- https://projectfluent.org/
closes: vim/vim#19011
https://github.com/vim/vim/commit/b91b30643af00947e4b0f8758b3e44bb9927faee
Co-authored-by: ners <ners@gmx.ch>
|
|
Problem: filetype: hylo files are not recognized
Solution: Detect *.hylo files as hylo filetype (Ambrus Tóth)
References:
- https://hylo-lang.org/
closes: vim/vim#18994
https://github.com/vim/vim/commit/9c9982240afca5c5efe6f235f2157a5e5165170c
Co-authored-by: Ambrus Tóth <ping@ambrus.dev>
|
|
Problem: filetype: N-Quads files are not recognized
Solution: Detect *.nq files as nq filetype
Reference:
- https://www.w3.org/TR/n-quads/
closes: vim/vim#18923
https://github.com/vim/vim/commit/6c027b25f114595a21fcb5031abe366349ad5a9c
Co-authored-by: Gordian Dziwis <gordian@dziw.is>
|
|
recognized (#36868)
Problem: filetype: Erlang application resource files are not recognized
Solution: Add content-based filetype detection for application resource
files matching extension '*.app' (Doug Kearns)
related: vim/vim#18835
closes: vim/vim#18842
https://github.com/vim/vim/commit/cf5c25526007a5cc39be317b023f55cb266d5ed2
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
Problem: filetype: bpftrace files are not recognized
Solution: Detect *.bt files as btftrace filetype,
include a btftrace filetype plugin (Stanislaw Gruszka)
closes: vim/vim#18866
https://github.com/vim/vim/commit/b60b33a9dc91569f803e5a4856244bd8414f1802
Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
|
|
Problem: filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
filetype plugins (Jon Parise).
leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.
This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.
Reference:
- https://www.erlang.org/doc/apps/parsetools/leex.html
related: vim/vim#18819
closes: vim/vim#18832
https://github.com/vim/vim/commit/b087c5452b4c12bfc9e7f6cecbee34aab64c92d8
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
Problem: filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
(John Parise).
*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)
Reference:
- https://www.erlang.org/doc/system/applications.html
Rebar is the Erlang build tool. rebar.config uses Erlang syntax.
Reference:
- https://rebar3.org/docs/configuration/configuration/
closes: vim/vim#18835
https://github.com/vim/vim/commit/2b2580e61a853617173f907bd42e12a073cf2410
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
Problem: filetype: not all starlark files are recognized
Solution: Detect *.sky files as starlark filetype (Bruno Belanyi)
References:
- https://docs.bazel.build/versions/0.17.1/skylark/spec.html
closes: vim/vim#18807
https://github.com/vim/vim/commit/3ba6a97fea3e62857fe473d8c08415a05b9c316b
Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
|
|
|
|
Problem: filetype: .mom files recognized as nroff files
Solution: Detect *.mom files as groff filetype instead
(Callum Andrew)
Reference:
- mom macros are written specifically for groff:
https://www.schaffter.ca/mom/
closes: vim/vim#18718
https://github.com/vim/vim/commit/23e12c0b7ec02cc374f111fd9dfaa84734dbb7f5
Co-authored-by: Callum Andrew <dev@candrew.net>
|
|
Problem: filetype: not all Ruby files are recognized
Solution: Detect *.rbi and Brewfile as ruby filetype
(botantony).
- `rbi` is a file extension used by Sorbet, typechecker for Ruby:
https://sorbet.org/docs/rbi
- `Brewfile` is a bundler file for Homebrew package manager:
https://docs.brew.sh/Brew-Bundle-and-Brewfile
closes: vim/vim#18697
https://github.com/vim/vim/commit/efc3be77bbf707edad9cbbda7aef471de65411fd
Co-authored-by: botantony <antonsm21@gmail.com>
|
|
Problem: filetype: not all AppleScript files are recognized
Solution: Detect *.applescript files as applescript filetype
(Samuel Huang)
Reference:
https://en.wikipedia.org/wiki/AppleScript
closes: vim/vim#18672
https://github.com/vim/vim/commit/69dd5906fd9723774715ec37ad3b44652938f655
Co-authored-by: Samuel Huang <hi@sgh.ng>
|
|
Problem:
Previously, the fallback logic to ".conf" was located outside of
`vim.filetype.match()` and directly within the AutoCmd definition. As a
result, `vim.filetype.match()` would return nil instead of ".conf" for
fallback cases (#30100).
Solution:
Added a boolean return value to `vim.filetype.match()` that indicates
whether the match was the result of fallback. If true, the filetype will
be set using `setf FALLBACK <ft>` instead of `setf <ft>`.
|
|
Problem: filetype: Android aconfig files are not recognized
Solution: Detect *.aconfig files as pbtxt filetype (Bruno Belanyi)
Reference:
https://source.android.com/docs/setup/build/feature-flagging/declare-flag
closes: vim/vim#18656
https://github.com/vim/vim/commit/7adeb09bb24a9d29179926dd391c3d67cea26057
Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
|
|
Problem: filetype: Soy files are not recognized
Solution: Detect *.soy files as soy filetype,
include a soy filetype plugin (Riley Bruins)
closes: vim/vim#18640
https://github.com/vim/vim/commit/9fff99c3c28083dbe4dcb243309bf2b28c4cb82b
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
|
**Problem:**
`vim.filetype.match({ filename = 'a.sh' })` returns `nil` because
an invalid buffer ID is passed to `vim.api.nvim_buf_get_lines()`.
For filetypes like `csh`, `txt`, or any other extensions that call
`_getlines()` or `_getline()` to detect their filetypes, the same
issue occurs.
When only the `filename` argument is passed, an error is raised
inside a `pcall()` that wraps the filetype detection function,
causing it to return no value without showing any error message.
**Solution:**
Validate the `bufnr` value in `_getlines()` and `_getline()`.
|
|
Problem: filetype: KerML and SysML files are not recognized
Solution: Detect *.kerml as kerml filetype, detect *.sysml as sysml
filetype, include a kerml and sysml filetype plugin
(Daumantas Kavolis)
closes: vim/vim#18476
https://github.com/vim/vim/commit/b73ccf7ff0326ece9c942127c1965475ad71b78a
Co-authored-by: Daumantas Kavolis <daumantas.kavolis@sensmetry.com>
|