For productivity addicts who enjoy coding while listening to Spotify, and cannot lose their focus switching to the app to control their music.
For productivity addicts who enjoy coding while listening to Spotify, and cannot lose their focus switching to the app to control their music.
For productivity addicts who enjoy coding while listening to Spotify, and cannot lose their focus switching to the app to control their music.
nvim-spotify requires spotify-tui
Display/Filter the search results with Telescope
Currently playing statusline.
Pause/Resume a track #
Skip a track
Add a track to the library
Display the name of what's being played
Select which device to play on
Search by:
or CR)
nvim-spotifyis a wrapper forspotify-tui, therefore, it is required for this plugin to work. Check their Github repository for installation instructions
-- Lua
use {
'KadoBOT/nvim-spotify',
requires = 'nvim-telescope/telescope.nvim',
config = function()
local spotify = require'nvim-spotify'
spotify.setup {
-- default opts
status = {
update_interval = 10000, -- the interval (ms) to check for what's currently playing
format = '%s %t by %a' -- spotify-tui --format argument
}
}
end,
run = 'make'
}Plug 'KadoBOT/nvim-spotify', { 'do': 'make' }Decreasing the update_interval value means more API calls in a shorter period. Because of the Spotify API rate limiter, setting this too low can block future requests.
Besides that, those constant updates can make your computer slow.
So bear this in mind when changing this value.
By default, the search will look for tracks. You can switch the type of the search by pressing one of the Keymaps Shortcuts
nvim-spotify has two commands:
Use this command to select which device Spotify should play on.
:SpotifyDevicesSpotify Search input. Check the keymaps below for Search shortcuts.
:SpotifyThe following keymaps are set by default when the Spotify search input is open:
| mode | key | Description |
|---|---|---|
| normal | Esc | Close |
| normal | q | Close |
| normal, insert | C-T | Search for Tracks |
| normal, insert | C-Y | Search for Playlists |
| normal, insert | C-L | Search for Albums |
| normal, insert | C-R | Search for Artists |
You can also define the additional following keymaps
…You can display what's currently playing on your statusline. The example below shows how to show it on lualine, although the configuration should be quite similar on other statusline plugins:
local status = require'nvim-spotify'.status
status:start()
require('lualine').setup {
sections = {
lualine_x = {
status.listen
}
}
}No open issues yet, or sync has not completed.