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