-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
56 lines (49 loc) · 1.63 KB
/
init.lua
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
-- Options (many more set in vim-sensible)
do
vim.opt.cmdheight = 2
vim.opt.colorcolumn = "+1"
vim.opt.expandtab = true -- Uses spaces for indent
vim.opt.foldenable = false
vim.opt.hlsearch = false
vim.opt.number = true -- Always display line numbers
vim.opt.relativenumber = true -- Relative line numbering
vim.opt.shiftwidth = 2 -- Number of spaces for autoindent
vim.opt.showmatch = true -- Highlight matching (){}[]
vim.opt.signcolumn = "yes"
vim.opt.showmode = false -- Hide `-- INSERT --`
vim.opt.updatetime = 500 -- Make gitgutter update faster
vim.opt.virtualedit = "block"
-- Control comment formatting
vim.opt.formatoptions = { c = true, q = true, l = true, j = true }
-- Command line completion options
vim.opt.wildmode = { "longest", "list", "full" }
end
-- Vim global variables
do
vim.g.mapleader = " "
vim.g.maplocalleader = ","
-- netrw should never be my alternate file
vim.g.netrw_altfile = 1
vim.g.markdown_fenced_languages = { 'html', 'python', 'bash=sh', 'sh' }
end
-- Init lazy.nvim plugin manager
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins", {
change_detection = { enabled = false },
rocks = { hererocks = false },
})
require "my.augroups"
require "my.commands"
require "my.filetypes"
require "my.keymaps"