diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-08-30 00:50:31 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-08-30 00:50:31 +0200 |
| commit | 5928998af5404ae2be84c6cecc10ebf84bd3f3ed (patch) | |
| tree | c72a17cb6eb84f01c52666e3f95853cf5e636bb8 /common/config/nvim/init.lua | |
| parent | bba0c17c6c0bc310e44ae45b9573d2dc99b8157f (diff) | |
| parent | 2a8020a2e9b7ef2ee77ddee14892127a4eb95187 (diff) | |
| download | dotfiles-5928998af5404ae2be84c6cecc10ebf84bd3f3ed.tar.gz dotfiles-5928998af5404ae2be84c6cecc10ebf84bd3f3ed.zip | |
Add 'common/config/nvim/' from commit '2a8020a2e9b7ef2ee77ddee14892127a4eb95187'
git-subtree-dir: common/config/nvim
git-subtree-mainline: bba0c17c6c0bc310e44ae45b9573d2dc99b8157f
git-subtree-split: 2a8020a2e9b7ef2ee77ddee14892127a4eb95187
Diffstat (limited to 'common/config/nvim/init.lua')
| -rw-r--r-- | common/config/nvim/init.lua | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/common/config/nvim/init.lua b/common/config/nvim/init.lua new file mode 100644 index 0000000..409f7c8 --- /dev/null +++ b/common/config/nvim/init.lua @@ -0,0 +1,149 @@ +--[[ + ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ + ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ + ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ + ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ + ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ + ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + " ------------------------------------------------ + Author: srdusr + Email: trevorgray@srdusr.com + Url: https://github.com/srdusr/nvim.git + ------------------------------------------------ " +--]] +--[[init.]] +-- ========================================================================== -- +-- == DEPENDENCIES == -- +-- ========================================================================== -- + +-- ripgrep - https://github.com/BurntSushi/ripgrep +-- fd - https://github.com/sharkdp/fd +-- git - https://git-scm.com/ +-- make - https://www.gnu.org/software/make/ +-- c compiler - gcc or tcc or zig + +-- -------------------------------------------------------------------------- -- + +-- ================================== -- +-- == Install neovim-nightly == -- +-- ================================== -- + +-- Download nvim-linux64.tar.gz: +--$ curl -L -o nvim-linux64.tar.gz https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz +-- Extract: +--$ tar xzvf nvim-linux64.tar.gz --install-dir=/bin +-- Run: +--$ ./nvim-linux64/bin/nvim + +-- ---------------------------------- -- + +-- Initialize config with this one liner in the terminal +--$ nvim --headless -c 'call mkdir(stdpath("config"), "p") | exe "edit" stdpath("config") . "/init.lua" | write | quit' + +-- Command to see startup time +--$ nvim --startuptime startup.log -c exit && tail -100 startup.log + +-- Load impatient (Faster loading times) +local impatient_ok, impatient = pcall(require, "impatient") +if impatient_ok then + impatient.enable_profile() +end + +-- Schedule reading shadafile to improve the startup time +vim.opt.shadafile = "NONE" +vim.schedule(function() + vim.opt.shadafile = "" + vim.cmd("silent! rsh") +end) + +-- Load/reload modules +local modules = { + "user.pack", -- Packer plugin manager + "user.opts", -- Options + "user.keys", -- Keymaps + "user.mods", -- Modules/functions + "user.view", -- Colorscheme/UI + "plugins.web-devicons", + "plugins.treesitter", + "plugins.neodev", + "plugins.telescope", + "plugins.nvim-tree", + "plugins.lsp", + "plugins.cmp", + "plugins.quickfix", + --"plugins.snippets", + --"plugins.colorizer", + --"plugins.prettier", + --"plugins.git", + --"plugins.fugitive", + "plugins.gitsigns", + "plugins.sniprun", + "plugins.session", + "plugins.surround", + "plugins.neoscroll", + "plugins.statuscol", + "plugins.trouble", + "plugins.goto-preview", + "plugins.autopairs", + "plugins.navic", + "plugins.toggleterm", + "plugins.zen-mode", + "plugins.fidget", + "plugins.dap", + "plugins.neotest", + "plugins.heirline", + "plugins.dashboard", + "plugins.which-key", + "plugins.harpoon", + "plugins.leetcode", + "plugins.hardtime", + "plugins.notify", + "plugins.overseer", + "plugins.vimtex", + "plugins.indent-blankline", + --"plugins.modify-blend", +} + +-- Refresh module cache +for k, v in pairs(modules) do + package.loaded[v] = nil + require(v) +end + +-- Improve speed by disabling some default plugins/modules +local builtins = { + "gzip", + "zip", + "zipPlugin", + "tar", + "tarPlugin", + "getscript", + "getscriptPlugin", + "vimball", + "vimballPlugin", + "2html_plugin", + --"matchit", + --"matchparen", + "logiPat", + "rrhelper", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "tutor_mode_plugin", + "fzf", + "spellfile_plugin", + "sleuth", +} + +for _, plugin in ipairs(builtins) do + vim.g["loaded_" .. plugin] = 1 +end +vim.g.do_filetype_lua = 1 +vim.g.did_load_filetypes = 0 + +-- Snippets +--vim.g.snippets = 'luasnip' + +-- Notifications +vim.notify = require("notify") -- Requires plugin "rcarriga/nvim-notify" |
