-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
114 lines (92 loc) · 2.13 KB
/
init.lua
File metadata and controls
114 lines (92 loc) · 2.13 KB
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
-- ------------ --
-- Vim Behavior --
-- ------------ --
vim.o.tildeop = true
vim.o.gdefault = true
vim.o.showmode = false
vim.o.exrc = true
vim.opt.shortmess:append('I')
vim.opt.display:append('uhex')
vim.opt.guicursor:append('v:VisualCursor')
vim.opt.fillchars:append {
eob = ' ',
fold = ' ',
msgsep = '\u{2500}',
}
vim.o.title = true
vim.o.splitbelow = false
vim.o.splitright = true
vim.o.wrapscan = true
vim.o.timeout = false
if vim.fn.executable('fish') == 1 then
vim.o.shell = 'fish'
end
-- UI2
local msg_height = 0.5
require('vim._core.ui2').enable {
enabled = true,
msg = {
cmd = { height = msg_height },
dialog = { height = msg_height },
msg = { height = msg_height },
pager = { height = msg_height },
},
}
-- ---------------- --
-- Buffer (General) --
-- ---------------- --
vim.o.smoothscroll = true
vim.o.undofile = true
vim.o.breakindent = true
vim.opt.breakindentopt:append('list:-1')
-- Use autocommand to override any changes made by ftplugins
vim.api.nvim_create_autocmd('BufEnter', {
group = vim.api.nvim_create_augroup('config.opts', {}),
command = 'setlocal formatoptions-=o',
})
-- ------------- --
-- Status Column --
-- ------------- --
vim.o.statuscolumn = '%s%C %l '
-- Line number column
vim.o.number = true
vim.o.relativenumber = true
-- Fold column
vim.o.foldcolumn = '1'
vim.opt.fillchars:append {
foldopen = '\u{f47c}',
foldclose = '\u{f460}',
foldsep = ' ',
foldinner = ' ',
}
-- Sign column
vim.o.signcolumn = 'auto:1-9'
-- -------------------------- --
-- Indentation and Whitespace --
-- -------------------------- --
vim.o.expandtab = true
vim.o.shiftwidth = 2
vim.o.tabstop = 4 -- Width of a <Tab> character
vim.o.softtabstop = -1 -- Follow 'shiftwidth'
vim.o.list = true
vim.opt.listchars = {
tab = '> ',
nbsp = '+',
}
-- ----- --
-- Mouse --
-- ----- --
vim.o.mouse = 'nvi'
vim.o.mousescroll = 'ver:1,hor:2'
vim.cmd.aunmenu 'PopUp.How-to\\ disable\\ mouse'
vim.cmd.aunmenu 'PopUp.-2-'
-- ------ --
-- Leader --
-- ------ --
local k = vim.keycode
vim.g.mapleader = k'<Space>'
vim.g.maplocalleader = k'<Bslash>'
-- ------- --
-- Plugins --
-- ------- --
vim.g.netrw_banner = false