|
1 | 1 | -- [[ Setting options ]] |
2 | | --- See `:help vim.opt` |
| 2 | +-- See `:help vim.o` |
3 | 3 | -- NOTE: You can change these options as you wish! |
4 | 4 | -- For more options, you can see `:help option-list` |
5 | 5 |
|
6 | 6 | -- Make line numbers default |
7 | | -vim.opt.number = true |
| 7 | +vim.o.number = true |
8 | 8 | -- You can also add relative line numbers, to help with jumping. |
9 | 9 | -- Experiment for yourself to see if you like it! |
10 | | --- vim.opt.relativenumber = true |
| 10 | +-- vim.o.relativenumber = true |
11 | 11 |
|
12 | 12 | -- Enable mouse mode, can be useful for resizing splits for example! |
13 | | -vim.opt.mouse = 'a' |
| 13 | +vim.o.mouse = 'a' |
14 | 14 |
|
15 | 15 | -- Don't show the mode, since it's already in the status line |
16 | | -vim.opt.showmode = false |
| 16 | +vim.o.showmode = false |
17 | 17 |
|
18 | 18 | -- Sync clipboard between OS and Neovim. |
19 | 19 | -- Schedule the setting after `UiEnter` because it can increase startup-time. |
20 | 20 | -- Remove this option if you want your OS clipboard to remain independent. |
21 | 21 | -- See `:help 'clipboard'` |
22 | 22 | vim.schedule(function() |
23 | | - vim.opt.clipboard = 'unnamedplus' |
| 23 | + vim.o.clipboard = 'unnamedplus' |
24 | 24 | end) |
25 | 25 |
|
26 | 26 | -- Enable break indent |
27 | | -vim.opt.breakindent = true |
| 27 | +vim.o.breakindent = true |
28 | 28 |
|
29 | 29 | -- Save undo history |
30 | | -vim.opt.undofile = true |
| 30 | +vim.o.undofile = true |
31 | 31 |
|
32 | 32 | -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term |
33 | | -vim.opt.ignorecase = true |
34 | | -vim.opt.smartcase = true |
| 33 | +vim.o.ignorecase = true |
| 34 | +vim.o.smartcase = true |
35 | 35 |
|
36 | 36 | -- Keep signcolumn on by default |
37 | | -vim.opt.signcolumn = 'yes' |
| 37 | +vim.o.signcolumn = 'yes' |
38 | 38 |
|
39 | 39 | -- Decrease update time |
40 | | -vim.opt.updatetime = 250 |
| 40 | +vim.o.updatetime = 250 |
41 | 41 |
|
42 | 42 | -- Decrease mapped sequence wait time |
43 | | -vim.opt.timeoutlen = 300 |
| 43 | +vim.o.timeoutlen = 300 |
44 | 44 |
|
45 | 45 | -- Configure how new splits should be opened |
46 | | -vim.opt.splitright = true |
47 | | -vim.opt.splitbelow = true |
| 46 | +vim.o.splitright = true |
| 47 | +vim.o.splitbelow = true |
48 | 48 |
|
49 | 49 | -- Sets how neovim will display certain whitespace characters in the editor. |
50 | 50 | -- See `:help 'list'` |
51 | 51 | -- and `:help 'listchars'` |
52 | | -vim.opt.list = true |
| 52 | +-- |
| 53 | +-- Notice listchars is set using `vim.opt` instead of `vim.o`. |
| 54 | +-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables. |
| 55 | +-- See `:help lua-options` |
| 56 | +-- and `:help lua-options-guide` |
| 57 | +vim.o.list = true |
53 | 58 | vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } |
54 | 59 |
|
55 | 60 | -- Preview substitutions live, as you type! |
56 | | -vim.opt.inccommand = 'split' |
| 61 | +vim.o.inccommand = 'split' |
57 | 62 |
|
58 | 63 | -- Show which line your cursor is on |
59 | | -vim.opt.cursorline = true |
| 64 | +vim.o.cursorline = true |
60 | 65 |
|
61 | 66 | -- Minimal number of screen lines to keep above and below the cursor. |
62 | | -vim.opt.scrolloff = 10 |
| 67 | +vim.o.scrolloff = 10 |
63 | 68 |
|
64 | 69 | -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), |
65 | 70 | -- instead raise a dialog asking if you wish to save the current file(s) |
66 | 71 | -- See `:help 'confirm'` |
67 | | -vim.opt.confirm = true |
| 72 | +vim.o.confirm = true |
68 | 73 |
|
69 | 74 | -- vim: ts=2 sts=2 sw=2 et |
0 commit comments