/metal-pipe.nvim

A sound effect (yes, singular) plugin for NeoVim for immersive coding experience

Primary LanguageLuaApache License 2.0Apache-2.0

🗣️🗣️🗣️ Metal Pipe 🗣️🗣️🗣️

📢 Sound 👏 effect 👏 driven 👏 coding 👏 for 👏 NeoVim 📢

For those who don't know.

Metal Pipe

What in the World Is This?

Bored with your NeoVim experience? Want to spice it up somehow? Well, look no further!

This is a NeoVim plugin that allows you to play the greatest sound to have ever been discovered by humans (the metal pipe falling sound effect), as well as any other sound effect you want to play, whenever you want to play it.

Features 💫

  • 📣 Play the metal pipe sound effect whenever you want.
  • 📣 Play any sound file that you have on your computer whenever you want.

Installation 🚀

Using vim-plug

Plug 'pavlo-skobnikov/metal-pipe.nvim'

Using lazy.nvim

return {
  'pavlo-skobnikov/metal-pipe.nvim',
  event = 'VeryLazy',
}

Usage 🦅

After installing, you have access to two commands.

Vim Commands

  • :PlayMetalPipeSound
  • :PlaySoundAtPath <~/path/to/sound/file>

Lua API

require('metal-pipe').play_metal_pipe_sound()
require('metal-pipe').play_sound('<~/path/to/sound/file>')

Examples

Playing Metal Pipe Sound on Key Mapping

vim.keymap.set('n', '<leader>mp', function()
  require('metal-pipe').play_metal_pipe_sound()
end, { desc = "Play Metal Pipe Sound" })

Creating an Autocommand to Play Metal Pipe Sound when Saving Files

vim.api.nvim_create_autocmd('BufWritePost', {
  group = vim.api.nvim_create_augroup('PlayMetalPipeOnBufferWrite', { clear = true }),
  pattern = { '*' },
  callback = function() require('metal-pipe').play_metal_pipe_sound() end,
  desc = "Play a sound when a buffer is written to disk",
})