55 lines
1.1 KiB
Lua
55 lines
1.1 KiB
Lua
-- settings.lua
|
|
|
|
local cmd = vim.cmd
|
|
local scopes = {o = vim.o, bo = vim.bo, wo = vim.wo}
|
|
|
|
local function opt(scope, key, value)
|
|
scopes[scope][key] = value
|
|
if scope ~= 'o' then scopes['o'][key] = value end
|
|
end
|
|
|
|
|
|
---- Misc Options
|
|
-- global options
|
|
opt('o', 'swapfile', true)
|
|
opt('o', 'dir', '/tmp')
|
|
opt('o', 'smartcase', true)
|
|
opt('o', 'laststatus', 2)
|
|
opt('o', 'hlsearch', true)
|
|
opt('o', 'incsearch', true)
|
|
opt('o', 'ignorecase', true)
|
|
opt('o', 'scrolloff', 12)
|
|
opt('o', 'mouse', 'a')
|
|
|
|
-- window-local options
|
|
opt('wo', 'number', true)
|
|
opt('wo', 'wrap', false)
|
|
|
|
-- buffer-local options
|
|
opt('bo', 'shiftwidth', 4)
|
|
opt('bo', 'tabstop', 4)
|
|
opt('bo', 'softtabstop', 4)
|
|
opt('bo', 'expandtab', true)
|
|
opt('bo', 'autoindent', true)
|
|
|
|
---- Theme
|
|
-- Font
|
|
opt('o', 'guifont', 'Source Code Pro for Powerline')
|
|
|
|
-- Statusline
|
|
local lualine = require('lualine')
|
|
lualine.status()
|
|
|
|
-- Bufferline
|
|
local bufferline = require('bufferline')
|
|
bufferline.setup()
|
|
|
|
local function ColorDarcula()
|
|
lualine.options.theme = 'onedark'
|
|
vim.g.limelight_conceal_ctermfg = 'gray'
|
|
cmd 'colorscheme darcula'
|
|
end
|
|
|
|
opt('bo', 'syntax', 'on')
|
|
ColorDarcula()
|