summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/settings.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/settings.lua')
-rw-r--r--.config/nvim/lua/settings.lua101
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
8local o = vim.o -- [o]ptions
9local wo = vim.wo -- [w]indow-local [o]ptions
10local bo = vim.bo -- [b]uffer-local [o]ptions
11local go = vim.go -- [g]lobal [o]ptions
12local opt = vim.opt -- convenient :set
13
14-- neovim filetype lua
15go.do_filetype_lua = true
16go.did_load_filetypes = false
17
18-- look & feel
19o.termguicolors = true
20
21-- interact with system clipboard
22opt.clipboard:append('unnamedplus')
23
24-- copy indent on a new line
25o.autoindent = true
26
27-- :h tabstop, 2. point
28-- use appropriate number of spaces to insert a <Tab>
29o.expandtab = true
30o.shiftwidth = 4
31o.softtabstop = 4
32o.tabstop = 8
33
34-- use english for spellchecking, but don't spellcheck by default
35wo.spell = true
36bo.spelllang = "en_gb"
37wo.spell = false
38
39-- tab completion, zsh style
40o.wildmode = "longest:full,full"
41opt.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)
50o.joinspaces = false
51
52-- keep n lines above/below cursor while scrolling
53o.scrolloff = 4
54-- line numbers
55o.number = true
56-- fold manually, when I place markers
57o.foldmethod = "marker"
58-- set the terminal title
59o.title = true
60-- wrap using 'breakat' character
61o.linebreak = true
62-- new split panes will split to below and right
63o.splitbelow = true
64o.splitright = true
65-- highlight the current line, yoc undoes
66o.cursorline = true
67-- current line actual number, rest are relative
68o.relativenumber = true
69-- we are already using a cursorline, don't clobber linter messages
70o.showmode = false
71-- jump to the matching bracket briefly
72o.showmatch = true
73-- wait 500 ms for a mapped sequence to complete
74o.timeoutlen = 500
75
76-- persistent undo
77o.undofile = true
78
79-- lower case searches ignore case, upper case searches do not
80o.ignorecase = true
81o.smartcase = true
82
83-- https://stackoverflow.com/a/3445040/
84-- switch case labels
85o.cinoptions = "l1"
86
87if vim.fn.executable("rg") then
88 o.grepprg = "rg --vimgrep --no-heading --smart-case"
89 o.grepformat = "%f:%l:%c:%m,%f:%l:%m"
90end
91
92-- iwhite: ignore changes in amount of white space.
93-- vertical: start diff mode with vertical splits
94-- filler: show filler lines,
95opt.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
101opt.completeopt = {"menu", "menuone", "noselect"}