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
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
870
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Quine, Polyglot, 良いコード
qnighy
4
640
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
CSC509 Lecture 09
javiergs
PRO
0
140
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
A designer walks into a library…
pauljervisheath
203
24k
A Tale of Four Properties
chriscoyier
156
23k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Bash Introduction
62gerente
608
210k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
The Cult of Friendly URLs
andyhume
78
6k
A better future with KSS
kneath
238
17k
A Philosophy of Restraint
colly
203
16k
Automating Front-end Workflow
addyosmani
1366
200k
Six Lessons from altMBA
skipperchong
27
3.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
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 ϓϥάΠϯΛ͍ͭͬͯ͘Δํੋඇར ༻Λݕ౼ͯ͠Έ͍ͯͩ͘͞