Upgrade to Pro — share decks privately, control downloads, hide ads and more …

VimmerのWebエンジニアがTypeScriptでNeovimプラグインを作った話 / 2...

VimmerのWebエンジニアがTypeScriptでNeovimプラグインを作った話 / 2023-06-21

Takuma Yamamoto

June 21, 2023
Tweet

More Decks by Takuma Yamamoto

Other Decks in Programming

Transcript

  1. BIOGRAPHY ͋ͳͨ͸୭Ͱ͔͢ʁ 5BLVNB:BNBNPUP 8PSLBUTOBQNF 'SPN.JZB[BLJ ٕज़ελοΫ 4/4 झຯ ɾόοΫΤϯυ3VCZPO3BJMT ɾϑϩϯτΤϯυ3FBDU

    ɾΞϓϦ3FBDU/BUJWF ɾɹɹIUUQTHJUIVCDPNUBNBHPLFSBO ɾɹɹIUUQTUXJUUFSDPNZBNBUBLV ɾɹɹIUUQTRJJUBDPNUBNBHPLFSBO ɾɹɹIUUQT[FOOEFWUBNBHPLFSBO ɾ͓΍ͭ ɾα΢φ ɾΞχϝ
  2. INTRODUCTION JavaScript TypeScript runtime %FOPJTB+BWB4DSJQU 5ZQF4DSJQU BOE 8FC"TTFNCMZSVOUJNFXJUITFDVSFEFGBVMUT BOEBHSFBUEFWFMPQFSFYQFSJFODF %FOPͱ͸ɺ%FOP-BOE*OD͕։ൃ͍ͯ͠Δϓ

    ϩμΫτͰ͋Γɺ҆શ͔ͭ༏Εͨ։ൃऀମݧΛ උ͑ͨ+BWB4DSJQU΍5ZQF4DSJQUϥϯλΠϜϞ δϡʔϧͰ͢ɻ Ҿ༻ݩIUUQTEFOPDPNSVOUJNF EFOPMBOEEFOP "NPEFSOSVOUJNFGPS+BWB4DSJQUBOE5ZQF4DSJQU 3VTU
  3. TUTORIAL Denops ͷΠϯετʔϧ Ҿ༻ݩIUUQTHJUIVCDPNUBNBHPLFSBO%PDLFS fi MFTCMPCNBJOCBTF%PDLFS fi MF Ҿ༻ݩIUUQTHJUIVCDPNUBNBHPLFSBOEPU fi

    MFTCMPCCBTFMPDBMTIBSFEFJOUPNMHFOFSBMUPNM ˞"QQMF$IJQ౥ࡌͷ.BD#PPLΛ࢖༻͢Δ͜ͱΛલఏͱ͍ͯ͠·͢ ˞ύοέʔδϚωʔδϟʔͱͯ͠EFJOWJNΛ࢖༻͍ͯ͠·͢
  4. INTRODUCTION ui, source, fi lter, kind ͱ͍͏֓೦ ui source fi

    lter kind WJFXΛ੍ޚ͢Δ JUFNΛੜ੒͢Δ JUFNΛߜΓࠐΈɾιʔτɾՃ޻͢Δ JUFNʹର࣮͠ߦ͢ΔΞΫγϣϯ ֦ுϓϥάΠϯྫ EEVVJ f ֦ுϓϥάΠϯྫ EEVTPVSDF fi MF@SFD ֦ுϓϥάΠϯྫ EEV fi MUFSNBUDIFS@TVCTUSJOH ֦ுϓϥάΠϯྫ EEVLJOE fi MF
  5. INTRODUCTION ddu.vim ʹΑΔ Fuzzy Finder ͷߏ੒ཁૉΛՄࢹԽ EEVVJ ff  WJFXͷ੍ޚ

    ˞ fl PBUJOHΛࢦఆ EEVTPVSDF fi MF@SFD ࠶ؼతʹϑΝΠϧΛऔಘ EEV fi MUFSNBUDIFS@TVCTUSJOH ೖྗͨ͠஋ͰߜΓࠐΈ EEVLJOE fi MF બ୒࣌ʹ։͘ ˞PQFOΛࢦఆ ˞େ·͔ͳઆ໌ͳͷͰɺৄ͘͠͸;FOO΍ιʔείʔυΛ͓ಡΈ͍ͩ͘͞ɻ
  6. INTRODUCTION ddu.vim ʹΑΔ Filer ͷߏ੒ཁૉΛՄࢹԽ ˞େ·͔ͳઆ໌ͳͷͰɺৄ͘͠͸;FOO΍ιʔείʔυΛ͓ಡΈ͍ͩ͘͞ɻ EEVVJ fi MFS WJFXͷ੍ޚ

    EEVTPVSDF fi MF ಛఆQBUI಺ͷϑΝΠϧɾσΟϨΫτϦΛऔಘ EEVLJOE fi MF બ୒࣌ʹ։͘ ˞PQFOΛࢦఆ EEVDPMVNO fi MFOBNF JUFNͷݟͤํΛ੍ޚ ˞ϑΝΠϧͱσΟϨΫτϦͷݟͤํΛม͑ͨΓ ˞σΟϨΫτϦͷ։ดͰݟͤํΛม͑ͨΓ
  7. EXAMPLE 4IPVHPࢯ͸EEVVJ fi MFS޲͚ʹΧϥϜ༻ͷ֦ு ϓϥάΠϯʮEEVDPMVNO fi MFOBNFʯΛఏڙ͠ ͍ͯ·͢ɻ 
 ͜ͷϓϥάΠϯΛࢀߟʹͯ͠ɺΞΠίϯͳͲ΋

    ҰॹʹදࣔͰ͖ΔΑ͏վม͠·ͨ͠ɻ طଘϓϥάΠϯΛࢀߟʹ 4IPVHPEEVDPMVNO fi MFOBNF 'JMFOBNFDPMVNOGPSEEVWJN 5ZQF4DSJQU