File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 33--- @copyright 2025
44local lfs = require ' lfs'
55local ltreesitter = require ' ltreesitter'
6+ local filetype = require ' vim.filetype'
7+
68local T = require ' texcat.themes'
9+
710local M = {
811 Treesitter = {}
912}
@@ -196,11 +199,10 @@ function M.Treesitter:list()
196199end
197200
198201--- detect file type
199- --- TODO: /usr/share/nvim/runtime/lua/vim/filetype.lua
200202--- @param filename string
201203--- @return string ft
202204function M .Treesitter .detect (filename )
203- return require ' texcat.syntaxes.tmlanguage ' . TMLanguage . detect ( filename )
205+ return filetype . match { filename = filename }
204206end
205207
206208return M
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ url = "https://github.com/ustctug/texrocks/archive/$(VERSION).zip"
1515dir = " texrocks-$(VERSION)/packages/$(PACKAGE)"
1616
1717[dependencies ]
18+ vim = " >= 0.0.4"
1819argparse = " 0.7.1-1"
1920lua-template = " 1.0.0-1"
2021warna = " 0.3.5-2"
You can’t perform that action at this time.
0 commit comments