-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
40 lines (35 loc) · 1.02 KB
/
init.lua
File metadata and controls
40 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- NeoVim MERN Stack Development Environment
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Load core configurations safely
local ok, _ = pcall(require, "config.options")
if not ok then
-- Fallback basic options
vim.opt.number = true
vim.opt.relativenumber = false
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.termguicolors = true
end
pcall(require, "config.keymaps")
pcall(require, "config.autocmds")
-- Plugin Manager Setup
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
print("🚀 Installing plugin manager...")
vim.fn.system({
"git", "clone", "--filter=blob:none", "--branch=stable",
"https://github.com/folke/lazy.nvim.git", lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Load plugins with error handling
local ok, lazy = pcall(require, "lazy")
if ok then
lazy.setup("plugins", {
ui = { backdrop = 100 },
change_detection = { enabled = false },
})
end
print("✅ NeoVim MERN Environment loaded!")