Compare commits
No commits in common. "843d400e2e70da761073706ac909368f76eee8b2" and "de011cad9d57ec6614d59b47a79d86b501f6aaf4" have entirely different histories.
843d400e2e
...
de011cad9d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
/lazy-lock.json
|
/lazy-lock.json
|
||||||
|
/custom.lua
|
||||||
|
|
18
init.lua
18
init.lua
|
@ -1,3 +1,6 @@
|
||||||
|
-- enable read config from CWD
|
||||||
|
vim.o.exrc = true
|
||||||
|
|
||||||
-- enable 24-bit color for nvim-notify
|
-- enable 24-bit color for nvim-notify
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
@ -43,10 +46,23 @@ vim.keymap.set("n", "<leader>c", "<cmd>bdelete<cr>", { silent = true })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>nh", "<cmd>nohlsearch<cr>", { silent = true })
|
vim.keymap.set("n", "<leader>nh", "<cmd>nohlsearch<cr>", { silent = true })
|
||||||
|
|
||||||
|
-- Load custom config
|
||||||
|
custom = {
|
||||||
|
full_feature = false,
|
||||||
|
proxy_url = "",
|
||||||
|
}
|
||||||
|
|
||||||
|
local custom_config_path = vim.fn.stdpath("config") .. "/custom.lua"
|
||||||
|
local ok, t = pcall(dofile, custom_config_path)
|
||||||
|
if ok then
|
||||||
|
for k, v in pairs(t) do
|
||||||
|
custom[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Use lazy.nvim as plugin manager, and load plugin's config
|
-- Use lazy.nvim as plugin manager, and load plugin's config
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.uv.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
|
|
|
@ -62,6 +62,7 @@ local lua_ls_opts = {
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
enabled = custom.full_feature,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
|
enabled = custom.full_feature,
|
||||||
main = "bufferline",
|
main = "bufferline",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
|
|
|
@ -2,6 +2,7 @@ return {
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
main = "gitsigns",
|
main = "gitsigns",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
enabled = custom.full_feature,
|
||||||
opts = {
|
opts = {
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
|
|
|
@ -8,6 +8,7 @@ end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
|
enabled = custom.full_feature,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
"dokwork/lualine-ex",
|
"dokwork/lualine-ex",
|
||||||
|
|
Loading…
Reference in a new issue