summaryrefslogtreecommitdiff
path: root/lua/ui.lua
blob: c9c0bfbe178562745dcdd240f7cb4ef6617a86ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
local pk_use = require 'packer'.use
local ct = require 'conftool'

--
-- Theme
--

pk_use {
	'Mofiqul/adwaita.nvim',
	config = function()
		local ct = require('conftool')
		ct.set({'background', 'dark'})
		-- vim.g.adwaita_darker = true
		vim.cmd [[colo adwaita]]
		vim.keymap.set(
			'n',
			'<Leader>c',
			function()
				if vim.o.background == 'light' then
					vim.o.background = 'dark'
				else
					vim.o.background = 'light'
					vim.api.nvim_set_hl(0, 'ColorColumn', {bg = '#c0bfbc'})
					vim.cmd('redraw')
					vim.cmd('redraw')
				end
			end,
			{noremap = true}
		)

	end
}


--
-- Buffer Bar
--
--[[
pk_use {
	'romgrk/barbar.nvim',
	config = function()
		require('bufferline').setup {
			animation = false,
			auto_hide = true,
			icons = {
				filetype = {
					custom_colors = false,
					enabled = false
				},
				inactive = {left = ' '},
				modified = {button = '*'},
				-- separator = {left = '|'},
				pinned = {button = '!'},
				button = 'X'
			},
			sidebar_filetypes = {
				aerial = true,
				netrw = true
			}
		}
	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 {
	'nathanaelkane/vim-indent-guides',
	setup = function()
		vim.g.indent_guides_guide_size = 1
		vim.g.indent_guides_tab_guides = 0
		vim.g.indent_guides_start_level = 2
		vim.g.indent_guides_enable_on_vim_startup = 1
	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}
)

-- Rainbow Delimiters
pk_use {
	'hiphish/rainbow-delimiters.nvim',
}

-- dont show line number in terminal window
vim.cmd('autocmd TermOpen * setlocal nonu')
-- turn on mouse
vim.opt.mouse = 'a'