Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add nvim-treesitter-context integration #265

Merged
merged 3 commits into from
Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This port of Catppuccin is special because it was the first one and the one that
- [Compile](https://github.com/catppuccin/nvim#Compile) user config for faster startuptime
- Integrations with a bunch of plugins:
- [Treesitter](https://github.com/tree-sitter/tree-sitter)
- [Nvim-Treesitter-Context](https://github.com/nvim-treesitter/nvim-treesitter-context)
- [Native LSP](https://github.com/neovim/nvim-lspconfig)
- [Telescope](https://github.com/nvim-telescope/telescope.nvim)
- [Feline](https://github.com/feline-nvim/feline.nvim)
Expand Down Expand Up @@ -145,6 +146,7 @@ require("catppuccin").setup({
},
integrations = {
treesitter = true,
treesitter_context = true,
native_lsp = {
enabled = true,
virtual_text = {
Expand Down
1 change: 1 addition & 0 deletions lua/catppuccin/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ local default_config = {
},
integrations = {
treesitter = true,
treesitter_context = true,
native_lsp = {
enabled = true,
virtual_text = {
Expand Down
13 changes: 13 additions & 0 deletions lua/catppuccin/groups/integrations/treesitter_context.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
local M = {}

function M.get()
return {
TreesitterContext = {
bg = cnf.transparent_background and cp.none or cp.mantle,
fg = cp.text,
},
TreesitterContextLineNumber = { fg = cp.surface1 },
}
end

return M