PGP: F15BF0D321234D88
Keyoxide: F7B946CD80BFD39084142EC3F15BF0D321234D88
Also https://sr.ht/~p00f
Rainbow parentheses for neovim using tree-sitter. Use https://sr.ht/~p00f/nvim-ts-rainbow instead
License: Apache License 2.0
PGP: F15BF0D321234D88
Keyoxide: F7B946CD80BFD39084142EC3F15BF0D321234D88
Also https://sr.ht/~p00f
I like the plugin very much. Thanks alot for creating!
Reasons to do:
Another related reason (bad practice/historical reasons): nvim-treesitter/module-template#1
Relevant content for change:
https://github.com/nanotee/nvim-lua-guide#using-meta-accessors-1
Hi 👋🏿 thanks for your work on this plugin.
I've just moved over from luochen1990
's plugin and I'm wondering if it's possible to enable this plugin for only a few filetypes primarily since there are only a few languages I use that tend to get a little unmanageable with their parens (e.g. lisps) but for things like lua
I don't really need this functionality.
Steps to reproduce
TSModuleInfo
after nvim-ts-rainbow has been loaded E5018: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:161: query: invalid node type at position 142
Expected behavior
TSModuleInfo
shouldn't throw an error.
Notes
After playing with the respective paren.scm
file, turns out the the following line is causing the issue:
You can try removing that query and the error can't be reproduced anymore.
For example, I want to disable this plugin for HTML files. Is there a way to do that?
Hey,
every time the history is rewritten on master it breaks updating the plugin with packer.
IMO such a workflow on public branches isn't a good practice and should be avoided in general, but that's up to the maintainer(s).
There is also an open issue on packer that explains a bit more:
wbthomason/packer.nvim#327
Maybe the current workflow can be reconsidered as I really appreciate the plugin.
C++ Function {} becomes gray with Neoformat clang-format
nvim: 0.6
rainbow:lastest
myconfig:
rainbow = {
enable = true,
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
max_file_lines = 1000 -- Do not enable for files with more than 1000 lines, int
},
-- packer
editor['p00f/nvim-ts-rainbow'] = {
opt = true,
after = 'nvim-treesitter',
event = 'BufRead'
}
How should I fix this?
Describe the bug
After install the plugin and adding config to treesitter config I get this. I'm kind of at a loss. Other plugins work as expected and packer shows both nvim-treesitter and nvim-ts-rainbow installed and loaded. I don't see it listed under modules using TSModuleInfo.
Error detected while processing /Users/brandon/.local/share/nvim/site/pack/packer/start/nvim-ts-rainbow/plugin/rainbo
w.vim:
line 1:
E5108: Error executing lua ...m/site/pack/packer/start/nvim-ts-rainbow/lua/rainbow.lua:1: module 'nvim-treesitter.que
ry' not found:
no field package.preload['nvim-treesitter.query']
no file './nvim-treesitter/query.lua'
no file '/opt/homebrew/Cellar/luajit-openresty/2.1-20210510/share/luajit-2.1.0-beta3/nvim-treesitter/query.lu
a'
no file '/usr/local/share/lua/5.1/nvim-treesitter/query.lua'
no file '/usr/local/share/lua/5.1/nvim-treesitter/query/init.lua'
no file '/opt/homebrew/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/nvim-treesitter/query.lua'
no file '/opt/homebrew/Cellar/luajit-openresty/2.1-20210510/share/lua/5.1/nvim-treesitter/query/init.lua'
no file '/Users/brandon/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-treesitter/query.lua'
no file '/Users/brandon/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/nvim-treesitter/query/init.lua
'
no file '/Users/brandon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-treesitter/query
.lua'
no file '/Users/brandon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/nvim-treesitter/query
/init.lua'
no file './nvim-treesitter/query.so'
no file '/usr/local/lib/lua/5.1/nvim-treesitter/query.so'
no file '/opt/homebrew/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/nvim-treesitter/query.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/Users/brandon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/nvim-treesitter/query.so'
no file './nvim-treesitter.so'
no file '/usr/local/lib/lua/5.1/nvim-treesitter.so'
no file '/opt/homebrew/Cellar/luajit-openresty/2.1-20210510/lib/lua/5.1/nvim-treesitter.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/Users/brandon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/nvim-treesitter.so'
stack traceback:
[C]: in function 'require'
...m/site/pack/packer/start/nvim-ts-rainbow/lua/rainbow.lua:1: in main chunk
[C]: in function 'require'
[string ":lua"]:1: in main chunk
Steps to reproduce
Install through packer
use {
"p00f/nvim-ts-rainbow",
opt = false
}
Treesitter Config
local present, ts_config = pcall(require, "nvim-treesitter.configs")
if not present then
return
end
ts_config.setup {
ensure_installed = "maintained",
highlight = {
enable = true,
use_languagetree = true,
},
rainbow = {
enable = true,
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int
-- colors = {}, -- table of hex strings
-- termcolors = {} -- table of colour name strings
}
}
Where it is stated in the documentation to use the require statement after installing, it is not clear why it won't work to new users (new nvim user here, formerly a well established vim user trying to switch 😆 ).
I would like to add a clarity note that after the plugin is installed, specifically with vim-plug that the require statement must be made after plug#end
.
I also did not know I needed to pipe it through lua <<EOF <code goes here> EOF
for it to accept it.
Maybe provide this as a sample:
" Example using vim-plug to install the plugins
" Start installing plugins using vim-plug
call plug#begin('~/.config/nvim/plugins')
" Install plugins
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'p00f/nvim-ts-rainbow'
" Finish installing plugins with vim-plug
call plug#end()
" Configure nvim-treesitter
lua <<EOF
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
-- ignore_install = {}, -- List of parsers to ignore installing
highlight = {
enable = true, -- false will disable the whole extension
-- disable = {}, -- list of language that will be disabled
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
EOF
" Configure nvim-ts-rainbow
lua <<EOF
require'nvim-treesitter.configs'.setup {
rainbow = {
enable = true,
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int
-- colors = {}, -- table of hex strings
-- termcolors = {} -- table of colour name strings
}
}
EOF
Treesitter must also be configured before this plugin is configured or it will not work.
It should also be noted that this plugin will not work unless treesitter has the linter for the language of the file that is open, therefore if treesitter does not contain the language, then this plugin will not work on that type of file.
The code above only configures it to work for the languages in treesitter that are listed as maintained, for full coverage by all languages in treesitter, set maintained
to all
.
Thoughts on the documentation updates?
Using latest nvim, tree-sitter and minimal config.
Does not work for any language, showing python and json.
also tried adding a python.scm to the parser, but it did not make any difference.
call plug#begin('~/.vim/plugged')
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'p00f/nvim-ts-rainbow'
call plug#end()
lua << EOF
require'nvim-treesitter.configs'.setup {
rainbow = {
enable = true
}
}
EOF
nvim version:
nvim --version
NVIM v0.5.0-dev+1165-ge5bef5974
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az205-228
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
Hi friends i have this module installed but it does not seem to be working for typescript .ts files. To be honest im not even sure if tree-sitter is working at all, ive noticed no difference, but the rainbow parenthesis color is deff no working.
init.vim
lua << EOF
require'nvim-treesitter.configs'.setup {
rainbow = {
enable = true,
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int
}
}
EOF
:TSConfigInfo
{
ensure_installed = {},
ignore_install = {},
modules = {
highlight = {
additional_vim_regex_highlighting = false,
custom_captures = {},
disable = { "c", "rust" },
enable = true,
loaded = true,
module_path = "nvim-treesitter.highlight"
},
incremental_selection = {
disable = {},
enable = false,
keymaps = {
init_selection = "gnn",
node_decremental = "grm",
node_incremental = "grn",
scope_incremental = "grc"
},
module_path = "nvim-treesitter.incremental_selection"
},
indent = {
disable = {},
enable = false,
module_path = "nvim-treesitter.indent"
},
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = 1000
}
},
update_strategy = "lockfile"
}
:checkhealth nvim_treesitter
health#nvim_treesitter#check
========================================================================
## Installation
- OK: `tree-sitter` found 0.19.5 (8d8690538ef0029885c7ef1f163b0e32f256a5aa) (parser generator, only needed for :TSInstallFromGrammar)
- OK: `node` found v12.18.3 (only needed for :TSInstallFromGrammar)
- OK: `git` executable found.
- OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl" }
- OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.
## Parser/Features H L F I
- c_sharp ✓ . ✓ . ✓
- bibtex ✓ . ✓ ✓ .
- python ✓ ✓ ✓ ✓ ✓
- r ✓ ✓ . . .
- comment ✓ . . . .
- lua ✓ ✓ ✓ ✓ ✓
- ocaml ✓ ✓ ✓ . ✓
- go ✓ ✓ ✓ ✓ ✓
- scss ✓ . . ✓ .
- json ✓ ✓ ✓ ✓ .
- jsdoc ✓ . . . .
- ledger ✓ . ✓ ✓ ✓
- php ✓ ✓ ✓ ✓ ✓
- clojure ✓ ✓ ✓ . ✓
- supercollider ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- fennel ✓ ✓ . . ✓
- query ✓ ✓ ✓ ✓ ✓
- cpp ✓ ✓ ✓ ✓ ✓
- vue ✓ . ✓ . ✓
- latex ✓ . ✓ . .
- rst ✓ ✓ . . ✓
- css ✓ . ✓ ✓ ✓
- zig ✓ ✓ ✓ ✓ ✓
- erlang . . . . .
- regex ✓ . . . .
- svelte ✓ . ✓ ✓ ✓
- c ✓ ✓ ✓ ✓ ✓
- fortran ✓ . ✓ ✓ .
- teal ✓ ✓ ✓ ✓ ✓
- java ✓ ✓ . ✓ ✓
- gomod ✓ . . . .
- dart ✓ ✓ . ✓ ✓
- verilog ✓ ✓ ✓ . ✓
- bash ✓ ✓ ✓ . ✓
- yaml ✓ ✓ ✓ ✓ ✓
- julia ✓ ✓ ✓ . ✓
- turtle ✓ ✓ ✓ ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- beancount ✓ . ✓ . .
- commonlisp ✓ ✓ ✓ . .
- swift . . . . .
- glimmer ✓ . . . .
- elm . . . . .
- ocaml_interface✓ ✓ ✓ . ✓
- cuda ✓ ✓ ✓ ✓ .
- haskell . . . . .
- ocamllex ✓ . . . ✓
- kotlin ✓ . . . ✓
- ruby ✓ ✓ ✓ ✓ ✓
- fish ✓ ✓ ✓ ✓ ✓
- devicetree ✓ ✓ ✓ ✓ ✓
- scala . . . . .
- dockerfile ✓ . . . ✓
- rust ✓ ✓ ✓ ✓ ✓
- toml ✓ ✓ ✓ ✓ ✓
- ql ✓ ✓ . ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- nix ✓ ✓ ✓ . ✓
- jsonc ✓ ✓ ✓ ✓ ✓
- graphql ✓ . . ✓ ✓
- gdscript ✓ ✓ . . ✓
- sparql ✓ ✓ ✓ ✓ ✓
- tsx ✓ ✓ ✓ ✓ ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents]
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang}
When I enable this plugin and type words, coc's auto completion become very slow and broken. After this, cursor moving also get lag. When I disable it, every thing works well.
change colorscheme while vim is running.
ts-rainbow still continues to work
Change colorscheme while nvim running.
rainbow no more. The colors of parenthesis are back to vanilla Treesitter
Hello, I installed this plugin, and its a very fun and helpful one, but it seems to mess up my colour scheme when I add the boilerplate code for HTML, here's a screenshot
and here is my config for rainbow
rainbow = {
enable = true,
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int
colors = {
"#ff003c",
"#ca0bd4",
"#e973f0",
"#710578",
"#780527",
"#a600ff",
"#eb445d"
} -- table of hex strings
}
and I'm using this colour scheme btw https://github.com/monsonjeremy/onedark.nvim
Thanks
Describe the bug
if you try to overwrite the colures use in the rainbow part of the treessitter config the now colors will not get applied
Steps to reproduce
Steps to reproduce the behavior.
use this as your treesiter configuration
local parsers = require("nvim-treesitter.parsers")
local enabled_list = {"clojure", "fennel","racket"}
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = {
enable = true, -- false will disable the whole extension
disable = { "c", "rust" }, -- list of language that will be disabled
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
rainbow = {
enable = true,
colors = {
"#E06C75",
"#E5C07B",
"#98C379",
"#56B6C2",
"#61AFEF",
"#C678DD",
"#E06C75"
},
extended_mode = true,
max_file_lines = nil,
disable = vim.tbl_filter(
function(p)
local disable = true
for _, lang in pairs(enabled_list) do
if p==lang then disable = false end
end
return disable
end, parsers.available_parsers()
)
}
}
Expected behavior
I expected the the ()
, []
, and {}
to have the colors above not the definition grouvbox colors
From #68 (comment)
After this merge #15 the highlight groups are displayed after the first command that is executed (e.g. open telescope).
#38 was merged yesterday to master, but is now gone. Should I open a new merge request?
The editor throws this message as soon as it displays any ()
or {}
with rainbow turned on. This started happening after updating to NVIM v0.5.0-dev+1197-ga17782042
when i enable this plugin, then edit the rust file. nvim throw error:
Error executing lua callback: /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:272: invalid start
I am using:
NVIM v0.5.0-888-g8b2887bd5
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Hi
Using this awesome plugin for the first time with Scala project, this one: scala project
It doesn't seem to work.
Here is my neovim init.lua in case useful to see if I am doing something wrong in my setup.
here is a screenshot:
Note that this may be a duplicate of #33.
I believe the value in coloring parenthesis is in differentiating level of nesting, and should be identical between two sets of parenthesis. I want to be able to look at nested parenthesis and immediately identify the level of nesting of each parenthesis. That doesn't seem to be the case. But maybe I'm misunderstanding the point.
For the sake of argument, lets say we have three colors:
rainbowcol1 = gray
rainbowcol2 = red
rainbowcol3 = green
And three sets of parenthesis:
()
(())
((()))
I would expect them to be colored like this:
How they are actually colored is something like this:
Is that a bug, or expected behavior?
Describe the bug
Rainbow parenthesis stopped working for me. I need some help to debug it. The strange thing is that TSConfigInfo tells me it is loaded an active.
TSConfigInfo
{
ensure_installed = {},
ignore_install = {},
modules = {
highlight = {
additional_vim_regex_highlighting = false,
custom_captures = {},
disable = { "markdown" },
enable = true,
loaded = true,
module_path = "nvim-treesitter.highlight"
},
incremental_selection = {
disable = {},
enable = false,
keymaps = {
init_selection = "gnn",
node_decremental = "grm",
node_incremental = "grn",
scope_incremental = "grc"
},
module_path = "nvim-treesitter.incremental_selection"
},
indent = {
disable = {},
enable = false,
module_path = "nvim-treesitter.indent"
},
rainbow = {
colors = { "#bf616a", "#d08770", "#ebcb8b", "#a3be8c", "#88c0d0", "#5e81ac", "#b48ead" },
disable = {},
enable = true,
extended_mode = true,
loaded = true,
max_file_lines = 2500,
module_path = "rainbow.internal"
}
},
update_strategy = "lockfile"
}
I've also tried to turn it of manually with
:TSDisableAll rainbow
:TSEnableAll rainbow
But it doesn't fix it. Help is much appreciated!
Steps to reproduce
Config: https://git.cryptomilk.org/users/asn/dotfiles.git/tree/nvim/.config/nvim
Expected behavior
Use use different colors for parenthesis
Can you please provide instructions in the readme on how to install this plugin with :TSInstall
?
Describe the bug
Bracket and parethesis no longer show different colors. Adding custom colors doesn't change this.
Steps to reproduce
Install:
Neovim v.0.7.0
tree-sitter 0.20.2
neovim-tree-sitter (git version)
Arch Linux OS
Expected behavior
What used to happend would be bracket, parenthises, and other pairings would have different color combination throughout the document to easily see where a pair occurs using tree-sitter.
Now that feature no longer works
Screenshots
If applicable, add screenshots to help explain your problem.
this error occurs after manually loading using TSBufEnable rainbow
E5108: Error executing lua ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:
424: loop or previous error loading module 'rainbow.internal'
because by default it doesnt load properly.
my TS config:
require"nvim-treesitter.configs".setup {
autopairs = { enable = true },
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = {}, -- List of parsers to ignore installing
highlight = {
enable = true, -- false will disable the whole extension
-- disable = { "c", "rust" }, -- list of language that will be disabled
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false
},
incremental_selection = {
enable = false,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm"
}
},
indent = { enable = true },
autotag = {
enable = true,
filetypes = {
"html",
"javascript",
"javascriptreact",
"typescriptreact",
"svelte",
"vue",
"xml"
}
},
rainbow = {
enable = true,
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int
colors = {
"#cc241d",
"#a89984",
"#b16286",
"#d79921",
"#689d6a",
"#d65d0e",
"#458588"
}, -- table of hex strings
termcolors = {
"red",
"yellow"
} -- table of colour name strings
}
-- nvimGPS = {
-- enable = true
-- }
}
all parses are installed. so its not a problem with parsers.
plugin is installed using packer
use { "p00f/nvim-ts-rainbow" }
when opening neovim i dont get any errors, but rainbow doesnt work because brackets are not colored. maybe because treesitter failed to load it and decided to not tell me anything about it.
after loading module manually it throws error.
is there a setup
function for this plugin, to load it manually?
how do i fix the bug?
Hello,
I am using this plugin (absolutely love it), and installed with Packer. A couple times in the past week I have gotten issues with this plugin while updating (via :PackerSync
) with git saying fatal: refusing to merge unrelated histories
. I tried going into the git directory directly, and get the same thing when I run git pull
. Do you have any idea why this would be happening? Is this an issue in Packer, have there been force pushes here or something? This is the only plugin showing this behavior
Describe the bug
For fennel, parentheses are not colored. They maintain the default syntax color
Steps to reproduce
Install Fennel parser with nvim-treesitter along with this plugin with the default settings
Expected behavior
Parentheses should be colored like brackets and curly brackets, they are not
Describe the bug
Plugin works inconsistently - works fine on some languages or partly at others (i.e. only curly brackets colored)
Steps to reproduce
Absolute barebones setup - 3 plugins (packer.nvim, nvim-treesitter, nvim-ts-rainbow), absolute barebones config (enabled highlight and rainbow), no colorscheme, no other configurations whatsoever
Expected behavior
Colored brackets on something like {{{{{{}}}}}}
, [[[]]]
, ((()))
Screenshots
It actually sometimes changes when disabling TS' highlight (in this case square brackets changed a bit)
Rust, for example, works perfectly fine (although notice that deepest pair of round brackets are blue instead of purple)
YAML doesn't work at all
Lua work partly
:checkhealth
is fine, I also tried reinstalling treesitter completely...
NVIM v0.6.0-dev+324-ge8fb0728e
I am at loss about why it doesn't work honestly
I would like to suggest a feature to add support for specifying custom left and right delimeters, for example \left(
and \right)
pairs in LaTeX. It seems like \(
and \)
have already been implemented.
I have extended_mode
configured as true
, but do not see any rainbow parens set on my .tf
files, and I have hcl
installed for TreeSitter.
When I open up Fennel and Clojure files I see the pretty rainbow, but not when in Terraform files.
Are there any other things that I should check on settings to help give feedback on why they are not showing.
Thanks!
Describe the bug
Installed as per the readme but see no rainbow brackets (tried CSS/TS). Tried with both Tokyo Night and Everforest themes.
Using NVIM v0.6.0-dev+1607-g7d2233fad
:TSConfigInfo output:
{
ensure_installed = {},
ignore_install = {},
modules = {
highlight = {
additional_vim_regex_highlighting = false,
custom_captures = {},
disable = { "markdown" },
enable = true,
loaded = true,
module_path = "nvim-treesitter.highlight"
},
incremental_selection = {
disable = {},
enable = false,
keymaps = {
init_selection = "gnn",
node_decremental = "grm",
node_incremental = "grn",
scope_incremental = "grc"
},
module_path = "nvim-treesitter.incremental_selection"
},
indent = {
disable = {},
enable = false,
module_path = "nvim-treesitter.indent"
},
rainbow = {
colors = {},
disable = {},
enable = true,
extended_mode = true,
loaded = true,
module_path = "rainbow.internal",
termcolors = {}
}
},
update_strategy = "lockfile"
}
Also tried moving setup until after the colorscheme is set but makes no difference.
Steps to reproduce
Using this init.lua where everything else works as expected: https://gist.github.com/benfrain/97f2b91087121b2d4ba0dcc4202d252f try opening TS/CSS file
Expected behavior
To see rainbow brackets
Describe the bug
I'm seeing extremely slow performance inserting ([
around line 150 in a ~1600 line file. It takes ~20 seconds for the [
to insert. 😵
Steps to reproduce
let tree = BTreeMap::from([
[
before it appears.Expected behavior
Text should insert instantly.
Just wondering if there are plans to support in the future.
Doing :PlugUpdate
with vim-plug has failed for me a couple of times recently, with the following error:
x nvim-ts-rainbow:
fatal: Not possible to fast-forward, aborting.
When I check my local nvim-ts-rainbow
repository, it seems that my copy is behind the GitHub repository by seven commits and ahead by three.
I don't make changes to my local repository, so I'm not sure how this happened. One possible explanation is that history in this repository gets rewritten with git push --force
, which makes it impossible to update local remotes with a fast-forward only pull.
If this is what happened, could you please avoid this in the future to avoid breaking updates for your users? If this isn't what happened, it'd be useful to know what did so I can try to fix it. Thanks!
Describe the bug
There are no colors for matching brackets
Steps to reproduce
Install tree sitter,
(via vim plug) install p00f/nvim-ts-rainbow
open a jsx file.
lua <<EOF
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained",
highlight = {
enable = true,
additional_vim_regex_highlighting = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<leader>so",
node_incremental = "<leader>",
scope_incremental = "grc",
node_decremental = "grm",
},
autotag = {
enable = true,
},
rainbow = {
enable = true,
termcolors = {
"#E06C75",
"#E5C07B",
"#98C379",
"#56B6C2",
"#61AFEF",
"#C678DD",
"#E06C75"
},
colors = {
"#E06C75",
"#E5C07B",
"#98C379",
"#56B6C2",
"#61AFEF",
"#C678DD",
"#E06C75"
},
extended_mode = true,
max_file_lines = 1000,
},
indent = {
enable = true
},
}
}
EOF
**extra info:
:lua print(vim.inspect(colors))
Returns null nil
Expected behavior
Brackets should be colored.
when alias s=
is added to
PATH=$PATH:~/.local/bin
PATH=$PATH:~/.local/bin/goneovim
PATH=$PATH:~/.gem/ruby/2.7.0/bin
export GPG_TTY=$(tty)
export DIFFPROG='nvim -d'
Error executing lua callback: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:198: attempt to index local 'node' (a nil value)
is thrown on every keystroke (even backspace)
@vigoux (i hope you don't mind me tagging you, stuff gets lost in zulip 😅 )
Support for Common Lisp was recently added to Treesitter, I have already added the current main parens to my clone of the repo, the only ones necessary are square brackets and parenthesis.
Hi! Thank you a lot for the plugin!
I have a question. Can a plugin be enabled for languages that Treesetter does not currently support? For example, for Vimscript.
How can I make Vue work with this plugin?
Current look:
But other treesitter langs work fine, e.g. Fennel:
I have this one installed https://github.com/ikatyang/tree-sitter-vue
The queries for TypeScript should include all the ones for javascript too.
Right now, only <
and >
are matched.
I get the error below when opening a typescript file. Using the latest version of nvim-ts-rainbow.
Error detected while processing FileType Autocommands for "*":
E5108: Error executing lua ...ck/packer/start/nvim-ts-rainbow/lua/rainbow/internal.lua:45: attempt to index local 'query' (a nil value)
I only want to enable this plugin for clojure
, because I find the colours to be distracting in non-lisp languages.
Is there a way to do so?
P.S: Which is the colorscheme used on the latter screenshots, and which colours for the rainbows is it using?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.