nvim-config/init.lua

45 lines
832 B
Lua

-- tab/indent options
vim.opt.expandtab = false
vim.opt.smarttab = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.smartindent = true
-- enable line numbers
vim.opt.nu = true
vim.opt.relativenumber = true
-- enable 24 bit colors
vim.opt.termguicolors = true
-- disable netrw (will use neotree instead)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Global key mappings
vim.keymap.set({"n", "i"}, "<C-s>", "<cmd>w<CR>")
-- Lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")