-- many ideas for this config come from
-- https://github.com/elianiva/dotfiles/ - with much gratitude
local api = vim.api

api.nvim_exec('runtime abbrev.vim', false)

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)

-- set our leader key to space since with hjkl, space is largely useless
-- needs to be set before lazy.nvim is loaded
vim.g.mapleader = " "

require('settings')
require('autocmds')
require("lazy").setup("plugins", {
    defaults = { version = "*" },
    performance = { rtp = { disabled_plugins = { "netrw", "netrwPlugin" } } }
})
require('look')
require('maps')

-- to include e.g. the spell dictionaries for vim
vim.opt.rtp:append(vim.fn.stdpath("data") .. "/site")
