this menghao develop environment setting config
-
參考網址 1 : Set up Neovim on a new M2 MacBook Air for coding React, TypeScript, Tailwind CSS, etc.
-
參考網址 2 : How I Setup Neovim On My Mac To Make It Amazing - Complete Guide
-
Screen Shot:
- 參考網址: How To Use and Configure Tmux Alongside Neovim
- 參考影片: Youtube
- 安裝 plugins:
(Ctrl + b)+(shift + i) - 解除 plugins:
(Ctrl + b)+alt (iTerm2 -> Profiles -> Keys -> ESC+)+u - Screen Shot:

-
安裝好 homebrew 後, 編輯.zshrc -> 輸入
export HOMEBREW_INSTALL_FROM_API=1來設定 homebrew -
在輸入
brew untap homebrew/core、brew untap homebrew/cask -
輸入下面這段指令來復原 homebrew 和 App Store 的軟體(記得要先安裝 homebrew)
brew bundle
(Ctrl + b) + r: refresh tmux config in tmux mode(Ctrl + b) + n: next(Ctrl + b) + p: previous,(Ctrl + b) + (0~9): switch between windows in session(Ctrl + b) + ,: rename windows
-
y: copy -
p: paste -
^n: 向下選擇字詞 -
^p: 向上選擇字詞 -
<Ctrl-z>: 恢復上一個改動 -
<Ctrl-r>: 恢復下一個改動^:Ctrl
-
/ + {word}: 收尋字詞 (in visual model) -
:NvimTreeToggle
space_bar + e: expand explorera: add new file under pathr: rename file named: delete file
-
nvim-telescope:
; + r: live_grep, search word in this file; + f: find files + f: file browser/: search file modea: create new file- "r" : rename file name
d: delete file
q: quit telescope mode
-
nvim-tabs-bufferline:
t + e: open new tab and editshift + tab: go to left tabtab: go to right tab
-
nvim-tabs-windows:
ss: split windows in horizontal (up-down)sv: split windows in vertical (left-right)
-
LSPsaga config:
K: show value typeCtrl + j: jump to error or warning line and show the messagesgf: lsp_finder searchgd: preview_definitiongD: jump into declarationgi: jump into implementationgr: renameCtrl + o: go back from declaration to your fileq: close interface
-
Auto-completion:
Ctrl + e: close auto-completion suggestion
-
記得要先安裝 Homebrew
brew install neovim
- 進入 nvim 介面,在底下輸入 :
:set fileencoding=utf-8:set encoding=utf-8:set backupskip:set wildignore
- Install Packer by running the below command (under .config/nvim/ ) :
git clone --depth 1 https://github.com/wbthomason/packer.nvim \
~/.local/share/nvim/site/pack/packer/start/packer.nvim
- 進入 nvim 介面,在底下輸入 :
:PackerInstall
-
Status line: Lualine
-
LSP config
- Mason bundle
- install typescript language server
- go into nvim, type command line:
:Mason - check the language servers were installed
- Auto-completion: Lspkind and cmp
- To get LSP-aware auto-completion feature with fancy pictograms ,I use the following
plugins:- onsails/lspkind-nvim - VSCode-like pictograms
- L3MON4D3/LuaSnip - Snippet engine
- hrsh7th/cmp-nvim-lsp - nvim-cmp source for neovim's built-in LSP
- hrsh7th/cmp-buffer - nvim-cmp source for buffer words
- hrsh7th/nvim-cmp - A completion engine plugin for neovim
- Syntax highlightings: Treesitter
-
進入以下 Path 進行編輯:
.config/nvim/lua/plugins.lua -
暫時修改 packer plugin 的描述:
use { 'nvim-treesitter/nvim-treesitter', run = function() require('nvim-treesitter.install').update({ with_sync = true }) end, }- 在以上程式碼區塊中,加入以下程式碼:
run = ':TSUpdate'
- 在以上程式碼區塊中,加入以下程式碼:
-
在 Visual 介面執行 “:TSUpdate”
-
確認執行沒問題後即可刪除加入的描述
- Autotag and Autopair
- For React apps, you often want to close tags quickly.
- ts-autotag
- autopairs is for closing brackets.
- Code formatter: mason-null-ls and null-ls
- 進入 nvim 介面,輸入以下指令以查看是否安裝 formatters & linters):
:Mason - 在 Mason 介面下的操作:
i: installshift + x: uninstallu: update












