diff options
Diffstat (limited to '.config/nvim/lua/settings.lua')
-rw-r--r-- | .config/nvim/lua/settings.lua | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua deleted file mode 100644 index 27ad40d..0000000 --- a/.config/nvim/lua/settings.lua +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | -- ┌───────────────────────┐ | ||
2 | -- │ ▐ ▐ ▗ │ | ||
3 | -- │▞▀▘▞▀▖▜▀ ▜▀ ▄ ▛▀▖▞▀▌▞▀▘│ | ||
4 | -- │▝▀▖▛▀ ▐ ▖▐ ▖▐ ▌ ▌▚▄▌▝▀▖│ | ||
5 | -- │▀▀ ▝▀▘ ▀ ▀ ▀▘▘ ▘▗▄▘▀▀ │ | ||
6 | -- └───────────────────────┘ | ||
7 | |||
8 | local o = vim.o -- [o]ptions | ||
9 | local wo = vim.wo -- [w]indow-local [o]ptions | ||
10 | local bo = vim.bo -- [b]uffer-local [o]ptions | ||
11 | local go = vim.go -- [g]lobal [o]ptions | ||
12 | local opt = vim.opt -- convenient :set | ||
13 | |||
14 | -- neovim filetype lua | ||
15 | go.do_filetype_lua = true | ||
16 | go.did_load_filetypes = false | ||
17 | |||
18 | -- look & feel | ||
19 | o.termguicolors = true | ||
20 | |||
21 | -- interact with system clipboard | ||
22 | opt.clipboard:append('unnamedplus') | ||
23 | |||
24 | -- copy indent on a new line | ||
25 | o.autoindent = true | ||
26 | |||
27 | -- :h tabstop, 2. point | ||
28 | -- use appropriate number of spaces to insert a <Tab> | ||
29 | o.expandtab = true | ||
30 | o.shiftwidth = 4 | ||
31 | o.softtabstop = 4 | ||
32 | o.tabstop = 8 | ||
33 | |||
34 | -- use english for spellchecking, but don't spellcheck by default | ||
35 | wo.spell = true | ||
36 | bo.spelllang = "en_gb" | ||
37 | wo.spell = false | ||
38 | |||
39 | -- tab completion, zsh style | ||
40 | o.wildmode = "longest:full,full" | ||
41 | opt.wildignore = { | ||
42 | '*.o', '*.obj', '*.class', '*.aux', '*.lof', '*.log', '*.lot', '*.fls', | ||
43 | '*.toc', '*.fmt', '*.fot', '*.cb', '*.cb2', '.*.lb', '.dvi', '*.xdv', | ||
44 | '*.bbl', '*.bcf', '*.blg', '*-blx.aux', '*-blx.bib', '*.run.xml', | ||
45 | '*.fdb_latexmk', '*.synctex', '*.synctex(busy)', '*.synctex.gz', | ||
46 | '*.synctex.gz(busy)', '*.pdfsync' | ||
47 | } | ||
48 | |||
49 | -- put one space while joining (not two) | ||
50 | o.joinspaces = false | ||
51 | |||
52 | -- keep n lines above/below cursor while scrolling | ||
53 | o.scrolloff = 4 | ||
54 | -- line numbers | ||
55 | o.number = true | ||
56 | -- fold manually, when I place markers | ||
57 | o.foldmethod = "marker" | ||
58 | -- set the terminal title | ||
59 | o.title = true | ||
60 | -- wrap using 'breakat' character | ||
61 | o.linebreak = true | ||
62 | -- new split panes will split to below and right | ||
63 | o.splitbelow = true | ||
64 | o.splitright = true | ||
65 | -- highlight the current line, yoc undoes | ||
66 | o.cursorline = true | ||
67 | -- current line actual number, rest are relative | ||
68 | o.relativenumber = true | ||
69 | -- we are already using a cursorline, don't clobber linter messages | ||
70 | o.showmode = false | ||
71 | -- jump to the matching bracket briefly | ||
72 | o.showmatch = true | ||
73 | -- wait 500 ms for a mapped sequence to complete | ||
74 | o.timeoutlen = 500 | ||
75 | |||
76 | -- persistent undo | ||
77 | o.undofile = true | ||
78 | |||
79 | -- lower case searches ignore case, upper case searches do not | ||
80 | o.ignorecase = true | ||
81 | o.smartcase = true | ||
82 | |||
83 | -- https://stackoverflow.com/a/3445040/ | ||
84 | -- switch case labels | ||
85 | o.cinoptions = "l1" | ||
86 | |||
87 | if vim.fn.executable("rg") then | ||
88 | o.grepprg = "rg --vimgrep --no-heading --smart-case" | ||
89 | o.grepformat = "%f:%l:%c:%m,%f:%l:%m" | ||
90 | end | ||
91 | |||
92 | -- iwhite: ignore changes in amount of white space. | ||
93 | -- vertical: start diff mode with vertical splits | ||
94 | -- filler: show filler lines, | ||
95 | opt.diffopt = { | ||
96 | "iwhite", "vertical", "filler", "algorithm:patience", "indent-heuristic" | ||
97 | } | ||
98 | |||
99 | -- menu: use a popup menu to show the possible completions | ||
100 | -- preview: show extra information | ||
101 | opt.completeopt = {"menu", "menuone", "noselect"} | ||