diff --git a/lazyvim/.config/nvim/lazy-lock.json b/lazyvim/.config/nvim/lazy-lock.json index 4c55f04..2510647 100644 --- a/lazyvim/.config/nvim/lazy-lock.json +++ b/lazyvim/.config/nvim/lazy-lock.json @@ -9,8 +9,9 @@ "crates.nvim": { "branch": "main", "commit": "c915ab5334a46178f64ce17ab606a79454bcd14f" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "fzf-lua": { "branch": "main", "commit": "cdfac04b264cd924173e7f63a00b4883e2b98564" }, + "fzf-lua": { "branch": "main", "commit": "262a22d43e343c47ca92bf870d83ffd5a7561183" }, "gitsigns.nvim": { "branch": "main", "commit": "1fcaddcc427ff5802b6602f46de37a5352d0f9e0" }, + "glow.nvim": { "branch": "main", "commit": "5d5954b2f22e109d4a6eba8b2618c5b96e4ee7a2" }, "grug-far.nvim": { "branch": "main", "commit": "45981a9af7f4e666a3cdaedb1d21d2ab926727a2" }, "hydra.nvim": { "branch": "main", "commit": "8c4a9f621ec7cdc30411a1f3b6d5eebb12b469dc" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, diff --git a/lazyvim/.config/nvim/lua/config/keymaps.lua b/lazyvim/.config/nvim/lua/config/keymaps.lua index 320a5fa..01e96c1 100644 --- a/lazyvim/.config/nvim/lua/config/keymaps.lua +++ b/lazyvim/.config/nvim/lua/config/keymaps.lua @@ -1,9 +1,33 @@ -- 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 ---vim.keymap.set( --- "n", --- "sx", --- require("telescope.builtin").resume, --- { noremap = false, silent = false, desc = "Resume" } ---) + +local map = vim.keymap.set + +-- Resume last Telescope search +-- map( +-- "n", +-- "sx", +-- require("telescope.builtin").resume, +-- { noremap = true, silent = true, desc = "Resume Telescope" } +-- ) + +-- Buffer management +map("n", "bn", ":bnext", { noremap = true, silent = true, desc = "Next buffer" }) +map("n", "bp", ":bprevious", { noremap = true, silent = true, desc = "Previous buffer" }) +map("n", "bd", ":bdelete", { noremap = true, silent = true, desc = "Delete buffer" }) + +-- Window navigation (splits) +map("n", "sh", "h", { noremap = true, silent = true, desc = "Window left" }) +map("n", "sj", "j", { noremap = true, silent = true, desc = "Window down" }) +map("n", "sk", "k", { noremap = true, silent = true, desc = "Window up" }) +map("n", "sl", "l", { noremap = true, silent = true, desc = "Window right" }) + +-- Quick save +map("n", "w", ":w", { noremap = true, silent = true, desc = "Save file" }) + +-- Copy to system clipboard (if not already mapped) +map({ "n", "v" }, "y", [["+y]], { noremap = true, silent = true, desc = "Copy to system clipboard" }) + +-- Paste from system clipboard +map("n", "p", [["+p]], { noremap = true, silent = true, desc = "Paste from system clipboard" }) diff --git a/lazyvim/.config/nvim/lua/config/lazy.lua b/lazyvim/.config/nvim/lua/config/lazy.lua index 732f55a..11482ef 100644 --- a/lazyvim/.config/nvim/lua/config/lazy.lua +++ b/lazyvim/.config/nvim/lua/config/lazy.lua @@ -30,16 +30,16 @@ require("lazy").setup({ version = false, -- always use the latest git commit -- version = "*", -- try installing the latest stable version for plugins that support semver }, - install = { colorscheme = { "tokyonight", "habamax" } }, + install = { colorscheme = { "tokyonight", "habamax", "catppuccin" } }, checker = { enabled = true }, -- automatically check for plugin updates performance = { rtp = { -- disable some rtp plugins disabled_plugins = { "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", + "matchit", + "matchparen", + "netrwPlugin", "tarPlugin", "tohtml", "tutor", @@ -47,4 +47,5 @@ require("lazy").setup({ }, }, }, + cache = true, }) diff --git a/lazyvim/.config/nvim/lua/config/options.lua b/lazyvim/.config/nvim/lua/config/options.lua index 5c23ba2..caf549f 100644 --- a/lazyvim/.config/nvim/lua/config/options.lua +++ b/lazyvim/.config/nvim/lua/config/options.lua @@ -1,4 +1,51 @@ -- 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.winbar = "%=%m %f" +local opt = vim.opt + +-- Line numbers +opt.number = true +opt.relativenumber = true + +-- Enable mouse in all modes +opt.mouse = "a" + +-- Better searching +opt.ignorecase = true +opt.smartcase = true + +-- Highlight current line +opt.cursorline = true + +-- Enable true color support +opt.termguicolors = true + +-- Enable system clipboard +opt.clipboard = "unnamedplus" + +-- Indentation +opt.expandtab = false +opt.shiftwidth = 8 +opt.tabstop = 8 +opt.smartindent = true + +-- Split behavior +opt.splitright = true +opt.splitbelow = true + +-- Enable undo file to persist undo history +opt.undofile = true + +-- Set upbar similar to statusline (optional) +opt.statusline = "%f %m %r %=%-14.(%l,%c%V%) %P" + +-- Persistent signcolumn to avoid text shifting +opt.signcolumn = "yes" + +-- Fold method +opt.foldmethod = "expr" +opt.foldexpr = "nvim_treesitter#foldexpr()" +opt.foldlevel = 99 -- open all folds by default + +-- Show file name and modified flag in the window bar +opt.winbar = "%=%m %f" diff --git a/lazyvim/.config/nvim/lua/plugins/colorscheme.lua b/lazyvim/.config/nvim/lua/plugins/colorscheme.lua index 528e8f3..6d28e92 100644 --- a/lazyvim/.config/nvim/lua/plugins/colorscheme.lua +++ b/lazyvim/.config/nvim/lua/plugins/colorscheme.lua @@ -4,6 +4,11 @@ return { lazy = false, priority = 1000, opts = { + flavour = "mocha", transparent_background = false, }, + config = function(_, opts) + require("catppuccin").setup(opts) + vim.cmd.colorscheme("catppuccin") + end, } diff --git a/lazyvim/.config/nvim/lua/plugins/lazyvim.lua b/lazyvim/.config/nvim/lua/plugins/lazyvim.lua index 9a83e6f..d1278e4 100644 --- a/lazyvim/.config/nvim/lua/plugins/lazyvim.lua +++ b/lazyvim/.config/nvim/lua/plugins/lazyvim.lua @@ -1,6 +1,6 @@ return { "LazyVim/LazyVim", opts = { - colorscheme = "catppuccin-frappe", + colorscheme = "catppuccin-mocha", }, } diff --git a/lazyvim/.config/nvim/lua/plugins/markdown-preview.lua b/lazyvim/.config/nvim/lua/plugins/markdown-preview.lua index dfa5968..8eaeeb6 100644 --- a/lazyvim/.config/nvim/lua/plugins/markdown-preview.lua +++ b/lazyvim/.config/nvim/lua/plugins/markdown-preview.lua @@ -1,10 +1,37 @@ return { - "iamcco/markdown-preview.nvim", - cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, - build = "cd app && yarn install", - init = function() - vim.g.mkdp_filetypes = { "markdown" } - vim.g.mkdp_auto_start = 1 - end, - ft = { "markdown" }, + -- Browser preview plugin + { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = "cd app && yarn install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + vim.g.mkdp_auto_start = 0 + vim.g.mkdp_browser = "firefox" -- use your preferred browser + vim.g.mkdp_sync_scroll_type = "middle" + end, + ft = { "markdown" }, + keys = { + { + "Mp", + "MarkdownPreviewToggle", + desc = "Preview Markdown (Browser)", + }, + }, + }, + + -- Terminal-based preview with Glow + { + "ellisonleao/glow.nvim", + config = true, -- uses default config + cmd = "Glow", + ft = { "markdown" }, + keys = { + { + "Mg", + "Glow", + desc = "Preview Markdown (Glow)", + }, + }, + }, }