Autocommit 2024-53-25 03:53:46
This commit is contained in:
59
init.lua
59
init.lua
@@ -1,18 +1,18 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.opt.title = true
|
||||
vim.opt.mouse=""
|
||||
vim.opt.mouse = ""
|
||||
vim.opt.wrap = true
|
||||
vim.opt.fileencoding = "utf-8"
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.completeopt = {"menu", "menuone", "preview", "noselect"}
|
||||
vim.opt.completeopt = { "menu", "menuone", "preview", "noselect" }
|
||||
vim.opt.termguicolors = false
|
||||
vim.opt.laststatus = 3
|
||||
--- Search
|
||||
vim.opt.ignorecase=true
|
||||
vim.opt.smartcase=true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
--- Numbers
|
||||
vim.opt.number=true
|
||||
vim.opt.relativenumber=true
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
--- Tab Options
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.smarttab = true
|
||||
@@ -32,7 +32,6 @@ vim.opt.sidescrolloff = 8
|
||||
--- Swapfile
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
|
||||
--- Keymap
|
||||
-- Resource
|
||||
vim.keymap.set("n", "<leader>r", ":source ~/.config/nvim/init.lua<cr>")
|
||||
@@ -47,7 +46,7 @@ vim.keymap.set("n", "<M-O>b", "<C-w>j")
|
||||
vim.keymap.set("n", "-", ":vertical resize -3<cr>")
|
||||
vim.keymap.set("n", "+", ":vertical resize +3<cr>")
|
||||
-- Buffer
|
||||
vim.keymap.set("n", "<Tab>", ":buffer ")
|
||||
vim.keymap.set("n", "<Tab>", ":buffer ")
|
||||
-- Tabs
|
||||
vim.keymap.set("n", "<leader>tn", ":tabnew<cr>")
|
||||
vim.keymap.set("n", "<leader>tc", ":tabclose<cr>")
|
||||
@@ -79,28 +78,28 @@ local function command(cmd)
|
||||
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%% "
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user