Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Neovim hearts Ruby
Masafumi Okura
May 13, 2022
Programming
0
95
Neovim hearts Ruby
https://fukuokarb.connpass.com/event/245647/
Masafumi Okura
May 13, 2022
Tweet
Share
More Decks by Masafumi Okura
See All by Masafumi Okura
A technique to implement DSL in Ruby
okuramasafumi
0
950
Writing simple and easy DSL with Ruby
okuramasafumi
1
62
Control methods like a pro
okuramasafumi
1
290
Guessing the future of Rails from what DHH said
okuramasafumi
3
1k
Recent Neovim
okuramasafumi
0
93
Read code together
okuramasafumi
0
100
my-first-mrbgem
okuramasafumi
1
120
Recent Rails movements in 15 minutes
okuramasafumi
0
82
Kaigi on Rails - creating a tech conference in the era of online
okuramasafumi
0
33
Other Decks in Programming
See All in Programming
"What's new in Swift"の要約 / swift_5_7_summary
uhooi
1
350
実践エクストリームプログラミング / Extreme Programming in Practice
enk
1
570
The strategies behind ddd – AdeoDevSummit 2022
lilobase
PRO
5
270
Jetpack Compose best practices 動画紹介 @GoogleI/O LT会
takakitojo
0
400
Client-Side Field-Level Encryption for Apache Kafka Connect @ VoxxedDays Luxembourg 2022
hpgrahsl
0
120
engineer
spacemarket
0
4.9k
GoogleI/O2022 LT報告会資料
shinsukefujita1126
0
410
Modern Android Developer ~ 안내서
pluu
1
660
開発速度を5倍早くするVSCodeの拡張機能を作った
purp1eeeee
2
170
Baseline Profilesでアプリのパフォーマンスを向上させる / Improve app performance with Baseline Profiles
numeroanddev
0
260
[DevTrends - Jun/2022] Arquitetura baseada em eventos
camilacampos
0
160
ES2022の新機能
smt7174
0
270
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
296
110k
How To Stay Up To Date on Web Technology
chriscoyier
780
250k
Ruby is Unlike a Banana
tanoku
91
9.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
253
12k
Build The Right Thing And Hit Your Dates
maggiecrowley
19
1.2k
How to train your dragon (web standard)
notwaldorf
58
3.9k
Learning to Love Humans: Emotional Interface Design
aarron
261
37k
Thoughts on Productivity
jonyablonski
43
2.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
10
3.5k
How to name files
jennybc
40
61k
A Philosophy of Restraint
colly
192
15k
Building Adaptive Systems
keathley
25
1.1k
Transcript
Neovim :hearts: Ruby OKURA Masafumi, Fukuoka.rb 0x100 ճ LT େձ,
2022-05-11
100000000ճ։࠵ ͓ΊͰͱ͏͍͟͝·͢ʂʂʂ ʢೋਐʣ
࠷ۙͷRubyͷΛฉ͍͍ͯΔͱ
͜Μͳ͕ଟ͍Ͱ͢Ͷ • typeprof͕VSCodeʹରԠͨ͠Αʂ • SteepରԠ͍ͯ͠ΔΑʂ • σόοΨVSCode্Ͱಈ͘Αʂ
શ෦VSCode͡ΌΜʂ
ԶͨͪʢVimʣʹ໌ͳ͍…ʁ
None
Neovimͱ • VimͷϑΥʔΫ • ݱతͳػೳʹଟ͘ରԠ • VimͷϓϥάΠϯ͍͍ͩͨͦͷ··͑Δ • VimͰ͑ΔϓϥάΠϯͷվྑ൛͕LuaͰॻ͔Ε͍ͯΔ͜ͱ͕ଟ͍ •
ඇৗʹ׆ൃͳ։ൃʢຊମɾϓϥάΠϯͱʹʣ
͍͔ͭ͘ͷศརͳϓϥάΠϯΛ͝հ
neovim/nvim-lspcon fi g
neovim/nvim-lspcon fi g • LSPʢVSCodeൃͷิػೳͱ͔ʹؔ͢ΔϓϩτίϧʣΛ͏ͨΊ ʹ΄΅ඞਢ • ࣄલʹొ͞ΕͨLSPαʔόʔͰ͋ΕɺઃఆϑΝΠϧΛ1ߦॻ͚ͩ͘ ͰNeovimͰ͑ΔΑ͏ʹͳΔ •
ઌSteepରԠͷύονΛ͛ͨʢએʣ • https://github.com/neovim/nvim-lspcon fi g/pull/1842
nvim-treesitter/nvim-treesitter
nvim-treesitter/nvim-treesitter • TreeSitterͱ͍͏ύʔαʔ͕Neovim͔Β͑ΔΑ͏ʹͳΔ • ΈࠐΈͷϋΠϥΠτΑΓΧϥϑϧʹͳΔ • ࢹ֮తʹจ๏ཁૉΛѲͰ͖ΔͷͰศར • ͨͩݱঢ়ɺRubyͰTreeSitterͷΈͩͱΠϯσϯτ͕յΕΔͨΊɺ syntax༗ޮʹ͢Δඞཁ͕͋Δ
Before
After
hrsh7th/nvim-cmp
hrsh7th/nvim-cmp • ࣗಈิϓϥάΠϯͰଟҰ൪ྑ͘Ͱ͖͍ͯΔ • ιʔεΛՃ͢Δ͜ͱͰ৭ʑͳީิ͔ΒิͰ͖Δ • LSP͔Βิ͕Մೳ • ίϚϯυϥΠϯݕࡧิର •
RubyΤσΟλͷิपΓ͕ऑ͍͕ɺকདྷతʹܕϕʔεͷิ༗ ޮʹͰ͖ΔͷͩΖ͏͔
mfussenegger/nvim-dap
mfussenegger/nvim-dap • Debug Adapter Protocol ( https://microsoft.github.io/debug- adapter-protocol/ ) ͕NeovimͰಈ࡞͢ΔΑ͏ʹͳΔ
• rcarriga/nvim-dap-ui Λ͏͜ͱͰIDEͬΆ͍ϦονͳUI͑Δ • suketa/nvim-dap-ruby Λ͑debug.gemͱ࿈ܞͰ͖Δ • …͕ͣͩɺݱ࣌ͰԿΒ͔ͷཧ༝ʹΑΓ͏·͘ಈ࡞͠ͳ͍
͓·͚ʢNeovimઐ༻Ͱͳ͍ͷͰʣ
tpope/vim-rails
tpope/vim-rails • 10Ҏ্લ͔Βଘࡏ͢ΔݹయతͳVimϓϥάΠϯ • `:Emodel`ίϚϯυͳͲɺRailsͷߏΛલఏͱͨ͠ίϚϯυମܥ • લड़ͷnvim-cmpͰίϚϯυิ͕Ͱ͖Δͷ͕ڧྗͰɺ`:Emodel u`ͱ ೖྗ͢Δ͚ͩͰޙิͰUserϞσϧΛ։͘͜ͱ͕Ͱ͖Δ •
Railsͷ߹ɺ”User”Ͱ࢝·ΔϑΝΠϧ͕ଟ͍ͨΊ୯ͳΔϑΝδʔ ϑΝΠϯμʔΑΓ༗ޮͳ߹͕ଟ͍
·ͱΊ
NeovimΛRubyͷ։ൃڥͱͯ͠͏͜ͱ • దͳϓϥάΠϯΛೖΕͯઃఆ͢Εे͑Δ • ٯʹݴ͏ͱɺσϑΥϧτͷঢ়ଶͰੜ࢈ੑΛߴΊΔͷ͍͠ • հͳͷɺ࠷దͳϓϥάΠϯʑมΘ͍ͬͯΔ͜ͱ • ͞Βʹ͍͏ͱׂͱߴ֬Ͱಥવಈ࡞͠ͳ͘ͳͬͨΓ͢Δ •
VimϓϥάΠϯͷੈքʹʮϦϦʔεʯʮόʔδϣϯʯͷ֓೦͕ͳ ͍ͷͰ…
NeovimΛ͏ϝϦοτ • λʔϛφϧ͚ͩͰ։ൃ͕݁͢Δ • ๛ͳϓϥάΠϯ • ωΠςΟϒͷVimΩʔόΠϯυ
Neovim͕͍͍ͯΔਓ • ࣗͰใऩू͕Ͱ͖Δ • vim-jpͱ͍͏ίϛϡχςΟ͕͋ͬͯຊޠ͕͑ΔͷͰͰ͖Δͣ • ࣗͰൺֱɾऔࣺબͰ͖Δ • ಉ͡ػೳΛ࣋ͭϓϥάΠϯ͕ෳ͋Δ͜ͱ͕ଟ͍ •
ઃఆΛࢼߦࡨޡͰ͖Δ • READMEͷ௨Γʹͨ͠ͷʹͳΜ͔มɺͱ͔Α͋͘Δ
Neovim Ruby
pp self • ໊લɿେխ࢙ʢ͓͓͘Β·͞;Έʣ • ॴଐɿϑϦʔϥϯε • ͦͷଞɿKaigi on RailsͷνʔϑΦʔΨφΠβʔɺGrow.rbͷओ࠵ऀɺ
Albaͷ࡞ऀ • ͖ͳςΩετΤσΟλɿVim
ࢀߟ • https://github.com/okuramasafumi/dot fi les/tree/master/vim