2022-07-14 16:48:31 +00:00
|
|
|
-- autocmd.lua
|
|
|
|
--------------
|
|
|
|
|
|
|
|
-- Highlight on yank
|
|
|
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
|
|
|
pattern = "*",
|
2022-09-08 22:17:29 +00:00
|
|
|
callback = function()
|
|
|
|
vim.highlight.on_yank({ timeout = 1200 })
|
|
|
|
end,
|
2022-07-14 16:48:31 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
-- keybindings.lua
|
|
|
|
------------------
|
|
|
|
|
|
|
|
local set = vim.keymap.set
|
|
|
|
local opts = {
|
|
|
|
silent = true,
|
|
|
|
}
|
|
|
|
|
|
|
|
-- cmd string
|
|
|
|
local function cmd(command)
|
|
|
|
return "<cmd>" .. command .. "<CR>"
|
|
|
|
end
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
set("", "<Space>", "<Nop>", opts)
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
vim.g.maplocalleader = " "
|
|
|
|
|
2022-09-08 22:17:29 +00:00
|
|
|
--
|
|
|
|
|
2022-07-14 16:48:31 +00:00
|
|
|
set("n", "<space>l", cmd("noh"), opts)
|
|
|
|
|
|
|
|
set("v", ">", ">gv", opts)
|
|
|
|
set("v", "<", "<gv", opts)
|
|
|
|
|
2022-09-08 22:17:29 +00:00
|
|
|
set("n", "<C-d>", cmd("bd"), opts)
|
|
|
|
|
2022-07-14 16:48:31 +00:00
|
|
|
-- options.lua
|
|
|
|
--------------
|
|
|
|
|
|
|
|
local o = vim.o
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2022-09-08 22:17:29 +00:00
|
|
|
o.mouse = ""
|
|
|
|
|
2022-07-14 16:48:31 +00:00
|
|
|
o.expandtab = true
|
|
|
|
o.tabstop = 4
|
|
|
|
o.shiftwidth = 4
|
|
|
|
o.smartindent = true
|
|
|
|
|
|
|
|
o.number = true
|
|
|
|
|
|
|
|
o.ignorecase = true
|
|
|
|
o.smartcase = true
|
|
|
|
|
|
|
|
o.gdefault = true
|
|
|
|
|
|
|
|
o.termguicolors = true
|
|
|
|
|
|
|
|
o.wrap = false
|
|
|
|
|
|
|
|
o.whichwrap = "b,s,h,l,<,>,[,]"
|
|
|
|
|
|
|
|
o.clipboard = "unnamedplus"
|
|
|
|
|
|
|
|
o.undofile = true
|
|
|
|
|
|
|
|
o.showmode = false
|
|
|
|
|
|
|
|
o.scrolloff = 3
|
|
|
|
o.sidescrolloff = 5
|
|
|
|
|
|
|
|
o.cursorline = true
|
|
|
|
|
|
|
|
o.shell = "/usr/bin/fish"
|
|
|
|
|
|
|
|
o.confirm = true
|
|
|
|
|
|
|
|
o.linebreak = true
|
|
|
|
|
|
|
|
o.laststatus = 3
|
|
|
|
|
|
|
|
o.pumblend = 10
|