summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorbh <qn+git@excalibur.computer>2025-11-19 19:39:14 +0800
committerbh <qn+git@excalibur.computer>2025-11-19 19:39:14 +0800
commit10e476e0f97d0a7c8d359aba270f68066a332583 (patch)
tree62fe7fc4693517778d919a207536143464c136cc /lua
parent8899689ea8f0db082aaa58968a40146db87c98c6 (diff)
Added indents
Diffstat (limited to 'lua')
-rw-r--r--lua/config/indent.lua39
-rw-r--r--lua/plugins/init.lua11
2 files changed, 49 insertions, 1 deletions
diff --git a/lua/config/indent.lua b/lua/config/indent.lua
new file mode 100644
index 0000000..e703212
--- /dev/null
+++ b/lua/config/indent.lua
@@ -0,0 +1,39 @@
+-- ~/.config/nvim/lua/config/indent.lua
+return function()
+ local ibl = require("ibl")
+ local hooks = require("ibl.hooks")
+
+ -- Define your highlight colors
+ local highlight = {
+ "RainbowRed",
+ "RainbowYellow",
+ "RainbowBlue",
+ "RainbowOrange",
+ "RainbowGreen",
+ "RainbowViolet",
+ "RainbowCyan",
+ }
+
+ -- Register hook to set highlights (resets on colorscheme change)
+ hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
+ vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
+ vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
+ vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
+ vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
+ vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
+ vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
+ vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
+ end)
+
+ -- Setup ibl with your highlights
+ ibl.setup {
+ indent = {
+ highlight = highlight,
+ },
+ exclude = {
+ filetypes = { "dashboard", "alpha", "help", "neo-tree", "NvimTree", "lazy" },
+ buftypes = { "nofile", "terminal" }, -- optional but useful
+ },
+ }
+end
+
diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua
index d9bf221..c0ce35c 100644
--- a/lua/plugins/init.lua
+++ b/lua/plugins/init.lua
@@ -1,7 +1,7 @@
-- ~/.config/nvim/lua/plugins/init.lua
return {
-- LSP
- {
+ {
"neovim/nvim-lspconfig",
config = function()
require("config.lsp")() -- note the () if your lsp.lua returns a function
@@ -108,6 +108,15 @@ return {
config = require("config.tabs"),
},
+ {
+ "lukas-reineke/indent-blankline.nvim",
+ main = "ibl",
+ ---@module "ibl"
+ ---@type ibl.config
+ opts = {},
+ config = require("config.indent"),
+ },
+
-- Dashboard
{ "nvimdev/dashboard-nvim", event = "VimEnter", dependencies = { "nvim-tree/nvim-web-devicons" }, config = require("config.dashboard") },