Sun, 12 Feb 2023 14:42:31 -0600
start nvim config
1014 | 1 | vim.g.mapleader = "\\" |
2 | vim.g.maplocalleader = "\\" | |
3 | ||
4 | local o = vim.opt | |
5 | ||
6 | -- Editing | |
7 | o.expandtab = true | |
8 | o.shiftround = true | |
9 | o.shiftwidth = 2 | |
10 | ||
11 | -- Display | |
12 | o.breakindent = true | |
13 | o.breakindentopt = "min:66,shift:2" | |
14 | o.diffopt:append("algorithm:patience") | |
15 | o.fillchars = "fold: ,vert:│" | |
16 | o.linebreak = true | |
17 | o.listchars = "tab:⇥·,trail:◼,nbsp:◻,extends:»,precedes:«" | |
18 | o.showbreak = "» " | |
19 | o.termguicolors = true | |
20 | o.signcolumn = "number" | |
21 | ||
22 | -- set font etc | |
23 | if vim.fn.has("gui") then | |
24 | o.number = true | |
25 | end | |
26 | ||
27 | -- Behavior | |
28 | o.autowriteall = true | |
29 | o.ignorecase = true | |
30 | o.scrolloff = 15 | |
31 | o.sidescrolloff = 10 | |
32 | o.smartcase = true | |
33 | o.splitbelow = true | |
34 | o.splitright = true | |
35 | o.wildignorecase = true | |
36 | ||
37 | -- Paths | |
38 | o.tags:append(".tags,./.tags;") | |
39 | o.wildignore = "*~,*.o,*.pyc,.git/*,hg/*,.svn/*" | |
40 | ||
41 | vim.api.nvim_create_autocmd("LspAttach", { | |
42 | once = true, | |
43 | callback = function(args) | |
44 | vim.opt.number = true | |
45 | end, | |
46 | }) |