-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.lua
109 lines (74 loc) · 2.4 KB
/
options.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
local opt = vim.opt
local g = vim.g
-- Print the line number in the left fridge
opt.number = true
-- Use relative line numbers
opt.relativenumber = true
-- Tabs displays as four spaces
opt.tabstop = 4
-- Tabs represent four spaces in all other modes
opt.softtabstop = 4
-- Shift indent by four spaces (with '<' or '>')
opt.shiftwidth = 4
-- Tabs is expanded to into spaces in insert mode
opt.expandtab = true
-- Auto indent when possible
opt.autoindent = true
-- Keep indentation of existing lines when auto indenting
opt.copyindent = true
-- Preserve indentation between changes
opt.preserveindent = true
-- Keep an 'undo' file persisted across sessions
opt.undofile = true
-- Enable 24-bit RGB colors in the TUI
opt.termguicolors = true
-- Keep some space between the cursor and the end of the page
opt.scrolloff = 8
-- Draw the sign column always
opt.signcolumn = 'yes'
-- Keep the swap file updated every 50 milliseconds of inactivity
opt.updatetime = 50
-- Use the system clipboard by default
opt.clipboard = 'unnamedplus'
-- Ignore casing when searching a file
opt.wildignorecase = true
-- Set completeopt to have a better completion experience
opt.completeopt = { 'menu', 'menuone', 'noselect' }
-- Show white spaces
opt.list = true
-- Chars to show for
opt.listchars = { eol = '↲', tab = '▸ ', space = '·' }
-- Abbreviate command line messages
opt.shortmess = 'filnxtToOFsS'
-- Abbreviate command line messages
opt.showmode = false
-- Show the status line always
opt.laststatus = 2
-- Default diffing options
opt.diffopt = { 'internal', 'filler', 'closeoff', 'linematch:60' }
-- We handle this manually in `after/plugin/autocmd.lua`
opt.exrc = false
-- Open vertical splits to the right
opt.splitright = true
-- Incremental search with a split window
opt.inccommand = 'split'
-- Small window before the popup apears
vim.opt.timeoutlen = 200
-- Set the language to American English
vim.cmd [[language en_US.UTF-8]]
-- Turn on spell check
opt.spell = true
-- editorconfig integration
g.editorconfig = true
-- Leader and localleader mappings
g.mapleader = ' '
g.maplocalleader = ' m'
-- By default, don't show hidden files in netrw. Can be toggled with `gh`.
g.netrw_list_hide = [[\(^\|\s\s\)\zs\.\S\+]]
g.netrw_hide = 1
-- Don't show the banner
g.netrw_banner = false
-- Keep the current directory separate from the browsing directory
g.netrw_keepdir = 1
-- Highlight the current line
opt.cursorline = true