diff options
| author | José Juan Loeza Sierra <jj@xz6ze.com> | 2025-11-07 23:42:52 -0800 |
|---|---|---|
| committer | José Juan Loeza Sierra <jj@xz6ze.com> | 2025-11-07 23:53:00 -0800 |
| commit | 5dc89fe9789701abbe4a73c2998d397a6d7d964c (patch) | |
| tree | cf43ae482b0c2bbfabd3370faf127a4e21a21086 /dot-config/nvim-old/lua/plugins | |
| parent | 617c3b29dbf03322ef3ccb0cd9663532e94adb68 (diff) | |
replace lazyvim with custom config
Diffstat (limited to 'dot-config/nvim-old/lua/plugins')
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/example.lua | 197 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/handlebars.lua | 26 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/hardtime.lua | 16 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/hledger.lua | 18 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/lualine.lua | 16 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/markdown.lua | 37 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/multicursor.lua | 85 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/theme.lua | 227 | ||||
| -rw-r--r-- | dot-config/nvim-old/lua/plugins/yaml.lua | 10 |
9 files changed, 632 insertions, 0 deletions
diff --git a/dot-config/nvim-old/lua/plugins/example.lua b/dot-config/nvim-old/lua/plugins/example.lua new file mode 100644 index 0000000..17f53d6 --- /dev/null +++ b/dot-config/nvim-old/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/dot-config/nvim-old/lua/plugins/handlebars.lua b/dot-config/nvim-old/lua/plugins/handlebars.lua new file mode 100644 index 0000000..b09dc3c --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/handlebars.lua @@ -0,0 +1,26 @@ +-- add language support for handlebars (.hbs) + +return { + + -- glimmer is the treesitter parser for handlebars + -- see https://github.com/nvim-treesitter/nvim-treesitter + { + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "glimmer" } }, + }, + + -- we can use djLint to format handlebars + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + handlebars = { "djlint" }, + }, + formatters = { + djlint = { + prepend_args = { "--preserve-blank-lines" }, + }, + }, + }, + }, +} diff --git a/dot-config/nvim-old/lua/plugins/hardtime.lua b/dot-config/nvim-old/lua/plugins/hardtime.lua new file mode 100644 index 0000000..8e8078a --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/hardtime.lua @@ -0,0 +1,16 @@ +-- https://github.com/m4xshen/hardtime.nvim +return { + "m4xshen/hardtime.nvim", + lazy = false, + dependencies = { "MunifTanjim/nui.nvim" }, + opts = { + -- re-enable <up> <down> <left> <right> + -- for use with mutlicursor.nvim + disabled_keys = { + ["<Up>"] = false, + ["<Down>"] = false, + ["<Left>"] = false, + ["<Right>"] = false, + }, + }, +} diff --git a/dot-config/nvim-old/lua/plugins/hledger.lua b/dot-config/nvim-old/lua/plugins/hledger.lua new file mode 100644 index 0000000..240d0a6 --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/hledger.lua @@ -0,0 +1,18 @@ +-- add language support for hledger +-- based on options from https://www.lazyvim.org/extras/lang/astro + +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "ledger" } }, + }, + + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + ledger = { "hledger-fmt" }, + }, + }, + }, +} diff --git a/dot-config/nvim-old/lua/plugins/lualine.lua b/dot-config/nvim-old/lua/plugins/lualine.lua new file mode 100644 index 0000000..d71612a --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/lualine.lua @@ -0,0 +1,16 @@ +local wc = require("wordcount") + +return { + "nvim-lualine/lualine.nvim", + opts = { + sections = { + lualine_y = { + -- Add wordcount + { wc.wordcount, cond = wc.is_available }, + -- Existing conf + { "progress", separator = " ", padding = { left = 1, right = 0 } }, + { "location", padding = { left = 0, right = 1 } }, + }, + }, + }, +} diff --git a/dot-config/nvim-old/lua/plugins/markdown.lua b/dot-config/nvim-old/lua/plugins/markdown.lua new file mode 100644 index 0000000..48c957d --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/markdown.lua @@ -0,0 +1,37 @@ +return { + { + -- Disable linting + "mfussenegger/nvim-lint", + optional = true, + opts = { + linters_by_ft = { + markdown = {}, + }, + }, + }, + { + "MeanderingProgrammer/render-markdown.nvim", + opts = { + html = { + comment = { + -- Turn on / off HTML comment concealing. + conceal = false, + }, + }, + code = { + -- Whether to conceal nodes at the top and bottom of code blocks. + conceal_delimiters = false, + -- Width of the code block background. + -- | block | width of the code block | + -- | full | full width of the window | + width = "block", + -- Determines how the top / bottom of code block are rendered. + -- | none | do not render a border | + -- | thick | use the same highlight as the code body | + -- | thin | when lines are empty overlay the above & below icons | + -- | hide | conceal lines unless language name or icon is added | + border = "thick", + }, + }, + }, +} diff --git a/dot-config/nvim-old/lua/plugins/multicursor.lua b/dot-config/nvim-old/lua/plugins/multicursor.lua new file mode 100644 index 0000000..6e81074 --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/multicursor.lua @@ -0,0 +1,85 @@ +-- this is the example config shown at https://github.com/jake-stewart/multicursor.nvim/blob/main/readme.md +-- with the additional changes necessary to work with LazyVIm + +return { + "jake-stewart/multicursor.nvim", + branch = "1.0", + + -- the following changes are necessary to work with LazyVim + -- see https://github.com/jake-stewart/multicursor.nvim/issues/107 + keys = { "<up>", "<down>" }, -- explicitly tell LazyVim used keys to avoid replace + lazy = false, -- avoid lazy trying to lazy load based on those keys + + config = function() + local mc = require("multicursor-nvim") + mc.setup() + + local set = vim.keymap.set + + -- Add or skip cursor above/below the main cursor. + set({ "n", "x" }, "<up>", function() + mc.lineAddCursor(-1) + end) + set({ "n", "x" }, "<down>", function() + mc.lineAddCursor(1) + end) + set({ "n", "x" }, "<leader><up>", function() + mc.lineSkipCursor(-1) + end) + set({ "n", "x" }, "<leader><down>", function() + mc.lineSkipCursor(1) + end) + + -- Add or skip adding a new cursor by matching word/selection + set({ "n", "x" }, "<leader>n", function() + mc.matchAddCursor(1) + end) + set({ "n", "x" }, "<leader>s", function() + mc.matchSkipCursor(1) + end) + set({ "n", "x" }, "<leader>N", function() + mc.matchAddCursor(-1) + end) + set({ "n", "x" }, "<leader>S", function() + mc.matchSkipCursor(-1) + end) + + -- Add and remove cursors with control + left click. + set("n", "<c-leftmouse>", mc.handleMouse) + set("n", "<c-leftdrag>", mc.handleMouseDrag) + set("n", "<c-leftrelease>", mc.handleMouseRelease) + + -- Disable and enable cursors. + set({ "n", "x" }, "<c-q>", mc.toggleCursor) + + -- Mappings defined in a keymap layer only apply when there are + -- multiple cursors. This lets you have overlapping mappings. + mc.addKeymapLayer(function(layerSet) + -- Select a different cursor as the main one. + layerSet({ "n", "x" }, "<left>", mc.prevCursor) + layerSet({ "n", "x" }, "<right>", mc.nextCursor) + + -- Delete the main cursor. + layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor) + + -- Enable and clear cursors using escape. + layerSet("n", "<esc>", function() + if not mc.cursorsEnabled() then + mc.enableCursors() + else + mc.clearCursors() + end + end) + end) + + -- Customize how cursors look. + local hl = vim.api.nvim_set_hl + hl(0, "MultiCursorCursor", { reverse = true }) + hl(0, "MultiCursorVisual", { link = "Visual" }) + hl(0, "MultiCursorSign", { link = "SignColumn" }) + hl(0, "MultiCursorMatchPreview", { link = "Search" }) + hl(0, "MultiCursorDisabledCursor", { reverse = true }) + hl(0, "MultiCursorDisabledVisual", { link = "Visual" }) + hl(0, "MultiCursorDisabledSign", { link = "SignColumn" }) + end, +} diff --git a/dot-config/nvim-old/lua/plugins/theme.lua b/dot-config/nvim-old/lua/plugins/theme.lua new file mode 100644 index 0000000..166c3a9 --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/theme.lua @@ -0,0 +1,227 @@ +return { + -- gruvbox material + -- https://github.com/sainnhe/gruvbox-material + { + "sainnhe/gruvbox-material", + lazy = false, + priority = 1000, + config = function() + vim.g.gruvbox_material_transparent_background = 2 + end, + }, + + { + "sainnhe/everforest", + lazy = false, + priority = 1000, + config = function() + vim.g.everforest_transparent_background = 2 + end, + }, + + { + "webhooked/kanso.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + }, + }, + + { + "vague2k/vague.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + }, + }, + + { + "AlexvZyl/nordic.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = { + bg = true, + float = true, + }, + }, + }, + + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + opts = { + transparent_background = true, + float = { + transparent = true, + }, + color_overrides = { + frappe = { + -- colors from https://primer.style/product/getting-started/foundations/color-usage/ + -- see https://primer.style/primitives/storybook/?path=/story/color-base-scales--all-scales&globals=theme%3Adark_high_contrast + rosewater = "#91cbff", + flamingo = "#addcff", + pink = "#addcff", + mauve = "#ff9492", + red = "#ff9492", + maroon = "#ffffff", + peach = "#addcff", + yellow = "#f0b72f", + green = "#addcff", + teal = "#91cbff", + sky = "#91cbff", + sapphire = "#91cbff", + blue = "#dbb7ff", + lavender = "#ffffff", + text = "#ffffff", + subtext1 = "#d1d7e0", + subtext0 = "#b7bdc8", + overlay2 = "#9198a1", + overlay1 = "#656c76", + overlay0 = "#3d444d", + surface2 = "#3d444d", + surface1 = "#2f3742", + surface0 = "#2a313c", + base = "#000000", + mantle = "#000000", + crust = "#000000", + }, + }, + no_italic = true, + }, + }, + + { + "rose-pine/neovim", + name = "rose-pine", + priority = 1000, + opts = { + styles = { + transparency = true, + }, + }, + }, + + { + "sainnhe/sonokai", + lazy = false, + priority = 1000, + config = function() + vim.g.sonokai_transparent_background = 2 + end, + }, + + { + "sainnhe/edge", + lazy = false, + priority = 1000, + config = function() + vim.g.edge_transparent_background = 2 + end, + }, + + { + "projekt0n/github-nvim-theme", + lazy = false, + priority = 1000, + config = function() + require("github-theme").setup({ + options = { + transparent = true, + }, + }) + end, + }, + + { + "bluz71/vim-moonfly-colors", + name = "moonfly", + lazy = false, + priority = 1000, + config = function() + vim.g.moonflyTransparent = true + end, + }, + + { + "miikanissi/modus-themes.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + line_nr_column_background = false, + }, + }, + + { + "scottmckendry/cyberdream.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + }, + }, + + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + }, + }, + + { + "Mofiqul/vscode.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + }, + }, + + { + "EdenEast/nightfox.nvim", + lazy = false, + priority = 1000, + opts = { + options = { + transparent = true, + }, + }, + }, + + { + "nyoom-engineering/oxocarbon.nvim", + name = "oxocarbon", + lazy = false, + priority = 1000, + config = function() + vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) + vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" }) + end, + }, + + { + "wtfox/jellybeans.nvim", + lazy = false, + priority = 1000, + opts = { + transparent = true, + italics = false, + bold = false, + flat_ui = true, -- toggles "flat UI" for pickers + }, + }, + + { + "LazyVim/LazyVim", + opts = { + colorscheme = "jellybeans-default", + }, + }, +} diff --git a/dot-config/nvim-old/lua/plugins/yaml.lua b/dot-config/nvim-old/lua/plugins/yaml.lua new file mode 100644 index 0000000..c14f04d --- /dev/null +++ b/dot-config/nvim-old/lua/plugins/yaml.lua @@ -0,0 +1,10 @@ +return { + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + yaml = { "prettier" }, + }, + }, + }, +} |
