Skip to content

Commit

Permalink
Add autocompletion for string tunings
Browse files Browse the repository at this point in the history
  • Loading branch information
fedelibre committed Dec 3, 2022
1 parent 4552b4b commit 78eaf71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frescobaldi_app/autocomplete/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,16 @@ def midi_instrument(self):
self.column = self.lastpos
return completiondata.midi_instruments

def string_tuning(self):
"""Complete stringTunings = #... """
try:
i = self.tokens.index('stringTunings', -7, -1)
except ValueError:
return
if self.last != '#':
self.column = self.lastpos
return completiondata.string_tunings

def font_name(self):
"""Complete #'font-name = #"..."""
try:
Expand Down
2 changes: 2 additions & 0 deletions frescobaldi_app/autocomplete/completiondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ def lilypond_grob_properties(grob, hash_quote=True):

midi_instruments = listmodel.ListModel(ly.words.midi_instruments)

string_tunings = listmodel.ListModel(ly.words.string_tunings)

language_names = listmodel.ListModel(sorted(ly.pitch.pitchInfo))

def font_names():
Expand Down

0 comments on commit 78eaf71

Please sign in to comment.