A music player inside neovim that uses mpv.
Extracted from stuff.nvim.
Note This is an experimental plugin without any proper testing.
2022-12-27_19-00-31.mp4
- neovim (0.7+)
- mpv
- youtube-dl
-- Using lazy.nvim:
{ "tamton-aquib/mpv.nvim", config=true }
- The command:
:MpvToggle
- The actual api:
require("mpv").toggle_player()
Click to view default config
require("mpv").setup { width = 50, height = 5, -- Changing these two might break the UI 😬 border = 'single', setup_widgets = false, -- to activate the widget components timer = { after = 1000, throttle = 250, -- Update time for the widgets. (lesser the faster) } }
- Keymaps:
key | action |
---|---|
<CR> |
Input song/link |
p / <space\> |
pause/play |
q |
quit |
> / < |
next/prev in playlist |
m |
mute/unmute |
Statusline/Tabline components
make sure you set
setup_widgets
totrue
insidesetup()
-- Components are: g:mpv_title, g:mpv_visualizer, g:mpv_percent require("lualine").setup { sections = { lualine_c = { { function() return ' ' end, color='green', on_click=require("mpv").toggle_player }, 'g:mpv_title' }, } }
- search by keyword.
- paste links from youtube (playlists too).
- mouse support (quite buggy)
- statusline/tabline components.
moved to todo.norg
- music.nvim
- vhyrro and vsedov