adding catppuchin theme
This commit is contained in:
72
init.lua
72
init.lua
@@ -38,10 +38,10 @@ vim.keymap.set("n", "<leader>r", ":source ~/.config/nvim/init.lua<cr>")
|
||||
-- Explorer
|
||||
vim.keymap.set("n", "<C-e>", ":Lexplore<cr>")
|
||||
-- Windows
|
||||
vim.keymap.set("n", "<M-O>d", "<C-w>h")
|
||||
vim.keymap.set("n", "<M-O>c", "<C-w>l")
|
||||
vim.keymap.set("n", "<M-O>a", "<C-w>k")
|
||||
vim.keymap.set("n", "<M-O>b", "<C-w>j")
|
||||
vim.keymap.set("n", "<C-Left>", "<C-w>h")
|
||||
vim.keymap.set("n", "<C-Right>", "<C-w>l")
|
||||
vim.keymap.set("n", "<C-Up>", "<C-w>k")
|
||||
vim.keymap.set("n", "<C-Down>", "<C-w>j")
|
||||
-- Resize
|
||||
vim.keymap.set("n", "-", ":vertical resize -3<cr>")
|
||||
vim.keymap.set("n", "+", ":vertical resize +3<cr>")
|
||||
@@ -64,44 +64,42 @@ vim.keymap.set("n", "<leader>nh", ":nohl<cr>")
|
||||
--vim.keymap.set ("i", "[", "[]<Left>")
|
||||
|
||||
--- Statusline
|
||||
vim.cmd "highlight StatusNormal ctermbg=blue ctermfg=black"
|
||||
vim.cmd "highlight StatusModified ctermbg=red ctermfg=black"
|
||||
vim.cmd "highlight StatusGitBranch ctermbg=yellow ctermfg=black"
|
||||
vim.cmd "highlight StatusGitDiffAdd ctermbg=green ctermfg=black"
|
||||
vim.cmd "highlight StatusGitdiffRemove ctermbg=red ctermfg=black"
|
||||
vim.cmd("highlight StatusNormal ctermbg=blue ctermfg=black")
|
||||
vim.cmd("highlight StatusModified ctermbg=red ctermfg=black")
|
||||
vim.cmd("highlight StatusGitBranch ctermbg=yellow ctermfg=black")
|
||||
vim.cmd("highlight StatusGitDiffAdd ctermbg=green ctermfg=black")
|
||||
vim.cmd("highlight StatusGitdiffRemove ctermbg=red ctermfg=black")
|
||||
|
||||
local function command(cmd)
|
||||
local handle = io.popen(cmd)
|
||||
local result = handle:read()
|
||||
handle:close()
|
||||
return result or ""
|
||||
local handle = io.popen(cmd)
|
||||
local result = handle:read()
|
||||
handle:close()
|
||||
return result or ""
|
||||
end
|
||||
|
||||
vim.o.statusline = "%#StatusNormal# "
|
||||
.. "%#StatusGitBranch#"
|
||||
.. command("git branch 2> /dev/null | sed -e 's/..//'")
|
||||
.. "%#StatusNormal# "
|
||||
.. "%#StatusGitDiffAdd#"
|
||||
.. command("git diff --numstat | awk '{print \"+\"$1}'")
|
||||
.. "%#StatusNormal# "
|
||||
.. "%#StatusGitDiffRemove#"
|
||||
.. command("git diff --numstat | awk '{print \"-\"$2}'")
|
||||
.. "%#StatusNormal# "
|
||||
.. ">>"
|
||||
.. " %F "
|
||||
.. "%#StatusModified#"
|
||||
.. "%M"
|
||||
.. "%#StatusNormal#"
|
||||
.. " >>"
|
||||
.. "%="
|
||||
.. "<<"
|
||||
.. " %Y "
|
||||
.. "<<"
|
||||
.. " %l,%c "
|
||||
.. "<<"
|
||||
.. " %p%% "
|
||||
|
||||
|
||||
.. "%#StatusGitBranch#"
|
||||
.. command("git branch 2> /dev/null | sed -e 's/..//'")
|
||||
.. "%#StatusNormal# "
|
||||
.. "%#StatusGitDiffAdd#"
|
||||
.. command("git diff --numstat | awk '{print \"+\"$1}'")
|
||||
.. "%#StatusNormal# "
|
||||
.. "%#StatusGitDiffRemove#"
|
||||
.. command("git diff --numstat | awk '{print \"-\"$2}'")
|
||||
.. "%#StatusNormal# "
|
||||
.. ">>"
|
||||
.. " %F "
|
||||
.. "%#StatusModified#"
|
||||
.. "%M"
|
||||
.. "%#StatusNormal#"
|
||||
.. " >>"
|
||||
.. "%="
|
||||
.. "<<"
|
||||
.. " %Y "
|
||||
.. "<<"
|
||||
.. " %l,%c "
|
||||
.. "<<"
|
||||
.. " %p%% "
|
||||
|
||||
require("core")
|
||||
require("lazy.load")
|
||||
|
||||
Reference in New Issue
Block a user