dotfiles/cli/vim/neovim/init.lua

51 lines
1.0 KiB
Lua
Raw Normal View History

2022-07-06 14:50:45 +00:00
-- global options
vim.g.mapleader = ";"
vim.g.clipboard = {
name = "sysclip",
copy = {
["+"] = {"xsel", "-b"},
["*"] = {"xsel", "-b"},
},
paste = {
["+"] = {"xsel", "-b"},
["*"] = {"xsel", "-b"},
},
}
-- 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
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
vim.o.background = "dark"
vim.cmd [[
colorscheme gruvbox
highlight Normal ctermbg=None guibg=none
highlight CursorLine ctermbg=240
]]
end
2022-07-24 16:38:33 +00:00
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.formatting_sync()]]