A Neovim filetype plugin for TeX-related files
- Improved support for existing filetypes, especially
tex
andlua
. - Additional filetypes for several TeX-related file formats.
- Neovim
>= 0.10.0
With lazy.nvim
{
"teatimeguest/tex-filetypes.nvim",
config = true,
event = { "BufReadPre", "BufNewFile" },
}
With mini.deps
add("teatimeguest/tex-filetypes.nvim")
- Improve
include
andincludeexpr
, usingkpsewhich
. - Add more match patterns for
matchit
.
- Add support for lua files from TeX distribution to
includeexpr
. - Set
b:is_texlua
tov:true
for TeX-related lua files.
The plugin provides support for the following file formats:
Filetype | Language | Syntax | Indent | Fold | Comments | Include | Define |
---|---|---|---|---|---|---|---|
bibtoolrsc |
BibTool resource file | ✅ | ✅ | ➖ | ✅ | ➖ | ➖ |
chktexrc |
ChkTeX config file | ✅ | ➖ | ✅ | ✅ | ➖ | ➖ |
dependstxt |
TeX Live's DEPENDS.txt format |
✅ | ➖ | ✅ | ✅ | ➖ | ➖ |
fontmap |
TeX fontmap file | ✅ | ➖ | ➖ | ✅ | ✅ | ➖ |
propertylist |
Property list of TeX font metric data | ✅ | ✅ | ✅ | ✅ | ➖ | ➖ |
subfonts |
ttfutils ' subfont definition file |
✅ | ➖ | ➖ | ✅ | ➖ | ➖ |
texliveprofile |
TeX Live installation profile | ✅ | ➖ | ➖ | ✅ | ➖ | ➖ |
tlpdb |
TeX Live Database/Object/Source file | ✅ | ➖ | ✅ | ✅ | ➖ | ✅ |
The plugin respects the filetype-overrule and filetype-ignore global config. In particular, the following variables affect filetype detection:
g:filetype_cfg
g:filetype_def
g:filetype_pl
g:ft_ignore_pat