diff options
-rw-r--r-- | init.lua | 1 | ||||
-rw-r--r-- | lua/config.lua | 2 | ||||
-rw-r--r-- | lua/plugins.lua | 136 | ||||
-rw-r--r-- | lua/style.lua | 108 |
4 files changed, 135 insertions, 112 deletions
@@ -1,6 +1,5 @@ require("config") require("plugins") -require("style") require("formatting") require("functions") require("maps") diff --git a/lua/config.lua b/lua/config.lua index add765b..77ee5ee 100644 --- a/lua/config.lua +++ b/lua/config.lua @@ -1,3 +1,5 @@ +vim.o.background = "dark" + -- Indentation vim.o.tabstop = 4 vim.o.softtabstop = 4 diff --git a/lua/plugins.lua b/lua/plugins.lua index 35e8e72..281515c 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -2,6 +2,8 @@ LAZY_NVIM_REPO_URL = "https://github.com/folke/lazy.nvim.git" LAZY_NVIM_PATH = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" LAZY_NVIM_REF = "v11.14.1" +AYU_NVIM_PLUGIN_PRIO = 100 + local function bootstrap_plugin_manager() if not (vim.uv or vim.loop).fs_stat(LAZY_NVIM_PATH) then local out = vim.fn.system({ @@ -40,21 +42,136 @@ require("lazy").setup({ { "Shatur/neovim-ayu", commit = "d7a2b754c9f9be3c30e14a53d6cfda3e111edd24", + priority = AYU_NVIM_PLUGIN_PRIO, + main = "ayu", + opts = function() + local ayu_colors = require('ayu.colors') + + ayu_colors.generate() + + ayu_colors.entity = "#3EB8FF" + ayu_colors.tag = ayu_colors.fg + + -- The colors should not be regenerated + require("ayu.colors").generate = function() end + + return { + overrides = { + WinSeparator = { fg = ayu_colors.comment, bg = ayu_colors.bg }, + LineNrAbove = { fg = ayu_colors.comment }, + LineNrBelow = { fg = ayu_colors.comment }, + LineNr = { fg = ayu_colors.accent }, + TerminalWindow = { fg = ayu_colors.fg, bg = ayu_colors.panel_bg }, + ColorColumn = { bg = ayu_colors.error }, + RainbowRed ={ fg = "#E06C75" }, + RainbowYellow = { fg = "#E5C07B" }, + RainbowBlue = { fg = "#61AFEF" }, + RainbowOrange = { fg = "#D19A66" }, + RainbowGreen = { fg = "#98C379" }, + RainbowViolet = { fg = "#C678DD" }, + RainbowCyan = { fg = "#56B6C2" }, + } + } + end, + config = function(_, opts) + require("ayu").setup(opts) + + vim.cmd("colorscheme ayu") + end }, { "nvim-lualine/lualine.nvim", commit = "0a5a66803c7407767b799067986b4dc3036e1983", - dependencies = { "nvim-tree/nvim-web-devicons" } + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + options = { + theme = "ayu_dark", + globalstatus = true, + }, + } }, { "akinsho/bufferline.nvim", tag = "v4.6.1", - dependencies = { "nvim-tree/nvim-web-devicons" } + dependencies = { "nvim-tree/nvim-web-devicons" }, + priority = AYU_NVIM_PLUGIN_PRIO - 10, + opts = function() + local selected_buffer_bg = "#1E2126" + + local ayu_colors = require("ayu.colors") + + return { + options = { + style_preset = require("bufferline").style_preset.no_italic, + show_buffer_close_icons = false, + show_close_icon = false, + indicator = { + style = "none" + }, + diagnostics = "coc", + }, + highlights = { + buffer_selected = { + bg = selected_buffer_bg + }, + buffer_visible = { + bg = selected_buffer_bg + }, + diagnostic_selected = { + bg = selected_buffer_bg + }, + hint_selected = { + bg = selected_buffer_bg + }, + info_selected = { + bg = selected_buffer_bg + }, + warning_selected = { + bg = selected_buffer_bg + }, + error_selected = { + bg = selected_buffer_bg + }, + indicator_selected = { + fg = ayu_colors.accent + } + } + } + end }, { "lukas-reineke/indent-blankline.nvim", main = "ibl", tag = "v3.5.3", + priority = AYU_NVIM_PLUGIN_PRIO - 20, + opts = function() + return { + indent = { char = '¦' }, + scope = { + highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", + }, + show_start = false, + show_exact_scope = false + } + } + end, + config = function(_, opts) + require("ibl").setup(opts) + + local hooks = require "ibl.hooks" + + hooks.register( + hooks.type.SCOPE_HIGHLIGHT, + hooks.builtin.scope_highlight_from_extmark + ) + end }, -- Style end -- Telescope @@ -146,7 +263,20 @@ require("lazy").setup({ }, { "https://gitlab.com/HiPhish/rainbow-delimiters.nvim", - commit = "d227e6c9879bb50af35cd733461198666981d482" -- 0.6.2 + commit = "d227e6c9879bb50af35cd733461198666981d482", -- 0.6.2 + init = function() + vim.g.rainbow_delimiters = { + highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", + }, + } + end }, -- Syntax & formatting end -- Markdown diff --git a/lua/style.lua b/lua/style.lua deleted file mode 100644 index 365ea9a..0000000 --- a/lua/style.lua +++ /dev/null @@ -1,108 +0,0 @@ -vim.o.background = "dark" - -local ayu_colors = require('ayu.colors') - -ayu_colors.generate() - -ayu_colors.entity = "#3EB8FF" -ayu_colors.tag = ayu_colors.fg - --- The colors should not be regenerated -require("ayu.colors").generate = function() end - -require('ayu').setup({ - overrides = { - WinSeparator = { fg = ayu_colors.comment, bg = ayu_colors.bg }, - LineNrAbove = { fg = ayu_colors.comment }, - LineNrBelow = { fg = ayu_colors.comment }, - LineNr = { fg = ayu_colors.accent }, - TerminalWindow = { fg = ayu_colors.fg, bg = ayu_colors.panel_bg }, - ColorColumn = { bg = ayu_colors.error }, - } -}) - -vim.cmd("colorscheme ayu-dark") - -local ayu_dark_lualine_theme = require'lualine.themes.ayu_dark' - -require('lualine').setup({ - options = { - theme = ayu_dark_lualine_theme, - globalstatus = true, - }, -}) - -local bufferline = require("bufferline") - -local selected_buffer_bg = "#1E2126" - -bufferline.setup { - options = { - style_preset = bufferline.style_preset.no_italic, - show_buffer_close_icons = false, - show_close_icon = false, - indicator = { - style = "none" - }, - diagnostics = "coc", - }, - highlights = { - buffer_selected = { - bg = selected_buffer_bg - }, - buffer_visible = { - bg = selected_buffer_bg - }, - diagnostic_selected = { - bg = selected_buffer_bg - }, - hint_selected = { - bg = selected_buffer_bg - }, - info_selected = { - bg = selected_buffer_bg - }, - warning_selected = { - bg = selected_buffer_bg - }, - error_selected = { - bg = selected_buffer_bg - }, - indicator_selected = { - fg = ayu_colors.accent - } - } -} - -local highlight = { - "RainbowRed", - "RainbowYellow", - "RainbowBlue", - "RainbowOrange", - "RainbowGreen", - "RainbowViolet", - "RainbowCyan", -} - -local hooks = require "ibl.hooks" - --- create the highlight groups in the highlight setup hook, so they are reset --- every time the colorscheme changes -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) - -vim.g.rainbow_delimiters = { highlight = highlight } - -require("ibl").setup { - indent = { char = '¦' }, - scope = { highlight = highlight, show_start = false, show_exact_scope = false } -} - -hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) |