maybe move away from nvchad/base46

scratch
Gabe Farrell 2 years ago
parent 39bb1219dc
commit a320162cf4

@ -3,7 +3,7 @@ vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true vim.opt.termguicolors = true
-- nvchad ui stuff -- nvchad ui stuff
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46_cache/" -- vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46_cache/"
vim.g.mapleader = " " vim.g.mapleader = " "
vim.keymap.set({ "n", "v" }, "<Left>", "") vim.keymap.set({ "n", "v" }, "<Left>", "")
@ -38,11 +38,17 @@ require("lazy").setup { import = "plugins" }
-- dofile(vim.g.base46_cache .. "nvimtree") -- dofile(vim.g.base46_cache .. "nvimtree")
-- or if you want to load all base46 integrations at startup itself -- or if you want to load all base46 integrations at startup itself
local integrations = require("nvconfig").base46.integrations -- local integrations = require("nvconfig").base46.integrations
--
for _, name in ipairs(integrations) do -- for _, name in ipairs(integrations) do
dofile(vim.g.base46_cache .. name) -- dofile(vim.g.base46_cache .. name)
end -- end
-- start lualine
local lineopts = require "configs.lualine"
require("lualine").setup(lineopts)
local bufferline = require "bufferline"
bufferline.setup {}
vim.o.number = true vim.o.number = true
-- require("nvim-tree.api").tree.open() -- open tree on start -- require("nvim-tree.api").tree.open() -- open tree on start

@ -1,7 +1,8 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" }, "LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" },
"base46": { "branch": "v2.5", "commit": "adb64a6ae70f8c61c5ab8892f07d29dafd4d47ad" }, "bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" },
"catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
@ -13,6 +14,7 @@
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "ca9eaccc154578064366d99de7b02f8231c383eb" }, "lsp-zero.nvim": { "branch": "v3.x", "commit": "ca9eaccc154578064366d99de7b02f8231c383eb" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
@ -22,8 +24,8 @@
"nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" }, "nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" },
"nvim-treesitter": { "branch": "master", "commit": "2a95ff14764af20d32ec1edb27e11c38a84b9478" }, "nvim-treesitter": { "branch": "master", "commit": "2a95ff14764af20d32ec1edb27e11c38a84b9478" },
"nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" },
"nvimgelion": { "branch": "main", "commit": "28f3b71f8545ff002a1c08ca928799cdf660eccf" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"telescope.nvim": { "branch": "master", "commit": "4d4ade7f2b8f403e8816ca50c05ed16e259b21fb" }, "telescope.nvim": { "branch": "master", "commit": "4d4ade7f2b8f403e8816ca50c05ed16e259b21fb" },
"ui": { "branch": "v2.5", "commit": "e1af69426b3c4b55c88bd1c81790c1c73b30bfa8" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" } "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }
} }

@ -7,18 +7,18 @@ return {
changedelete = { text = "~" }, changedelete = { text = "~" },
untracked = { text = "" }, untracked = { text = "" },
}, },
--
on_attach = function(bufnr) -- on_attach = function(bufnr)
local gs = package.loaded.gitsigns -- local gs = package.loaded.gitsigns
--
local function opts(desc) -- local function opts(desc)
return { buffer = bufnr, desc = desc } -- return { buffer = bufnr, desc = desc }
end -- end
--
local map = vim.keymap.set -- local map = vim.keymap.set
--
map("n", "<leader>rh", gs.reset_hunk, opts "Reset Hunk") -- map("n", "<leader>rh", gs.reset_hunk, opts "Reset Hunk")
map("n", "<leader>ph", gs.preview_hunk, opts "Preview Hunk") -- map("n", "<leader>ph", gs.preview_hunk, opts "Preview Hunk")
map("n", "<leader>gb", gs.blame_line, opts "Blame Line") -- map("n", "<leader>gb", gs.blame_line, opts "Blame Line")
end, -- end,
} }

@ -3,7 +3,7 @@ local o = vim.o
local g = vim.g local g = vim.g
-------------------------------------- globals ----------------------------------------- -------------------------------------- globals -----------------------------------------
g.toggle_theme_icon = "" -- g.toggle_theme_icon = "  "
-------------------------------------- options ------------------------------------------ -------------------------------------- options ------------------------------------------
o.laststatus = 3 -- this line is necessary otherwise statusline breaks o.laststatus = 3 -- this line is necessary otherwise statusline breaks
@ -67,3 +67,6 @@ vim.api.nvim_create_autocmd("TextYankPost", {
vim.highlight.on_yank { timeout = 500 } vim.highlight.on_yank { timeout = 500 }
end, end,
}) })
-- set colorscheme
vim.cmd.colorscheme "catppuccin-mocha"

@ -1,8 +1,8 @@
return { return {
"NvChad/base46", -- "NvChad/base46",
branch = "v2.5", -- branch = "v2.5",
lazy = true, -- lazy = true,
build = function() -- build = function()
require("base46").load_all_highlights() -- require("base46").load_all_highlights()
end, -- end,
} }

@ -0,0 +1 @@
return { "akinsho/bufferline.nvim", version = "*", dependencies = "nvim-tree/nvim-web-devicons" }

@ -0,0 +1,39 @@
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
config = function()
require("catppuccin").setup {
color_overrides = {
mocha = {
rosewater = "#efc9c2",
flamingo = "#ebb2b2",
pink = "#f2a7de",
mauve = "#b889f4",
red = "#ea7183",
maroon = "#ea838c",
peach = "#f39967",
yellow = "#eaca89",
green = "#96d382",
teal = "#78cec1",
sky = "#91d7e3",
sapphire = "#68bae0",
blue = "#739df2",
lavender = "#a0a8f6",
text = "#b5c1f1",
subtext1 = "#a6b0d8",
subtext0 = "#959ec2",
overlay2 = "#848cad",
overlay1 = "#717997",
overlay0 = "#63677f",
surface2 = "#505469",
surface1 = "#3e4255",
surface0 = "#2c2f40",
base = "#1a1c2a",
mantle = "#141620",
crust = "#0e0f16",
},
},
}
end,
}

@ -28,6 +28,7 @@ return {
yaml = { { "prettierd", "prettier" } }, yaml = { { "prettierd", "prettier" } },
markdown = { { "prettierd", "prettier" } }, markdown = { { "prettierd", "prettier" } },
["markdown.mdx"] = { { "prettierd", "prettier" } }, ["markdown.mdx"] = { { "prettierd", "prettier" } },
ruby = { { "prettierd", "prettier" } },
}, },
}, },
config = function(_, opts) config = function(_, opts)

@ -2,7 +2,8 @@ return {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
event = "User FilePost", event = "User FilePost",
opts = function() opts = function()
return require "configs.gitsigns" -- return require "configs.gitsigns"
return {}
end, end,
config = function(_, opts) config = function(_, opts)
dofile(vim.g.base46_cache .. "git") dofile(vim.g.base46_cache .. "git")

@ -11,6 +11,6 @@ return {
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level) hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level)
require("ibl").setup(opts) require("ibl").setup(opts)
dofile(vim.g.base46_cache .. "blankline") -- dofile(vim.g.base46_cache .. "blankline")
end, end,
} }

@ -3,7 +3,7 @@ return {
"williamboman/mason.nvim", "williamboman/mason.nvim",
cmd = { "Mason", "MasonInstall", "MasonUpdate" }, cmd = { "Mason", "MasonInstall", "MasonUpdate" },
config = function(_, opts) config = function(_, opts)
dofile(vim.g.base46_cache .. "mason") -- dofile(vim.g.base46_cache .. "mason")
require("mason").setup(opts) require("mason").setup(opts)
end, end,
}, },
@ -46,43 +46,4 @@ return {
}, },
{ "neovim/nvim-lspconfig" }, { "neovim/nvim-lspconfig" },
{ "hrsh7th/cmp-nvim-lsp" }, { "hrsh7th/cmp-nvim-lsp" },
{
"hrsh7th/nvim-cmp",
dependencies = {
{
-- snippet plugin
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
config = function(_, opts)
require("luasnip").config.set_config(opts)
require "configs.luasnip"
end,
},
-- autopairing of (){}[] etc
{
"windwp/nvim-autopairs",
opts = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
},
config = function(_, opts)
require("nvim-autopairs").setup(opts)
-- setup cmp for autopairs
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},
-- cmp sources plugins
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
},
} }

@ -0,0 +1,4 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
}

@ -0,0 +1,39 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
{
-- snippet plugin
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
config = function(_, opts)
require("luasnip").config.set_config(opts)
require "configs.luasnip"
end,
},
-- autopairing of (){}[] etc
{
"windwp/nvim-autopairs",
opts = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
},
config = function(_, opts)
require("nvim-autopairs").setup(opts)
-- setup cmp for autopairs
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},
-- cmp sources plugins
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
}

@ -12,7 +12,7 @@ return {
require "configs.nvim-tree" require "configs.nvim-tree"
end, end,
config = function(_, opts) config = function(_, opts)
dofile(vim.g.base46_cache .. "devicons") -- dofile(vim.g.base46_cache .. "devicons")
require("nvim-web-devicons").setup(opts) require("nvim-web-devicons").setup(opts)
end, end,
}, },

@ -0,0 +1,6 @@
return {
"nyngwang/nvimgelion",
config = function()
-- do whatever you want for further customization~
end,
}

@ -2,4 +2,13 @@ local map = vim.keymap.set
return { return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" }, dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("telescope").setup {
pickers = {
colorscheme = {
enable_preview = true,
},
},
}
end,
} }

@ -7,8 +7,8 @@ return {
return require "configs.treesitter" return require "configs.treesitter"
end, end,
config = function(_, opts) config = function(_, opts)
dofile(vim.g.base46_cache .. "syntax") -- dofile(vim.g.base46_cache .. "syntax")
dofile(vim.g.base46_cache .. "treesitter") -- dofile(vim.g.base46_cache .. "treesitter")
require("nvim-treesitter.configs").setup(opts) require("nvim-treesitter.configs").setup(opts)
end, end,
} }

@ -1,8 +1,8 @@
return { return {
"NvChad/ui", -- "NvChad/ui",
lazy = false, -- lazy = false,
branch = "v2.5", -- branch = "v2.5",
config = function() -- config = function()
require "nvchad" -- require "nvchad"
end, -- end,
} }

@ -20,9 +20,14 @@ map("n", "<leader>fh", builtin.help_tags, { desc = "[f]ind [h]elp" })
map("n", "<leader>fg", "<cmd>Telescope current_buffer_fuzzy_find<CR>", { desc = "[f]ile [g]rep" }) map("n", "<leader>fg", "<cmd>Telescope current_buffer_fuzzy_find<CR>", { desc = "[f]ile [g]rep" })
map("n", "<leader>cm", "<cmd>Telescope git_commits<CR>", { desc = "Telescope Git commits" }) map("n", "<leader>cm", "<cmd>Telescope git_commits<CR>", { desc = "Telescope Git commits" })
map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", { desc = "Telescope Git status" }) map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", { desc = "Telescope Git status" })
map("n", "<leader>th", "<cmd>Telescope colorscheme<CR>", { desc = "[th]eme switcher" })
-- base46 maps -- base46 maps
map("n", "<leader>th", "<cmd>Telescope themes<CR>", { desc = "[th]emes" }) map("n", "<leader>rt", function()
os.execute('rm -r "' .. vim.g.base46_cache .. '"')
require("base46").load_all_highlights()
vim.api.nvim_exec_autocmds("User", { pattern = "NvChadThemeReload" })
end)
-- nvim-tree mapping -- nvim-tree mapping
map("n", "<leader>e", "<cmd>NvimTreeOpen<CR>") map("n", "<leader>e", "<cmd>NvimTreeOpen<CR>")
@ -33,17 +38,9 @@ map("n", "<leader>/", function()
end, { desc = "Comment Toggle" }) end, { desc = "Comment Toggle" })
-- tabufline -- tabufline
map("n", "<tab>", function() map("n", "<tab>", "<cmd>BufferLineCycleNext<CR>", { desc = "Buffer Goto next" })
require("nvchad.tabufline").next() map("n", "<S-tab>", "<cmd>BufferLineCyclePrev<CR>", { desc = "Buffer Goto Prev" })
end, { desc = "Buffer Goto next" }) map("n", "<leader>x", "<cmd>bdelete<CR>", { desc = "Buffer Close" })
map("n", "<S-tab>", function()
require("nvchad.tabufline").prev()
end, { desc = "Buffer Goto prev" })
map("n", "<leader>x", function()
require("nvchad.tabufline").close_buffer()
end, { desc = "Buffer Close" })
-- lsp -- lsp
map("n", "<leader>lf", vim.diagnostic.open_float, { desc = "Lsp floating diagnostics" }) map("n", "<leader>lf", vim.diagnostic.open_float, { desc = "Lsp floating diagnostics" })

Loading…
Cancel
Save