diff options
Diffstat (limited to 'lua/plugins')
| -rw-r--r-- | lua/plugins/all-themes.lua | 101 | ||||
| -rw-r--r-- | lua/plugins/disable-news-alert.lua | 9 | ||||
| -rw-r--r-- | lua/plugins/example.lua | 197 | ||||
| -rw-r--r-- | lua/plugins/omarchy-theme-hotreload.lua | 91 | ||||
| -rw-r--r-- | lua/plugins/snacks-animated-scrolling-off.lua | 8 | ||||
| l--------- | lua/plugins/theme.lua | 1 |
6 files changed, 407 insertions, 0 deletions
diff --git a/lua/plugins/all-themes.lua b/lua/plugins/all-themes.lua new file mode 100644 index 0000000..bff3343 --- /dev/null +++ b/lua/plugins/all-themes.lua @@ -0,0 +1,101 @@ +return { + -- Load all theme plugins but don't apply them + -- This ensures all colorschemes are available for hot-reloading + { + "ribru17/bamboo.nvim", + lazy = true, + priority = 1000, + }, + { + "bjarneo/aether.nvim", + lazy = true, + priority = 1000, + }, + { + "bjarneo/ethereal.nvim", + lazy = true, + priority = 1000, + }, + { + "bjarneo/hackerman.nvim", + lazy = true, + priority = 1000, + }, + { + "bjarneo/vantablack.nvim", + lazy = true, + priority = 1000, + }, + { + "bjarneo/white.nvim", + lazy = true, + priority = 1000, + }, + { + "catppuccin/nvim", + name = "catppuccin", + lazy = true, + priority = 1000, + }, + { + "sainnhe/everforest", + lazy = true, + priority = 1000, + }, + { + "kepano/flexoki-neovim", + lazy = true, + priority = 1000, + }, + { + "ellisonleao/gruvbox.nvim", + lazy = true, + priority = 1000, + }, + { + "rebelot/kanagawa.nvim", + lazy = true, + priority = 1000, + }, + { + "tahayvr/matteblack.nvim", + lazy = true, + priority = 1000, + }, + { + "loctvl842/monokai-pro.nvim", + lazy = true, + priority = 1000, + }, + { + "shaunsingh/nord.nvim", + lazy = true, + priority = 1000, + }, + { + "rose-pine/neovim", + name = "rose-pine", + lazy = true, + priority = 1000, + }, + { + "folke/tokyonight.nvim", + lazy = true, + priority = 1000, + }, + { + "OldJobobo/miasma.nvim", + lazy = true, + priority = 1000, + }, + { + "OldJobobo/retro-82.nvim", + lazy = true, + priority = 1000, + }, + { + "omacom-io/lumon.nvim", + lazy = true, + priority = 1000, + }, +} diff --git a/lua/plugins/disable-news-alert.lua b/lua/plugins/disable-news-alert.lua new file mode 100644 index 0000000..5b3cd76 --- /dev/null +++ b/lua/plugins/disable-news-alert.lua @@ -0,0 +1,9 @@ +return { + "LazyVim/LazyVim", + opts = { + news = { + lazyvim = false, + neovim = false, + }, + }, +} diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua new file mode 100644 index 0000000..17f53d6 --- /dev/null +++ b/lua/plugins/example.lua @@ -0,0 +1,197 @@ +-- since this is just an example spec, don't actually load anything here and return an empty spec +-- stylua: ignore +if true then return {} end + +-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim +-- +-- In your plugin files, you can: +-- * add extra plugins +-- * disable/enabled LazyVim plugins +-- * override the configuration of LazyVim plugins +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, + + -- change trouble config + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = true }, + }, + + -- disable trouble + { "folke/trouble.nvim", enabled = false }, + + -- override nvim-cmp and add cmp-emoji + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "emoji" }) + end, + }, + + -- change some telescope options and a keymap to browse plugin files + { + "nvim-telescope/telescope.nvim", + keys = { + -- add a keymap to browse plugin files + -- stylua: ignore + { + "<leader>fp", + function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, + desc = "Find Plugin File", + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + }, + }, + }, + + -- add pyright to lspconfig + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- pyright will be automatically installed with mason and loaded with lspconfig + pyright = {}, + }, + }, + }, + + -- add tsserver and setup with typescript.nvim instead of lspconfig + { + "neovim/nvim-lspconfig", + dependencies = { + "jose-elias-alvarez/typescript.nvim", + init = function() + require("lazyvim.util").lsp.on_attach(function(_, buffer) + -- stylua: ignore + vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) + end) + end, + }, + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- tsserver will be automatically installed with mason and loaded with lspconfig + tsserver = {}, + }, + -- you can do any additional lsp server setup here + -- return true if you don't want this server to be setup with lspconfig + ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?> + setup = { + -- example to setup with typescript.nvim + tsserver = function(_, opts) + require("typescript").setup({ server = opts }) + return true + end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + }, + }, + + -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, + -- treesitter, mason and typescript.nvim. So instead of the above, you can use: + { import = "lazyvim.plugins.extras.lang.typescript" }, + + -- add more treesitter parsers + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + }, + + -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above + -- would overwrite `ensure_installed` with the new value. + -- If you'd rather extend the default config, use the code below instead: + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add tsx and treesitter + vim.list_extend(opts.ensure_installed, { + "tsx", + "typescript", + }) + end, + }, + + -- the opts function can also be used to change the default opts: + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, { + function() + return "😄" + end, + }) + end, + }, + + -- or you can return new options to override all the defaults + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function() + return { + --[[add your custom lualine config here]] + } + end, + }, + + -- use mini.starter instead of alpha + { import = "lazyvim.plugins.extras.ui.mini-starter" }, + + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, + + -- add any tools you want to have installed below + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "stylua", + "shellcheck", + "shfmt", + "flake8", + }, + }, + }, +} diff --git a/lua/plugins/omarchy-theme-hotreload.lua b/lua/plugins/omarchy-theme-hotreload.lua new file mode 100644 index 0000000..054ff29 --- /dev/null +++ b/lua/plugins/omarchy-theme-hotreload.lua @@ -0,0 +1,91 @@ +return { + { + name = "theme-hotreload", + dir = vim.fn.stdpath("config"), + lazy = false, + priority = 1000, + config = function() + local transparency_file = vim.fn.stdpath("config") .. "/plugin/after/transparency.lua" + + vim.api.nvim_create_autocmd("User", { + pattern = "LazyReload", + callback = function() + -- Unload the theme module + package.loaded["plugins.theme"] = nil + + vim.schedule(function() + local ok, theme_spec = pcall(require, "plugins.theme") + if not ok then + return + end + + -- Find the theme plugin and unload it + local theme_plugin_name = nil + for _, spec in ipairs(theme_spec) do + if spec[1] and spec[1] ~= "LazyVim/LazyVim" then + theme_plugin_name = spec.name or spec[1] + break + end + end + + -- Clear all highlight groups before applying new theme + vim.cmd("highlight clear") + if vim.fn.exists("syntax_on") then + vim.cmd("syntax reset") + end + + -- Reset background to default so colorscheme can set it properly (light themes will set to light) + vim.o.background = "dark" + + -- Unload theme plugin modules to force full reload + if theme_plugin_name then + local plugin = require("lazy.core.config").plugins[theme_plugin_name] + if plugin then + -- Unload all lua modules from the plugin directory + local plugin_dir = plugin.dir .. "/lua" + require("lazy.core.util").walkmods(plugin_dir, function(modname) + package.loaded[modname] = nil + package.preload[modname] = nil + end) + end + end + + -- Find and apply the new colorscheme + for _, spec in ipairs(theme_spec) do + if spec[1] == "LazyVim/LazyVim" and spec.opts and spec.opts.colorscheme then + local colorscheme = spec.opts.colorscheme + + -- Load the colorscheme plugin + require("lazy.core.loader").colorscheme(colorscheme) + + vim.defer_fn(function() + -- Apply the colorscheme (it will set background itself) + pcall(vim.cmd.colorscheme, colorscheme) + + -- Force redraw to update all UI elements + vim.cmd("redraw!") + + -- Reload transparency settings + if vim.fn.filereadable(transparency_file) == 1 then + vim.defer_fn(function() + vim.cmd.source(transparency_file) + + -- Trigger UI updates for various plugins + vim.api.nvim_exec_autocmds("ColorScheme", { modeline = false }) + vim.api.nvim_exec_autocmds("VimEnter", { modeline = false }) + + -- Final redraw + vim.cmd("redraw!") + end, 5) + end + end, 5) + + break + end + end + end) + end, + }) + end, + }, +} diff --git a/lua/plugins/snacks-animated-scrolling-off.lua b/lua/plugins/snacks-animated-scrolling-off.lua new file mode 100644 index 0000000..cbb0a58 --- /dev/null +++ b/lua/plugins/snacks-animated-scrolling-off.lua @@ -0,0 +1,8 @@ +return { + "folke/snacks.nvim", + opts = { + scroll = { + enabled = false, -- Disable scrolling animations + }, + }, +} diff --git a/lua/plugins/theme.lua b/lua/plugins/theme.lua new file mode 120000 index 0000000..fa23772 --- /dev/null +++ b/lua/plugins/theme.lua @@ -0,0 +1 @@ +/home/ngharo/.config/omarchy/current/theme/neovim.lua
\ No newline at end of file |
