nvim-lilypond-suite
This is a plugin (Neovim only) for writing LilyPond scores, with asynchronous make, midi/MP3 player, "hyphenation" function for lyrics, fast syntax highlighting... This repository also contains ftplugin files for LaTeX and Texinfo files which allows embedded LilyPond syntax highlighting, and makeprg which support lilypond-book
or lyluatex
package out of the box.
Installation • Configuration • Usage • Tips & tricks
FEATURES
- Fast syntax file for LilyPond
- Asynchronous :make - compile in background without freezing Neovim
- Audio player in floating window (LilyPond only) - convert (mp3 or wav) and play midi file while writing score (using
mpv
, timidity
or fluidsynth
& ffmpeg
)
- QuickPlayer (LilyPond only) - convert and play only visual selection
- Hyphenation : automatically place hyphens ' -- ' inside texts to make those texts usable as lyrics (LilyPond only)
- Simple ftplugin for LilyPond with
makeprg
, correct errorformat
, diagnostics
(experimental)
- Multiple files support - Compile only main file when working on multiple files project
- ftplugin for LaTex and Texinfo files which detects and allows embedded LilyPond syntax, adaptive
makeprg
function for lyluatex
or lilypond-book
, correct errorformat
- Easy auto-completion and Point & Click configuration
QUICK INSTALL
⚠ This plugin requires Nvim >= 0.7
If you want to use all the functions (player, hyphenation for various languages...), please read the installation section in the wiki to install dependencies
{
'martineausimon/nvim-lilypond-suite',
config = function()
require('nvls').setup({
-- edit config here (see "Customize default settings" in wiki)
})
end
}
With config (click to expand)
```lua
{
'martineausimon/nvim-lilypond-suite',
config = function()
require('nvls').setup({
lilypond = {
mappings = {
player = "",
compile = "",
open_pdf = "",
switch_buffers = "",
insert_version = "",
hyphenation = "",
hyphenation_change_lang = "",
insert_hyphen = "ih",
add_hyphen = "ah",
del_next_hyphen = "dh",
del_prev_hyphen = "dH",
},
options = {
pitches_language = "default",
hyphenation_language = "en_DEFAULT",
output = "pdf",
backend = nil,
main_file = "main.ly",
main_folder = "%:p:h",
include_dir = nil,
diagnostics = false,
pdf_viewer = nil,
},
},
latex = {
mappings = {
compile = "",
open_pdf = "",
lilypond_syntax = ""
},
options = {
lilypond_book_flags = nil,
clean_logs = false,
main_file = "main.tex",
main_folder = "%:p:h",
include_dir = nil,
lilypond_syntax_au = "BufEnter",
pdf_viewer = nil,
},
},
texinfo = {
mappings = {
compile = "",
open_pdf = "",
lilypond_syntax = ""
},
options = {
lilypond_book_flags = "--pdf",
clean_logs = false,
main_file = "main.texi",
main_folder = "%:p:h",
lilypond_syntax_au = "BufEnter",
pdf_viewer = nil,
},
},
player = {
mappings = {
quit = "q",
play_pause = "p",
loop = "",
backward = "h",
small_backward = "",
forward = "l",
small_forward = "",
decrease_speed = "j",
increase_speed = "k",
halve_speed = "",
double_speed = ""
},
options = {
row = 1,
col = "99%",
width = "37",
height = "1",
border_style = "single",
winhighlight = "Normal:Normal,FloatBorder:Normal",
midi_synth = "fluidsynth",
fluidsynth_flags = nil,
timidity_flags = nil,
audio_format = "mp3",
mpv_flags = {
"--msg-level=cplayer=no,ffmpeg=no,alsa=no",
"--loop",
"--config-dir=/dev/null"
}
},
},
})
end
}
```
WIKI INDEX