diff options
| author | Nicholas Hall <root@ngha.ro> | 2026-04-29 20:42:44 -0500 |
|---|---|---|
| committer | Nicholas Hall <root@ngha.ro> | 2026-04-29 20:42:44 -0500 |
| commit | b834788f7dc110e4a4f79b0356f1293d6d129b13 (patch) | |
| tree | bef6e26d08963096e192292c8d597d7f3301e2ba /lua | |
| parent | 7041a218d5cdcb6131697078e4422deb457c6cf0 (diff) | |
| download | nvim-lazyvim.tar.xz nvim-lazyvim.zip | |
Omarchy lazyvimlazyvim
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/config/autocmds.lua | 8 | ||||
| -rw-r--r-- | lua/config/keymaps.lua | 3 | ||||
| -rw-r--r-- | lua/config/lazy.lua | 53 | ||||
| -rw-r--r-- | lua/config/options.lua | 4 | ||||
| -rw-r--r-- | lua/core/mappings.lua | 2 | ||||
| -rw-r--r-- | lua/core/options.lua | 23 | ||||
| -rw-r--r-- | lua/core/plugins.lua | 53 | ||||
| -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 |
13 files changed, 475 insertions, 78 deletions
diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua new file mode 100644 index 0000000..4221e75 --- /dev/null +++ b/lua/config/autocmds.lua @@ -0,0 +1,8 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- +-- Add any additional autocmds here +-- with `vim.api.nvim_create_autocmd` +-- +-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) +-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua new file mode 100644 index 0000000..2c134f7 --- /dev/null +++ b/lua/config/keymaps.lua @@ -0,0 +1,3 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..d73bfa1 --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,53 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import/override with your plugins + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = { "tokyonight", "habamax" } }, + checker = { + enabled = true, -- check for plugin updates periodically + notify = false, -- notify on update + }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/lua/config/options.lua b/lua/config/options.lua new file mode 100644 index 0000000..f8b335b --- /dev/null +++ b/lua/config/options.lua @@ -0,0 +1,4 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here +vim.opt.relativenumber = false diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua deleted file mode 100644 index 3640341..0000000 --- a/lua/core/mappings.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.g.mapleader = " " -- easy to reach leader key -vim.keymap.set("n", "-", vim.cmd.Ex) -- need nvim 0.8+ diff --git a/lua/core/options.lua b/lua/core/options.lua deleted file mode 100644 index de4903f..0000000 --- a/lua/core/options.lua +++ /dev/null @@ -1,23 +0,0 @@ -vim.opt.tabstop = 2 -vim.opt.shiftwidth = 2 -vim.opt.shiftround = true -- round indent to sw compatible -vim.opt.expandtab = true - -vim.opt.mouse = 'a' -vim.opt.clipboard = 'unnamedplus' --- Case insensitive searching UNLESS /C or capital in search -vim.opt.ignorecase = true -vim.opt.smartcase = true - --- Better editor UI -vim.opt.number = true --- vim.opt.numberwidth = 3 -vim.opt.relativenumber = true --- vim.opt.signcolumn = 'yes:2' -vim.opt.signcolumn = 'yes' -vim.opt.cursorline = false -vim.opt.listchars = 'trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂,eol:⁋' -vim.diagnostic.config({ - -- virtual_lines = true, - virtual_text = true, -}) diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua deleted file mode 100644 index faeae4a..0000000 --- a/lua/core/plugins.lua +++ /dev/null @@ -1,53 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -require("lazy").setup({ - 'wbthomason/packer.nvim', - - -- Telescope and deps - { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, - 'nvim-telescope/telescope-symbols.nvim', - { - 'nvim-telescope/telescope.nvim', version = '0.1.5', - dependencies = { {'nvim-lua/plenary.nvim'} } - }, - - -- color scheme - { 'rose-pine/neovim', name = 'rose-pine' }, - - -- visual undo - 'mbbill/undotree', - - -- lsp - { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v3.x', - dependencies = { - --- Uncomment these if you want to manage LSP servers from neovim - -- {'williamboman/mason.nvim'}, - -- {'williamboman/mason-lspconfig.nvim'}, - - -- LSP Support - {'neovim/nvim-lspconfig'}, - -- Autocompletion - {'hrsh7th/nvim-cmp'}, - {'hrsh7th/cmp-nvim-lsp'}, - {'L3MON4D3/LuaSnip'}, - } - }, - - { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons', lazy = true } - } -}) 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 |
