Modify LazyVim configuration

This commit is contained in:
Fabio Scotto di Santolo
2025-07-24 17:39:12 +02:00
parent 95aa11f5d1
commit f5aa42c853
7 changed files with 126 additions and 21 deletions

View File

@@ -9,8 +9,9 @@
"crates.nvim": { "branch": "main", "commit": "c915ab5334a46178f64ce17ab606a79454bcd14f" }, "crates.nvim": { "branch": "main", "commit": "c915ab5334a46178f64ce17ab606a79454bcd14f" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "cdfac04b264cd924173e7f63a00b4883e2b98564" }, "fzf-lua": { "branch": "main", "commit": "262a22d43e343c47ca92bf870d83ffd5a7561183" },
"gitsigns.nvim": { "branch": "main", "commit": "1fcaddcc427ff5802b6602f46de37a5352d0f9e0" }, "gitsigns.nvim": { "branch": "main", "commit": "1fcaddcc427ff5802b6602f46de37a5352d0f9e0" },
"glow.nvim": { "branch": "main", "commit": "5d5954b2f22e109d4a6eba8b2618c5b96e4ee7a2" },
"grug-far.nvim": { "branch": "main", "commit": "45981a9af7f4e666a3cdaedb1d21d2ab926727a2" }, "grug-far.nvim": { "branch": "main", "commit": "45981a9af7f4e666a3cdaedb1d21d2ab926727a2" },
"hydra.nvim": { "branch": "main", "commit": "8c4a9f621ec7cdc30411a1f3b6d5eebb12b469dc" }, "hydra.nvim": { "branch": "main", "commit": "8c4a9f621ec7cdc30411a1f3b6d5eebb12b469dc" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },

View File

@@ -1,9 +1,33 @@
-- Keymaps are automatically loaded on the VeryLazy event -- 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 -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here -- Add any additional keymaps here
--vim.keymap.set(
local map = vim.keymap.set
-- Resume last Telescope search
-- map(
-- "n", -- "n",
-- "<leader>sx", -- "<leader>sx",
-- require("telescope.builtin").resume, -- require("telescope.builtin").resume,
-- { noremap = false, silent = false, desc = "Resume" } -- { noremap = true, silent = true, desc = "Resume Telescope" }
--) -- )
-- Buffer management
map("n", "<leader>bn", ":bnext<CR>", { noremap = true, silent = true, desc = "Next buffer" })
map("n", "<leader>bp", ":bprevious<CR>", { noremap = true, silent = true, desc = "Previous buffer" })
map("n", "<leader>bd", ":bdelete<CR>", { noremap = true, silent = true, desc = "Delete buffer" })
-- Window navigation (splits)
map("n", "<leader>sh", "<C-w>h", { noremap = true, silent = true, desc = "Window left" })
map("n", "<leader>sj", "<C-w>j", { noremap = true, silent = true, desc = "Window down" })
map("n", "<leader>sk", "<C-w>k", { noremap = true, silent = true, desc = "Window up" })
map("n", "<leader>sl", "<C-w>l", { noremap = true, silent = true, desc = "Window right" })
-- Quick save
map("n", "<leader>w", ":w<CR>", { noremap = true, silent = true, desc = "Save file" })
-- Copy to system clipboard (if not already mapped)
map({ "n", "v" }, "<leader>y", [["+y]], { noremap = true, silent = true, desc = "Copy to system clipboard" })
-- Paste from system clipboard
map("n", "<leader>p", [["+p]], { noremap = true, silent = true, desc = "Paste from system clipboard" })

View File

@@ -30,16 +30,16 @@ require("lazy").setup({
version = false, -- always use the latest git commit version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver -- 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 checker = { enabled = true }, -- automatically check for plugin updates
performance = { performance = {
rtp = { rtp = {
-- disable some rtp plugins -- disable some rtp plugins
disabled_plugins = { disabled_plugins = {
"gzip", "gzip",
-- "matchit", "matchit",
-- "matchparen", "matchparen",
-- "netrwPlugin", "netrwPlugin",
"tarPlugin", "tarPlugin",
"tohtml", "tohtml",
"tutor", "tutor",
@@ -47,4 +47,5 @@ require("lazy").setup({
}, },
}, },
}, },
cache = true,
}) })

View File

@@ -1,4 +1,51 @@
-- Options are automatically loaded before lazy.nvim startup -- 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 -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here -- 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"

View File

@@ -4,6 +4,11 @@ return {
lazy = false, lazy = false,
priority = 1000, priority = 1000,
opts = { opts = {
flavour = "mocha",
transparent_background = false, transparent_background = false,
}, },
config = function(_, opts)
require("catppuccin").setup(opts)
vim.cmd.colorscheme("catppuccin")
end,
} }

View File

@@ -1,6 +1,6 @@
return { return {
"LazyVim/LazyVim", "LazyVim/LazyVim",
opts = { opts = {
colorscheme = "catppuccin-frappe", colorscheme = "catppuccin-mocha",
}, },
} }

View File

@@ -1,10 +1,37 @@
return { return {
-- Browser preview plugin
{
"iamcco/markdown-preview.nvim", "iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install", build = "cd app && yarn install",
init = function() init = function()
vim.g.mkdp_filetypes = { "markdown" } vim.g.mkdp_filetypes = { "markdown" }
vim.g.mkdp_auto_start = 1 vim.g.mkdp_auto_start = 0
vim.g.mkdp_browser = "firefox" -- use your preferred browser
vim.g.mkdp_sync_scroll_type = "middle"
end, end,
ft = { "markdown" }, ft = { "markdown" },
keys = {
{
"<leader>Mp",
"<cmd>MarkdownPreviewToggle<CR>",
desc = "Preview Markdown (Browser)",
},
},
},
-- Terminal-based preview with Glow
{
"ellisonleao/glow.nvim",
config = true, -- uses default config
cmd = "Glow",
ft = { "markdown" },
keys = {
{
"<leader>Mg",
"<cmd>Glow<CR>",
desc = "Preview Markdown (Glow)",
},
},
},
} }