blob: e7a7d21abbfeb6b5191a2c8e484dc3a96bd7900a (
plain) (
blame)
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
|
local lib = require('mango.lib')
local api = vim.api
local o = vim.opt
local g = vim.g
local augroup = api.nvim_create_augroup('Mango', { clear = true })
o.nu = true
o.relativenumber = true
o.exrc = true
o.secure = true
g.guifont = { 'Iosevka Smooth Term', ':h16' }
lib.set_tab_width(4)
o.expandtab = false
o.smartindent = true
o.wrap = false
o.swapfile = false
o.backup = false
o.undodir = os.getenv('XDG_STATE_HOME') .. '/nvim/undo'
o.undofile = true
o.hlsearch = true
o.incsearch = true
o.termguicolors = true
o.scrolloff = 8
-- TODO: Research
-- o.signcolumn = 'yes'
-- o.isfname:append('@-@')
o.updatetime = 50
o.colorcolumn = '81'
o.splitright = true
o.splitbelow = true
-- Disable auto commenting
api.nvim_create_autocmd('BufEnter', {
callback = function()
o.formatoptions:remove({ 'c', 'r', 'o' })
end,
group = augroup,
})
-- Make buffer auto-reverting work… somehow
g.autoread = true
api.nvim_create_autocmd('CursorHold', {
command = 'checktime | call feedkeys("lh")',
group = augroup,
})
-- This has to be done to enable linenumbers in netrw
g.netrw_bufsettings = 'noma nomod nu nobl nowrap ro'
-- Allow for jumping between these pairs with %
o.matchpairs:append('<:>')
o.matchpairs:append('‘:’')
o.matchpairs:append('“:”')
-- Disable the netrw banner
g.netrw_banner = 0
g.netrw_list_hide = [[^\(\.\|\.\.\)/\?$]]
|