neovim-config/lua/ui.lua

81 lines
1.4 KiB
Lua

local pk_use = require 'packer'.use
local ct = require 'conftool'
--
-- Theme
--
--vim.cmd('syntax on')
--vim.cmd('colo borterm')
pk_use {
'navarasu/onedark.nvim',
setup = function()
require('conftool').set({'background', 'dark'})
end,
config = function()
local theme = require('onedark')
theme.setup {
style = 'darker',
}
theme.load()
end
}
--
-- Buffer Bar
--
pk_use {
'romgrk/barbar.nvim',
config = function()
require('bufferline').setup {
animation = false,
auto_hide = true,
icons = false,
icon_separator_active = '|',
icon_separator_inactive = ' ',
icon_close_tab = 'X',
icon_close_tab_modified = '*',
icon_pinned = '!'
}
end
}
--
-- Indentation
--
vim.cmd('filetype plugin indent on')
ct.set('autoindent', 'smartindent', 'cindent')
ct.set({'tabstop', 5}, {'shiftwidth', 5})
--
-- Indent indicators
--
vim.opt.list = true
vim.cmd([[set lcs=tab:\|\ ]])
pk_use {
'Yggdroot/indentLine',
setup = function()
vim.g.indentLine_char = '|'
vim.g.indentLine_setConceal = 0
end
}
--
-- Misc.
--
ct.set('ruler', 'showcmd', 'cursorline', 'number', 'title')
ct.set(
{'termguicolors', true},
{'signcolumn', 'yes:1'},
{'conceallevel', 0},
{'colorcolumn', '81,121'},
{'textwidth', 0},
{'laststatus', 1},
{'wrapmargin', 0}
)
-- dont show line number in terminal window
vim.cmd('autocmd TermOpen * setlocal nonu')
-- turn on mouse
vim.opt.mouse = 'a'