Comments (13)
Also paste the text
from nvim-ts-rainbow.
It doesn't look like you require your plugins file? Does :PackerStatus
show nvim-ts-rainbow?
from nvim-ts-rainbow.
It doesn't work for any text, not just that text. I can just write a bunch of curly brackets in a lua file and get nothing.
from nvim-ts-rainbow.
Here's some nested tex code that should use the rainbow: \lim_{t\to0}\frac{1}{\sqrt{t^{2}+9}+3}
from nvim-ts-rainbow.
Can't reproduce, sorry. I'll keep this open so that someone who has this issue can help
from nvim-ts-rainbow.
load plugins by this order:
- this plugin
- bufferline
- colorschema
this plugins will not work when
- this plugin
- colorschema
- bufferline
from nvim-ts-rainbow.
emm, It's weird that it doesn't work in my first Buffer, but the second one works fine. But like I said above, tweaking Bufferline and colorschema has a chance to make this plugin work
from nvim-ts-rainbow.
@cathaysia Appreciate the suggestion, but no dice. I wonder if it's because I'm not using Neovim nightly.
from nvim-ts-rainbow.
Can reproduce for both NVIM v0.7.2
and NVIM v0.8.0-dev+1027-g4bf005e9f
.
plugins.lua
:
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use 'nvim-treesitter/nvim-treesitter'
require("nvim-treesitter.configs").setup {
ensure_installed = { "c", "lua", "rust", "java", "clojure" },
-- Automatically install missing parsers when entering buffer
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
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 = {"#666666", "#5544EE", "#2265DC", "#00A89B", "#229900", "#999900", "#F57900", "#EE66E8"}, -- table of hex strings
-- termcolors = {} -- table of colour name strings
}
}
-- Colorscheme
use 'kostafey/organicgreen.nvim'
vim.cmd[[colorscheme organicgreen]]
end)
:PackerStatus
packer.nvim - Total plugins: 7
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• neovim-session-manager
• notifier.nvim
• nvim-colorizer.lua
• organicgreen.nvim
• packer.nvim
• plenary.nvim
• telescope.nvim
from nvim-ts-rainbow.
If you defined {colors = { "#cc241d", "#a89984" }, termcolors = {}}
, you can't reproduce the issue. Because there are seven colors and termcolors in default config.
nvim-ts-rainbow/lua/rainbow.lua
Lines 29 to 46 in c641e22
If you defined colors more than seven,
colors = { "#cc241d", "#a89984", "#b16286", "#d79921", "#689d6a", "#d65d0e", "#458588", "#005f87" },
termcolors = {},
Or colors' length more than termcolors',
colors = { "#cc241d", "#a89984"},
termcolors = { 3 },
then the issue can be reproduced.
nvim-ts-rainbow/lua/rainbow/internal.lua
Lines 160 to 166 in c641e22
When termcolors[i]
is nil, setting highlight group will fail.
from nvim-ts-rainbow.
adoyle-h looks like I'm doing something completely wrong. But I can't enable plugin for seven colors too. The same story if I remove colors
and termcolors
lines from config at all.
nvim --version
NVIM v0.8.0-dev+1027-g4bf005e9f
:PackerStatus
packer.nvim - Total plugins: 2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• nvim-treesitter
• packer.nvim
The total config for test case:
~/.config/nvim/init.vim
:
lua require('plugins')
~/.config/nvim/lua/plugins.lua
:
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use 'nvim-treesitter/nvim-treesitter'
-- use 'p00f/nvim-ts-rainbow'
require("nvim-treesitter.configs").setup {
ensure_installed = { "c", "lua", "rust", "java", "clojure" },
-- Automatically install missing parsers when entering buffer
auto_install = true,
highlight = {
enable = true,
-- additional_vim_regex_highlighting = false,
},
rainbow = {
enable = true,
colors = {
"#cc241d",
"#a89984",
"#b16286",
"#d79921",
"#689d6a",
"#d65d0e",
"#458588",
},
termcolors = {
"Red",
"Green",
"Yellow",
"Blue",
"Magenta",
"Cyan",
"White",
},
}
}
end)
from nvim-ts-rainbow.
use 'p00f/nvim-ts-rainbow
is commented out @kostafey
from nvim-ts-rainbow.
@p00f oh, really. It works now. Thank you!
from nvim-ts-rainbow.
Related Issues (20)
- tsx html element change color too HOT 1
- Not sure whether it is a bug or expected behavour, but loading this extension plugin before any colorscheme throws error
- Tsx colors are the other way around HOT 5
- TSX colors still appear broken HOT 10
- JSX is not highlighted in files with `jsx` extension HOT 2
- Highlight `do` and `and` keywords for elixir HOT 3
- My rainbow doesn't work HOT 2
- Question: how to get vertical lines? HOT 1
- Update readme to mention how to install HOT 1
- Treesitter hl map has been removed in neovim nightly HOT 4
- Add support for Makefiles HOT 8
- Add EJS? HOT 5
- Colorized bracket inside python f-strings HOT 1
- Only work when execute :e to reload current file or :TSEnable rainbow HOT 10
- Autoformatting breaks highlights HOT 2
- Rainbow doesn't work in header file c HOT 6
- Lines with inline comments get wrong color HOT 1
- Rainbow Matching Pairs for JavaScript's styled-components Library HOT 5
- Colors of tags in tsx file are messed up after inserting new tag HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-ts-rainbow.