repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by bugabinga
neovim/init.lua
Raw-- A Neovim configuration, again...
--
-- ███ ▄ ▄▀ ██ ███ ▄█ ▄ ▄▀ ██
-- █ █ █ ▄▀ █ █ █ █ ██ █ ▄▀ █ █
-- █ ▀ ▄ █ █ █ ▀▄ █▄▄█ █ ▀ ▄ ██ ██ █ █ ▀▄ █▄▄█
-- █ ▄▀ █ █ █ █ █ █ █ ▄▀ ▐█ █ █ █ █ █ █ █
-- ███ █▄ ▄█ ███ █ ███ ▐ █ █ █ ███ █
-- ▀▀▀ █ █ ██ █
-- ▀ ▀
local version = vim.version()
local expected = { major = 0, minor = 11 }
if version.major ~= expected.major or version.minor ~= expected.minor then
vim.notify(
'This configuration assumes NeoVim version ' ..
expected.major .. '.' .. expected.minor .. ', but it is ' .. version.major .. '.' .. version.minor .. '!',
vim.log.levels.ERROR)
return
end
-- setup debug mode
vim.g.bugabinga_debug_mode = false
-- start `profiler.nvim` with `NVIM_PROFILE=1 nvim ...` to instrument all modules,
-- but not start profiler yet.
-- or `NVIM_PROFILE=start nvim ...` to start the profiler on startup
-- then hit <F12> to save profile.
-- inspect profile on https://ui.perfetto.dev
require 'bugabinga.profile'
local start_time = vim.uv.hrtime() ---@diagnostic disable-line: undefined-field
local auto = require 'std.auto'
auto 'measure_startup_time' {
events = 'VimEnter',
description = 'Measure startup time of neovim.',
once = true,
command = function()
local end_time = vim.uv.hrtime() ---@diagnostic disable-line: undefined-field
local time_elapsed = end_time - start_time
vim.schedule(function()
vim.notify(string.format('Neovim started in (%d ms).', time_elapsed / 1e6), vim.log.levels.INFO)
end)
end,
}
vim.cmd.colorscheme 'nugu'
require 'patches'
--[[ MY STUFF ]]
--
require 'bugabinga.options'
require 'bugabinga.sessions'
require 'bugabinga.treesitter'
require 'bugabinga.bigfile'
require 'bugabinga.editorconfig'
require 'bugabinga.save_actions'
require 'bugabinga.lsp'
require 'bugabinga.java'
require 'bugabinga.mkdir'
require 'bugabinga.diagnostic'
--[[ PLUGINS ]]
--
require 'bugabinga.file_explorer'
require 'bugabinga.virtual_column'
require 'bugabinga.autotag'
require 'bugabinga.colorizer'
require 'bugabinga.devicons'
require 'bugabinga.diff'
require 'bugabinga.format'
require 'bugabinga.jump2d'
require 'bugabinga.lint'
require 'bugabinga.search_and_replace'
require 'bugabinga.move'
require 'bugabinga.navigation'
require 'bugabinga.notifications'
require 'bugabinga.operators'
require 'bugabinga.specs'
require 'bugabinga.splitjoin'
require 'bugabinga.statusbar'
require 'bugabinga.surround'
require 'bugabinga.textobjects'
require 'bugabinga.key_preview'
require 'bugabinga.patterns'
require 'bugabinga.terminal'
require 'bugabinga.fuzzy_find'
require 'bugabinga.tree_explorer'
require 'bugabinga.incubator'