Sun, 19 Feb 2023 11:03:32 -0600
Fix up tig for nvim
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 | |
1015 | 29 | o.backup = true |
30 | o.completeopt:append({"menuone", "noselect"}) | |
1025 | 31 | o.hidden = false |
1014 | 32 | o.ignorecase = true |
33 | o.scrolloff = 15 | |
1015 | 34 | o.sessionoptions = {"buffers", "curdir", "localoptions"} |
1014 | 35 | o.sidescrolloff = 10 |
36 | o.smartcase = true | |
37 | o.splitbelow = true | |
38 | o.splitright = true | |
1015 | 39 | o.undofile = true |
1014 | 40 | o.wildignorecase = true |
41 | ||
42 | -- Paths | |
1019 | 43 | o.backupdir:remove(".") |
1015 | 44 | o.tags:append({".tags", "./.tags;"}) |
1014 | 45 | o.wildignore = "*~,*.o,*.pyc,.git/*,hg/*,.svn/*" |
46 | ||
1015 | 47 | if vim.fn.executable("ag") then |
48 | o.grepprg = "ag --vimgrep" | |
1022 | 49 | -- o.grepformat:prepend({"%f:%l:%c:%m", "%f"}) |
50 | -- o.errorformat:append("%f") | |
1015 | 51 | end |