-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
77 lines (58 loc) · 1.8 KB
/
Copy pathinit.lua
File metadata and controls
77 lines (58 loc) · 1.8 KB
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
-- enables relative numbers
vim.opt.number = true
vim.opt.relativenumber = true
-- enables persistent undos
vim.opt.undofile = true
-- number of lines away from bottom/top of the page from the cursor
vim.opt.scrolloff = 6
-- enable line wrapping
vim.opt.wrap = true
vim.opt.linebreak = true
-- disables signcolumn
vim.opt.signcolumn = "no"
-- set default tabs to 4 spaces
-- will be overriden if a specific file type is read from ./ftplugin/
local tab_size = 4
vim.opt.expandtab = true
vim.opt.tabstop = tab_size
vim.opt.shiftwidth = tab_size
vim.opt.softtabstop = tab_size
-- smart case search with "/"
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- disables annoying swap
vim.opt.swapfile = false
-- set new split directions
vim.opt.splitright = true
vim.opt.splitbelow = true
-- gives a visualisation for text replacement ":%s/<TEXT>/<REPLACEMENT>/<MODIFIERS>"
vim.opt.inccommand = "split"
-- replaces the "~" on left sidebar with nothing
vim.opt.fillchars = { eob = " " }
-- disables nvims inbuilt status bar (replacing with lualine) and makes status bar flush with bottom
vim.opt.cmdheight = 0
vim.opt.showmode = false
-- enable ui2
-- require("vim._core.ui2").enable({
-- enable = true,
-- })
-- load custom colorscheme
-- require("config.colorscheme")
-- load plugins
local plugins_dir = vim.fn.stdpath("config") .. "/lua/plugins"
for _, file in ipairs(vim.fn.globpath(plugins_dir, "*.lua", false, true)) do
local module_name = "plugins." .. vim.fn.fnamemodify(file, ":t:r")
require(module_name)
end
-- source autocmds
require("config.autocmds")
-- source keymaps
require("config.keymaps")
-- source commands
require("config.commands")
-- source diagnostics
require("config.diagnostics")
vim.schedule(function()
-- links nvim clipboard with system clipboard
vim.opt.clipboard = "unnamedplus"
end)