enc: update default config ts rust

This commit is contained in:
asep.komarudin 2024-06-22 09:33:55 +07:00
parent ebe7697c5e
commit 66d401335e
4 changed files with 23 additions and 6 deletions

View file

@ -42,6 +42,8 @@ pcode.show_mode = 3
pcode.format_on_save = 1
pcode.format_timeout_ms = 5000
pcode.treesitter_ensure_installed = {}
-- ini hanya untuk lsp yg tidak support masson
-- untuk referesi support language kunjungi link dibawah
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
@ -163,4 +165,4 @@ pcode.jest_config = "jest.config.mjs"
-- https://github.com/fredrikaverpil/neotest-golang
pcode.gotest = false
pcode.acive_rust_config = false
pcode.acive_rust_config = true

View file

@ -31,5 +31,6 @@ end
if pcode.acive_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
return {}

View file

@ -1,3 +1,11 @@
local ts_list = {
"lua",
"vim",
"vimdoc",
}
for _, ts in pairs(pcode.treesitter_ensure_installed or {}) do
table.insert(ts_list, ts)
end
return {
{
"nvim-treesitter/nvim-treesitter",
@ -65,11 +73,7 @@ return {
return {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"lua",
"vim",
"vimdoc",
},
ensure_installed = ts_list,
incremental_selection = {
enable = true,
},