-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
85 lines (72 loc) · 2.29 KB
/
init.lua
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
83
84
85
vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/"
vim.g.mapleader = " "
-- Enable Avente AI
--require('configs.avante')
-- bootstrap lazy and all plugins
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
local repo = "https://github.com/folke/lazy.nvim.git"
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
end
vim.opt.rtp:prepend(lazypath)
local lazy_config = require "configs.lazy"
-- Load plugins using Lazy
require("lazy").setup({
-- Import NvChad plugin with specific branch
{
"NvChad/NvChad",
lazy = false,
branch = "v2.5",
import = "nvchad.plugins",
config = function()
require("options") -- Load options configuration
end,
},
-- Import other plugins
{ import = "plugins" },
}, lazy_config) -- Assume 'lazy_config' is defined elsewhere in the code
-- Load theme components
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
-- Import NvChad autocmds (automatic commands)
require("nvchad.autocmds")
-- Schedule mappings (keyboard shortcuts) to be applied after initializing Lazy
vim.schedule(function()
require("mappings") -- Load mappings configuration
end)
-- Functionality to open the Projects directory on start-up can be added here, and open NvimTreeToggle.
vim.cmd [[cd ~/Projects]]
-- Configure Nvim tree to include .gitignore files but grayed out
require("nvim-tree").setup({
filters = {
custom = {},
exclude = {},
},
renderer = {
highlight_git = true, -- Enable highlighting for git status
highlight_opened_files = "all", -- Optional: Highlight files that are opened
},
git = {
enable = true, -- Ensure git integration is enabled
ignore = false, -- Do not ignore git ignored files
},
sync_root_with_cwd = true,
respect_buf_cwd = true,
update_focused_file = {
enable = true,
update_root = true
},
})
-- Open Nvim Tree on startup
-- vim.cmd [[NvimTreeToggle]]
-- Termux LSP
vim.api.nvim_create_autocmd({ "BufEnter" }, {
pattern = { "build.sh", "*.subpackage.sh", "PKGBUILD", "*.install",
"makepkg.conf", "*.ebuild", "*.eclass", "color.map", "make.conf" },
callback = function()
vim.lsp.start({
name = "termux",
cmd = { "termux-language-server" }
})
end,
})