return { { "scottmckendry/cyberdream.nvim", lazy = false, priority = 1000, config = function() require("cyberdream").setup({ highlights = { Comment = { fg = "#89ca78", bg = "NONE" }, }, colors = { bg = "#000000", green = "#00cc00", purple = "#5ef1ff", cyan = "#bd5eff" } }) vim.cmd.colorscheme("cyberdream") end }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", main = "nvim-treesitter.configs", opts = { ensure_installed = { "vimdoc", "lua", "markdown", "markdown_inline", "c", "cpp", "rust", "javascript", "typescript", "html", "python", "json", "hyprlang" }, highlight = { enable = true, additional_vim_regex_highlighting = false, }, sync_install = false, auto_install = true } }, { "nvim-treesitter/nvim-treesitter-textobjects", event = "VeryLazy" }, { "mason-org/mason-lspconfig.nvim", dependencies = { { "mason-org/mason.nvim", opts = { ensure_installed = { "shfmt", } } }, "neovim/nvim-lspconfig", "saghen/blink.cmp" }, event = { "BufReadPre", "BufNewFile" }, config = function() require("mason-lspconfig").setup({ automatic_installation = true, ensure_installed = { "lua_ls", "bashls", "clangd", "rust_analyzer", "pyright", "marksman", "tailwindcss" } }) local blinkCapabilities = require("blink.cmp").get_lsp_capabilities() vim.lsp.config("lua_ls", { settings = { Lua = { diagnostics = { globals = { "vim" } }, workspace = { library = vim.api.nvim_get_runtime_file("", true) }, telemetry = { enable = false } } }, capabilities = blinkCapabilities }) vim.lsp.config("bashls", { filetypes = { "bash", "sh", "zsh" }, settings = { bashIde = { globPattern = "*@(.sh|.inc|.bash|.command|.zsh)" } }, capabilities = blinkCapabilities }) vim.lsp.config("clangd", { capabilities = blinkCapabilities }) vim.lsp.config("rust_analyzer", { capabilities = blinkCapabilities }) vim.lsp.config("pyright", { capabilities = blinkCapabilities }) vim.lsp.config("marksman", { capabilities = blinkCapabilities }) vim.lsp.config("tailwindcss", { filetypes = { "html", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss" }, capabilities = blinkCapabilities }) vim.lsp.config("nil_ls", { capabilities = blinkCapabilities }) end }, { "stevearc/conform.nvim", config = function() vim.g.enable_autoformat = true require("conform").setup({ formatters_by_ft = { nix = { "nixfmt" }, zsh = { "shfmt" }, -- TODO: More formatters by filetype }, format_on_save = function(bufnr) if vim.g.enable_autoformat or vim.b[bufnr].enable_autoformat then return { timeout_ms = 500, lsp_format = "fallback" } end end }) vim.api.nvim_create_user_command("Format", function(args) local range = nil if args.count ~= -1 then local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] range = { start = { args.line1, 0 }, ["end"] = { args.line2, end_line:len() }, } end require("conform").format({ async = true, range = range }) end, { range = true }) vim.api.nvim_create_user_command("FormatDisable", function(args) if args.bang then vim.b.enable_autoformat = false else vim.g.enable_autoformat = false end end, { desc = "Disable autoformat-on-save", bang = true }) vim.api.nvim_create_user_command("FormatEnable", function(args) if args.bang then vim.b.enable_autoformat = true else vim.g.enable_autoformat = true end end, { desc = "Re-enable autoformat-on-save", bang = true }) vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" end }, { "saghen/blink.cmp", dependencies = { "rafamadriz/friendly-snippets" }, version = "*", opts = { enabled = function() return not vim.tbl_contains({ "text" }, vim.bo.filetype) and vim.bo.buftype ~= "prompt" and vim.b.completion ~= false end, keymap = { preset = "default" }, appearance = { nerd_font_variant = "mono" }, signature = { enabled = true }, cmdline = { enabled = true, keymap = { preset = "cmdline" }, sources = function() local type = vim.fn.getcmdtype() if type == "/" or type == "?" then return { "buffer" } end if type == ":" or type == "@" then return { "cmdline" } end return {} end, completion = { trigger = { show_on_blocked_trigger_characters = {}, show_on_x_blocked_trigger_characters = {}, }, list = { selection = { preselect = true, auto_insert = true, }, }, menu = { auto_show = true }, ghost_text = { enabled = true } } } } }, { "windwp/nvim-autopairs", event = "InsertEnter", opts = {} }, { "windwp/nvim-ts-autotag", dependencies = { "nvim-treesitter/nvim-treesitter" }, opts = {} }, { "folke/trouble.nvim", opts = {}, cmd = "Trouble", keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)", }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, { "cs", "Trouble symbols toggle focus=false", desc = "Symbols (Trouble)" }, { "cl", "Trouble lsp toggle focus=false win.position=right", desc = "LSP Definitions / references / ... (Trouble)" }, { "xL", "Trouble loclist toggle", desc = "Location List (Trouble)" }, { "xQ", "Trouble qflist toggle", desc = "Quickfix List (Trouble)" }, } }, { "mluders/comfy-line-numbers.nvim", config = function() require("comfy-line-numbers").setup({ hidden_file_types = {} }) vim.api.nvim_create_autocmd("CmdlineEnter", { group = "ComfyLineNumbers", pattern = "*", callback = function() pcall(require("comfy-line-numbers").disable_line_numbers) end }) vim.api.nvim_create_autocmd("CmdlineLeave", { group = "ComfyLineNumbers", pattern = "*", callback = function() pcall(require("comfy-line-numbers").enable_line_numbers) end }) end }, { "winston0410/range-highlight.nvim", event = { "CmdlineEnter" }, opts = {}, }, { "nvim-pack/nvim-spectre", config = function() local spectre = require("spectre") vim.keymap.set("n", "ss", function() spectre.toggle() end, { desc = "Spectre toggle" }) vim.keymap.set("n", "sw", function() require("spectre").open_visual({ select_word = true }) end, { desc = "Spectre search current word" }) vim.keymap.set("v", "sw", function() require("spectre").open_visual() end, { desc = "Spectre search current word" }) vim.keymap.set("n", "sf", function() require("spectre").open_file_search({ select_word = true }) end, { desc = "Spectre search current word in current file" }) vim.keymap.set("v", "sf", function() require("spectre").open_file_search() end, { desc = "Spectre search current word in current file" }) spectre.setup({ is_block_ui_break = true }) end }, { "kdheepak/lazygit.nvim", lazy = true, cmd = { "LazyGit", "LazyGitConfig", "LazyGitCurrentFile", "LazyGitFilter", "LazyGitFilterCurrentFile", }, dependencies = { "nvim-lua/plenary.nvim", }, keys = { { "lg", "LazyGit", desc = "LazyGit" } } }, { "nvim-telescope/telescope.nvim", branch = "0.1.x", dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope-fzf-native.nvim" }, config = function() require("telescope").load_extension("fzf") local builtin = require("telescope.builtin") vim.keymap.set("n", "ff", builtin.find_files, { desc = "Telescope find files" }) vim.keymap.set("n", "fg", builtin.git_files, { desc = "Telescope git files" }) vim.keymap.set("n", "fs", builtin.live_grep, { desc = "Telescope live grep" }) vim.keymap.set("n", "fw", function() local word = vim.fn.expand("") builtin.grep_string({ search = word }) end, { desc = "Telescope grep current word" }) vim.keymap.set("n", "fW", function() local word = vim.fn.expand("") builtin.grep_string({ search = word }) end, { desc = "Telescope grep current WORD" }) end }, { "nvim-telescope/telescope-fzf-native.nvim", build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 && cmake --build build --config Release" }, { "mbbill/undotree" }, { "mikavilpas/yazi.nvim", version = "*", event = "VeryLazy", dependencies = { { "nvim-lua/plenary.nvim", lazy = true }, }, keys = { { "-", mode = { "n", "v" }, "Yazi", desc = "Open yazi at the current file", }, { "cw", "Yazi cwd", desc = "Open the file manager in nvim's working directory", }, { "", "Yazi toggle", desc = "Resume the last yazi session", }, }, ---@type YaziConfig | {} opts = { open_for_directories = true, keymaps = { show_help = "", }, }, init = function() vim.g.loaded_netrwPlugin = 1 end, }, { "lukas-reineke/indent-blankline.nvim", event = "BufReadPost", dependencies = { "nvim-treesitter/nvim-treesitter" }, config = function() vim.api.nvim_set_hl(0, "IblScope", { link = "Function", nocombine = true }) require("ibl").setup({ scope = { char = "│", enabled = true, show_start = true, show_end = false, show_exact_scope = true }, indent = { char = "┊" }, }) end }, { "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, config = function(_, opts) require("todo-comments").setup(opts) vim.keymap.set("n", "Tn", function() require("todo-comments").jump_next() end, { desc = "Next todo comment" }) vim.keymap.set("n", "TN", function() require("todo-comments").jump_prev() end, { desc = "Previous todo comment" }) end, opts = { signs = true, -- show icons in the signs column sign_priority = 8, -- sign priority keywords = { BUG = { icon = " ", -- icon used for the sign, and in search results color = "error", -- can be a hex color, or a named color (see below) alt = { "FIX", "FIXME", "FIXIT", "ISSUE" } }, TODO = { icon = " ", color = "info" }, HACK = { icon = " ", color = "warning" }, WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } } }, gui_style = { fg = "NONE", -- The gui style to use for the fg highlight group. bg = "BOLD" -- The gui style to use for the bg highlight group. }, merge_keywords = true, -- when true, custom keywords will be merged with the defaults highlight = { multiline = true, -- enable multine todo comments multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword multiline_context = 10, -- extra lines that will be re-evaluated when changing a line before = "", -- "fg" or "bg" or empty keyword = "bg", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) after = "fg", -- "fg" or "bg" or empty pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex) comments_only = true, -- uses treesitter to match keywords in comments only max_line_len = 400, -- ignore lines longer than this exclude = {}, -- list of file types to exclude highlighting }, colors = { error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, info = { "DiagnosticInfo", "#2563EB" }, hint = { "DiagnosticHint", "#10B981" }, default = { "Identifier", "#7C3AED" }, test = { "Identifier", "#FF00FF" } }, search = { command = "rg", args = { "--color=never", "--no-heading", "--with-filename", "--line-number", "--column" }, pattern = [[\b(KEYWORDS):]] } } }, { "folke/flash.nvim", event = "VeryLazy", ---@type Flash.Config opts = {}, keys = { -- { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, }, }, { "j-hui/fidget.nvim", opts = { progress = { display = { done_ttl = 0.5 } } } }, { "norcalli/nvim-colorizer.lua", main = "colorizer", config = function() require("colorizer").setup({ css = { css = true, }, "html", "javascript", "markdown", }, { RGB = true, RRGGBB = true, RRGGBBAA = true, names = false, mode = "background", } ) end }, { "nvim-tree/nvim-web-devicons", lazy = true }, { "obsidian-nvim/obsidian.nvim", version = "*", lazy = true, event = { "BufEnter " .. vim.fn.expand "~" .. "/Obsidian*" }, dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "nvim-treesitter/nvim-treesitter", "saghen/blink.cmp" }, opts = { legacy_commands = false, workspaces = { { name = "personal", path = "~/Obsidian/personal", } }, notes_subdir = "Notes", daily_notes = { folder = "Notes/Daily", date_format = "%Y-%m-%d", alias_format = "%B %-d, %Y", default_tags = { "daily-notes" } }, completion = { nvim_cmp = false, blink = true, min_chars = 1, }, new_notes_location = "notes_subdir", note_path_func = function(spec) local path = spec.dir / spec.id return path:with_suffix(".md") end, preferred_link_style = "wiki", frontmatter = { enabled = false, }, templates = { folder = "Templates", date_format = "%Y-%m-%d", time_format = "%H:%M", substitutions = {}, }, picker = { name = "telescope.nvim", note_mappings = { new = "", insert_link = "", }, tag_mappings = { tag_note = "", insert_tag = "", }, }, checkboxes = { [" "] = { char = "󰄱", hl_group = "ObsidianTodo" }, ["x"] = { char = "", hl_group = "ObsidianDone" }, [">"] = { char = "", hl_group = "ObsidianRightArrow" }, ["~"] = { char = "󰰱", hl_group = "ObsidianTilde" }, ["!"] = { char = "", hl_group = "ObsidianImportant" } }, ui = { enable = true, update_debounce = 200, max_file_length = 5000, bullets = { char = "•", hl_group = "ObsidianBullet" }, external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" }, reference_text = { hl_group = "ObsidianRefText" }, highlight_text = { hl_group = "ObsidianHighlightText" }, tags = { hl_group = "ObsidianTag" }, block_ids = { hl_group = "ObsidianBlockID" }, hl_groups = { ObsidianTodo = { bold = true, fg = "#f78c6c" }, ObsidianDone = { bold = true, fg = "#89ddff" }, ObsidianRightArrow = { bold = true, fg = "#f78c6c" }, ObsidianTilde = { bold = true, fg = "#ff5370" }, ObsidianImportant = { bold = true, fg = "#d73128" }, ObsidianBullet = { bold = true, fg = "#89ddff" }, ObsidianRefText = { underline = true, fg = "#c792ea" }, ObsidianExtLinkIcon = { fg = "#c792ea" }, ObsidianTag = { italic = true, fg = "#89ddff" }, ObsidianBlockID = { italic = true, fg = "#89ddff" }, ObsidianHighlightText = { bg = "#75662e" } }, } }, keys = { { "fn", "Obsidian quick_switch", desc = "Switch between Obsidian notes" } } }, { "Kicamon/markdown-table-mode.nvim", main = "markdown-table-mode", opts = {} }, { "Thiago4532/mdmath.nvim", dependencies = { "nvim-treesitter/nvim-treesitter", }, opts = { filetypes = { "markdown" }, update_interval = 500 } } }