Compare commits

..
Author SHA1 Message Date
Dzuchun
6e55450bd9 ench(filetype): tree-sitter config enchancements
- do not highlight cpp. it's detremental
- remove plaintex highlight (that's not a thing)
- add highlighting for yaml
- add highlight for special files (Dockerfile, Cargo.lock, makefile)
2025-12-26 17:41:29 +00:00
Dzuchun
bdd2f33f39 format ant declarations via xmlformatter 2025-12-26 17:38:42 +00:00
2 changed files with 14 additions and 2 deletions

View file

@ -17,6 +17,7 @@ local function config()
-- nix = { "nixfmt" }, -- nix = { "nixfmt" },
cpp = { "clang-format" }, cpp = { "clang-format" },
xml = { "xmlformatter" }, xml = { "xmlformatter" },
ant = { "xmlformatter" },
} }
-- add to tool list -- add to tool list

View file

@ -11,7 +11,6 @@ function M.setup()
"bash", "bash",
"c", "c",
{ "comment", nil }, { "comment", nil },
"cpp",
"csv", "csv",
{ "dockerfile", nil }, { "dockerfile", nil },
"fish", "fish",
@ -23,9 +22,9 @@ function M.setup()
"html", "html",
{ "javascript", "js" }, { "javascript", "js" },
{ "typescript", "ts" }, { "typescript", "ts" },
"jsx",
"tsx", "tsx",
"json", "json",
{ "latex", "tex" },
"lua", "lua",
{ "luadoc", nil }, { "luadoc", nil },
{ "make", nil }, { "make", nil },
@ -38,8 +37,10 @@ function M.setup()
"vim", "vim",
{ "vimdoc", nil }, { "vimdoc", nil },
"xml", "xml",
{ "ant", nil },
"nu", "nu",
"java", "java",
"yaml",
} }
local langs = {} local langs = {}
local li = 1 local li = 1
@ -60,6 +61,16 @@ function M.setup()
pi = pi + 1 pi = pi + 1
end end
end end
table.insert(pattern, pi, "Dockerfile*")
pi = pi + 1
table.insert(pattern, pi, "Cargo.lock")
pi = pi + 1
table.insert(pattern, pi, "makefile*")
pi = pi + 1
table.insert(pattern, pi, "Makefile*")
pi = pi + 1
local opts = { local opts = {
ensure_installed = langs, ensure_installed = langs,
highlight = { highlight = {