nvim/lua/settings.lua

65 lines
1.3 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
opt('o', 'backup', false)
opt('o', 'undodir', '/Users/fschmidt/.cache/nvim/undodir')
opt('o', 'smartcase', true)
opt('o', 'laststatus', 2)
opt('o', 'hidden', true)
opt('o', 'hlsearch', false)
opt('o', 'incsearch', true)
opt('o', 'ignorecase', true)
opt('o', 'scrolloff', 12)
opt('o', 'mouse', 'a')
opt('o', 'autochdir', true)
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)
opt('wo', 'signcolumn', 'yes')
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)
opt('bo', 'swapfile', false)
opt('bo', 'undofile', 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
require'lualine'.setup {
options = {
theme = 'onedark'
}
}
2021-02-24 18:33:43 +01:00
-- Bufferline
local bufferline = require('bufferline')
bufferline.setup()
local function ColorDarcula()
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()
-- File Navigation