-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
33 lines (30 loc) · 892 Bytes
/
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
-- ~/.config/nvim/init.lua
vim.opt.termguicolors = true
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.api.nvim_set_keymap('n', '<C-c>', '"*y', { noremap = true, silent = true })
vim.api.nvim_set_keymap('v', '<C-c>', '"*y', { noremap = true, silent = true })
if not (vim.uv or 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.o.tabstop = 4
vim.o.shiftwidth = 2
vim.o.expandtab = false
vim.api.nvim_create_autocmd("FileType", {
pattern = "cpp",
callback = function()
vim.keymap.set("i", "<CR>", function()
return "\n\t"
end, { buffer = true, expr = true })
end
})
vim.opt.rtp:prepend(lazypath)
vim.opt.number = true
vim.opt.relativenumber = true
require("lazy").setup("plugins")