-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_init.lua
117 lines (100 loc) · 3.04 KB
/
demo_init.lua
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
110
111
112
113
114
115
116
117
-- Configure `where-am-i`
local default_opts = {
-- optional features
features = {
keymaps = {
enable = true,
},
user_commands = {
enable = true,
},
},
display = {
-- Position of the floating window relative to the current window
position = {
-- The starting point for position evaluations.
--
-- Can be an abbreviated cardinal direction ("N", "NW", etc.) or "center"
anchor = "SE",
},
size = {
-- The height of the floating window in rows
--
-- Can be a number of rows or the string "message_length" for adaptive
-- sizing.
height = "message_height",
-- The width of the floating buffer
--
-- Can be a number of columns or the string "message_length" for adaptive
-- sizing.
width = "message_length",
},
style = {
-- The border style used by the float
--
-- Possible options are exactly the same as what you'd find for
-- `:help nvim_open_win`'s border property
--
-- (eg. "single", "double", "rounded", "solid", "shadow", etc.)
border = "single",
-- Highlight group mappings.
-- `key` = `where-am-i.nvim` highlight group
-- `value` = A highlight group from your configuration to link to
highlights = {
hl_where_am_i_normal_float = "NormalFloat",
},
},
content = {
-- show and configure a line containing the file path of the file
-- loaded to the currently active vim buffer
file_path = {
enable = true,
-- possible_values = {
-- "filename_only"
-- "parent_dir_path"
-- "present_working_dir_path"
-- "system_path"
-- }
format = "filename_only",
},
},
functionality = {
-- The default command passed when running ":WhereAmI" with no arguments
default_command = "please_tell_me",
-- The buffer name given to the float. You probably don't care about this
-- and can leave it set to the default
floating_buffer_name = "where_am_i_float",
-- The amount of time in milliseconds that the float should stay open
-- before automatically closing.
--
-- Can be a number of milliseconds, or the string "infinite" to never auto
-- close.
hang_time = 1500,
},
},
}
require("where-am-i").setup(default_opts)
-- Set up a colorscheme
local theme = "dark"
local background_color = theme == "light" and "#f9f5d7" or "#1d2021"
require("gruvbox").setup({
overrides = {
Comment = { bold = true },
Winbar = { bg = "NONE", bold = true, fg = 4 },
WinbarNC = { bg = "NONE", bold = true, fg = 8 },
Normal = { bg = background_color },
NormalFloat = { bg = background_color },
},
})
vim.cmd([[
colorscheme gruvbox
set laststatus=0
hi! link StatusLine Normal
hi! link StatusLineNC Normal
set statusline=%{repeat('─',winwidth('.'))}
]])
vim.opt.background = theme
-- Hide the command line
vim.opt.cmdheight = 0
-- Telescope is helpful for debugging
require("telescope").setup({})