diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-04-23 14:15:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-23 14:15:52 +0200 |
| commit | f17bb4f41102ecec7989bc4c14c626dc595e2f0b (patch) | |
| tree | 7e2508e07eff9ece0970048086b01e7148159e60 /runtime/lua/vim/filetype.lua | |
| parent | bf0ac4f241cd22f53e026767ed5df89bf63bcf37 (diff) | |
| download | rneovim-f17bb4f41102ecec7989bc4c14c626dc595e2f0b.tar.gz rneovim-f17bb4f41102ecec7989bc4c14c626dc595e2f0b.tar.bz2 rneovim-f17bb4f41102ecec7989bc4c14c626dc595e2f0b.zip | |
vim-patch:9.0.1478: filetypes for *.v files not detected properly (#23282)
* vim-patch:9.0.1478: filetypes for *.v files not detected properly
Problem: Filetypes for *.v files not detected properly.
Solution: Use the file contents to detect the filetype. (Turiiya,
closes vim/vim#12281)
https://github.com/vim/vim/commit/80406c26188219f3773b2e9c49160caeeb386ee2
Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com>
Co-authored-by: Jonas Strittmatter <40792180+smjonas@users.noreply.github.com>
Diffstat (limited to 'runtime/lua/vim/filetype.lua')
| -rw-r--r-- | runtime/lua/vim/filetype.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index cbd9aa640b..4fafc4e2e2 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1091,7 +1091,9 @@ local extension = { vr = 'vera', vri = 'vera', vrh = 'vera', - v = 'verilog', + v = function(path, bufnr) + return require('vim.filetype.detect').v(bufnr) + end, va = 'verilogams', vams = 'verilogams', vhdl = 'vhdl', |