1
0
Fork 0

nvim: Switch to nvim-ts-rainbow2

This commit is contained in:
Daniel Kempkens 2023-03-04 20:07:46 +01:00
parent 59ef1643a5
commit 0c682ac92b
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
6 changed files with 33 additions and 12 deletions

View file

@ -0,0 +1,11 @@
(list
("(" @opening)
(")" @closing)) @container
(table
("{" @opening)
("}" @closing)) @container
(sequential_table
("[" @opening)
("]" @closing)) @container

View file

@ -25,7 +25,15 @@
;; vim-illuminate ;; vim-illuminate
(highlight :IlluminatedWordText {:bg mod.colors.selection}) (highlight :IlluminatedWordText {:bg mod.colors.selection})
(highlight :IlluminatedWordRead {:bg mod.colors.selection}) (highlight :IlluminatedWordRead {:bg mod.colors.selection})
(highlight :IlluminatedWordWrite {:bg mod.colors.selection :underline true})) (highlight :IlluminatedWordWrite {:bg mod.colors.selection :underline true})
;; nvim-ts-rainbow2
(highlight :TSRainbowRed {:fg mod.colors.red})
(highlight :TSRainbowYellow {:fg mod.colors.yellow})
(highlight :TSRainbowBlue {:fg mod.colors.purple})
(highlight :TSRainbowOrange {:fg mod.colors.orange})
(highlight :TSRainbowGreen {:fg mod.colors.green})
(highlight :TSRainbowViolet {:fg mod.colors.pink})
(highlight :TSRainbowCyan {:fg mod.colors.cyan}))
mod) mod)

View file

@ -33,7 +33,7 @@
:typescript :typescript
:vim :vim
:yaml] :yaml]
rainbow-parsers [:fennel] rainbow-parsers [:css :fennel :json :query :yaml]
disable-parsers []] disable-parsers []]
(nifoc-treesitter.setup) (nifoc-treesitter.setup)
(treesitter-config.setup {:ensure_installed [] (treesitter-config.setup {:ensure_installed []
@ -51,7 +51,9 @@
:disable (vim.tbl_filter (fn [parser] :disable (vim.tbl_filter (fn [parser]
(not (vim.tbl_contains rainbow-parsers (not (vim.tbl_contains rainbow-parsers
parser))) parser)))
install-parsers)} install-parsers)
:query :rainbow-parens
:strategy (require :ts-rainbow.strategy.global)}
:matchup {:enable true :disable disable-parsers} :matchup {:enable true :disable disable-parsers}
:autopairs {:enable true :disable disable-parsers} :autopairs {:enable true :disable disable-parsers}
:autotag {:enable true :disable disable-parsers} :autotag {:enable true :disable disable-parsers}

View file

@ -146,7 +146,7 @@ in
type = "fennel"; type = "fennel";
} }
nvim-ts-rainbow nvim-ts-rainbow2
playground playground
# Telescope # Telescope

View file

@ -121,14 +121,14 @@ rec {
fetchSubmodules = false; fetchSubmodules = false;
}; };
}); });
nvim-ts-rainbow = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-ts-rainbow2 = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-ts-rainbow"; pname = "nvim-ts-rainbow2";
version = "2023-02-21"; version = "2023-03-03";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "mrjones2014"; owner = "HiPhish";
repo = "nvim-ts-rainbow"; repo = "nvim-ts-rainbow2";
rev = "81f9a2e752edc793a34355be952dd1ebb1d5701b"; rev = "293e12e90f0928845582b9a3db7258eaa8e92a65";
sha256 = "1zc8p31dmlwsqrz8p9r6xnhq9zwgvq82crgr339w0ndn3m0wy508"; sha256 = "069nyc2bxi5wyvbnyqmdif2vqk7fv0kfgz3b7r7xgjf6s4kgw9yl";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };

View file

@ -19,7 +19,7 @@
# Syntax # Syntax
- src: nvim-treesitter/nvim-treesitter - src: nvim-treesitter/nvim-treesitter
- src: mrjones2014/nvim-ts-rainbow - src: HiPhish/nvim-ts-rainbow2
- src: nvim-treesitter/playground - src: nvim-treesitter/playground
# Telescope # Telescope