Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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.6k
ripgrep をライブラリとして使う
rhysd
0
410
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.9k
Other Decks in Programming
See All in Programming
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
良いユニットテストを書こう
mototakatsu
4
1.8k
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
920
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
650
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
선언형 UI에서의 상태관리
l2hyunwoo
0
140
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
450
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
360
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
4 Signs Your Business is Dying
shpigford
181
21k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Bash Introduction
62gerente
608
210k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
BBQ
matthewcrist
85
9.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
A Tale of Four Properties
chriscoyier
157
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Agile that works and the tools we love
rasmusluckow
328
21k
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 ϓϥάΠϯΛ͍ͭͬͯ͘Δํੋඇར ༻Λݕ౼ͯ͠Έ͍ͯͩ͘͞