local version_required = 'nvim-0.7.0' -- 0.7.0 features we need: -- - autocommands in Lua -- - bind key mappings directly to Lua functions if vim.fn.has(version_required) == 0 then print("💥 need " .. version_required .. ", config files will NOT be read!") return nil end require('my/plugins') require('my.functions') require('my/settings') require('my/keymaps') require('my/filetypes') require('my/completion') require('my/lsp') require('my/tools') require('my/coding') require('my/net') -- reload config file after writing vim.api.nvim_create_augroup('config_init', { clear = true }) vim.api.nvim_create_autocmd( { 'BufWritePost' }, { group = 'config_init', pattern = { '*/nvim/lua/my/*.lua', '*/nvim/init.lua' }, callback = function() -- exclude plugins.lua, because it is sourced in another autocmd if not vim.api.nvim_buf_get_name(0):match('plugins.lua$') then vim.cmd([[source ]]) end end })