add lazy nvim

This commit is contained in:
miam1gh0st 2024-11-16 17:28:19 +08:00
parent e1dde8a5d2
commit 6d8dc3f72d
2 changed files with 29 additions and 0 deletions

View file

@ -20,9 +20,35 @@ vim.api.nvim_create_autocmd({ "TextYankPost" }, {
-- keybindings
local opt = { noremap = true, silent = true }
vim.g.mapleader = " "
vim.keymap.set("n", "<C-l>", "<C-w>l", opt)
vim.keymap.set("n", "<C-h>", "<C-w>h", opt)
vim.keymap.set("n", "<C-j>", "<C-w>j", opt)
vim.keymap.set("n", "<C-k>", "<C-w>k", opt)
vim.keymap.set("n", "<Leader>v", "<C-w>v",opt)
vim.keymap.set("n", "<Leader>s", "<C-w>s",opt)
-- https://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
vim.keymap.set("n", "j", [[v:count ? 'j' : 'gj']], { noremap = true, expr = true })
vim.keymap.set("n", "k", [[v:count ? 'k' : 'gk']], { noremap = true, expr = true })
-- lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", --latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
-- "folke/which-key.nvim",
-- { "folke/neoconf.nvim", cmd = "Neoconf" },
-- "folke/neodev.nvim",
})

3
lazy-lock.json Normal file
View file

@ -0,0 +1,3 @@
{
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }
}