diff options
| author | ache <ache@ache.one> | 2024-08-09 05:59:38 +0200 |
|---|---|---|
| committer | ache <ache@ache.one> | 2024-08-09 05:59:38 +0200 |
| commit | d597aa01b811afa3962a0ca5127d28f2cea3cd1e (patch) | |
| tree | 6be29887d943ee289b5788a312a23347f67f13b1 | |
| parent | Set bufferline shortcuts (diff) | |
Support for multiple colorschemes
| -rw-r--r-- | lua/ache/lazy.lua | 42 | ||||
| -rw-r--r-- | lua/ache/plugins/lualine.lua | 115 | ||||
| -rw-r--r-- | lua/ache/plugins/night-owl.lua | 10 | ||||
| -rw-r--r-- | lua/ache/plugins/telescope.lua | 128 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/catppuccin.lua | 9 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/cyberdream.lua | 4 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/github-nvim-theme.lua | 9 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/night-owl.lua | 9 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/nightfox.lua | 10 | ||||
| -rw-r--r-- | lua/ache/plugins/themes/tokyonight.lua | 5 |
10 files changed, 207 insertions, 134 deletions
diff --git a/lua/ache/lazy.lua b/lua/ache/lazy.lua index 756330c..50bc70c 100644 --- a/lua/ache/lazy.lua +++ b/lua/ache/lazy.lua @@ -2,27 +2,29 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) -require("lazy").setup( - { { import = "ache.plugins" }, { import = "ache.plugins.lsp" }, { import = "ache.plugins.llm" } }, - { - checker = { - enabled = true, - notify = false, - }, - change_detection = { - notify = false, - }, - } -) -- Will list every lua file in the directory and load them. +require("lazy").setup({ + { import = "ache.plugins.themes" }, + { import = "ache.plugins" }, + { import = "ache.plugins.lsp" }, + { import = "ache.plugins.llm" }, +}, { + checker = { + enabled = true, + notify = false, + }, + change_detection = { + notify = false, + }, +}) -- Will list every lua file in the directory and load them. diff --git a/lua/ache/plugins/lualine.lua b/lua/ache/plugins/lualine.lua index 75b9b09..7da4424 100644 --- a/lua/ache/plugins/lualine.lua +++ b/lua/ache/plugins/lualine.lua @@ -1,61 +1,62 @@ return { - "nvim-lualine/lualine.nvim", - event = "VimEnter", - dependencies = { - "nvim-tree/nvim-web-devicons", - { - "linrongbin16/lsp-progress.nvim", - opts = {}, - enabled = false, - }, - { - "nvim-lua/lsp-status.nvim", - -- config = function() - -- local lsp_status = require("lsp-status") - -- - -- lsp_status.register_progress() - -- end, - enabled = false, - }, - }, - config = function(_, opts) - local lualine = require("lualine") - local lazy_status = require("lazy.status") + "nvim-lualine/lualine.nvim", + event = "VimEnter", + dependencies = { + "nvim-tree/nvim-web-devicons", + { + "linrongbin16/lsp-progress.nvim", + opts = {}, + enabled = false, + }, + { + "nvim-lua/lsp-status.nvim", + -- config = function() + -- local lsp_status = require("lsp-status") + -- + -- lsp_status.register_progress() + -- end, + enabled = false, + }, + }, + config = function(_, opts) + local lualine = require("lualine") + local lazy_status = require("lazy.status") + opts.theme = "night-owl" - opts.sections.lualine_x = { - { "location" }, - { - lazy_status.updates, - cond = lazy_status.has_updates, - color = { fg = "#dd9e64" }, - }, - { "encoding" }, - { "fileformat" }, - { "filetype" }, - } - lualine.setup(opts) + opts.sections.lualine_x = { + { "location" }, + { + lazy_status.updates, + cond = lazy_status.has_updates, + color = { fg = "#dd9e64" }, + }, + { "encoding" }, + { "fileformat" }, + { "filetype" }, + } + lualine.setup(opts) - -- To use with lsp-progress - -- vim.api.nvim_create_augroup("lualine_augroup", { clear = true }) - -- vim.api.nvim_create_autocmd("User", { - -- group = "lualine_augroup", - -- pattern = "LspProgressStatusUpdated", - -- callback = require("lualine").refresh, - -- }) - end, - opts = { - sections = { - ---- To use lsp-status.nvim / works not realy well - -- lualine_c = { - -- "filename", - -- function() - -- if #vim.lsp.get_clients() > 0 then - -- return require("lsp-status").status() - -- else - -- return "Lol" - -- end - -- end, - -- }, - }, - }, + -- To use with lsp-progress + -- vim.api.nvim_create_augroup("lualine_augroup", { clear = true }) + -- vim.api.nvim_create_autocmd("User", { + -- group = "lualine_augroup", + -- pattern = "LspProgressStatusUpdated", + -- callback = require("lualine").refresh, + -- }) + end, + opts = { + sections = { + ---- To use lsp-status.nvim / works not realy well + -- lualine_c = { + -- "filename", + -- function() + -- if #vim.lsp.get_clients() > 0 then + -- return require("lsp-status").status() + -- else + -- return "Lol" + -- end + -- end, + -- }, + }, + }, } diff --git a/lua/ache/plugins/night-owl.lua b/lua/ache/plugins/night-owl.lua deleted file mode 100644 index 1d3a025..0000000 --- a/lua/ache/plugins/night-owl.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "oxfist/night-owl.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - require("night-owl").setup() - vim.cmd.colorscheme("night-owl") - end, -} diff --git a/lua/ache/plugins/telescope.lua b/lua/ache/plugins/telescope.lua index 4696a4d..55b6c4a 100644 --- a/lua/ache/plugins/telescope.lua +++ b/lua/ache/plugins/telescope.lua @@ -1,52 +1,86 @@ return { - "nvim-telescope/telescope.nvim", - branch = "0.1.x", - dependencies = { - "nvim-lua/plenary.nvim", - { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - }, - "nvim-tree/nvim-web-devicons", - "folke/todo-comments.nvim", - "tiagovla/scope.nvim", - }, - -- TODO - config = function() - local telescope = require("telescope") - local actions = require("telescope.actions") - -- TODO: lqsdjflkqjsdf + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + }, + "nvim-tree/nvim-web-devicons", + "folke/todo-comments.nvim", + "tiagovla/scope.nvim", + }, + -- TODO + config = function() + local telescope = require("telescope") + local actions = require("telescope.actions") + -- TODO: lqsdjflkqjsdf - telescope.setup({ - defaults = { - path_display = { "smart" }, - mappings = { - i = { - ["<C-k>"] = actions.move_selection_previous, -- move tot prev result - ["<C-j>"] = actions.move_selection_next, - ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, - ["<C-u>"] = false, - ["<C-d>"] = actions.close, - }, - }, - sorting_strategy = "ascending", - layout_strategy = "horizontal", - layout_config = { - prompt_position = "top", - }, - borderchars = { "─", "│", "─", "│", "r", "╮", "╯", "╰" }, - color_devicons = true, - }, - }) + telescope.setup({ + defaults = { + path_display = { "smart" }, + mappings = { + i = { + ["<C-k>"] = actions.move_selection_previous, -- move tot prev result + ["<C-j>"] = actions.move_selection_next, + ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, + ["<C-u>"] = false, + ["<C-d>"] = actions.close, + }, + }, + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + prompt_position = "top", + }, + borderchars = { "─", "│", "─", "│", "r", "╮", "╯", "╰" }, + color_devicons = true, + }, + pickers = { + colorscheme = { + enable_preview = true, + ignore_builtins = true, + colors = { + "nightfox", + "duskfox", + "dawnfox", + "terafox", + "carbonfox", + "night-owl", + "catppuccin-latte", + "catppuccin-mocha", + "catppuccin-frappe", + "catppuccin-macchiato", + "tokyonight", + "tokyonight-day", + "tokyonight-night", + "tokyonight-moon", + "tokyonight-storm", + "github_dark", + "github_dark_colorblind", + "github_light_high_contrast", + }, + }, + }, + }) - telescope.load_extension("fzf") - telescope.load_extension("scope") + telescope.load_extension("fzf") + telescope.load_extension("scope") - vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" }) - vim.keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recet files" }) - vim.keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" }) - vim.keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" }) - vim.keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" }) - vim.keymap.set("n", "<leader>fb", "<cmd>Telescope scope buffers<CR>", { desc = "Find in buffers" }) - end, + vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" }) + vim.keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recet files" }) + vim.keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" }) + vim.keymap.set( + "n", + "<leader>fc", + "<cmd>Telescope grep_string<cr>", + { desc = "Find string under cursor in cwd" } + ) + vim.keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" }) + vim.keymap.set("n", "<leader>fb", "<cmd>Telescope scope buffers<CR>", { desc = "Find in buffers" }) + + -- Colorscheme picker + vim.keymap.set("n", "<leader>cc", "<cmd>Telescope colorscheme<CR>", { desc = "Switch colorscheme" }) + end, } diff --git a/lua/ache/plugins/themes/catppuccin.lua b/lua/ache/plugins/themes/catppuccin.lua new file mode 100644 index 0000000..502ca18 --- /dev/null +++ b/lua/ache/plugins/themes/catppuccin.lua @@ -0,0 +1,9 @@ +return { + "catppuccin/nvim", + name = "catppuccin", + lazy = true, + config = function() + require("catppuccin").setup({ background = { dark = "latte" } }) + vim.cmd.colorscheme("catppuccin-latte") + end, +} diff --git a/lua/ache/plugins/themes/cyberdream.lua b/lua/ache/plugins/themes/cyberdream.lua new file mode 100644 index 0000000..55f89cc --- /dev/null +++ b/lua/ache/plugins/themes/cyberdream.lua @@ -0,0 +1,4 @@ +return { + "scottmckendry/cyberdream.nvim", + lazy = true, +} diff --git a/lua/ache/plugins/themes/github-nvim-theme.lua b/lua/ache/plugins/themes/github-nvim-theme.lua new file mode 100644 index 0000000..644dd6a --- /dev/null +++ b/lua/ache/plugins/themes/github-nvim-theme.lua @@ -0,0 +1,9 @@ +return { + "projekt0n/github-nvim-theme", + lazy = true, + config = function() + require("github-theme").setup({}) + + vim.cmd("colorscheme github_dark") + end, +} diff --git a/lua/ache/plugins/themes/night-owl.lua b/lua/ache/plugins/themes/night-owl.lua new file mode 100644 index 0000000..024e6ea --- /dev/null +++ b/lua/ache/plugins/themes/night-owl.lua @@ -0,0 +1,9 @@ +return { + "oxfist/night-owl.nvim", + lazy = true, + config = function() + -- load the colorscheme here + require("night-owl").setup() + vim.cmd.colorscheme("night-owl") + end, +} diff --git a/lua/ache/plugins/themes/nightfox.lua b/lua/ache/plugins/themes/nightfox.lua new file mode 100644 index 0000000..ae2d8cf --- /dev/null +++ b/lua/ache/plugins/themes/nightfox.lua @@ -0,0 +1,10 @@ +return { + "EdenEast/nightfox.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- default priority is 50 + config = function() + -- load the colorscheme here + require("nightfox").setup() + vim.cmd.colorscheme("nightfox") + end, +} diff --git a/lua/ache/plugins/themes/tokyonight.lua b/lua/ache/plugins/themes/tokyonight.lua new file mode 100644 index 0000000..bfc0750 --- /dev/null +++ b/lua/ache/plugins/themes/tokyonight.lua @@ -0,0 +1,5 @@ +return { + "folke/tokyonight.nvim", + lazy = true, + opts = {}, +} |