Initial commit
This commit is contained in:
3
lazyvim/.config/nvim/lua/config/autocmds.lua
Normal file
3
lazyvim/.config/nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- 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
|
||||
33
lazyvim/.config/nvim/lua/config/keymaps.lua
Normal file
33
lazyvim/.config/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +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
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- Resume last Telescope search
|
||||
-- map(
|
||||
-- "n",
|
||||
-- "<leader>sx",
|
||||
-- require("telescope.builtin").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" })
|
||||
51
lazyvim/.config/nvim/lua/config/lazy.lua
Normal file
51
lazyvim/.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
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", "catppuccin" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
"matchit",
|
||||
"matchparen",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
cache = true,
|
||||
})
|
||||
51
lazyvim/.config/nvim/lua/config/options.lua
Normal file
51
lazyvim/.config/nvim/lua/config/options.lua
Normal file
@@ -0,0 +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
|
||||
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"
|
||||
16
lazyvim/.config/nvim/lua/plugins/alpha.lua
Normal file
16
lazyvim/.config/nvim/lua/plugins/alpha.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
opts = function(_, opts)
|
||||
local logo = [[
|
||||
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
|
||||
████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║
|
||||
██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║
|
||||
██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
|
||||
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||
|
||||
[ @elijahmanor ]
|
||||
]]
|
||||
opts.section.header.val = vim.split(logo, "\n", { trimempty = true })
|
||||
end,
|
||||
}
|
||||
14
lazyvim/.config/nvim/lua/plugins/colorscheme.lua
Normal file
14
lazyvim/.config/nvim/lua/plugins/colorscheme.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
flavour = "mocha",
|
||||
transparent_background = false,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("catppuccin").setup(opts)
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
}
|
||||
3
lazyvim/.config/nvim/lua/plugins/disabled.lua
Normal file
3
lazyvim/.config/nvim/lua/plugins/disabled.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
{ "windwp/nvim-spectre", enabled = false },
|
||||
}
|
||||
13
lazyvim/.config/nvim/lua/plugins/file-browser.lua
Normal file
13
lazyvim/.config/nvim/lua/plugins/file-browser.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>sB",
|
||||
":Telescope file_browser path=%:p:h=%:p:h<cr>",
|
||||
desc = "Browser Files",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("file_browser")
|
||||
end,
|
||||
}
|
||||
6
lazyvim/.config/nvim/lua/plugins/lazyvim.lua
Normal file
6
lazyvim/.config/nvim/lua/plugins/lazyvim.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin-mocha",
|
||||
},
|
||||
}
|
||||
37
lazyvim/.config/nvim/lua/plugins/markdown-preview.lua
Normal file
37
lazyvim/.config/nvim/lua/plugins/markdown-preview.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
-- 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 = {
|
||||
{
|
||||
"<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)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
17
lazyvim/.config/nvim/lua/plugins/multicursors.lua
Normal file
17
lazyvim/.config/nvim/lua/plugins/multicursors.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"smoka7/multicursors.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvimtools/hydra.nvim",
|
||||
},
|
||||
opts = {},
|
||||
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
|
||||
keys = {
|
||||
{
|
||||
mode = { "v", "n" },
|
||||
"<Leader>m",
|
||||
"<cmd>MCstart<cr>",
|
||||
desc = "Create a selection for selected text or word under the cursor",
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user