liurongqing / nvim

一份基于 macbook 的 nvim 完整的快速配置

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

成神之路

Neovim License Packer.nvim Coc.nvim vim-startify nvim-tree catppuccin telescope

这是一份基于 macbook 的 nvim 完整的配置

  1. 环境变量

    vim ~/.zshrc

    # alias vim="nvim" # 留条路,万一 nvim 崩了,还能用 vim 临时编辑
    alias vi="nvim"
    alias v="nvim"
    alias n="nvim"
  2. 安装 tmux

    参考地址:https://github.com/tmux/tmux

    brew install tmux

    配置:https://github.com/gpakosz/.tmux

    快速入手: doc/tmux.md

  3. 安装 neovim

    参考地址:https://github.com/neovim/neovim/wiki/Installing-Neovim

    brew install neovim
  4. 安装 字体

    参考地址:https://github.com/ryanoasis/nerd-fonts/#option-4-homebrew-fonts

    # brew tap homebrew/cask-fonts 已经移入核心,不需要加这句了
    brew install font-hack-nerd-font
    
    # 安装好以后在 iterm2 中设置 `Profiles` -> `Text` -> `Non-ASCII Font`
  5. packer.nvim 安装

    参考地址:https://github.com/wbthomason/packer.nvim

    git clone --depth 1 https://github.com/wbthomason/packer.nvim\ 
    ~/.local/share/nvim/site/pack/packer/start/packer.nvim
  6. 克隆整个配置文件

    cd ~/.config
    git clone https://github.com/liurongqing/nvim.git
  7. packer.nvim 管理的插件安装

    # 输入 nvim 命令,然后输入以下命令安装同步
    :PackerSync
  8. Coc.nvim 相关插件安装 需要先安装 node, 可以安装 nvm 管理 node 版本

    # 输入 nvim 命令,然后安装以下插件
    :CocInstall coc-json coc-tsserver coc-eslint coc-prettier coc-emmet coc-snippets
  9. 安装插件以支持 telescope 搜索

    1. ripgrep
      https://github.com/BurntSushi/ripgrep?tab=readme-ov-file#installation
      brew install ripgrep
    2. sharkdp/fd
      https://github.com/sharkdp/fd?tab=readme-ov-file#installation
      brew install fd
    3. nvim-treesitter
      https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation
      lua/plugins.ua 中添加
      use {
        'nvim-treesitter/nvim-treesitter',
        run = ':TSUpdate'
      }

About

一份基于 macbook 的 nvim 完整的快速配置

License:MIT License


Languages

Language:Lua 100.0%