-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
77 lines (61 loc) · 1.62 KB
/
Copy pathinit.lua
File metadata and controls
77 lines (61 loc) · 1.62 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
require("config.lazy")
require("config.autocmds")
require('lualine').setup()
-- Line numbers
vim.opt.number = true
-- Relative line numbers (vim-like)
vim.opt.relativenumber = true
-- Indentation
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.autoindent = true
vim.opt.smartindent = true
-- Highlight the current line
vim.opt.cursorline = true
-- Don't wrap long lines
vim.opt.wrap = false
-- Don't create backup files
vim.opt.backup = false
vim.opt.swapfile = false
-- Persistent undo and smooth scrolling
vim.opt.smoothscroll = true
vim.opt.undofile = true
vim.opt.undolevels = 10000
-- Search
vim.opt.hlsearch = false
vim.opt.incsearch = true
-- Color columns (ruler)
vim.opt.colorcolumn = {"80", "120"}
-- Auto-reload files changed outside Neovim
vim.opt.autoread = true
-- termguicolors is enabled by default since Nvim 0.10+
-- Disable the laggy matching-paren highlight
vim.g.loaded_matchparen = 1
vim.opt.list = false
vim.opt.listchars = {
tab = '→ ',
trail = '•',
extends = '⟩',
precedes = '⟨',
nbsp = '␣',
space = '·',
}
-- Show invisible characters only while in Visual mode
vim.api.nvim_create_autocmd('ModeChanged', {
pattern = '*:[vV\x16]*', -- Entering Visual, Visual Line, or Visual Block
callback = function()
vim.opt.list = true
end,
})
vim.api.nvim_create_autocmd('ModeChanged', {
pattern = '[vV\x16]*:*', -- Leaving Visual mode
callback = function()
vim.opt.list = false
end,
})
-- Colors for invisible characters
vim.cmd([[
highlight Whitespace guifg=#3b4261 gui=NONE
highlight NonText guifg=#3b4261 gui=NONE
]])