nvim/lua/settings.lua

55 lines
1.1 KiB
Lua
Raw Normal View History

2021-02-24 18:33:43 +01:00
-- settings.lua
local cmd = vim.cmd
2021-02-24 19:14:06 +01:00
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
2021-02-24 18:33:43 +01:00
---- Misc Options
-- global options
2021-02-24 19:14:06 +01:00
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')
2021-02-24 18:33:43 +01:00
-- window-local options
2021-02-24 19:14:06 +01:00
opt('wo', 'number', true)
opt('wo', 'wrap', false)
2021-02-24 18:33:43 +01:00
-- buffer-local options
2021-02-24 19:14:06 +01:00
opt('bo', 'shiftwidth', 4)
opt('bo', 'tabstop', 4)
opt('bo', 'softtabstop', 4)
opt('bo', 'expandtab', true)
opt('bo', 'autoindent', true)
2021-02-24 18:33:43 +01:00
---- Theme
-- Font
2021-02-24 19:14:06 +01:00
opt('o', 'guifont', 'Source Code Pro for Powerline')
2021-02-24 18:33:43 +01:00
-- 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'
2021-02-24 18:33:43 +01:00
cmd 'colorscheme darcula'
end
2021-02-24 19:14:06 +01:00
opt('bo', 'syntax', 'on')
2021-02-24 18:33:43 +01:00
ColorDarcula()