diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-09-09 12:42:18 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-09-09 12:42:18 +0200 |
commit | b147123070e5d7418fe67e315a53599cfde38d58 (patch) | |
tree | b4ed260a622235d320310094d329fc6604a47345 /syntax | |
parent | 7f98e949d4922ba2109304bd4cabe9578a8062fb (diff) | |
download | vim-polyglot-b147123070e5d7418fe67e315a53599cfde38d58.tar.gz vim-polyglot-b147123070e5d7418fe67e315a53599cfde38d58.zip |
Ensure some files are compied from each package
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/lilypond-words.vim | 7 | ||||
-rw-r--r-- | syntax/lilypond.vim | 108 | ||||
-rw-r--r-- | syntax/mermaid.vim | 65 | ||||
-rw-r--r-- | syntax/swayconfig.vim | 285 | ||||
-rw-r--r-- | syntax/toml.vim | 80 |
5 files changed, 545 insertions, 0 deletions
diff --git a/syntax/lilypond-words.vim b/syntax/lilypond-words.vim new file mode 100644 index 00000000..cb137b8f --- /dev/null +++ b/syntax/lilypond-words.vim @@ -0,0 +1,7 @@ +if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'syntax/lilypond-words.vim') + finish +endif + +syn match lilyKeyword "[-_^]\?\\\(xNotesOn\|xNotesOff\|xNote\|wordwrap-string-internal\|wordwrap-string\|wordwrap-lines\|wordwrap-internal\|wordwrap-field\|wordwrap\|withMusicProperty\|with-url\|with-outline\|with-link\|with-dimensions-from\|with-dimensions\|with-color\|whiteout\|whiteTriangleMarkup\|whiteCircleMarkup\|walkerHeadsMinor\|walkerHeads\|vspace\|vowelTransition\|void\|voices\|voiceTwoStyle\|voiceTwo\|voiceThreeStyle\|voiceThree\|voiceOneStyle\|voiceOne\|voiceNeutralStyle\|voiceFourStyle\|voiceFour\|vocalName\|virgula\|virga\|veryshortfermata\|verylongfermata\|versus\|version\|verbatim-file\|vcenter\|varcoda\|upright\|upprall\|upmordent\|upbow\|up\|unset\|unit\|unfoldRepeats\|undo\|undertie\|underline\|unaCorda\|unHideNotes\|typewriter\|type\|tweak\|turn\|tupletUp\|tupletSpan\|tupletNeutral\|tupletDown\|tuplet\|trill\|triangle\|treCorde\|transposition\|transposedCueDuring\|transpose\|transparent\|translate-scaled\|translate\|topLevelAlignment\|tocTitleMarkup\|tocItemWithDotsMarkup\|tocItemMarkup\|tocItem\|tocIndentMarkup\|tocFormatMarkup\|tiny\|timing\|times\|timeSignatureSettings\|timeSignatureFraction\|time\|tied-lyric\|tieWaitForNote\|tieUp\|tieSolid\|tieNeutral\|tieHalfSolid\|tieHalfDashed\|tieDown\|tieDotted\|tieDashed\|tieDashPattern\|tie\|thumb\|textSpannerUp\|textSpannerNeutral\|textSpannerDown\|textLengthOn\|textLengthOff\|text\|tenuto\|temporary\|tempoWholesPerMinute\|tempo\|teeny\|tagGroup\|tag\|table-of-contents\|table\|tablatureFormat\|tabStaffLineLayoutFunction\|tabFullNotation\|systemStartDelimiter\|sustainOn\|sustainOff\|super\|subdivideBeams\|sub\|styledNoteHeads\|strut\|stropha\|strokeFingerOrientations\|stringTunings\|stringOneTopmost\|stringNumberOrientations\|stopped\|stopTrillSpan\|stopTextSpan\|stopStaff\|stopSlashedGraceMusic\|stopMeasureSpanner\|stopMeasureCount\|stopGroup\|stopGraceSlur\|stopGraceMusic\|stopAppoggiaturaMusic\|stopAcciaccaturaMusic\|stop\|stencil\|stemUp\|stemNeutral\|stemDown\|startTrillSpan\|startTextSpan\|startStaff\|startSlashedGraceMusic\|startRepeatType\|startMeasureSpanner\|startMeasureCount\|startGroup\|startGraceSlur\|startGraceMusic\|startAppoggiaturaMusic\|startAcciaccaturaMusic\|start\|staccato\|staccatissimo\|squashedPosition\|spp\|spacingTweaks\|sp\|southernHarmonyHeadsMinor\|southernHarmonyHeads\|sostenutoOn\|sostenutoOff\|soloText\|soloIIText\|snappizzicato\|smaller\|smallCaps\|small\|slurUp\|slurSolid\|slurNeutral\|slurHalfSolid\|slurHalfDashed\|slurDown\|slurDotted\|slurDashed\|slurDashPattern\|slashturn\|slashedGrace\|slashed-digit\|slashChordSeparator\|skipTypesetting\|skip\|single\|simultaneous\|simple\|signumcongruentiae\|showStaffSwitch\|showSplitTiedTabNotes\|shortfermata\|shortVocalName\|shortInstrumentName\|shiftOnnn\|shiftOnn\|shiftOn\|shiftOff\|shiftDurations\|sharp\|shape\|sfz\|sfp\|sff\|sf\|settingsFrom\|setDefaultDurationToQuarter\|set\|sesquisharp\|sesquiflat\|sequential\|semisharp\|semiflat\|semicirculus\|semiGermanChords\|segno\|searchForVoice\|scriptDefinitions\|score-lines\|score\|scaleDurations\|scale\|sans\|sacredHarpHeadsMinor\|sacredHarpHeads\|rtoe\|rounded-box\|rotate\|romanStringNumbers\|roman\|rightHandFinger\|right-column\|right-brace\|right-align\|right\|rheel\|rfz\|revertTimeSignatureSettings\|revert\|reverseturn\|retrograde\|restrainOpenStrings\|restNumberThreshold\|rest-by-number\|rest\|responsum\|resetRelativeOctave\|replace\|repeatTie\|repeatCountVisibility\|repeat\|removeWithTag\|remove\|relative\|rehearsalMark\|reduceChords\|raiseNote\|raise\|quotedEventTypes\|quotedCueEventTypes\|quoteDuring\|quilisma\|put-adjacent\|pushToTag\|pt\|propertyUnset\|propertyTweak\|propertySet\|propertyRevert\|propertyOverride\|property-recursive\|printPartCombineTexts\|printOctaveNames\|printKeyCancellation\|printAccidentalNames\|predefinedFretboardsOn\|predefinedFretboardsOff\|predefinedDiagramTable\|prallup\|prallprall\|prallmordent\|pralldown\|prall\|ppppp\|pppp\|ppp\|pp\|postscript\|portato\|pointAndClickTypes\|pointAndClickOn\|pointAndClickOff\|pitchedTrill\|phrygian\|phrasingSlurUp\|phrasingSlurSolid\|phrasingSlurNeutral\|phrasingSlurHalfSolid\|phrasingSlurHalfDashed\|phrasingSlurDown\|phrasingSlurDotted\|phrasingSlurDashed\|phrasingSlurDashPattern\|pes\|pedalUnaCordaStyle\|pedalUnaCordaStrings\|pedalSustainStyle\|pedalSustainStrings\|pedalSostenutoStyle\|pedalSostenutoStrings\|pattern\|path\|partial\|partCombineUp\|partCombineUnisono\|partCombineTextsOnNote\|partCombineSoloII\|partCombineSoloI\|partCombineListener\|partCombineForce\|partCombineDown\|partCombineChords\|partCombineAutomatic\|partCombineApart\|partCombine\|parenthesize\|parallelMusic\|paper\|palmMuteOn\|palmMuteOff\|palmMute\|pageTurn\|pageBreak\|page-ref\|page-link\|pad-x\|pad-to-box\|pad-markup\|pad-around\|p\|overtie\|overrideTimeSignatureSettings\|overrideProperty\|override-lines\|override\|overlay\|oval\|ottavationMarkups\|ottava\|oriscus\|open\|oneVoice\|once\|on-the-fly\|omit\|offset\|octaveCheck\|numericTimeSignature\|number\|nullAccidentals\|null\|notemode\|noteToFretFunction\|noteNameSeparator\|noteNameFunction\|note-by-number\|note\|normalsize\|normal-text\|normal-size-super\|normal-size-sub\|noPageTurn\|noPageBreak\|noChordSymbol\|noBreak\|noBeam\|newSpacingSection\|new\|neumeDemoLayout\|natural\|name\|n\|musicglyph\|musicMap\|mp\|mordent\|modalTranspose\|modalInversion\|mm\|mixolydian\|minorChordModifier\|minor\|midiInstrument\|midiChannelMapping\|midi\|middleCPosition\|middleCClefPosition\|mf\|metronomeMarkFormatter\|mergeDifferentlyHeadedOn\|mergeDifferentlyHeadedOff\|mergeDifferentlyDottedOn\|mergeDifferentlyDottedOff\|melismaEnd\|melismaBusyProperties\|melisma\|medium\|measurePosition\|maxima\|markuplist\|markupMap\|markup\|markletter\|markalphabet\|markLengthOn\|markLengthOff\|markFormatter\|mark\|marcato\|map-markup-commands\|makeClusters\|majorSevenSymbol\|major\|maininput\|magnifyStaff\|magnifyMusic\|magnify\|lyricsto\|lyrics\|lyricmode\|lyricMelismaAlignment\|lydian\|ltoe\|lower\|lookup\|longfermata\|longa\|locrian\|localAlterations\|lineprall\|linea\|line\|ligature\|lheel\|left-column\|left-brace\|left-align\|left\|layout\|larger\|large\|languageSaveAndChange\|languageRestore\|language\|laissezVibrer\|label\|killCues\|kievanOn\|kievanOff\|keyAlterationOrder\|key\|keepWithTag\|keepAliveInterfaces\|justify-string\|justify-line\|justify-field\|justify\|justified-lines\|italic\|italianChords\|ionian\|invertChords\|inversion\|instrumentTransposition\|instrumentSwitch\|instrumentName\|instrumentEqualizer\|initialTimeSignatureVisibility\|indent\|include\|inclinatum\|incipit\|inStaffSegno\|in\|improvisationOn\|improvisationOff\|ij\|iij\|ignoreFiguredBassRest\|ignoreBarNumberChecks\|ignoreBarChecks\|ignatzekExceptions\|ignatzekExceptionMusic\|ictus\|huge\|hspace\|highStringOne\|hideStaffSwitch\|hideSplitTiedTabNotes\|hideNotes\|hide\|henzeshortfermata\|henzelongfermata\|header\|hcenter-in\|hbracket\|haydnturn\|harp-pedal\|harmonicsOn\|harmonicsOff\|harmonicNote\|harmonicByRatio\|harmonicByFret\|harmonicAccidentals\|harmonic\|handleNegativeFrets\|halign\|halfopen\|grobdescriptions\|graceSettings\|grace\|glissando\|germanChords\|general-align\|fz\|funkHeadsMinor\|funkHeads\|fromproperty\|fret-diagram-verbose\|fret-diagram-terse\|fret-diagram\|frenchChords\|fraction\|fp\|footnote\|fontsize\|fontSize\|fontCaps\|flexa\|flat\|flageolet\|fixed\|firstClef\|first-visible\|fingeringOrientations\|finger\|finalis\|filled-box\|fill-with-pattern\|fill-line\|figures\|figuremode\|figuredBassFormatter\|fffff\|ffff\|fff\|ff\|fermata\|featherDurations\|f\|eyeglasses\|extraNatural\|extendersOverRests\|explicitKeySignatureVisibility\|explicitCueClefVisibility\|explicitClefVisibility\|expandEmptyMeasures\|eventChords\|etc\|espressivo\|epsfile\|episemInitium\|episemFinis\|enddim\|enddecresc\|enddecr\|endcresc\|endcr\|endSpanners\|endRepeatType\|ellipse\|easyHeadsOn\|easyHeadsOff\|dynamicUp\|dynamicNeutral\|dynamicDown\|dynamicAbsoluteVolumeFunction\|dynamic\|drums\|drummode\|drumStyleTable\|drumPitchTable\|dropNote\|draw-squiggle-line\|draw-line\|draw-hline\|draw-dotted-line\|draw-dashed-line\|draw-circle\|downprall\|downmordent\|downbow\|down\|doublesharp\|doubleflat\|doubleRepeatType\|dotsUp\|dotsNeutral\|dotsDown\|dorian\|divisioMinima\|divisioMaxima\|divisioMaior\|displayScheme\|displayMusic\|displayLilyMusic\|dir-column\|dimTextDim\|dimTextDecresc\|dimTextDecr\|dimHairpin\|dim\|description\|descendens\|deprecatedenddim\|deprecatedendcresc\|deprecateddim\|deprecatedcresc\|denies\|deminutum\|defineBarLine\|defaultchild\|defaultTimeSignature\|defaultNoteHeads\|defaultBarType\|default\|decrescendoSpanner\|decresc\|decr\|deadNotesOn\|deadNotesOff\|deadNote\|dashUnderscore\|dashPlus\|dashLarger\|dashHat\|dashDot\|dashDash\|dashBang\|cueDuringWithClef\|cueDuring\|cueClefUnset\|cueClefTranspositionFormatter\|cueClef\|crossStaff\|crescendoSpanner\|crescTextCresc\|crescHairpin\|cresc\|createSpacing\|cr\|context\|consists\|concat\|compressMMRests\|compressEmptyMeasures\|compoundMeter\|completionFactor\|command-name\|combine\|column-lines\|column\|coda\|cm\|clefTranspositionFormatter\|clefTransposition\|clefPosition\|clefGlyph\|clef\|circulus\|circle\|chords\|chordmodifiers\|chordmode\|chordRootNamer\|chordPrefixSpacer\|chordNoteNamer\|chordNameSeparator\|chordNameLowercaseMinor\|chordNameFunction\|chordNameExceptions\|char\|change\|center-column\|center-align\|center\|cavum\|caps\|caesura\|cadenzaOn\|cadenzaOff\|breve\|breathe\|breakDynamicSpan\|break\|bracket\|box\|bookpart\|bookOutputSuffix\|bookOutputName\|book\|bold\|blackTriangleMarkup\|bigger\|bendAfter\|beamHalfMeasure\|beamExceptions\|beam\|bassFigureStaffAlignmentUp\|bassFigureStaffAlignmentNeutral\|bassFigureStaffAlignmentDown\|bassFigureExtendersOn\|bassFigureExtendersOff\|barNumberVisibility\|barNumberFormatter\|barNumberCheck\|barCheckSynchronize\|barAlways\|bar\|balloonText\|balloonLengthOn\|balloonLengthOff\|balloonGrobText\|backslashed-digit\|automaticBars\|autoPageBreaksOn\|autoPageBreaksOff\|autoLineBreaksOn\|autoLineBreaksOff\|autoChange\|autoCautionaries\|autoBreaksOn\|autoBreaksOff\|autoBeaming\|autoBeamOn\|autoBeamOff\|autoBeamCheck\|autoAccidentals\|auto-footnote\|augmentum\|auctum\|associatedVoiceType\|assertBeamSlope\|assertBeamQuant\|ascendens\|arrow-head\|arpeggioParenthesisDashed\|arpeggioParenthesis\|arpeggioNormal\|arpeggioBracket\|arpeggioArrowUp\|arpeggioArrowDown\|arpeggio\|arabicStringNumbers\|appoggiatura\|applyOutput\|applyMusic\|applyContext\|appendToTag\|ambitusAfter\|alternativeRestores\|alternative\|alterBroken\|allowVoltaHook\|allowPageTurn\|alias\|aikenThinHeadsMinor\|aikenThinHeads\|aikenHeadsMinor\|aikenHeads\|afterGraceFraction\|afterGrace\|aeolian\|addlyrics\|additionalPitchPrefix\|addQuote\|addInstrumentDefinition\|accidentalStyle\|acciaccatura\|accepts\|accentus\|accent\|absolute\|abs-fontsize\|aDueText\|RemoveEmptyTabStaffContext\|RemoveEmptyStaffContext\|RemoveEmptyRhythmicStaffContext\|RemoveEmptyDrumStaffContext\|IJ\|IIJ\|C\|B\|AncientRemoveEmptyStaffContext\|A\|n\)\(\A\|\n\)"me=e-1 +syn match lilyReservedWord "\(\A\|\n\)\(staff\|spacing\|signature\|routine\|notes\|handler\|corrected\|beams\|arpeggios\|Volta_engraver\|Voice\|Vertical_align_engraver\|Vaticana_ligature_engraver\|VaticanaVoice\|VaticanaStaff\|Tweak_engraver\|Tuplet_engraver\|Trill_spanner_engraver\|Timing_translator\|Time_signature_performer\|Time_signature_engraver\|Tie_performer\|Tie_engraver\|Text_spanner_engraver\|Text_engraver\|Tempo_performer\|Tab_tie_follow_engraver\|Tab_staff_symbol_engraver\|Tab_note_heads_engraver\|TabVoice\|TabStaff\|System_start_delimiter_engraver\|Stem_engraver\|Stanza_number_engraver\|Stanza_number_align_engraver\|Staff_symbol_engraver\|Staff_performer\|Staff_collecting_engraver\|StaffGroup\|Staff\|Spanner_break_forbid_engraver\|Span_bar_stub_engraver\|Span_bar_engraver\|Span_arpeggio_engraver\|Spacing_engraver\|Slur_performer\|Slur_engraver\|Slash_repeat_engraver\|Separating_line_group_engraver\|Script_row_engraver\|Script_engraver\|Script_column_engraver\|Score\|Rhythmic_column_engraver\|RhythmicStaff\|Rest_engraver\|Rest_collision_engraver\|Repeat_tie_engraver\|Repeat_acknowledge_engraver\|Pure_from_neighbor_engraver\|Pitched_trill_engraver\|Pitch_squash_engraver\|Piano_pedal_performer\|Piano_pedal_engraver\|Piano_pedal_align_engraver\|PianoStaff\|Phrasing_slur_engraver\|PetrucciVoice\|PetrucciStaff\|Percent_repeat_engraver\|Part_combine_engraver\|Parenthesis_engraver\|Paper_column_engraver\|Output_property_engraver\|Ottava_spanner_engraver\|OneStaff\|NullVoice\|Note_spacing_engraver\|Note_performer\|Note_name_engraver\|Note_heads_engraver\|Note_head_line_engraver\|NoteNames\|NoteHead\|New_fingering_engraver\|Multi_measure_rest_engraver\|Midi_control_change_performer\|Metronome_mark_engraver\|Merge_mmrest_numbers_engraver\|Mensural_ligature_engraver\|MensuralVoice\|MensuralStaff\|Mark_engraver\|Lyrics\|Lyric_performer\|Lyric_engraver\|Ligature_bracket_engraver\|Ledger_line_engraver\|Laissez_vibrer_engraver\|Kievan_ligature_engraver\|KievanVoice\|KievanStaff\|Key_performer\|Key_engraver\|Keep_alive_together_engraver\|Instrument_switch_engraver\|Instrument_name_engraver\|Hyphen_engraver\|Grob_pq_engraver\|GregorianTranscriptionVoice\|GregorianTranscriptionStaff\|GrandStaff\|Grace_spacing_engraver\|Grace_engraver\|Grace_beam_engraver\|Grace_auto_beam_engraver\|Global\|Glissando_engraver\|Fretboard_engraver\|FretBoards\|Forbid_line_break_engraver\|Footnote_engraver\|Font_size_engraver\|Fingering_engraver\|Fingering_column_engraver\|Figured_bass_position_engraver\|Figured_bass_engraver\|FiguredBass\|Extender_engraver\|Episema_engraver\|Dynamics\|Dynamic_performer\|Dynamic_engraver\|Dynamic_align_engraver\|Drum_notes_engraver\|Drum_note_performer\|DrumVoice\|DrumStaff\|Double_percent_repeat_engraver\|Dots_engraver\|Dot_column_engraver\|Devnull\|Default_bar_line_engraver\|Custos_engraver\|Cue_clef_engraver\|CueVoice\|Control_track_performer\|Concurrent_hairpin_engraver\|Collision_engraver\|Cluster_spanner_engraver\|Clef_engraver\|Chord_tremolo_engraver\|Chord_name_engraver\|ChordNames\|ChoirStaff\|Breathing_sign_engraver\|Break_align_engraver\|Bend_engraver\|Beam_performer\|Beam_engraver\|Beam_collision_engraver\|Bar_number_engraver\|Bar_engraver\|Axis_group_engraver\|Auto_beam_engraver\|Arpeggio_engraver\|Accidental_engraver\|Score\)\(\A\|\n\)"ms=s+1,me=e-1 +syn match lilyNote "\<\(\(\(solx\|soltqs\|soltqd\|soltqb\|soltcs\|soltcb\|solstqt\|solss\|solsqt\|solsd\|solsb\|sols\|solqs\|solqd\|solqb\|solkk\|solkhk\|solk\|solhk\|solhb\|soldsd\|soldd\|sold\|solcs\|solcb\|solbtqt\|solbsb\|solbqt\|solbhb\|solbb\|solb\|sol\|six\|sitqs\|sitqd\|sitqb\|sitcs\|sitcb\|sistqt\|siss\|sisqt\|sisd\|sisb\|sis\|siqs\|siqd\|siqb\|sikk\|sikhk\|sik\|sihk\|sihb\|sidsd\|sidd\|sid\|sics\|sicb\|sibtqt\|sibsb\|sibqt\|sibhb\|sibb\|sib\|si\|rex\|retqs\|retqd\|retqb\|retcs\|retcb\|restqt\|ress\|resqt\|resd\|resb\|res\|reqs\|reqd\|reqb\|rekk\|rekhk\|rek\|rehk\|rehb\|redsd\|redd\|red\|recs\|recb\|rebtqt\|rebsb\|rebqt\|rebhb\|rebb\|reb\|re\|mix\|mitqs\|mitqd\|mitqb\|mitcs\|mitcb\|mistqt\|miss\|misqt\|misd\|misb\|mis\|miqs\|miqd\|miqb\|mikk\|mikhk\|mik\|mihk\|mihb\|midsd\|midd\|mid\|mics\|micb\|mibtqt\|mibsb\|mibqt\|mibhb\|mibb\|mib\|mi\|lax\|latqs\|latqd\|latqb\|latcs\|latcb\|lastqt\|lass\|lasqt\|lasd\|lasb\|las\|laqs\|laqd\|laqb\|lakk\|lakhk\|lak\|lahk\|lahb\|ladsd\|ladd\|lad\|lacs\|lacb\|labtqt\|labsb\|labqt\|labhb\|labb\|lab\|la\|hississ\|hissih\|hiss\|hisis\|hisih\|his\|hih\|hessess\|hesseh\|heses\|heseh\|heh\|h\|gx\|gtqs\|gtqf\|gtqd\|gtqb\|gss\|gshd\|gshb\|gs\|gqs\|gqf\|gississ\|gissih\|giss\|gisis\|gisih\|gis\|gih\|gfhd\|gfhb\|gff\|gf\|gessess\|gesseh\|gess\|geses\|geseh\|ges\|geh\|gdd\|gdb\|gd\|gb\|g\|fx\|ftqs\|ftqf\|ftqd\|ftqb\|fss\|fshd\|fshb\|fs\|fqs\|fqf\|fississ\|fissih\|fiss\|fisis\|fisih\|fis\|fih\|ffhd\|ffhb\|fff\|ff\|fessess\|fesseh\|fess\|feses\|feseh\|fes\|feh\|fdd\|fdb\|fd\|fb\|fax\|fatqs\|fatqd\|fatqb\|fatcs\|fatcb\|fastqt\|fass\|fasqt\|fasd\|fasb\|fas\|faqs\|faqd\|faqb\|fakk\|fakhk\|fak\|fahk\|fahb\|fadsd\|fadd\|fad\|facs\|facb\|fabtqt\|fabsb\|fabqt\|fabhb\|fabb\|fab\|fa\|f\|ex\|etqs\|etqf\|etqd\|etqb\|essess\|esseh\|ess\|eshd\|eshb\|eses\|eseh\|es\|eqs\|eqf\|eississ\|eissih\|eiss\|eisis\|eisih\|eis\|eih\|eh\|efhd\|efhb\|eff\|ef\|eessess\|eesseh\|eess\|eeses\|eeseh\|ees\|eeh\|edd\|edb\|ed\|eb\|e\|dx\|dtqs\|dtqf\|dtqd\|dtqb\|dss\|dshd\|dshb\|ds\|dqs\|dqf\|dox\|dotqs\|dotqd\|dotqb\|dotcs\|dotcb\|dostqt\|doss\|dosqt\|dosd\|dosb\|dos\|doqs\|doqd\|doqb\|dokk\|dokhk\|dok\|dohk\|dohb\|dodsd\|dodd\|dod\|docs\|docb\|dobtqt\|dobsb\|dobqt\|dobhb\|dobb\|dob\|do\|dississ\|dissih\|diss\|disis\|disih\|dis\|dih\|dfhd\|dfhb\|dff\|df\|dessess\|desseh\|dess\|deses\|deseh\|des\|deh\|ddd\|ddb\|dd\|db\|d\|cx\|ctqs\|ctqf\|ctqd\|ctqb\|css\|cshd\|cshb\|cs\|cqs\|cqf\|cississ\|cissih\|ciss\|cisis\|cisih\|cis\|cih\|cfhd\|cfhb\|cff\|cf\|cessess\|cesseh\|cess\|ceses\|ceseh\|ces\|ceh\|cdd\|cdb\|cd\|cb\|c\|bx\|btqs\|btqf\|btqd\|btqb\|bss\|bshd\|bshb\|bs\|bqs\|bqf\|bisis\|bisih\|bis\|bih\|bfhd\|bfhb\|bff\|bf\|bess\|beses\|beseh\|bes\|beh\|bdd\|bdb\|bd\|bb\|b\|ax\|atqs\|atqf\|atqd\|atqb\|assess\|asseh\|ass\|ashd\|ashb\|ases\|aseh\|asas\|asah\|as\|aqs\|aqf\|aississ\|aissih\|aiss\|aisis\|aisih\|ais\|aih\|ah\|afhd\|afhb\|aff\|af\|aessess\|aesseh\|aess\|aeses\|aeseh\|aes\|aeh\|add\|adb\|ad\|ab\|a\|a\)\([,']\)\{,4}\([?!]\)\?\)\|s\|r\|R\|q\)\(\(128\|64\|32\|16\|8\|4\|2\|1\|\\breve\|\\longa\|\\maxima\)[.]\{,8}\)\?\(\A\|\n\)"me=e-1 diff --git a/syntax/lilypond.vim b/syntax/lilypond.vim new file mode 100644 index 00000000..b2c674e8 --- /dev/null +++ b/syntax/lilypond.vim @@ -0,0 +1,108 @@ +if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'syntax/lilypond.vim') + finish +endif + +" LilyPond syntax file +" Language: LilyPond +" Maintainer: Heikki Junes <hjunes@cc.hut.fi> +" License: This file is part of LilyPond, the GNU music typesetter. +" +" Copyright (C) 2002-2004, 2008-2010 Han-Wen Nienhuys <hanwen@xs4all.nl> +" +" LilyPond is free software: you can redistribute it and/or modify +" it under the terms of the GNU General Public License as published by +" the Free Software Foundation, either version 3 of the License, or +" (at your option) any later version. +" +" LilyPond is distributed in the hope that it will be useful, +" but WITHOUT ANY WARRANTY; without even the implied warranty of +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +" GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License +" along with LilyPond. If not, see <http://www.gnu.org/licenses/>. +" +" Last Change: 2010 Jul 26 +" +" Installed As: vim/syntax/lilypond.vim +" Uses Generated File: vim/syntax/lilypond-words.vim +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the LilyPond syntax match groups: +" lilyKeyword, lilyReservedWord, lilyNote +if version < 600 + so <sfile>:p:h/lilypond-words.vim +else + runtime! syntax/lilypond-words.vim + if exists("b:current_syntax") + unlet b:current_syntax + endif +endif + +" Match also parethesis of angle type +setlocal mps+=<:> + +" Case matters +syn case match + +syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord,lilyScheme + +syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold +syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold +syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold + +syn region lilyString start=/"/ end=/"/ skip=/\\"/ +syn region lilyComment start="%{" skip="%$" end="%}" +syn region lilyComment start="%\([^{]\|$\)" end="$" + +syn match lilyNumber "[-_^.]\?\d\+[.]\?" +syn match lilySlur "[(~)]" +syn match lilySlur "\\[()]" +syn match lilySpecial "\\[<!>\\]" +" avoid highlighting the extra character in situations like +" c--\mf c^^\mf c__\mf +syn match lilyArticulation "[-_^][-_^+|>.]" + +" Include Scheme syntax highlighting, where appropriate +syn include @embeddedScheme syntax/scheme.vim +unlet b:current_syntax +syn region lilyScheme matchgroup=Delimiter start="#['`]\?(" matchgroup=Delimiter end=")" contains=@embeddedScheme + +" Rest of syntax highlighting rules start here +" +" " Define the default highlighting. +" " For version 5.7 and earlier: only when not done already +" " For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lily_syn_inits") + if version < 508 + let did_lily_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink Delimiter Identifier + + HiLink lilyString String + HiLink lilyComment Comment + + HiLink lilyNote Identifier + HiLink lilyArticulation PreProc + HiLink lilyKeyword Keyword + HiLink lilyReservedWord Type + + HiLink lilyNumber Constant + HiLink lilySpecial Special + HiLink lilySlur ModeMsg + + delcommand HiLink +endif + +let b:current_syntax = "lilypond" diff --git a/syntax/mermaid.vim b/syntax/mermaid.vim new file mode 100644 index 00000000..91b8658e --- /dev/null +++ b/syntax/mermaid.vim @@ -0,0 +1,65 @@ +if polyglot#init#is_disabled(expand('<sfile>:p'), 'mermaid', 'syntax/mermaid.vim') + finish +endif + +setlocal iskeyword+=- + +syntax keyword mermaidDiagramType classDiagram classDiagram-v2 erDiagram gantt graph flowchart pie sequenceDiagram stateDiagram stateDiagram-v2 +syntax match mermaidOperator /\v(-|\<|\>|\+|\||\=)/ +syntax match mermaidComment /\v^(\s?)+\%\%.*$/ +syntax region mermaidString start=/"/ end=/"/ skip=/\\"/ +" is used in both class and state diagrams +syntax match mermaidSpecialAnnotation /\v\<\<\w+\>\>/ +syntax match mermaidKeyword /\v^\s+(subgraph|loop|alt|else|opt|par[^a-z]|and|rect|end|participant|activate|deactivate)/ + +syntax match mermaidGraphOperator /\v(\.-|-\.|\&|o-|-o|x-|-x)/ +syntax keyword mermaidGraphClickKeyword click + +syntax match mermaidNote /\v^\s+(note[^s]|Note[^s]|end note)/ nextgroup=mermaidNoteDirection +syntax match mermaidNoteDirection /\v(left of|right of|over[^a-z])/ + +syntax keyword mermaidSequenceFunction rgb + +" TODO: support class dashed link operator: `..` +syntax match mermaidClassOperator /\v(\*-|-\*|\<\.\.|\.\.\>|\|\.\.|\.\.\|)/ +syntax keyword mermaidClassClassKeyword class +syntax keyword mermaidClassType + \ int[eger] bool[ean] string float bigdec[imal] char[cter] double symbol +syntax match mermaidClassGenericType /\v\w+\~\w+\~/ + \ contains=ALLBUT,mermaidClassGenericType +" TODO Fix matching on graph/flowchart round shape: `SecondStep(Go Shopping)` +syntax match mermaidClassFunction /\v\w+\(((\w+|\s+|\~)?,?)+\)/ contains=ALLBUT,mermaidClassFunction +" TODO support class visibility operators +" https://mermaid-js.github.io/mermaid/#/classDiagram?id=visibility + +syntax match mermaidStateFinalKeyword /\[\*\]/ +syntax match mermaidStateKeyword /\v(\s+as[^a-z]|^\s+state)/ + +" TODO highlight gantt keywords + +" TODO improve er operators +syntax match mermaidErOperator /\v(\}\||\|\{|o\{)/ + +highlight link mermaidDiagramType Constant +highlight link mermaidOperator Operator +highlight link mermaidComment Comment +highlight link mermaidString String +highlight link mermaidSpecialAnnotation Label +highlight link mermaidNote Keyword +highlight link mermaidNoteDirection Keyword + +highlight link mermaidGraphOperator Operator +highlight link mermaidGraphClickKeyword Keyword + +highlight link mermaidKeyword Keyword +highlight link mermaidSequenceFunction Function + +highlight link mermaidClassClassKeyword Keyword +highlight link mermaidClassOperator Operator +highlight link mermaidClassType Type +highlight link mermaidClassGenericType Type + +highlight link mermaidStateFinalKeyword Keyword +highlight link mermaidStateKeyword Keyword + +highlight link mermaidErOperator Operator diff --git a/syntax/swayconfig.vim b/syntax/swayconfig.vim new file mode 100644 index 00000000..96259665 --- /dev/null +++ b/syntax/swayconfig.vim @@ -0,0 +1,285 @@ +if polyglot#init#is_disabled(expand('<sfile>:p'), 'sway', 'syntax/swayconfig.vim') + finish +endif + +" Vim syntax file +" Language: sway config file +" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com> +" Maintainer: James Eapen <jamespeapen at gmail dot com> +" Version: 1.0 +" Last Change: 2020-10-07 + +" References: +" http://i3wm.org/docs/userguide.html#configuring +" http://vimdoc.sourceforge.net/htmldoc/syntax.html +" +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elsei exists("b:current_syntax") + fini +en + +scriptencoding utf-8 + +" Error +syn match swayConfigError /.*/ + +" Todo +syn keyword swayConfigTodo TODO FIXME XXX contained + +" Comment +" Comments are started with a # and can only be used at the beginning of a line +syn match swayConfigComment /^\s*#.*$/ contains=swayConfigTodo + +" Font +" A FreeType font description is composed by: +" a font family, a style, a weight, a variant, a stretch and a size. +syn match swayConfigFontSeparator /,/ contained +syn match swayConfigFontSeparator /:/ contained +syn keyword swayConfigFontKeyword font contained +syn match swayConfigFontNamespace /\w\+:/ contained contains=swayConfigFontSeparator +syn match swayConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=swayConfigFontNamespace,swayConfigFontSeparator,swayConfigFontKeyword +syn match swayConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained +syn match swayConfigFont /^\s*font\s\+.*$/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace +syn match swayConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace +syn match swayConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace +syn match swayConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace + +" variables +syn match swayConfigString /\(['"]\)\(.\{-}\)\1/ contained +syn match swayConfigColor /#\w\{6}/ contained +syn match swayConfigVariableModifier /+/ contained +syn match swayConfigVariableAndModifier /+\w\+/ contained contains=swayConfigVariableModifier +syn match swayConfigVariable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=swayConfigVariableModifier,swayConfigVariableAndModifier +syn keyword swayConfigInitializeKeyword set contained +syn match swayConfigInitialize /^\s*set\s\+.*$/ contains=swayConfigVariable,swayConfigInitializeKeyword,swayConfigColor,swayConfigString + +" Gaps +syn keyword swayConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained +syn match swayConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=swayConfigGapStyleKeyword,swayConfigNumber,swayConfigVariable +syn keyword swayConfigSmartGapKeyword on inverse_outer contained +syn match swayConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=swayConfigSmartGapKeyword +syn keyword swayConfigSmartBorderKeyword on no_gaps contained +syn match swayConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=swayConfigSmartBorderKeyword + +" Keyboard bindings +syn keyword swayConfigAction toggle fullscreen restart key import kill shrink grow contained +syn keyword swayConfigAction focus move grow height width split layout resize restore reload mute unmute exit mode workspace container to output contained +syn match swayConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=swayConfigVariableModifier +syn match swayConfigNumber /\s\d\+/ contained +syn match swayConfigUnit /\sp\(pt\|x\)/ contained +syn match swayConfigUnitOr /\sor/ contained +syn keyword swayConfigBindKeyword bindsym bindcode exec gaps border contained +syn match swayConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained +syn match swayConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=swayConfigVariable,swayConfigBindKeyword,swayConfigVariableAndModifier,swayConfigNumber,swayConfigUnit,swayConfigUnitOr,swayConfigBindArgument,swayConfigModifier,swayConfigAction,swayConfigString,swayConfigGapStyleKeyword,swayConfigBorderStyleKeyword + +" Floating +syn keyword swayConfigFloatingModifier floating_modifier contained +syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s.*\(normal\|inverted\)$/ contains=swayConfigFloatingModifier,swayConfigVariable + +syn keyword swayConfigSizeSpecial x contained +syn match swayConfigNegativeSize /-/ contained +syn match swayConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=swayConfigSizeSpecial,swayConfigNumber,swayConfigNegativeSize +syn match swayConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=swayConfigSize + +" Orientation +syn keyword swayConfigOrientationKeyword vertical horizontal auto contained +syn match swayConfigOrientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=swayConfigOrientationKeyword + +" Layout +syn keyword swayConfigLayoutKeyword default stacking tabbed contained +syn match swayConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=swayConfigLayoutKeyword + +" Border style +syn keyword swayConfigBorderStyleKeyword none normal pixel contained +syn match swayConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\(\s\+\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?\)\?\)\s\?$/ contains=swayConfigBorderStyleKeyword,swayConfigNumber,swayConfigVariable + +" Hide borders and edges +syn keyword swayConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained +syn match swayConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=swayConfigEdgeKeyword + +" Arbitrary commands for specific windows (for_window) +syn keyword swayConfigCommandKeyword for_window contained +syn region swayConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=swayConfigString +syn region swayConfigWindowCommandSpecial start="\[" end="\]" contained contains=swayConfigWindowStringSpacial,swayConfigString +syn match swayConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=swayConfigWindowCommandSpecial,swayConfigCommandKeyword,swayConfigBorderStyleKeyword,swayConfigLayoutKeyword,swayConfigOrientationKeyword,Size,swayConfigNumber + +" Disable focus open opening +syn keyword swayConfigNoFocusKeyword no_focus contained +syn match swayConfigDisableFocus /^\s*no_focus\s\+.*$/ contains=swayConfigWindowCommandSpecial,swayConfigNoFocusKeyword + +" Move client to specific workspace automatically +syn keyword swayConfigAssignKeyword assign contained +syn match swayConfigAssignSpecial /→/ contained +syn match swayConfigAssign /^\s*assign\s\+.*$/ contains=swayConfigAssignKeyword,swayConfigWindowCommandSpecial,swayConfigAssignSpecial + +" X resources +syn keyword swayConfigResourceKeyword set_from_resource contained +syn match swayConfigResource /^\s*set_from_resource\s\+.*$/ contains=swayConfigResourceKeyword,swayConfigWindowCommandSpecial,swayConfigColor,swayConfigVariable + +" Auto start applications +syn keyword swayConfigExecKeyword exec exec_always contained +syn match swayConfigNoStartupId /--no-startup-id/ contained " We are not using swayConfigBindArgument as only no-startup-id is supported here +syn match swayConfigExec /^\s*exec\(_always\)\?\s\+.*$/ contains=swayConfigExecKeyword,swayConfigNoStartupId,swayConfigString + +" Automatically putting workspaces on specific screens +syn keyword swayConfigWorkspaceKeyword workspace contained +syn keyword swayConfigOutputKeyword output contained +syn match swayConfigWorkspace /^\s*workspace\s\+.*$/ contains=swayConfigWorkspaceKeyword,swayConfigNumber,swayConfigString,swayConfigOutputKeyword + +" set display outputs +syn match swayConfigOutput /^\s*output\s\+.*$/ contains=swayConfigOutputKeyword + +" set display focus +syn keyword swayConfigFocusKeyword focus contained +syn keyword swayConfigFocusType output contained +syn match swayConfigFocus /^\s*focus\soutput\s.*$/ contains=swayConfigFocusKeyword,swayConfigFocusType + +" Changing colors +syn keyword swayConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained +syn match swayConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=swayConfigClientColorKeyword,swayConfigColor,swayConfigVariable + +syn keyword swayConfigTitleAlignKeyword left center right contained +syn match swayConfigTitleAlign /^\s*title_align\s\+.*$/ contains=swayConfigTitleAlignKeyword + +" Interprocess communication +syn match swayConfigInterprocessKeyword /ipc-socket/ contained +syn match swayConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=swayConfigInterprocessKeyword + +" Mouse warping +syn keyword swayConfigMouseWarpingKeyword mouse_warping contained +syn keyword swayConfigMouseWarpingType output none contained +syn match swayConfigMouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=swayConfigMouseWarpingKeyword,swayConfigMouseWarpingType + +" Focus follows mouse +syn keyword swayConfigFocusFollowsMouseKeyword focus_follows_mouse contained +syn keyword swayConfigFocusFollowsMouseType yes no contained +syn match swayConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusFollowsMouseKeyword,swayConfigFocusFollowsMouseType + +" Popups during fullscreen mode +syn keyword swayConfigPopupOnFullscreenKeyword popup_during_fullscreen contained +syn keyword swayConfigPopuponFullscreenType smart ignore leave_fullscreen contained +syn match swayConfigPopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=swayConfigPopupOnFullscreenKeyword,swayConfigPopupOnFullscreenType + +" Focus wrapping +syn keyword swayConfigFocusWrappingKeyword force_focus_wrapping focus_wrapping contained +syn keyword swayConfigFocusWrappingType yes no contained +syn match swayConfigFocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigFocusWrappingKeyword + +" Forcing Xinerama +syn keyword swayConfigForceXineramaKeyword force_xinerama contained +syn match swayConfigForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigForceXineramaKeyword + +" Automatic back-and-forth when switching to the current workspace +syn keyword swayConfigAutomaticSwitchKeyword workspace_auto_back_and_forth contained +syn match swayConfigAutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigAutomaticSwitchKeyword + +" Delay urgency hint +syn keyword swayConfigTimeUnit ms contained +syn keyword swayConfigDelayUrgencyKeyword force_display_urgency_hint contained +syn match swayConfigDelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=swayConfigFocusWrappingType,swayConfigDelayUrgencyKeyword,swayConfigNumber,swayConfigTimeUnit + +" Focus on window activation +syn keyword swayConfigFocusOnActivationKeyword focus_on_window_activation contained +syn keyword swayConfigFocusOnActivationType smart urgent focus none contained +syn match swayConfigFocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=swayConfigFocusOnActivationKeyword,swayConfigFocusOnActivationType + +" Automatic back-and-forth when switching to the current workspace +syn keyword swayConfigDrawingMarksKeyword show_marks contained +syn match swayConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigDrawingMarksKeyword + +" Group mode/bar +syn keyword swayConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained +syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=swayConfigBlockKeyword,swayConfigString,swayConfigBind,swayConfigComment,swayConfigFont,swayConfigFocusWrappingType,swayConfigColor,swayConfigVariable transparent keepend extend + +" Line continuation +syn region swayConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=swayConfigBlockKeyword,swayConfigString,swayConfigBind,swayConfigComment,swayConfigFont,swayConfigFocusWrappingType,swayConfigColor,swayConfigVariable transparent keepend extend + +" Includes with relative paths to config files +syn keyword swayConfigInclude include contained +syn match swayConfigFile /^include\s\(\~\?\/.*$\|\.\{0,2}\/.*$\)/ contains=swayConfigInclude + +" Define the highlighting. +let b:current_syntax = "swayconfig" +hi! def link swayConfigError Error +hi! def link swayConfigTodo Todo +hi! def link swayConfigComment Comment +hi! def link swayConfigFontContent Type +hi! def link swayConfigFocusOnActivationType Type +hi! def link swayConfigPopupOnFullscreenType Type +hi! def link swayConfigOrientationKeyword Type +hi! def link swayConfigMouseWarpingType Type +hi! def link swayConfigFocusFollowsMouseType Type +hi! def link swayConfigGapStyleKeyword Type +hi! def link swayConfigTitleAlignKeyword Type +hi! def link swayConfigSmartGapKeyword Type +hi! def link swayConfigSmartBorderKeyword Type +hi! def link swayConfigLayoutKeyword Type +hi! def link swayConfigBorderStyleKeyword Type +hi! def link swayConfigEdgeKeyword Type +hi! def link swayConfigAction Type +hi! def link swayConfigCommand Type +hi! def link swayConfigOutputKeyword Type +hi! def link swayConfigWindowCommandSpecial Type +hi! def link swayConfigFocusWrappingType Type +hi! def link swayConfigUnitOr Type +hi! def link swayConfigFontSize Constant +hi! def link swayConfigColor Constant +hi! def link swayConfigNumber Constant +hi! def link swayConfigUnit Constant +hi! def link swayConfigVariableAndModifier Constant +hi! def link swayConfigTimeUnit Constant +hi! def link swayConfigModifier Constant +hi! def link swayConfigString Constant +hi! def link swayConfigNegativeSize Constant +hi! def link swayConfigFontSeparator Special +hi! def link swayConfigVariableModifier Special +hi! def link swayConfigSizeSpecial Special +hi! def link swayConfigWindowSpecial Special +hi! def link swayConfigAssignSpecial Special +hi! def link swayConfigFontNamespace PreProc +hi! def link swayConfigBindArgument PreProc +hi! def link swayConfigNoStartupId PreProc +hi! def link swayConfigFontKeyword Identifier +hi! def link swayConfigBindKeyword Identifier +hi! def link swayConfigOrientation Identifier +hi! def link swayConfigGapStyle Identifier +hi! def link swayConfigTitleAlign Identifier +hi! def link swayConfigSmartGap Identifier +hi! def link swayConfigSmartBorder Identifier +hi! def link swayConfigLayout Identifier +hi! def link swayConfigBorderStyle Identifier +hi! def link swayConfigEdge Identifier +hi! def link swayConfigFloating Identifier +hi! def link swayConfigCommandKeyword Identifier +hi! def link swayConfigNoFocusKeyword Identifier +hi! def link swayConfigInitializeKeyword Identifier +hi! def link swayConfigAssignKeyword Identifier +hi! def link swayConfigResourceKeyword Identifier +hi! def link swayConfigExecKeyword Identifier +hi! def link swayConfigWorkspaceKeyword Identifier +hi! def link swayConfigClientColorKeyword Identifier +hi! def link swayConfigInterprocessKeyword Identifier +hi! def link swayConfigMouseWarpingKeyword Identifier +hi! def link swayConfigFocusFollowsMouseKeyword Identifier +hi! def link swayConfigPopupOnFullscreenKeyword Identifier +hi! def link swayConfigFocusWrappingKeyword Identifier +hi! def link swayConfigForceXineramaKeyword Identifier +hi! def link swayConfigAutomaticSwitchKeyword Identifier +hi! def link swayConfigDelayUrgencyKeyword Identifier +hi! def link swayConfigFocusOnActivationKeyword Identifier +hi! def link swayConfigDrawingMarksKeyword Identifier +hi! def link swayConfigBlockKeyword Identifier +hi! def link swayConfigVariable Statement +hi! def link swayConfigArbitraryCommand Type +hi! def link swayConfigInclude Identifier +hi! def link swayConfigFile Constant +hi! def link swayConfigFloatingModifier Identifier +hi! def link swayConfigFloatingMouseAction Type +hi! def link swayConfigFocusKeyword Type +hi! def link swayConfigFocusType Identifier + + diff --git a/syntax/toml.vim b/syntax/toml.vim new file mode 100644 index 00000000..9540d2c5 --- /dev/null +++ b/syntax/toml.vim @@ -0,0 +1,80 @@ +if polyglot#init#is_disabled(expand('<sfile>:p'), 'toml', 'syntax/toml.vim') + finish +endif + +" Language: TOML +" Maintainer: Caleb Spare <cespare@gmail.com> +" URL: https://github.com/cespare/vim-toml +" LICENSE: MIT + +if exists('b:current_syntax') + finish +endif + +syn match tomlEscape /\\[btnfr"/\\]/ display contained +syn match tomlEscape /\\u\x\{4}/ contained +syn match tomlEscape /\\U\x\{8}/ contained +hi def link tomlEscape SpecialChar + +syn match tomlLineEscape /\\$/ contained +hi def link tomlLineEscape SpecialChar + +" Basic strings +syn region tomlString oneline start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=tomlEscape +" Multi-line basic strings +syn region tomlString start=/"""/ end=/"""/ contains=tomlEscape,tomlLineEscape +" Literal strings +syn region tomlString oneline start=/'/ end=/'/ +" Multi-line literal strings +syn region tomlString start=/'''/ end=/'''/ +hi def link tomlString String + +syn match tomlInteger /[+-]\=\<[1-9]\(_\=\d\)*\>/ display +syn match tomlInteger /[+-]\=\<0\>/ display +syn match tomlInteger /[+-]\=\<0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*\>/ display +syn match tomlInteger /[+-]\=\<0o[0-7]\(_\=[0-7]\)*\>/ display +syn match tomlInteger /[+-]\=\<0b[01]\(_\=[01]\)*\>/ display +syn match tomlInteger /[+-]\=\<\(inf\|nan\)\>/ display +hi def link tomlInteger Number + +syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\.\d\+\>/ display +syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*\>/ display +hi def link tomlFloat Float + +syn match tomlBoolean /\<\%(true\|false\)\>/ display +hi def link tomlBoolean Boolean + +" https://tools.ietf.org/html/rfc3339 +syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}/ display +syn match tomlDate /\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?/ display +syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}[T ]\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?\%(Z\|[+-]\d\{2\}:\d\{2\}\)\?/ display +hi def link tomlDate Constant + +syn match tomlKey /\v(^|[{,])\s*\zs[[:alnum:]._-]+\ze\s*\=/ display +hi def link tomlKey Identifier + +syn region tomlKeyDq oneline start=/\v(^|[{,])\s*\zs"/ end=/"\ze\s*=/ contains=tomlEscape +hi def link tomlKeyDq Identifier + +syn region tomlKeySq oneline start=/\v(^|[{,])\s*\zs'/ end=/'\ze\s*=/ +hi def link tomlKeySq Identifier + +syn region tomlTable oneline start=/^\s*\[[^\[]/ end=/\]/ contains=tomlKey,tomlKeyDq,tomlKeySq +hi def link tomlTable Title + +syn region tomlTableArray oneline start=/^\s*\[\[/ end=/\]\]/ contains=tomlKey,tomlKeyDq,tomlKeySq +hi def link tomlTableArray Title + +syn cluster tomlValue contains=tomlArray,tomlString,tomlInteger,tomlFloat,tomlBoolean,tomlDate,tomlComment +syn region tomlKeyValueArray start=/=\s*\[\zs/ end=/\]/ contains=@tomlValue +syn region tomlArray start=/\[/ end=/\]/ contains=@tomlValue contained + +syn keyword tomlTodo TODO FIXME XXX BUG contained +hi def link tomlTodo Todo + +syn match tomlComment /#.*/ contains=@Spell,tomlTodo +hi def link tomlComment Comment + +syn sync minlines=500 + +let b:current_syntax = 'toml' |