$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
about-neovim-0.4.0-floating-window
Search
Linda_pp
May 15, 2019
Programming
3
2.2k
about-neovim-0.4.0-floating-window
gorilla.vim #4 at Akatsuki on 2019/5/15
Linda_pp
May 15, 2019
Tweet
Share
More Decks by Linda_pp
See All by Linda_pp
actionlint の Linter 設計
rhysd
6
3.4k
ripgrep をライブラリとして使う
rhysd
0
400
port-monolith-to-wasm-for-chrome-extension
rhysd
0
450
Fuzzing Rust Text Editor
rhysd
1
2.9k
Vim compiled to WebAssembly
rhysd
5
2.1k
reply.vim
rhysd
0
1.2k
Vim ported to WebAssembly (VimConf 2018)
rhysd
4
3.3k
go-selfupdate-github で ツールを自己アップデートする
rhysd
5
4.3k
小さく始めて育てるコンパイラ
rhysd
13
4.8k
Other Decks in Programming
See All in Programming
アニメーションを最深まで理解してパフォーマンスを向上させる
mine2424
0
100
Java 23の概要とJava Web Frameworkの現状 / Java 23 and Java web framework
kishida
2
380
React + Tauriでデスクトップアプリ開発に入門してみた
ynishimura0922
0
190
PaaSとSaaSの境目で信頼性と開発速度を両立する 〜TROCCO®︎のこれまでとこれから〜
gtnao
6
6.9k
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
310
Arm移行タイムアタック
qnighy
0
410
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
6
3.4k
社内活動の取り組み紹介 ~ スリーシェイクでこんな取り組みしてます ~
bells17
0
390
Reckoner における Datadog Browser Test の活用事例 / Datadog Browser Test at Reckoner
nomadblacky
0
190
大規模サイトリビルドの現場から:成功と失敗のリアルな教訓 / Site Rebuild,Real Lessons Learned from Successes and Failures_JJUG Fall 2024
techtekt
0
210
Jakarta EE meets AI
ivargrimstad
0
1.2k
Vapor Revolution
kazupon
2
2.5k
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Code Review Best Practice
trishagee
64
17k
Building Adaptive Systems
keathley
38
2.3k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Producing Creativity
orderedlist
PRO
341
39k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
BBQ
matthewcrist
85
9.3k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Rails Girls Zürich Keynote
gr2m
94
13k
Transcript
Neovim 0.4.0 ৽ػೳ ϑϩʔτΟϯυʹ͍ͭͯ gorilla.vim #4, 2019/05/14
About Me @Linda_pp @rhysd ࠷ۙ git-messenger.vim ͱ͔ͭͬͯ͘·͢
ϑϩʔτΟϯυΛͬͨ ϓϥάΠϯ
coc.nvim https://github.com/neoclide/coc.nvim
LanguageClient-neovim https://github.com/autozimu/LanguageClient- neovim
git-messenger.vim https://github.com/rhysd/git-messenger.vim
vim-iced https://github.com/liquidz/vim-iced
Neovim ϑϩʔτΟϯυ API
ϑϩʔτΟϯυͱʁ λΠϧܕͰͳ͍ɼ৽͍͠ܗࣜͷΟϯυɽ Neovim 0.4.0 ͰՃ͞ΕΔ CSS Ͱ͍͏ position: absolute; ͳͲͷΑ͏
ʹɼطଘͷΟϯυͷ্ʹΦʔόʔϥοϓ ͨ͠ΟϯυΛͭ͘Δ͜ͱ͕Ͱ͖Δ
call nvim_open_win(bufnr('%'), v:true, { \ 'relative': 'cursor', \ 'anchor': 'NW',
\ 'row': 4, \ 'col': 4, \ 'width': 10, \ 'height': 10, \ })
call nvim_open_win(bufnr('%'), v:true, { \ 'relative': 'cursor', \ 'anchor': 'NW',
\ 'row': 4, \ 'col': 4, \ 'width': 10, \ 'height': 10, \ }) ࠷ॳʹ։͘όοϑΝ ΟϯυΛ։͍ͨޙ ͦͷதʹΧʔιϧΛҠ ಈ͢Δ͔Ͳ͏͔ ϑϩʔτΟϯυΛ Ͳ͏։͔͘Λࢦఆ͢Δ $POpHࣙॻ ʢޙड़ʣ ։͍ͨϑϩʔτΟϯυ ͷ8JOEPX*%Λฦ͢
Config ࣙॻ Ωʔ આ໌ σϑΥϧτ SFMBUJWF FEJUPS DVSTPS
XJOͷ͏ͪͷ͍ ͣΕ͔ Οϯυͷى ͷҐஔʢޙड़ʣ FEJUPS BODIPS /& /8 4& 48ͷ͍ͣΕ͔ ىʹͯ͠ํͷ Ͳ͜ʹΟϯυ Λग़͔͢ʢޙड़ʣ /8 GPDVTBCMF CPPMFBO Ϣʔβ͕Οϯυ ʹΧʔιϧΛ ҠಈͰ͖Δ͔ WUSVF FYUFSOBM CPPMFBO (6*ଆ͕ϑϩʔτ ΟϯυΛදࣔ ͢Δ͔ WGBMTF
"relative" (row: 2, col: 3 ͷͱ͖ʣ • "editor" εΫϦʔϯ
• "cursor" Χʔιϧ Οϯυׂ • "relative" ˞ରΟϯυ XJOΩʔͰࢦఆ͢Δ "row": 2, "col": 3 ͷͱ͖ ϑϩʔτΟϯυ
"anchor" "relative": "cursor", "row": 0, "col": 0 ͷͱ͖ Χʔιϧ •
"NE" • "NW" • "SW" • "SE" Χʔιϧ Χʔιϧ Χʔιϧ
։͘Ҏ֎ͷૢ࡞ • ด͡Δ → ී௨ͷ Vim ͷΟϯυͱಉ ͡ɽ:close :wincmd
c nvim_close_win() ͳͲ͖ʹด͡ΒΕΔ • αΠζมߋɾҠಈ → nvim_win_set_config(win_id, config) Ͱίϯ ϑΟάࣙॻΛηοτ͠ͳ͓͢͜ͱͰө͞ΕΔ
ϑϩʔτΟϯυͷ࣮ • ࣮ऀɿ@bfredl ͞Μ • ֻ͚2͔͚࣮ͯ 1. ϑϩʔτΟϯυͷΈΛ࣮ɽnvim_open_win() ͳͲͰϓϥάΠϯ͔Β ࣗ༝ʹ͑ΔΑ͏ʹ͢Δʢ#6619ʣ
2. ΈࠐΈͷิΟϯυΛϑϩʔτΟϯυͰ࠶࣮͠ɼϑϦοΧϦϯά Λܰݮ͢Δʢ#9530ʣ 3. ίϚϯυϥΠϯϞʔυͷϙοϓΞοϓิ wildoptions=pum Λ࣮ʢ#9607ʣ 4. ॏͳ͍ͬͯΔΟϯυͷ৭ΛϒϨϯυ͢Δػೳͷ࣮ͳͲվળதʢ#9923ʣ • ϕʔεͱͳΔΈΛ࣮͠ɼͦΕΛͬͯ෦ΛϦϑΝΫλϦϯάɾϢʔβ͔Β ར༻Ͱ͖ΔΑ͏ʹ͍ͯ͠Δ
ϑϩʔτΟϯυͲ͕͜ ྑ͍ͷ͔
৽نػೳΛΟϯυͷϨΠΞτͷΈʹߜ Γɼैདྷͷ Vim Οϯυͱಉʹ͑Δ • Οϯυͷதී௨ͷ Vim ͷόοϑΝ • ৭Λ͚͚ͨΕߏจϋΠϥΠτΛॻ͍ͯ
filetype ΛΟϯυͰηοτ͢Εྑ͍ • ดͨ͡ΓΧʔιϧҠಈͨ͠Γ :wincmd ͳͲ ͷैདྷͷΓํͰͰ͖Δ
ଥڠ͠ͳ͍࣮ • ΟϯυͷαΠζ 1x1 ͔ΒࢦఆͰ͖Δ • ͍ͭ͘ͰੜͰ͖Δʢz-index ޙউͪʣ • ϑϩʔτΟϯυ͕εΫϦʔϯ͔ΒΈग़
Δ࣌ࣗಈͰௐͯ͘͠ΕΔͷͰϓϥάΠϯ ࡞ऀؾʹ͠ͳͯ͘ྑ͍
ϓϥάΠϯ࡞ऀ͜ΕΛʹ༷ʑͳ UI ΛߏஙͰ͖Δ • ΠϯλϥΫςΟϒͳϙοϓΞοϓϝχϡʔ • ิϝχϡʔࣗ࡞ • υΩϡϝϯτͳͲͷϓϨϏϡʔΟϯυπʔϧνοϓ •
ςΩετϥϕϧʢEasyMotion ͷΑ͏ͳʣ • ௨ • ...
ϑϩʔτΟϯυҙ • ΟϯυΛ͍ऴΘͬͨΒϓϥάΠϯଆͰ࣮֬ʹด͡Δɽಛʹ "enter": v:false ʹ͢ΔͱϢʔβ͔Β༰қʹด͡ΒΕͳ͍ • git-messenger.vim ͰόοϑΝͰΧʔιϧ͕ಈ͍ͨΓ৽͍͠Οϯυʹ Ҡಈ͢ΔλΠϛϯάΛϑοΫͯ͠ด͍ͯ͡Δ
• σϑΥϧτͰ NormalFloat ͱ͍͏ϋΠϥΠτ͕ Normal ͷΘΓʹΘΕΔʢม ߋ͢Δʹ 'winhightlight' ΦϓγϣϯΛ͏ʣ • ίϯςϯπ͕Οϯυʹऩ·ΔΑ͏ʹ͢Δɽऩ·Γ͖Βͳ͍߹Ϣʔβ͕ εΫϩʔϧͰ͖ΔΑ͏ʹ͢ΔͳͲ͢Δ • Vim ͱͷޓੑΛอͭʹɼVim ͰϓϨϏϡʔΟϯυΛ͏Α͏ʹ͢Δͱ ͏·͍͘͘߹͕͋Δʢgit-messenger.vimʣ
·ͱΊ • ϑϩʔτΟϯυඇৗʹ 'ے͕ྑ͍' ػೳ • ϓϥάΠϯ࡞ऀࠓ·Ͱʹ࣮ݱ͕ࠔͩͬ ͨ UI ΛߏஙͰ͖Δ
• Neovim ϓϥάΠϯΛ͍ͭͬͯ͘Δํੋඇར ༻Λݕ౼ͯ͠Έ͍ͯͩ͘͞