Display synchronized Spotify lyrics in a floating Neovim window.
- 🎵 Real-time synchronized lyrics from LRCLIB
- 🔄 Automatic token refresh (authenticate once, use forever)
- 🎨 Customizable floating window with song title
- ⚡ Smooth scrolling with minimal API calls
- Neovim >= 0.10.0
- plenary.nvim
- curl (system)
- Spotify account (Free or Premium)
{
"stuckinforloop/vibe.lua",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("vibe").setup({
client_id = os.getenv("SPOTIFY_CLIENT_ID"),
client_secret = os.getenv("SPOTIFY_CLIENT_SECRET"),
})
end,
}use {
"stuckinforloop/vibe.lua",
requires = { "nvim-lua/plenary.nvim" },
config = function()
require("vibe").setup({
client_id = "your_spotify_client_id",
client_secret = "your_spotify_client_secret",
})
end,
}Plug 'nvim-lua/plenary.nvim'
Plug 'stuckinforloop/vibe.lua'
lua << EOF
require("vibe").setup({
client_id = "your_spotify_client_id",
client_secret = "your_spotify_client_secret",
})
EOF- Go to Spotify Developer Dashboard
- Create a new app
- In app settings, add this Redirect URI:
http://127.0.0.1:8888/callback - Copy your Client ID and Client Secret
| Command | Description |
|---|---|
:VibeAuth |
Authenticate with Spotify (once) |
:VibeStart |
Start displaying lyrics |
:VibeStop |
Stop displaying lyrics |
:VibeToggle |
Toggle lyrics display |
:VibeLogout |
Log out and clear stored tokens |
- Run
:VibeAuth- browser opens for Spotify authorization - Authorize the app
- Play a song on Spotify
- Run
:VibeToggle
vim.keymap.set("n", "<leader>vt", "<cmd>VibeToggle<cr>", { desc = "Toggle lyrics" })
vim.keymap.set("n", "<leader>va", "<cmd>VibeAuth<cr>", { desc = "Spotify auth" })require("vibe").setup({
-- Spotify credentials (required)
client_id = "",
client_secret = "",
-- Timing
update_interval = 100, -- UI refresh rate (ms)
spotify_api_poll_interval = 5000, -- Spotify API poll interval (ms)
-- Window appearance
window = {
width = 40,
height = 6,
relative = "editor",
anchor = "NE", -- NE = top-right
row = 1,
col = 1,
border = "rounded",
style = "minimal",
},
-- Highlight groups
styles = {
highlight = "String", -- Current line
dim = "Comment", -- Other lines
},
})- Dual-timer architecture: Network timer polls Spotify every 5s, render timer updates UI every 100ms
- Time interpolation: Smooth scrolling without hammering the API
- LRCLIB integration: Fetches synchronized lyrics by artist/track name
- OAuth2 flow: Built-in authentication with automatic token refresh
Make sure you added http://127.0.0.1:8888/callback (not localhost) in your Spotify app settings.
Not all songs have synchronized lyrics on LRCLIB. The plugin will display a message for instrumental tracks.
MIT
- Lyrics provided by LRCLIB
- Inspired by the love for music and code
