Other

项目介绍

ribru17/bamboo.nvim 是一个托管在 GitHub 上的开源项目,主要使用 Lua 编写,采用 Other 许可证,目前获得 498 个 Star、25 次 Fork。

仓库全名
ribru17/bamboo.nvim
开源许可证
Other
Star 数
498
Fork 数
25
未关闭 Issue
5

README 摘要

bamboo.nvim Dark green theme for Neovim $\ge$ 0.9 forked from OneDark.nvim. Theme written in Lua with Tree-sitter syntax highlighting and LSP semantic highlighting. For earlier versions of Neovim and/or Tree-sitter, pin the color scheme to this commit. Features Blue and purple are used sparingly to help reduce eye strain Red, yellow, and green are prioritized more for the same reason Comments are colored…

完整内容见 GitHub 原始 README 或本页 。

常见问题

bamboo.nvim 用什么语言开发?

主要使用 Lua 编写,采用 Other 许可证,目前有 498 个 Star。

bamboo.nvim 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 bamboo.nvim 的源码?

可以直接克隆仓库:git clone https://github.com/ribru17/bamboo.nvim.git,默认分支为 master;安装与运行步骤见仓库 README。

bamboo.nvim 最近还在维护吗?

仓库最近一次更新为 2025年11月25日,当前有 5 个未关闭 Issue;Star 数为 498,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Warm Green Theme for Neovim and Beyond

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Lua
Shell

README

bamboo.nvim

Dark green theme for Neovim $\ge$ 0.9 forked from OneDark.nvim. Theme written in Lua with Tree-sitter syntax highlighting and LSP semantic highlighting.

For earlier versions of Neovim and/or Tree-sitter, pin the color scheme to this commit.

Features

  • Blue and purple are used sparingly to help reduce eye strain
  • Red, yellow, and green are prioritized more for the same reason
  • Comments are colored specifically to be readable and have good contrast with other text and background
  • Many semantic highlighting tokens are handled and colored nicely
  • Light and dark variants
    • Light mode only applies when vim.o.background = 'light' (can also use set background=light)
  • Multiple plugins are supported with hand-picked, proper colors
  • Colors, highlights, and code style of the theme can be customized as you like (refer to Customization)
  • Integration with other applications (see the extras directory)

Regular (vulgaris)

Click to toggle previews

bamboo md bamboo lua

Greener (multiplex)

Click to toggle previews

bamboo multiplex md bamboo multiplex lua

Light Mode (light)

Click to toggle previews

bamboo light md bamboo light lua


Note 注意

The above screenshots utilize Tree-sitter parsers for lua, luap, comment, markdown, markdown_inline, mermaid, and latex.

The lua file screenshot also uses a custom query to highlight the vim global as a builtin variable rather than a constant, changing it from pink to red. If you want this behavior, add the following to a queries/lua/highlights.scm file in your config directory (the extends comment is necessary):

; extends
((identifier) @variable.builtin
  (#eq? @variable.builtin "vim")
  (#set! "priority" 128))

Installation

Install via your favorite package manager:

-- Using lazy.nvim
{
  'ribru17/bamboo.nvim',
  lazy = false,
  priority = 1000,
  config = function()
    require('bamboo').setup {
      -- optional configuration here
    }
    require('bamboo').load()
  end,
},
Tip 提示

For best results, use (rounded) borders for float windows (or change their background to a slightly different color than the main editor background).

Configuration

Enable theme

-- Lua
require('bamboo').load()
" Vim
colorscheme bamboo

Default Configuration

-- Lua
require('bamboo').setup {
  -- Main options --
  -- NOTE: to use the light theme, set `vim.o.background = 'light'`
  style = 'vulgaris', -- Choose between 'vulgaris' (regular), 'multiplex' (greener), and 'light'
  toggle_style_key = nil, -- Keybind to toggle theme style. Leave it nil to disable it, or set it to a string, e.g. "<leader>ts"
  toggle_style_list = { 'vulgaris', 'multiplex', 'light' }, -- List of styles to toggle between
  transparent = false, -- Show/hide background
  dim_inactive = false, -- Dim inactive windows/buffers
  term_colors = true, -- Change terminal color as per the selected theme style
  ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
  cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu

  -- Change code style ---
  -- Options are anything that can be passed to the `vim.api.nvim_set_hl` table
  -- You can also configure styles with a string, e.g. keywords = 'italic,bold'
  code_style = {
    comments = { italic = true },
    conditionals = { italic = true },
    keywords = {},
    functions = {},
    namespaces = { italic = true },
    parameters = { italic = true },
    strings = {},
    variables = {},
  },

  -- Lualine options --
  lualine = {
    transparent = false, -- lualine center bar transparency
  },

  -- Custom Highlights --
  colors = {}, -- Override default colors
  highlights = {}, -- Override highlight groups

  -- Plugins Config --
  diagnostics = {
    darker = false, -- darker colors for diagnostic
    undercurl = true, -- use undercurl instead of underline for diagnostics
    background = true, -- use background color for virtual text
  },
}

Vimscript Configuration

Bamboo can be configured also with Vimscript, using the global dictionary g:bamboo_config. NOTE: when setting boolean values use v:true and v:false instead of 0 and 1.

Example:

let g:bamboo_config = {
  \ 'ending_tildes': v:true,
  \ 'diagnostics': {
    \ 'darker': v:true,
    \ 'background': v:false,
  \ },
\ }
colorscheme bamboo

Customization

Example using custom colors and highlights:

require('bamboo').setup {
  colors = {
    bright_orange = '#ff8800', -- define a new color
    green = '#00ffaa', -- redefine an existing color
  },
  highlights = {
    -- make comments blend nicely with background, similar to other color schemes
    ['@comment'] = { fg = '$grey' },

    ['@keyword'] = { fg = '$green' },
    ['@string'] = { fg = '$bright_orange', bg = '#00ff00', fmt = 'bold' },
    ['@function'] = { fg = '#0000ff', sp = '$cyan', fmt = 'underline,italic' },
    ['@function.builtin'] = { fg = '#0059ff' },
  },
}

Note that Tree-sitter keywords have been changed after Neovim version 0.8 and onwards. TS prefix is trimmed and lowercase words are separated with ..

The old way before neovim 0.8 looks like this. All highlights used in this colorscheme can be found in this file.

require('bamboo').setup {
  colors = {
    bright_orange = '#ff8800', -- define a new color
    green = '#00ffaa', -- redefine an existing color
  },
  highlights = {
    TSKeyword = { fg = '$green' },
    TSString = { fg = '$bright_orange', bg = '#00ff00', fmt = 'bold' },
    TSFunction = { fg = '#0000ff', sp = '$cyan', fmt = 'underline,italic' },
    TSFuncBuiltin = { fg = '#0059ff' },
  },
}

Plugins Supported

Reference

License

MIT

评论

暂无评论