Skip to content

Commit 4bbf13d

Browse files
authored
Merge branch 'main' into fix-nvim-context-vt-1696
2 parents 9d36b2b + 086c6fc commit 4bbf13d

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

lua/astrocommunity/editing-support/rainbow-delimiters-nvim/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ Rainbow delimiters for Neovim with Tree-sitter
55
**Repository:** <https://github.com/HiPhish/rainbow-delimiters.nvim>
66

77
This is a hard fork of the nvim-ts-rainbow2 plugin & is recommended over it.
8+
9+
This plugin adds the following mappings:
10+
11+
- `<Leader>u(` toggles rainbow delimiters for the current buffer
12+
- `<Leader>u)` toggles rainbow delimiters globally

lua/astrocommunity/editing-support/rainbow-delimiters-nvim/init.lua

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local enabled = true
2+
13
return {
24
{
35
"HiPhish/rainbow-delimiters.nvim",
@@ -22,6 +24,21 @@ return {
2224
end,
2325
desc = "Toggle rainbow delimeters (buffer)",
2426
},
27+
["<Leader>u)"] = {
28+
function()
29+
local rainbow_delimiters = require "rainbow-delimiters"
30+
enabled = not enabled
31+
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
32+
if enabled then
33+
rainbow_delimiters.enable(bufnr)
34+
else
35+
rainbow_delimiters.disable(bufnr)
36+
end
37+
end
38+
require("astrocore").notify(string.format("Global rainbow delimeters %s", enabled and "on" or "off"))
39+
end,
40+
desc = "Toggle rainbow delimeters (global)",
41+
},
2542
},
2643
},
2744
},
@@ -40,7 +57,7 @@ return {
4057
opts = {
4158
condition = function(bufnr)
4259
local buf_utils = require "astrocore.buffer"
43-
return buf_utils.is_valid(bufnr) and not buf_utils.is_large(bufnr)
60+
return enabled and buf_utils.is_valid(bufnr) and not buf_utils.is_large(bufnr)
4461
end,
4562
},
4663
},

lua/astrocommunity/pack/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Requirements:** `python` must be in your `PATH` and executable
44

5-
This is the base Python pack that provides core functionality:
5+
The default Python pack imports the base pack plus the `basedpyright`, `black`, and `isort` subpacks. Import `astrocommunity.pack.python.base` directly if you only want core Python functionality:
66

77
- Adds `python` and `toml` Treesitter parsers
88
- Adds `debugpy` for debugging with `nvim-dap-python`

0 commit comments

Comments
 (0)