Open18
Neovimの整備
ピン留めされたアイテム
TODO
-
Ctrl + nで_を入力する - gitUIを入れる
- 補完の表示を良い感じにする
- カーソル下のコードのPRを開きたい
- terminalからPRやissueを確認したい
- templateからDaily Noteを開きたい
普段はVSCodeでneovimの拡張機能を使って開発をしつつ、コマンドはNeovimのterminalモードを使っている。
キーボードで完結するVimの思想はすごく惹かれているので、VSCodeをのキーバインドをカスタマイズしている。が最近、顕著に動作が遅くなったので、Neovimに移行しようか(また)迷い出した
コメントアウトについて確認する
n: gccでコメントの制御ができる
v: gc
easymotionどうなっているか確認する
- 補完の効いている時に <C-n>が効かない
- color themeを変更する
- floating terminalに枠をつけたい
補完の効いている時に <C-n>が効かない
noremapのoptsをつけた。多分、これで良い
local keymap = vim.keymap
local opts = { noremap = true, silent = true }
keymap.set("i", "<C-n>", "_", opts)
Lazy.vimのデフォルトで使われていた。
- TODO
color themeを変更する
- 基本的にColorscheme | LazyVimに書いてあるようにすれば良い。
- everforestの場合、neovim用のプラグインと、読み込むプラグイン名が異なったで手間取った。
return {
{
"neanias/everforest-nvim",
config = function()
require("everforest").setup({
background = "soft",
})
end,
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "everforest",
},
},
}
Github Copilotを使えるようにする
- pluginを入れる
- node のバージョンup を要求された
nodeのバージョンを上げる
- nodeのバージョンを確認
node -v
- nodeのバージョン管理を何でしているか確認
-
anyenv -vでバージョンが表示されたので、これであると確認ができた
-
- Anyenv をアップデートするに従って、anyenv自体をversion up
-
nodenv insitall --listでインストールできるversionを確認 nodenv install 21.5.0nodeenv global 21.5.0
これでエラーメッセージが出なくなった
zshの起動に時間がかかるを解決する
neovim termを起動したら以下のような警告がでた
[WARNING]: Console output during zsh initialization detected.
When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.
You can:
- Recommended: Change ~/.zshrc so that it does not perform console I/O
after the instant prompt preamble. See the link below for details.
* You will not see this error message again.
* Zsh will start quickly and prompt will update smoothly.
- Suppress this warning either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
* You will not see this error message again.
* Zsh will start quickly but prompt will jump down after initialization.
- Disable instant prompt either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
* You will not see this error message again.
* Zsh will start slowly.
- Do nothing.
* You will see this error message every time you start zsh.
* Zsh will start quickly but prompt will jump down after initialization.
For details, see:
https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt
-- console output produced during zsh initialization follows --
nodenv: yarn: command not found
The `yarn' command exists in these Node versions:
17.0.0
警告を呼んで、powerlevel10k/README.md at master · romkatv/powerlevel10kを確認
要約すると
- zshの起動に時間がかかっているが、
p10k configureで解決できるらしい
やった
yarnが使えないので、設定した
$ which yarn
/Users/hogehoge/.anyenv/envs/nodenv/shims/yarn
# yarnを一旦削除
$ rm -rf /Users/hogehoge/.anyenv/envs/nodenv/shims/yarn
# 確認
$ which yarn
yarn not found
# npmから再インストール
$ npm install --global yarn
# zshを再起動してから確認
$ yarn --version
Bracket Lensと同様の機能
return {
{
"haringsrob/nvim_context_vt",
},
}
snippetの整備
-
~/.config/nvim直下にpackage.jsonを置く - 同じ場所 にsnippets/ ディレクトリを作成
~/.config/nvim/snippets
でできた。
補完の表示を良い感じにしたい
gitUI入れる
Ctrl + n で _を入力する
itermのフォントを変える
-
Hack Nerd Font Mono, italic にした
brew install font-hack-nerd-font