2024-02-15 11:13:37 +00:00
|
|
|
return {
|
2024-03-05 06:54:50 +00:00
|
|
|
-- Syntax highlighting
|
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
config = function()
|
|
|
|
require("nvim-treesitter.configs").setup {
|
|
|
|
indent = {
|
|
|
|
enable = true,
|
|
|
|
disable = {},
|
|
|
|
},
|
|
|
|
ensure_installed = { "markdown", "markdown_inline", "regex" },
|
|
|
|
sync_install = false,
|
|
|
|
auto_install = true,
|
|
|
|
ignore_install = {},
|
2024-02-15 11:13:37 +00:00
|
|
|
|
2024-03-05 06:54:50 +00:00
|
|
|
highlight = {
|
|
|
|
enable = true,
|
|
|
|
disable = {},
|
|
|
|
disable = function(lang, buf)
|
|
|
|
local max_filesize = 100 * 1024 -- 100 KB
|
|
|
|
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
|
|
|
if ok and stats and stats.size > max_filesize then
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
additional_vim_regex_highlighting = false,
|
|
|
|
},
|
|
|
|
}
|
2024-02-15 11:13:37 +00:00
|
|
|
|
2024-03-05 06:54:50 +00:00
|
|
|
-- let it to use 'markdown' parser for mdx filetype.
|
|
|
|
vim.treesitter.language.register("markdown", "mdx")
|
|
|
|
end,
|
|
|
|
},
|
2024-02-15 11:13:37 +00:00
|
|
|
|
2024-03-05 06:54:50 +00:00
|
|
|
-- Colors highlighting
|
|
|
|
{
|
|
|
|
"NvChad/nvim-colorizer.lua",
|
|
|
|
config = function(plun)
|
|
|
|
require("colorizer").setup {
|
|
|
|
user_default_options = {
|
|
|
|
names = false,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
end,
|
|
|
|
},
|
2024-02-15 11:13:37 +00:00
|
|
|
}
|