2022-07-06 14:50:45 +00:00
|
|
|
-- global options
|
|
|
|
vim.g.mapleader = ";"
|
|
|
|
vim.g.clipboard = {
|
2022-09-24 07:59:11 +00:00
|
|
|
name = "sysclip",
|
|
|
|
copy = {
|
|
|
|
["+"] = { "xsel", "-b" },
|
|
|
|
["*"] = { "xsel", "-b" },
|
|
|
|
},
|
|
|
|
paste = {
|
|
|
|
["+"] = { "xsel", "-b" },
|
|
|
|
["*"] = { "xsel", "-b" },
|
|
|
|
},
|
2022-07-06 14:50:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
-- general options
|
|
|
|
vim.o.cursorline = true
|
|
|
|
vim.o.colorcolumn = 120
|
|
|
|
vim.o.scrolloff = 8
|
|
|
|
--vim.o.clipboard = "unnamedplus"
|
|
|
|
vim.o.expandtab = true
|
2022-07-10 02:25:46 +00:00
|
|
|
vim.o.tabstop = 4
|
|
|
|
vim.o.shiftwidth = 4
|
2022-07-06 14:50:45 +00:00
|
|
|
vim.o.list = true
|
|
|
|
vim.o.mouse = "a"
|
2022-07-10 02:25:46 +00:00
|
|
|
vim.o.ignorecase = true
|
|
|
|
vim.o.smartcase = true
|
2022-07-24 16:38:33 +00:00
|
|
|
vim.o.swapfile = false
|
2022-07-06 14:50:45 +00:00
|
|
|
|
|
|
|
-- window options
|
|
|
|
vim.wo.number = true
|
2022-07-07 15:29:02 +00:00
|
|
|
vim.wo.relativenumber = true
|
2022-07-06 14:50:45 +00:00
|
|
|
|
2022-07-24 16:38:33 +00:00
|
|
|
vim.cmd "set colorcolumn=120"
|
|
|
|
|
2022-07-06 14:50:45 +00:00
|
|
|
-- more
|
|
|
|
require("keybindings")
|
|
|
|
require("plugins")
|
|
|
|
|
2022-07-24 16:38:33 +00:00
|
|
|
local gruvbox_ok, _ = pcall(require, "gruvbox")
|
2022-07-06 14:50:45 +00:00
|
|
|
if gruvbox_ok then
|
2022-09-24 07:59:11 +00:00
|
|
|
vim.o.background = "dark"
|
|
|
|
vim.cmd [[
|
2022-07-06 14:50:45 +00:00
|
|
|
colorscheme gruvbox
|
|
|
|
highlight Normal ctermbg=None guibg=none
|
|
|
|
highlight CursorLine ctermbg=240
|
|
|
|
]]
|
|
|
|
end
|
2022-07-24 16:38:33 +00:00
|
|
|
|
|
|
|
|
2022-09-24 07:59:11 +00:00
|
|
|
-- format on save
|
2022-10-06 16:47:05 +00:00
|
|
|
vim.cmd [[autocmd BufWritePre *.go lua vim.lsp.buf.formatting_sync()]]
|
2022-09-24 07:59:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
-- open quickfix buffer after :grep or :vimgrep
|
|
|
|
vim.cmd [[
|
|
|
|
augroup quickfix
|
|
|
|
autocmd!
|
|
|
|
autocmd QuickFixCmdPost [^l]* cwindow
|
|
|
|
autocmd QuickFixCmdPost l* lwindow
|
|
|
|
augroup END
|
|
|
|
]]
|