enc: config default javascript

This commit is contained in:
asep.komarudin 2024-06-22 10:29:08 +07:00
parent 66d401335e
commit 2165fb1c63
6 changed files with 106 additions and 105 deletions

View file

@ -28,9 +28,18 @@ _G.all_trim = function(s)
return s:match("^%s*(.-)%s*$")
end
if pcode.acive_rust_config then
-- run if rust config true
if pcode.active_rust_config then
table.insert(pcode.mason_ensure_installed, "rust_analyzer")
table.insert(pcode.unregister_lsp, "rust_analyzer")
table.insert(pcode.treesitter_ensure_installed, "rust")
end
-- run if javascript config true
if pcode.active_javascript_config.status then
local lst_ts = { "html", "javascript", "typescript", "tsx", "css", "json", "jsonc" }
for _, ts in pairs(lst_ts) do
table.insert(pcode.treesitter_ensure_installed, ts)
end
table.insert(pcode.mason_ensure_installed, "tsserver")
end
return {}