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

@ -39,7 +39,7 @@
"nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" }, "nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" },
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" },
"nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" }, "nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"smart-splits.nvim": { "branch": "master", "commit": "c8a9173d70cbbd1f6e4a414e49e31df2b32a1362" }, "smart-splits.nvim": { "branch": "master", "commit": "c8a9173d70cbbd1f6e4a414e49e31df2b32a1362" },

View file

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

View file

@ -10,14 +10,28 @@ configs.setup({
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
highlight = { highlight = {
enable = true, 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 = { rainbow = {
enable = true, enable = true,
disable = { "html" }, disable = { "html" },
extended_mode = false, equery = 'rainbow-parens',
max_file_lines = nil, strategy = require('ts-rainbow').strategy.global,
}, },
autotag = { enable = true }, autotag = { enable = true },
incremental_selection = { enable = true }, incremental_selection = { enable = true },

View file

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