[[ðArticles]] > [[ð2024 Articles]]
![[2024-03-27.webp|cover-picture]]
[[Neovimãã©ã°ã€ã³]]ã®äžã§ãæ¥æ¬èªãµã€ãã§ã»ãŒèŠãããªããã®ã«éå®ããŠãæ°ã«å
¥ããããã€ã玹ä»ããŠããŸãã
> [!info]
> ãã®èšäºã¯ [[Vimé§
äŒ]] #2024/03/27 ã® åå èšäºã§ãã
## ã¡ã€ã³ãšãã£ã¿ãšããŠäœ¿ãããã®çåœç·
[[Neovim]]ãã¡ã€ã³ãšãã£ã¿([[IDE]])ãšããŠå©çšãããªãã[[Neovimãã©ã°ã€ã³]]ã®éžåºãšå©çšã¯çåœç·ã ãšæããŠããŸããããã[[Vim]]ã[[Neovim]]ã®ã¢ãŒããæäœãåªããŠãããšããŠããçŽ ã®ç¶æ
ã§[[VSCode]]ã[[IntelliJ IDEA]]ãªã©ãšåŒµãåãã®ã¯å³ããã§ããããå°ãªããšãç§ã¯ããæããŸãã
[[IntelliJ IDEA]]ãã¡ã€ã³ã§äœ¿ã£ãŠããé ã®ç§ã¯ã[[Vim]]ã®ãã©ã°ã€ã³ã¯æ¥µåå
¥ããªã掟ã§ããã[[ðå®è·µVim]]ã«ãæžãããŠããŸããããçŽ ã®ç¶æ
ã§[[Vim]]ã䜿ãããšãçŸãããããããã[[Vimmer]]ã§ããããšæã£ãŠããŸããã
ã§ããã[[Neovim]]ãã¡ã€ã³ã§äœ¿ãããã«ãªã£ãŠããã¯ãå€ãã®[[Neovimãã©ã°ã€ã³]]ãã€ã³ã¹ããŒã«ããŠããŸããææã¯ã¡ããã©2023幎ãã2024幎ã«ãããŠã®é ãå
·äœçã«ã¯ä»¥äžã®[[ðArticles]]ã§[[Vimé§
äŒ]]ã«åå ããé ã§ãã
<div class="link-card">
<div class="link-card-header">
<img src="https://publish-01.obsidian.md/access/35d05cd1bf5cc500e11cc8ba57daaf88/favicon-64.png" class="link-card-site-icon"/>
<span class="link-card-site-name">minerva.mamansoft.net</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">ðNeovimã䜿ã£ãããšããªãã£ãããã®åãž</p>
<p class="link-card-description">2023幎ã®ãããã1幎ã®ãµããããèšäºãæžãããšãã¿ãèããªããåž°è·¯ã«ã€ãããã€ãã¯èŠãªããã¹ããéãããšããã«ã¯èŠæ
£ããªã1éã®æçŽã...ã</p>
</div>
<img src="https://publish-01.obsidian.md/access/35d05cd1bf5cc500e11cc8ba57daaf88/%F0%9F%93%98Articles/attachments/2023-12-29.jpg" class="link-card-image" />
</div>
<a class="internal-link" data-href="ðArticles/ðNeovimã䜿ã£ãããšããªãã£ãããã®åãž.md"></a>
</div>
%%[[ðNeovimã䜿ã£ãããšããªãã£ãããã®åãž]]%%
ãããã3ã¶æ以äžãçµã¡ãç§ã®ãã©ã°ã€ã³äºæ
ãå®å®ããŠããã®ã§ããã®ã¿ã€ãã³ã°ã§äžåºŠæçãªãã©ã°ã€ã³ã®å
±æãã§ããã°ãšæãçããšããŸããã
## 玹ä»ãããã©ã°ã€ã³ã®éžå®æ¡ä»¶
æ°ããŠã¿ããšãããä»äœ¿ã£ãŠãããã©ã°ã€ã³ã®æ°ã¯60ã§ããããããããã¹ãŠçŽ¹ä»ããŠããŸããšãååã ãã玹ä»ããè¶
æµ
ãèšäºã«ãªã£ãŠããŸãããšã§ãããããã®äžã«ã¯ãä»ããŒãžã§ãã£ãšè©³ããæçãªçŽ¹ä»ããããŠãããã®ããããšæããŸãã
ãªã®ã§ããã®èšäºã§ã¯ **æ¥æ¬èªã®[[Neovimãã©ã°ã€ã³]]玹ä»ãµã€ãã§çŽ¹ä»ãããŠããªãã£ããã®** ã®äžãã **ç§ããªã¹ã¹ã¡ãããã®5ã€** ãããã¯ã¢ããããŠçŽ¹ä»ããããšã«ããŸããã
äºåã«èª¿ã¹ããµã€ãã¯ãGoogleæ€çŽ¢ã§ãNeovimãã©ã°ã€ã³ãã®ãããªæ€çŽ¢ã¯ãŒãã§ããããããè€æ°ã®[[Neovimãã©ã°ã€ã³]]ã玹ä»ããŠããæ¥æ¬èªãµã€ãã§ãã察象ãµã€ãã¯20匱ã§ãããã«äžåºŠãç»å Žããªãã£ããã®ãåè£ãšãªããŸãã
## é€å€ãããã©ã°ã€ã³
ç§ã䜿ã£ãŠãããã©ã°ã€ã³ã®ãã¡ãäºå調æ»ã«åŒã£ãããé€å€ãããã®ãäžèŠ§ã§çŽ¹ä»ããŸãããããã®ãã©ã°ã€ã³ã¯æ¬èšäºã§ã®çŽ¹ä»å¯Ÿè±¡å€ãšãªããŸãã
| 玹ä»æ° | ãã©ã°ã€ã³ |
| --- | ------------------------------------------ |
| 12 | [[telescope.nvim]] |
| 9 | [[nvim-treesitter]] |
| 7 | [[gitsigns.nvim]] |
| 7 | [[lualine.nvim]] |
| 6 | [[nvim-cmp]] |
| 4 | [[Tokyo Night (Neovim)\|Tokyo Night]] |
| 4 | [[nvim-autopairs]] |
| 4 | [[nvim-lspconfig]] |
| 4 | [[toggleterm.nvim]] |
| 3 | [[LuaSnip]] |
| 3 | [[Noice]] |
| 3 | [[aerial.nvim]] |
| 3 | [[barbar.nvim]] |
| 3 | [[colorizer.lua]] |
| 3 | [[lazy.nvim]] |
| 3 | [[nvim-scrollbar]] |
| 3 | [[nvim-surround]] |
| 3 | [[trouble.nvim]] |
| 2 | [[Lspsaga]] |
| 2 | [[Markdown Preview for (Neo)vim]] |
| 2 | [[cmp-buffer]] |
| 2 | [[cmp-nvim-lsp]] |
| 2 | [[cmp-path]] |
| 2 | [[cmp_luasnip]] |
| 2 | [[illuminate.vim]] |
| 2 | [[lspkind-nvim]] |
| 1 | [[CamelCaseMotion (Vim)\|CamelCaseMotion]] |
| 1 | [[Fidget]] |
| 1 | [[ReplaceWithRegister]] |
| 1 | [[Todo Comments]] |
| 1 | [[VIM Table Mode]] |
| 1 | [[Which Key]] |
| 1 | [[bufdelete.nvim]] |
| 1 | [[cmp-cmdline]] |
| 1 | [[none-ls.nvim]] |
| 1 | [[nvim-bqf]] |
| 1 | [[nvim-hlslens]] |
| 1 | [[nvim-treesitter-context]] |
| 1 | [[nvim-ts-context-commentstring]] |
| 1 | [[nvim-ufo]] |
| 1 | [[repeat.vim]] |
| 1 | [[replacer.nvim]] |
| 1 | [[telescope-frecency.nvim]] |
ãŸããéèšã«å©çšãããµã€ãã¯ä»¥äžã§ãã
- [Neovimãã©ã°ã€ã³2023決å®ç - Qiita](https://qiita.com/ysmb-wtsg/items/79be0d97711eb49f5e82)
- [ãVim/NeoVimãã©ã°ã€ã³ãããã ãã¯å
¥ããŠãããããã©ã°ã€ã³10éž - ãã«ã¹ã¿ãã¯Linuxããã°ã©ãã³ã°](https://reisuta.com/plugin-recommend/)
- [Neovimã®ãã©ã°ã€ã³ã£ãŠã©ããã£ãŠãããã®ïŒ](https://zenn.dev/vim_jp/articles/20231113vim_ekiden)
- [[Neovim]2023幎åé ã»å人çã«æçšããŠããNeovimãã©ã°ã€ã³ð](https://zenn.dev/fukakusa_kadoma/articles/4d48fb4e67c945)
- [2024幎ã«åããŠãäžè©±ã«ãªããã Neovim ãã©ã°ã€ã³ - Qiita](https://qiita.com/naoki96/items/14cbdf69bb2176f45c90)
- [ãæ°ã«å
¥ãã® Neovim ãã©ã°ã€ã³ 5 éž | fohte.net](https://fohte.net/blog/posts/2023-12-22-nvim-plugins)
- [åããŠã®Neovimããã©ã°ã€ã³ãããŒãžã£ãŒèšå®&ãã©ã°ã€ã³èšå®ïœKe1ny](https://note.com/k_programmer/n/n943787f9a79e)
- [Luaã§æžãããNeovimãã©ã°ã€ã³ - uki00a](https://scrapbox.io/uki00a/Lua%E3%81%A7%E6%9B%B8%E3%81%8B%E3%82%8C%E3%81%9FNeovim%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3)
- [NeoVimã®ãããããã©ã°ã€ã³ â Recommended plug-ins for NeoVim](https://www.panoptia.agency/a88bfe662a6eca483ea1fc105cbe75cbe04249bc414af1e2097ad034ee0d59fe/)
- [NeoVim ãã©ã°ã€ã³ã®ãããã - innei](http://blog.innei.ren/nvim-plugin-recommend?locale=ja)
- [ãMacãNeovimã®ãããããã©ã°ã€ã³ïŒèŠãç®ãã¯ãŒã«ã«ïŒãã¶ã€ã³ã»UIé¢é£ïŒ](https://namileriblog.com/mac/neovim_plugins_ui/)
- [ãNeoVimããã©ã°ã€ã³ãå°å
¥ããŠã¢ãã³ãªNeovimã«ããïœHistone](https://note.com/histone/n/na8ebb8a5909f)
- [NeovimãŠã奜ããªããã©ã¯ãã€ã³5éž / my_5_favorite_neovim_plugins](https://speakerdeck.com/uhooi/my-5-favorite-neovim-plugins)
- [endaaman.me](https://endaaman.me/tips/brushup-neovim-plugins)
- [ã¯ã·ã®äœ¿ã£ãŠããNeovimãã©ã°ã€ã³ã¯200åè¿ãããã](https://zenn.dev/yutakatay/articles/neovim-plugins-2022)
ããã§ã¯1ã€ãã€çŽ¹ä»ããŠãããŸãã
## [[flash.nvim]]
å¹ççãªç§»åã[[ã¢ãŒã·ã§ã³]]ãæäŸãã[[Neovimãã©ã°ã€ã³]]ã§ããäœè
ã¯[[lazy.nvim]]ã[[LazyVim]]ã®äœè
ãšããŠæåãª[[ð€Folke Lematire]]æ°ã
<div class="link-card">
<div class="link-card-header">
<img src="https://github.githubassets.com/favicons/favicon.svg" class="link-card-site-icon"/>
<span class="link-card-site-name">GitHub</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">GitHub - folke/flash.nvim: Navigate your code with search labels, enhanced character motions and Treesitter integration</p>
<p class="link-card-description">Navigate you ... </p>
</div>
<img src="https://repository-images.githubusercontent.com/650962914/6c7dbe1b-43f5-4b51-b177-6af34ff84841" class="link-card-image" />
</div>
<a href="https://github.com/folke/flash.nvim"></a>
</div>
ç§ã¯ãã®çš®ã®ãã©ã°ã€ã³ã以åãã䜿çšããŠããã[[Vim]]ã䜿ã£ãŠããé ã¯[[EasyMotion]]ãã[[Neovim]]ã«ç§»è¡ããŠããã¯[[hop.nvim]] -> [[leap.nvim]] -> [[flash.nvim]]ãšäœ¿ã£ãŠããŸããã[[flash.nvim]]ã®åºæ¬æ©èœã¯ãããŸã§ã®ãã®ãšå€§ããå€ãããŸããã
![[2024-03-24-19-20-27.webp|frame]]
*ä»»æã®æåæ°å
¥ååŸã«ã©ãã«æåãEnterã§ç§»åãã*
ãã®äžã§ãç§ã[[flash.nvim]]ã䜿ã£ãŠããçç±ã¯ä»¥äž3ç¹ã§ãã
- [[lazy.nvim]]ãã¯ãããšããŠ[[ð€Folke Lematire]]æ°ã®ãã¡ã³ã§ããä¿¡é ŒããŠãã
- ä»ãã©ã°ã€ã³ãšæ¯èŒããŠæäœãçŽæçã§ãããããã©ãŒãã³ã¹é¢ãå«ããŠå®å®ããŠãã
- 䜿ãããæ©èœããã¹ãŠå«ãŸããŠãã
ããã§ã¯[[flash.nvim]]ã®äžã§ããæ°ã«å
¥ãã®æ©èœã2ã€çŽ¹ä»ããŸãã
### Remote Actions
çŸåšã®ã«ãŒãœã«ããé¢ããå Žæã§ã¢ã¯ã·ã§ã³([[ãªãã¬ãŒã¿]]&[[ã¢ãŒã·ã§ã³]])ãçºåããå
ã®ã«ãŒãœã«ããæäœãåéããæ©èœã§ããèšèã§èšãããŠããã³ãšããªããšæããŸãã®ã§å
·äœäŸãæããŠã¿ãŸãã
![[Pasted image 20240324193541.png|frame]]
*ããããããš*
æ®éã«ãããšä»¥äžã®ãããªæäœã移åããŠ[[ã€ã³ã¯]]ããŠæ»ã£ãŠããŠputã®æµãã«ãªããŸãã
![[2024-03-24-20-24-49.webp|frame]]
*`sano<CR>yi"<C-o>_i"` 13 keys*
> [!hint]
> `_i"`ã¯[[ReplaceWithRegister]]ã䜿ã£ãŠããã`vi"p`ãšã»ãŒäžç·ã§ãã
Remote Actionsã䜿ããšã[[ãªãã¬ãŒã¿]]ãå
ã«æå®ããããšã§å
ã®äœçœ®ã«æ»ã`<C-o>`ãçç¥ã§ããŸãã
![[2024-03-24-20-31-51.webp|frame]]
*`yrano<CR>i"_i"` 11 keys*
å°ãã ãããŒãç¯çŽã§ããèŠãŠãã人ã«äœãèµ·ãã£ãã®ãããããæãäžããããšã¯ã§ããŸãããã ãæéãšããŠã¯ã»ãšãã©å€ãããªãã®ã§ãé 匵ã£ãŠãŸã§äœ¿ãã¹ãæ©èœããšèšããããš... å人çã«ã¯... ãšãã£ãåçã«ãªããŸãã
### Treesitter Integration
[[nvim-treesitter]]ã§è§£æããããŒããç¯å²ãšããŠå©çšã§ããæ©èœã§ããããšãã°ä»¥äžã®ã³ãŒãããããã«ãŒãœã«äœçœ®ã41è¡ç®ã«ãã£ããšããŸãã
![[Pasted image 20240324204338.png]]
ããã§ããŒãå
¥åãããšã[[nvim-treesitter]]ã®ããŒã¹ããåäœã®ç¯å²ãã©ãã«ãšããŠè¡šç€ºãããŸãã
![[Pasted image 20240324204415.png]]
åèŠã§ã¯ãã¡ããã¡ãããŠåããã«ããã§ããã以äžã®ã«ãŒã«ã«åŸã£ãŠè§£èªããŸãã
- ç¯å²ã®éå§ãã1ã€åãšãçµäºãã1ã€åŸã«åãã©ãã«ãç»å Žãã
- ããŸã«è¡šç€ºãããªãã©ãã«ããã
- äžèš2ã€ã®ã©ãã«(ãã¢ã®ã©ãã«)ã«æãŸããé åã察象ç¯å²ã§ãã
ããšãã°ã`f`ãæŒããšã`f`ã§æãŸãã以äžã®éšåã察象ãšãªããŸãã
![[Pasted image 20240324205059.png]]
ãããå
ã»ã©ã®Remote Actionsãšçµã¿åããããšãé¢æ°ãã³ããŒããŠããŠãã®å Žã«è²Œãä»ã...ã¿ãããªããšãã§ããŸãã
![[2024-03-24-20-57-05.webp]]
[[flash.nvim]]ã«ã¯ä»ã«ãå€ãã®æ©èœããããŸãã
## [[lsp_signature.nvim]]
ã¿ã€ãã³ã°äžã«é¢æ°ã®ã·ã°ããã£ã衚瀺ãã[[Neovimãã©ã°ã€ã³]]ã§ããå人çã«ã¯å¿
é ã¬ãã«ã§ãããæå€ãšçŽ¹ä»ãããŠããŸããã§ããã
<div class="link-card">
<div class="link-card-header">
<img src="https://github.githubassets.com/favicons/favicon.svg" class="link-card-site-icon"/>
<span class="link-card-site-name">GitHub</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">GitHub - ray-x/lsp_signature.nvim: LSP signature hint as you type</p>
<p class="link-card-description">LSP signature hint as you type. Contribute to ray-x/lsp_signature.nvim development by creating an account on GitHub.</p>
</div>
<img src="https://opengraph.githubassets.com/017d882b4a05ac41658fd7abb9e19f410a667ac3c897cb540b460fd5894df226/ray-x/lsp_signature.nvim" class="link-card-image" />
</div>
<a href="https://github.com/ray-x/lsp_signature.nvim"></a>
</div>
äŸãšããŠã[[TypeScript]]ã®ã³ãŒã `lib.ts` ã« `sum` ãšããé¢æ°ã3ã€ã®ã·ã°ããã£ã[[ãªãŒããŒããŒã (TypeScript)|ãªãŒããŒããŒã]]ããŠããå Žåã玹ä»ããŸãã
```ts
export function sum(a: number, b: number): number;
export function sum(a: number, b: number, c: number): number;
export function sum(a: number, b: number, c: number, d: number): number;
export function sum(a: number, b: number, c?: number, d?: number): number {
return a + b + (c ?? 0) + (d ?? 0);
}
```
ãããåŒã³åºããšãã以äžã®ããã«ã·ã°ããã£ã衚瀺ãããŸãã
![[2024-03-24-21-10-28.webp]]
ãŸããæ¢ã«èšè¿°æžã¿ã§ããé¢æ°ã®åŒæ°ã«ã«ãŒãœã«ãããããŠ[[æ¿å
¥ã¢ãŒã]]ã«ç§»è¡ãããšãèªåã§ã·ã°ããã£ãšçŸåšã®åŒæ°ããã€ã©ã€ããããã®ã§ãšãŠã䟿å©ã§ãã
## [[no-neck-pain.nvim]]
ã¹ã¯ãªãŒã³ã®äžå€®ã«çŸåšã®[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ãå¯ãã[[Neovimãã©ã°ã€ã³]]ã§ãã
<div class="link-card">
<div class="link-card-header">
<img src="https://github.githubassets.com/favicons/favicon.svg" class="link-card-site-icon"/>
<span class="link-card-site-name">GitHub</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">GitHub - shortcuts/no-neck-pain.nvim: â Dead simple yet super extensible plugin to center the currently focused buffer to the middle of the screen.</p>
<p class="link-card-description">â Dead simple yet super extensible plugin to center the currently focused buffer to the middl ... </p>
</div>
<img src="https://opengraph.githubassets.com/da9139b4ff071fb8d64f82aeaf18e10f01e4f2f6bde15baddb17e65cc2cc7c05/shortcuts/no-neck-pain.nvim" class="link-card-image" />
</div>
<a href="https://github.com/shortcuts/no-neck-pain.nvim?tab=readme-ov-file"></a>
</div>
ãŠã«ãã©ã¯ã€ãã¢ãã¿ã®ãããªæšªã«é·ãã¹ã¯ãªãŒã³ãæ³åããŠã¿ãŠãã ããã[[Neovim]]ã§ãã¡ã€ã«ãéããšãããªæãã«ãªããšæããŸãã
![[Pasted image 20240324211600.png]]
èŠäºãªã»ã©å·Šã«å¯ã£ãŠãŸããã[[Neovim]]ã§ã³ãŒãã£ã³ã°ãããšãã貎æ¹ã¯åžžã«å·ŠãåããŠããããšã«ãªããŸãããããªæ¥ã
ãç¶ãã°neckãpainããŠããŸãã§ããããæ£é¢ãåããŠããªããšéäžåãèœã¡ããšæããŸãã
ãããªæ©ã¿ã[[no-neck-pain.nvim]]ã解決ããŠãããŸãã[[no-neck-pain.nvim]]ã䜿ã£ãŠåãããã¡ã€ã«ãéããŠã¿ãŸãããã
![[Pasted image 20240324211800.png]]
å·Šå³ã«[[ã¹ã¯ã©ãããŠã£ã³ã㊠(Vim)|ã¹ã¯ã©ãããŠã£ã³ããŠ]]ãå±éããã察象ãã¡ã€ã«ãäžå€®ã«è¡šç€ºãããŸãããæ°ãã[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ãåå²ããŠã¿ãŸãã
![[Pasted image 20240324212000.png]]
ãŸã å°ãäœè£ãããã®ã§å·Šå³ã«è¥å¹²ã®äœçœãã§ããŸãããã¡ã€ã«ã®æ倧å¹
ã¯ãªãã·ã§ã³ã§èšå®ã§ããŸãã®ã§ãèªåã«ãã£ããµã€ãºãæå®ããŠéŠã«åªããè¶
éäžç°å¢ãã€ãã£ãŠãããŸãããïŒ (ä»åã®äŸã§ã¯100ãèšå®ããŠããŸã)
## [[oil.nvim]]
[[ãããã¡ (Vim)|ãããã¡]]ã·ã¹ãã ãæ倧éã«å©çšãããã¡ã€ã«ãšã¯ã¹ãããŒã©ãŒãæäŸãã[[Neovimãã©ã°ã€ã³]]ã
<div class="link-card">
<div class="link-card-header">
<img src="https://github.githubassets.com/favicons/favicon.svg" class="link-card-site-icon"/>
<span class="link-card-site-name">GitHub</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">GitHub - stevearc/oil.nvim: Neovim file explorer: edit your filesystem like a buffer</p>
<p class="link-card-description">Neovim file explorer: edit your filesystem like a buffer - stevearc/oil.nvim</p>
</div>
<img src="https://opengraph.githubassets.com/943d3851483c5a519a69a23b14064e840749f4ce2e8ff83205f72f84b012643e/stevearc/oil.nvim" class="link-card-image" />
</div>
<a href="https://github.com/stevearc/oil.nvim"></a>
</div>
ã€ãæè¿ãŸã§ããã¡ã€ã«ãšã¯ã¹ãããŒã©ãŒã«ã¯[[nvim-tree.lua]]ã䜿ã£ãŠããŸãããåæ§ã®ããªãŒåãšã¯ã¹ãããŒã©ãŒã§[[Neo-tree.nvim]]ã[[fern.vim]]ã䜿ã£ãŠããæ¹ãå€ããšæããŸããã§ãããæè¿ã«ãªã£ãŠ[[oil.nvim]]ã«ä¹ãæããŸããã
倧ããªçç±ã®1ã€ã«ãå
ã»ã©çŽ¹ä»ãã[[no-neck-pain.nvim]]ã䜿ãããã«ãªã£ãããšããããŸãã[[nvim-tree.lua]]ã¯ãã¡ããããªãŒã®è¡šç€ºããã¡ã€ã«æäœã«äœ¿ã£ãŠããŸããããç¡æèã®ãã¡ã« **ãã¡ã€ã«ãã§ããã ãäžå€®ã«å¯ããŠè¡šç€ºãã** ãšããç®çã«ã䜿ã£ãŠããŸããã[[nvim-tree.lua]]ãå·ŠåŽãµã€ãã®[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ãšããŠè¡šç€ºãããã°ãç·šé察象ã®[[ãããã¡ (Vim)|ãããã¡]]ã衚瀺ããã[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ã¯ããäžå€®ã«å¯ããŸããããã
ãã®çšéãç®çããå€ããããæå€ãš[[nvim-tree.lua]]ã䜿ãã·ãŒã³ã¯å°ãªãã®ã§ã¯ãšããããšã«æ°ã¥ããŸãããå ããŠã[[no-neck-pain.nvim]]ãš[[nvim-tree.lua]]ãåæã«äœ¿ããšããã°ãã°[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ã®ã¬ã€ã¢ãŠãã厩ããããšããããŸããããããªãã[[nvim-tree.lua]]ã§ã¯ãªãå¥ã®ãã£ãšãšã¢ããã©ã°ã€ã³ã䜿ããããª... ãšæãã[[oil.nvim]]ã«ãã©ãçããŸããã
ãããª[[oil.nvim]]ã®é
åã2ç¹ã»ã©çŽ¹ä»ããŸãã
### Vimããªã¹ãã¯ãããæäœæ
[[oil.nvim]]ã¯[[ãããã¡ (Vim)|ãããã¡]]ã«ãšã¯ã¹ãããŒã©ãŒãå±éããããã **ãŸãã§Vimã«ãããã¡ã€ã«ç·šéãè¡ããã®ããã«** å å·¥ã§ããŸãããªã¢ã«ãªå
·äœäŸã玹ä»ããŸãããã
> [!attention]
> ãã¢åç»ãšããŠèŠãããã®ã§ã`<C-p>`ã§ãã¬ãã¥ãŒãONã«ãããšãããããŸããããããããšã§ããã©ãŒã«ã¹ããããã¡ã€ã«ã®ãã¬ãã¥ãŒãå¥[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ã«è¡šç€ºãããŸãã
>
> ![[2024-03-24-23-06-30.webp|frame]]
> *`Ctrl+P` ã§ãã¬ãã¥ãŒãæå¹ã«ããç¶æ
*
#### ãã¡ã€ã«ã®äœæ
åœããåã®ããã«ãªã¹ãã«è¿œå ç·šéããã ãã§ãã[[ãããã¡ (Vim)|ãããã¡]]ãä¿åãããšåæ ãããŸãã
![[2024-03-24-23-17-50.webp]]
äžèšã¯`hoge.md`ãš`parent/child.md`ãæ°èŠäœæããŠããŸãã
#### ååå€æŽã»ã³ããŒã»åé€
ãããæ®éã«ç·šéããã ããã³ããŒã¯[[ã€ã³ã¯]]ãããã¡ã€ã«ã®å®äœãŸã§ããã³ãšã³ããŒãããŸãã
![[2024-03-24-23-26-29.webp]]
äžèšã¯ä»¥äžã®æäœãè¡ã£ãŠããŸãã
- `index.ts`ã`main.ts`ãšå称å€æŽ
- `main.ts` ã `main2.ts` ãš `main3.ts` ã«è€è£œ
- `main.ts` ãåé€
ã³ããŒãåé€ã®æã¯ç¢ºèªã®[[ãããŒãã£ã³ã°ãŠã£ã³ã㊠(Neovim)|ãããŒãã£ã³ã°ãŠã£ã³ããŠ]]ã衚瀺ãããŸãã®ã§ãæå³éãã®æäœãè¡ããããããã£ãã確èªã§ããŸãã
> [!hint]
> éäžã®æäœã§å
ã»ã©çŽ¹ä»ãã[[flash.nvim]]ã䜿ã£ãŠããŸãã
### ã«ã¬ã³ããããã¡ã®åéå±€ã衚瀺ããã
ãã1ç¹ã¯å°ããªé
åã§ã... ãç§ã«ãšã£ãŠã¯éåžžã«å€§äºã§ãã[[oil.nvim]]ã¯ã«ã¬ã³ã[[ãããã¡ (Vim)|ãããã¡]]ã®ãã¹ã«å¯ŸããŠãšã¯ã¹ãããŒã©ãŒãéããŸãã
ããšãã°ã`node_modules/@types/bun/package.json`ãéããç¶æ
ãèããŸãã
![[Pasted image 20240324233141.png]]
ããã§`Oil`ã³ãã³ããå®è¡ãããšã以äžã®ããã«ãªããŸãã
![[Pasted image 20240324233247.png]]
ç§ããã¡ã€ã«æäœãããããšãã¯ãçŸåšç·šéäžã®ãã¡ã€ã«ããçžå¯Ÿçã«å¯Ÿè±¡ãæ¢ããŠæäœãããããšãå€ãã®ã§ãã®ä»æ§ã¯éåžžã«å©ãããŸãã倧æµã®ãã©ã°ã€ã³ã¯ã«ã¬ã³ããã£ã¬ã¯ã㪠([[Neovim]]ãéãããã¹) ã衚瀺ãããŠããŸãã®ã§äžæéãããŸããã
ãªãã`_`ããŒãæŒãã°1çºã§ã«ã¬ã³ããã£ã¬ã¯ããªã«ç§»åã§ããŸãã®ã§ããã¡ããæãŸããå Žåãåé¡ãããŸããããŸããåå²ããŠè€æ°[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ã§å¥ã
ã®æäœãã§ããŸãã®ã§ã[[nvim-tree.lua]]ã®ããã«ç¹å¥ãª[[ãããã¡ (Vim)|ãããã¡]]ãæèããããå¿
èŠããããŸãããFreedomã§ãïŒ
![[Pasted image 20240324233525.png]]
## smart-open.nvim
æ¬èšäºã§çŽ¹ä»ããæåŸã®ãã©ã°ã€ã³ã¯ã[[telescope.nvim]]ã®çµæãã¹ããŒãã«è¡šç€ºãããã®ã§ãã
<div class="link-card">
<div class="link-card-header">
<img src="https://github.githubassets.com/favicons/favicon.svg" class="link-card-site-icon"/>
<span class="link-card-site-name">GitHub</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">GitHub - danielfalk/smart-open.nvim: Neovim plugin for fast file-finding</p>
<p class="link-card-description">Neovim plugin for fast file-finding. Contribute to danielfalk/smart-open.nvim development by creating an a ... </p>
</div>
<img src="https://opengraph.githubassets.com/321a765c4ea4e851fa0f343442ef734502767bf6f1e3cf4844a6335bfa591d81/danielfalk/smart-open.nvim" class="link-card-image" />
</div>
<a href="https://github.com/danielfalk/smart-open.nvim"></a>
</div>
### telescope.nvimã«ã¯æ€çŽ¢ã³ãã³ãã®æ±ºå®çããªã
çããããåãã®ãšããã[[telescope.nvim]]ã¯çŽ æŽããããã©ã°ã€ã³ã§ããä»åã[[#é€å€ãããã©ã°ã€ã³]]ã§çŽ¹ä»ãã玹ä»æ°ã§ããã³ãã1äœã®12ãµã€ãã§ãããããããå人çã«ã¯[[telescope.nvim]]ã衚瀺ããçµæã«ã¯å°ãã¢ã€ã¢ã€ããŠããŸããã
ç§ã®[[telescope.nvim]]ã®ããŒãã€ã³ãèšå®ã§ãã
```lua
keys = {
{ "<C-j>f", ":Telescope find_files find_command=rg,--files,--hidden,--glob,!*.git <CR>", silent = true },
{ "<C-j>z", ":Telescope frecency<CR>", silent = true },
{ "<C-j>e", ":Telescope smart_open<CR>", silent = true },
{ "<C-j>g", ":Telescope live_grep<CR>", silent = true },
{ "<C-j>l", ":Telescope current_buffer_fuzzy_find<CR>", silent = true },
{ "<C-j>p", ":Telescope commands<CR>", silent = true },
{ "<C-j>:", ":Telescope command_history<CR>", silent = true },
{ "<C-j>m", ":Telescope vim_bookmarks all<CR>", silent = true },
{ "<C-j>s", ":Telescope lsp_dynamic_workspace_symbols<CR>", silent = true },
{ "<C-j>c", ":lua require'telescope.builtin'.git_status{}<CR>", silent = true },
},
```
`:Telescope find_files`ã¯ã«ã¬ã³ããã£ã¬ã¯ããªé
äžããã¡ã€ã«åã§æ€çŽ¢ããæ©èœã§ãããçŸåšéããŠãããã¡ã€ã«ã®å ŽæãæåŸã«éãã/ç·šéããæéãªã©ãèæ
®ãããªããšæããŸãããã¡ã€ã«åã§æ€çŽ¢ããããšãã¯äŸ¿å©ã§ããããæè¿éããã¢ã¬ããšãããã®ãã¡ã€ã«ãšåéå±€ã®ã¢ã¬ãã¿ãããªãšãã¯å°ããã©ããããšãããããŸãã
次㫠`:Telescope oldfiles` ãè©ŠããŠã¿ãŸãããããã§éãããã¡ã€ã«é ã«è¡šç€ºãããããšæãããã埮åŠã«éãé çªã§è¡šç€ºãããŠããŸã£ããããã£ã«ã¿ãªã³ã°ã®çµæã¯ãããçãåªå
ããŠèæ
®ãããããšãããã£ãŠè¿·ããçããŸããã
ãã®æ¬¡ã¯[[telescope-frecency.nvim]]ãè©ŠããŠã¿ãŸããã
> A telescope.nvim extension that offers intelligent prioritization when selecting files from your editing history.
`intelligent prioritization`... ãšããã°ãç§ãéçºããŠãã[[Obsidianãã©ã°ã€ã³]]ã®[[ðŠVarious Complements]]ã«å®è£
ããæ©èœ [[Intelligent suggestion prioritization]] ã«äŒŒãååã§ããREADMEãèªãã§ãåããããªææ³ãå£éèŠããŸããã®ã§æåŸ
ããŠäœ¿ãå§ããŸããã
ã«ã¬ã³ããã£ã¬ã¯ããªãšããæ·ãå€ããŠãæè¿ç®ã«ãããã®ãçµã蟌ã¿ã€ã€æ€çŽ¢ã§ãããšããç¹ã§ããã®ãã©ã°ã€ã³ã¯éåžžã«äŸ¿å©ã§ãããã§ããã[[Neovim]]ã§éçºãããŠãããšãã¯ããã¯ãã«ã¬ã³ããããžã§ã¯ãã®ãã¡ã€ã«ãéããããªãããšãå€ãã§ãããããªãšãã«ã[[telescope-frecency.nvim]]ãå
ã®2æ©èœã§ã¯èŠæ±ãæºãããªãã®ã§ãã
- [[telescope-frecency.nvim]]ã¯ããéãå¥ãããžã§ã¯ãã®ãã¡ã€ã«ãåªå
ããŠããŸããŸã
- `oldfiles`ã¯å³å¯ã«éããé ã§ãã¡ã€ã«ã衚瀺ããŠãããŸãã
- `find_files`ã¯çŽç²ã«ãã¡ã€ã«ã®ãããçã§è¡šç€ºããŸã
匷ããŠèšããªãããããžã§ã¯ãã§éçºãããšãã¯`find_files`ãå€çšããŠããŸãããå¥ãããžã§ã¯ãã®ãã¡ã€ã«ã衚瀺ãããããã¯ããããçã«é Œã£ãŠã«ã¬ã³ããããžã§ã¯ãã®ãã¡ã€ã«äžèŠ§ã衚瀺ããæ¹ãããããã§ãã
### smart-open.nvimã¯æ¬åœã«ã¹ããŒãã ã£ã
ãããªè¿·ãã貎æ¹ã«... [[smart-open.nvim]]ïŒ ãã®ãã©ã°ã€ã³ã¯2ã€ã®æå³ã§éåžžã«ã¹ããŒãã§ãã
#### 䞊ã³é ãã¹ããŒã
æã倧åãªãã€ã³ãã§ãã䞊ã³é ãå®ã«ã¹ããŒãã§ããREADMEã«ãããšä»¥äžã®èŠçŽ ãèæ
®ããŠããããã§ãã
- ãã¡ã€ã«ãã¹ãæ€çŽ¢æååã«ãããããã
- ãã¡ã€ã«**å**ãæ€çŽ¢æååã«ãããããã
- æåŸã«ãã¡ã€ã«ãéããã®ã¯ãã€ã
- æåŸã«ç·šéããããã¡ã€ã«ãã©ãã
- ãã¡ã€ã«ãããããã®[[ãŠã£ã³ã㊠(Vim)|ãŠã£ã³ããŠ]]ã§éããŠããã
- ãã¡ã€ã«ã®èŠªãã£ã¬ã¯ããªãã¹ããçŸåšéããŠãããã¡ã€ã«ã®èŠªãã£ã¬ã¯ããªãã¹ã«ã©ãã ãè¿ãã
- ãã¡ã€ã«ãã©ããããé »ç¹ã«éãããŠããã
- ãã¡ã€ã«ãã«ã¬ã³ããã£ã¬ã¯ããªå
ã®ã©ãã«ããã
ãããã人éãèããããšã«è¿ãã®ã§ã¯ãªãã®ã§ãããããããã«ããããã®éã¿ã¥ãã¯ãŠãŒã¶ãŒ([[Neovim]]å©çšè
)ã®è¡åã«ãã£ãŠãå€åãããããªããšãæžãããŠããŸãã
> This ranking algorithm is self-tuning. Over time, the weights of the factors above will be adjusted based upon your interaction with it. The tuning process is especially sensitive to selecting a suggestion that is not at the top. Weights will be adjusted relative to the higher-ranked suggestions that were not selected.
å°ãªããšãç§ã®å Žåã[[smart-open.nvim]]ã䜿ãç¶ããŠãã10æ¥éã§ã**[[smart-open.nvim]]ã®åè£ã«æ¬²ããçµæã衚瀺ãããªãã£ãããšã¯ã»ãŒãããŸãã**ã§ããã
#### 衚瀺ãã¹ããŒã
[[telescope.nvim]]ã®éåžžã®çµæ衚瀺ãèŠãŠã¿ãŸãããã
![[Pasted image 20240326215114.png]]
ãã€ã©ã€ãããããŠããŠèŠãããããããªã? ãšæããããããŸãããããã§ã¯[[smart-open.nvim]]ã®çµæ衚瀺ã䞊ã¹ãŠã¿ãŸãã
![[Pasted image 20240326215226.png]]
[[smart-open.nvim]]ã¯ãã¡ã€ã«åãå
é ã«è¡šç€ºããããã®åŸã«ãã¹ã衚瀺ãããŸããäžéšäŸå€ã¯ãããŸãããããªãŒã¯ãŒãã§çµãå Žåãäžçªã¿ãŒã²ããã«ãªãã®ã¯ãã¡ã€ã«åã ãšæããŸãããªã®ã§ãç§ã¯éåžžã«èŠããããšæããŸããã
ãªããå·ŠåŽã®âãšãã¯ããããããéããŠãããã¡ã€ã«ã®ãã¡æãçŽåã«éãããã®ããšãçŸåšéããŠãããã¡ã€ã«(1ã€ä»¥äž)ãã§ãã
## ãŸãšã
ç§ãå©çšããŠãã[[Neovimãã©ã°ã€ã³]]ã®äžã§ãæ¥æ¬èªãµã€ãã§èŠãããªãã£ããã®ã®äžãããç¹ã«ãªã¹ã¹ã¡ã®5ã€ã玹ä»ããŸããã
- [[flash.nvim]]
- [[lsp_signature.nvim]]
- [[no-neck-pain.nvim]]
- [[oil.nvim]]
- [[smart-open.nvim]]
ããå©çšãããããšã®ãªãæ¹ãããã£ããããŸããããæ¯éäžåºŠè©ŠããŠã¿ãŠãã ããããããã®ãã©ã°ã€ã³ã«ã¯ä»ã«ããæ¬èšäºå
ã§ã¯çŽ¹ä»ããããªãã£ã䟿å©ãªæ©èœã沢山ãããŸãã
ãŸããæ®æ®µããŸããç®ã«ããããªããã©äŸ¿å©ãªãã©ã°ã€ã³ãšããŠã¯ã以äžããªã¹ã¹ã¡ã§ãã
- [[lasterisk.nvim]]
- [[nvim-ufo]]
- [[nvim-treesitter-context]]
- [[nvim-bqf]]
[[Neovim]]ã¯æ²Œã§ããæ°žé ã«èªåã®çæ³ç°å¢ã«ã¯ãã©ãçããªãæ°ãããŸããã§ãããä»å玹ä»ãããããªçŽ æŽãããããªããªãåºäŒããªã[[Neovimãã©ã°ã€ã³]]ãšããåºäŒãã€ã€ãäžæè°ãªãã³ãžã§ã³ã®ããã«çµããã¬æ
ãç¶ããã®ãããŸãäžèã§ã¯ãªãããšç§ã¯æã£ãŠããŸãã
---
<small>â» æ¬ããŒãžã®ã€ã©ã¹ãã¯AI(DALL·E)ã«ããçæããããã®ã§ã</small>