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.1k
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.1k
ripgrep をライブラリとして使う
rhysd
0
390
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
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
CSC509 Lecture 11
javiergs
PRO
0
180
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
Quine, Polyglot, 良いコード
qnighy
4
650
Jakarta EE meets AI
ivargrimstad
0
590
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
140
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
What's new in Ruby 2.0
geeforr
343
31k
The Cult of Friendly URLs
andyhume
78
6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Code Review Best Practice
trishagee
64
17k
Six Lessons from altMBA
skipperchong
27
3.5k
It's Worth the Effort
3n
183
27k
A Philosophy of Restraint
colly
203
16k
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 ϓϥάΠϯΛ͍ͭͬͯ͘Δํੋඇར ༻Λݕ౼ͯ͠Έ͍ͯͩ͘͞