-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
82 lines (73 loc) · 1.97 KB
/
Copy pathinit.lua
File metadata and controls
82 lines (73 loc) · 1.97 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
--[[
Modern Neovim Configuration
Migrated from classic Vim setup with Pathogen
Features:
- lazy.nvim plugin manager with lazy loading
- Smart autoformatter with config detection
- Modern LSP, completion, and treesitter
- 1:1 feature parity with original Vim config
Structure:
- lua/config/ - Core configuration (options, keymaps, autocmds)
- lua/plugins/ - Plugin specifications for lazy.nvim
- lua/utils/ - Utility functions
- tests/ - Automated tests
]]
-- Set leader key BEFORE loading plugins
-- Leader: comma (,)
vim.g.mapleader = ','
vim.g.maplocalleader = ','
-- Bootstrap lazy.nvim plugin manager
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',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Add current config directory to runtimepath
local config_path = vim.fn.stdpath('config')
vim.opt.rtp:prepend(config_path)
-- Load core configuration
require('config.options')
require('config.keymaps')
require('config.autocmds')
-- Setup diagnostic auto-open (must be after autocmds)
require('config.diagnostic_autoopen').setup()
-- Load plugins with lazy.nvim
require('lazy').setup('plugins', {
defaults = {
lazy = true, -- Lazy load by default
},
install = {
colorscheme = { 'ir_black' },
},
checker = {
enabled = true, -- Check for plugin updates
notify = false,
},
performance = {
rtp = {
disabled_plugins = {
'gzip',
'matchit',
'matchparen',
'netrwPlugin',
'tarPlugin',
'tohtml',
'tutor',
'zipPlugin',
},
},
},
})
-- Load project-specific config (if exists)
-- Uses vim.secure for security (similar to original 'set secure')
local project_config = vim.fn.findfile('.nvim.lua', '.;')
if project_config ~= '' then
vim.secure.read(project_config)
end