Skip to content

errestan/speak.nvim

Repository files navigation

speak.nvim

CI

A NeoVim plugin that reads buffer text aloud using Speech Dispatcher.

Requirements

  • NeoVim 0.8+
  • spd-say (part of the speech-dispatcher package)
# Debian / Ubuntu
sudo apt install speech-dispatcher

# Fedora
sudo dnf install speech-dispatcher

Installation

Using lazy.nvim:

{
  "errestan/speak.nvim",
  config = function()
    require("speak").setup()
  end,
}

Usage

Operator

speak.nvim registers an operator that accepts any NeoVim motion.

Keymap Action
gs<motion> Speak text covered by motion
gss Speak current line

Examples:

Key sequence Speaks
gsiw current word
gsap current paragraph
gs3j next 3 lines
gss current line

Commands

Command Action
:Speak <text> Speak an arbitrary string
:SpeakStop Stop current playback

Configuration

Pass options to setup() to override the defaults:

require("speak").setup({
  -- Key used as the speak operator (default: "gs").
  -- Double the key to speak the current line (e.g. "gss").
  keymap = "gs",
})

License

GNU General Public License v2.0

About

A NeoVim plug-in that reads text from the current buffer based on a motion.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors