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
|
local pk_use = require 'packer'.use
local ct = require 'conftool'
--
-- Theme
--
vim.cmd('syntax on')
--[[
pk_use {
'ellisonleao/gruvbox.nvim',
config = function()
require('conftool').set({'background', "light"})
require('gruvbox').setup({
italic = true,
bold = true,
contrast = "hard"
})
vim.cmd [[colo gruvbox]]
-- end
--}
--]]
pk_use {
'Shatur/neovim-ayu',
config = function()
local ct = require('conftool')
local hr = os.date('*t').hour
--[[
if hr >= 21 then
ct.set({'background', 'dark'})
elseif hr >= 7 then
ct.set({'background', 'light'})
elseif hr >= 0 then
ct.set({'background', 'light'})
end
]]--
ct.set({'background', 'light'})
require('ayu').setup {
mirage = false,
}
vim.cmd [[colorscheme ayu]]
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
}
--
-- EtC.
--
ct.set('ruler', 'showcmd', 'cursorline', 'number', 'termguicolors', 'title')
ct.set(
{'signcolumn', 'yes:1'},
{'laststatus', 1},
{'background', 'light'},
{'conceallevel', 0},
{'textwidth', 0},
{'wrapmargin', 0},
{'laststatus', 1}
)
-- dont show line number in terminal window
vim.cmd('autocmd TermOpen * setlocal nonu')
-- turn on mouse
vim.opt.mouse = 'a'
|