1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
local opt = vim.opt
-- TODO: Check if HOME directory exists
local home = os.getenv("HOME")
opt.hlsearch = false
opt.incsearch = true
opt.conceallevel = 2
opt.signcolumn = "no"
opt.tabstop = 4
opt.softtabstop = 4
opt.shiftwidth = 4
opt.expandtab = true
opt.smartindent = true
opt.breakindent = true
opt.backspace = "indent,eol,start"
opt.undofile = true
opt.swapfile = true
opt.backup = true
opt.writebackup = true
opt.undodir = home .. "/.local/state/nvim"
opt.backupdir = home .. "/.local/share/Trash/nvim//,."
opt.directory = home .. "/.local/share/Trash/nvim//,."
opt.ignorecase = true
opt.smartcase = true
opt.updatetime = 50
opt.timeoutlen = 300
opt.completeopt = ""
opt.scrolloff = 8
opt.splitbelow = true
opt.splitright = true
opt.clipboard = "unnamed"
opt.showmode = false
opt.showmatch = false
opt.cursorline = true
opt.textwidth = 100
-- opt.colorcolumn = "102"
opt.termguicolors = true
opt.ruler = true
opt.showcmd = true
opt.wildmenu = true
opt.mouse = ""
opt.laststatus = 2
opt.history = 200
-- opt.encoding = "utf-8"
-- opt.fileencoding = "utf-8"
opt.smartindent = true
opt.scrolloff = 8
-- opt.spelllang = "en_us,nl"
opt.formatoptions = "tocqrnj"
opt.title = true
-- vim.opt.fillchars = { fold = " " }
-- vim.opt.foldmethod = "indent"
vim.opt.foldenable = false
vim.opt.foldlevel = 99
vim.g.markdown_folding = 1
local cwd = vim.fn.getcwd():gsub(home, "~")
local IsInCWD = string.match(cwd, "[^/]+/[^/]+/[^/]+/?$")
if IsInCWD then
opt.titlestring = IsInCWD .. " -> %t"
else
opt.titlestring = cwd .. " -> %t"
end
-- Highlighting
vim.api.nvim_set_hl(0, "matchNotes", { fg = require("nord.colors").palette.frost.ice })
vim.fn.matchadd("matchNotes", "NOTE\\((.*)\\)\\?:")
vim.api.nvim_set_hl(0, "matchTodos", { fg = require("nord.colors").palette.aurora.yellow })
vim.fn.matchadd("matchTodos", "\\(TODO\\|FIXME\\)\\((.*)\\)\\?:")
vim.api.nvim_set_hl(0, "matchErrors", { fg = require("nord.colors").palette.aurora.red })
vim.fn.matchadd("matchErrors", "\\(BUG\\|ERROR\\)\\((.*)\\)\\?:")
|