MasterTemple / bible.nvim

Integrate the Bible into the Neovim text editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bible.nvim - Neovim Plugin

Purpose - Access Bible from within Neovim

Brief demonstration here

search_example.png

Setup

lazy.nvim

{
	"MasterTemple/bible.nvim",
	keys = {
		{"<leader>es", '<cmd>lua require("telescope").extensions.bible.bible({isReferenceOnly = false, isMultiSelect = false})<CR>', desc = "Search by verse content" },
		{"<leader>er", '<cmd>lua require("telescope").extensions.bible.bible({isReferenceOnly = true, isMultiSelect = false})<CR>', desc = "Search by verse reference" },
		{"<leader>ems", '<cmd>lua require("telescope").extensions.bible.bible({isReferenceOnly = false, isMultiSelect = true})<CR>', desc = "Search by verse content (multi-select)" },
		{"<leader>emr", '<cmd>lua require("telescope").extensions.bible.bible({isReferenceOnly = true, isMultiSelect = true})<CR>', desc = "Search by verse reference (multi-select)" },
	}
},

Mappings

Explanation

Note: I initally chose e as the first key because it is in ESV.

These can be remapped in the config above.

s is to search through the content

r is to get by reference

Prefix the operation with m to make it multi-select (choose a start and end verse)

Alt+? set an option but does not run anything

Ctrl+? runs on the current selection

Open Telescope Menu

<leader>es: Search by verse content

<leader>er: Search by verse reference

<leader>ems: Search by verse content (multi-select)

<leader>emr: Search by verse reference (multi-select)

<leader>et: Select Bible translation (not implemented yet) [global]

In Telescope Menu

Hit Enter to insert the content and the reference

Hit Ctrl+W to insert the whole chapter

Hit Alt+R to toggle inserting reference [global: default = true]

Hit Alt+C to toggle inserting content [global: default = true]

Hit Alt+I to toggle adding indent [global: default = true]

Hit Alt+S to toggle showing settings in preview [global: default = true]

Hit Alt+M to toggle multi-select [current selection]

Hit Alt+T to edit Bible translation (not implemented yet) [current selection]

Todo

  • Ctrl/Shift/Alt+Enter for easier bindings to insert in different formats
  • Dynamically size the preview window
  • Allow user to specify format in setup like: "{content} [{ref}]" (options = book, chapter, verse, ref, content)
  • Insert verse content by matching references on current line (by default set insertReference=false)
    • handle c:v-v, c:v-c:v, c:v,v, and c:v;c:v
  • Take what is highlighted as input for Telescope
  • Add option to remove unicode apostrophes/quotes
  • Add option regarding removing newlines/tabs
  • Allow support for more translations (currently only ESV) + only download certain ones, not them all
  • make config options persist

About

Integrate the Bible into the Neovim text editor

License:MIT License


Languages

Language:Lua 100.0%