forked from NvChad/NvChad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
68 lines (53 loc) · 1.58 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
57
58
59
60
61
62
63
64
65
66
67
68
vim.opt.ignorecase = true -- ignore commands case
vim.g.mapleader = " "
-- install lazy.nvim and configure
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", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
{ import = 'plugins' },
}, {})
-- colors!
vim.cmd [[colorscheme tokyonight-storm]]
-- explorer
vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
--line numbering
vim.opt.nu = true
vim.opt.relativenumber = true
-- set clipboard to a common between system and vim
vim.opt.clipboard = "unnamedplus"
-- spacing
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.textwidth = 80
--formatoptions+=tca
vim.opt.wrap = false
-- very annoying. IF ever using undo-tree just set undofile = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undofile = true
-- highlight as we write regex
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 10
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
vim.keymap.set("n", "<leader>pu", ":pu<CR>")
vim.api.nvim_set_keymap('n', 'i', 'a', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'a', 'i', { noremap = true, silent = true })