migrate ts-rainbo to ts-rainbow2

This commit is contained in:
asep komarudin 2023-11-01 10:36:43 +07:00
parent e52160557a
commit d86ac958a2
4 changed files with 28 additions and 12 deletions

View file

@ -328,12 +328,14 @@ return {
-- for check startuptime
{ "dstein64/vim-startuptime", cmd = "StartupTime", event = "InsertEnter" },
-- for coloring pairs
{
"p00f/nvim-ts-rainbow",
event = "BufRead",
dependencies = "nvim-treesitter/nvim-treesitter",
},
-- remark 20231101 - menyebabkan error treesitter
-- {
-- "p00f/nvim-ts-rainbow",
-- event = "BufRead",
-- dependencies = "nvim-treesitter/nvim-treesitter",
-- },
-- for git
{ "HiPhish/nvim-ts-rainbow2", event = "BufRead", dependencies = "nvim-treesitter/nvim-treesitter" },
{
"lewis6991/gitsigns.nvim",
enabled = vim.fn.executable("git") == 1,

View file

@ -10,14 +10,28 @@ configs.setup({
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
highlight = {
enable = true,
disable = function(_, bufnr) return vim.b[bufnr].large_buf end,
disable = { "css" }, -- list of language that will be disabled
additional_vim_regex_highlighting = false,
},
context_commentstring = {
enable = true,
enable_autocmd = false,
config = {
-- Languages that have a single comment style
typescript = "// %s",
css = "/* %s */",
scss = "/* %s */",
html = "<!-- %s -->",
svelte = "<!-- %s -->",
vue = "<!-- %s -->",
json = "",
},
},
context_commentstring = { enable = true, enable_autocmd = false },
rainbow = {
enable = true,
disable = { "html" },
extended_mode = false,
max_file_lines = nil,
equery = 'rainbow-parens',
strategy = require('ts-rainbow').strategy.global,
},
autotag = { enable = true },
incremental_selection = { enable = true },

View file

@ -30,8 +30,8 @@ configs.setup({
rainbow = {
enable = true,
disable = { "html" },
extended_mode = false,
max_file_lines = nil,
equery = 'rainbow-parens',
strategy = require('ts-rainbow').strategy.global,
},
autotag = { enable = true },
incremental_selection = { enable = true },