Home

Awesome

Always Work In Process


Startify

Neovim Configure

.
├── compiler                  -- compiler related setting
├── coc-settings.json         -- for coc.nvim if you use coc.nvim as default complation framework, you can also select the builtin lsp
├── ftplugin                  -- some specific setting for some filetype
├── init.lua
├── install.sh
├── lua
│   ├── configure
│   │   ├── nvim_cmp.lua      -- builtin lsp complation config
│   │   ├── lsp_config        -- builtin lsp config
│   │   ├── ....              -- other plugin configs
│   │   └── coc.lua           -- coc.nvim based lsp config
│   ├── core
│   │   ├── after.lua         -- just eusure this will be setting after all plugin loaded
│   │   ├── default.lua       -- some default setting
│   │   ├── init.lua          --
│   │   ├── mapping.lua       -- mapping register module
│   │   ├── plugins.lua       -- all plugin name and group center
│   │   └── themes.lua        -- my favorite themes
│   ├── hack                  -- something you want to hack
│   │   ├── init.lua
│   │   └── pomodoro.lua
│   ├── local.lua             --
│   ├── user.lua              -- user related configure like email, name, etc.
│   └── util                  -- some useful tools and functions
└── tasks.ini                 -- asynctasks

Install

  1. Install Neovim >=0.9, git >= 2.32

  2. Install pynvim and debugpy(optional)

  # pynvim for python based plugins
  pip install pynvim
  # debugpy for python debug, just install it to your environment
  pip install debugpy
  # optional yapf for python format
  pip install yapf
  1. Install node.js, npm, and yarn
curl -sL install-node.vercel.app/lts | bash
npm install --global yarn

Optional:

for grammarly-language-server, it requires the node@16

# install node@16
npm install -g n
n -d 16

# export the GRAMMARLY_PATH in you .bashrc or .zshrce or what shell you use
export GRAMMARLY_PATH="$HOME/.local/share/nvim/mason/packages/grammarly-languageserver/node_modules/grammarly-languageserver"
  1. Install lolcat for display the NEOVIM logo
Ubuntu:
    sudo apt install lolcat
OSX:
    brew install lolcat
  1. Install ag or rg
OSX:
    brew install rg
Ubuntu:
    sudo apt-get install ripgrep
  1. Install Nerd Font
Install Nerd Font Family: `DejaVuSansMono Nerd Font` or  what you want
Download from https://www.nerdfonts.com/
Install method depend on your os.
  1. Install xclip (X11), wl-clipboard (Wayland), pngpaste (MacOS), for Clipboard Image

  2. Make some link

./install.sh
  1. User related setting in lua/core/user.lua.

Both local.lua and user.lua are bind to user. user.lua is more general for each user, and local.lua is special to each machine, and setting in local.lua will not be indexed by git but user.lua will be.

My own setting example in local.lua is:

local M = {}

M.setup = function()
    vim.g.global_proxy_port = 'http://127.0.0.1:7893' -- like "http://127.0.0.1:7893", this is for some plugin like google translate that is banned by GFW. if you don't have this issue, set it to `nil`
end

M.after = function()
...your code
end
return M

In the user.lua you must provide the setup and after method in the module

local M = {}
M.setup = function()
-- call the local setup
-- require('core.local').setup()
...your code
end
M.after = function() ... end
-- call the local after
-- require('core.local').after()
...your code
return M

NOTE: The default leader is setting in lua/core/default.lua. The setting is

let maplocalleader=','
let mapleader=';'
nnoremap \\ ;
vnoremap \\ ;
  1. Select builtin or coc.nvim for the default LSP in 'core/init.lua'.

For my experience, coc.nvim is more easy to configure to get all things work. But now more and more neovim users change to use builtin?

  1. Open neovim and run :PackerSync<cr> command to install Plugins by Packer plugin manager.

Optional

  1. Install pg_format for sql format
see https://github.com/darold/pgFormatter#:~:text=following%20your%20distribution.-,INSTALLATION,-Following%20your%20Linux
  1. Install sqlite3 for better frequence files display(<leader>fh)
sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev

More

For getting the best performance, please use the GPU-based terminal:

Main features

Each figure may display with different colorscheme.

ChatGPT

chatgpt

Complete/Nvim-Tree/Navigator(based builtin lsp)

code_view_complete

Complete/Nvim-Tree/Navigator(based coc.nvim)

code_view_complete

Fuzzy Search

Fuzzy Search

Agenda

Agenda

Markdown & Vimwiki

Markdown & Vimwiki

Project TODO

Project TODO

Debug Adapter Protocol

Debug Adapter Protocol

Pomodoro Clock

Pomodoro Clock

There are some shortcuts.

NOTE: Default set

    vim.cmd("let maplocalleader=' '")
    vim.cmd("let mapleader=';'")
    vim.cmd("nnoremap ' ;")
    vim.cmd("vnoremap ' ;")

WARNING: We will remap some shortcuts but not update this table, just for reference.

ModeMappingDescription
x<Left Indent Selected
x>Right Indent Selected
i,ckjBack to Normal Mode
n,i;pPaste From Clipboard
n;qADirectly Quit Without Save
n;qqDirectly Quit
n;qwDirectly Quit After Write
n;qcQuickFix Close
n;qoQuickFix Open
n;qpQuickFix Previous Item
n;qnQuickFix Next Item
n;rdRead Date From System
n;rrReload Current File
n;rtRead FileTree
n;s.Source Current File
n;s<SPACE>Remove Tail Space
n;ssSave Current Buffer
n;saSave All Buffers
n;wsSplit Window
n;wvVertical Split Window
n;wdClose Current Window
n;woOnly Reserve Current Window
n;wwGoto Next Window
n;wjGoto The Down Window
n;wkGoto The Above Window
n;whGoto The Left Window
n;wlGoto The Right Window
n;wJGoto The Bottom Window
n;wKGoto The Top Window
n;wHGoto The Leftest Window
n;wLGoto The Rightest Window
n;xClose Current Window
v;yYank to Clipboard
n;<TAB>Smart toggle fold
nzRUnzip all
nzrUnzip
nzaZip toggle
nzmZip current
nzMZip all
nzoUnzip current
n<A-L><alt-l>Goto Right Window
n<A-K><alt-k>Goto Above Window
n<A-H><alt-h>Goto Left Window
n<A-J><alt-j>Goto Below Window
n<A-F><alt-f>Go to Next Buffer
n<A-B><alt-b>Go to Previous Buffer
n<A-W><alt-w>Size +5
n<A-S><alt-s>Size -5
n<A-A><alt-a>Vertical Size -5
n<A-D><alt-d>Vertical Size +5
n,v<C-J>5j
n,v<C-k>5k
n<SPACE><CR>No Search Highlight
i<C-U>Delete Prior Word
i<C-H>Delete Prior Char
i<C-D>Delete Next Char
i<C-K>Delete To The End
i<C-J>Delete To The Begin
i<C-B>Go Left
i<C-F>Go Right
i<C-A>Go To The Begin and Insert
i<C-E>Go To The End and Append
i<C-O>New Line and Insert
i<C-S>Save
i<C-Q>Save & Quit
n<C-Q>Save & Quit
vgxOpen URL Link
ngxOpen URL Link
n;gaGit Add
n;gbGit Blame
n;gcGit Commits
n;gCGit Checkout
n;geGit Edit Something
n;gdGit Diff
n;ggGit Grep
n;glGit Log For Current File
n;gLGit Log
n;gmGit Move
n;grGit Read
n;gsGit Status
n;gwGit Write
n;guGit Pull
n;gpGit Push
n;giGit Indicator Toggle
n<SPACE><SPACE>Blink Cursor
n<SPACE>1Goto 1 Window
n<SPACE>2Goto 2 Window
n<SPACE>3Goto 3 Window
n<SPACE>4Goto 4 Window
n<SPACE>5Goto 5 Window
n<SPACE>6Goto 6 Window
n<SPACE>7Goto 7 Window
n<SPACE>8Goto 8 Window
n<SPACE>9Goto 9 Window
n;1Goto 1 Buffer
n;2Goto 2 Buffer
n;3Goto 3 Buffer
n;4Goto 4 Buffer
n;5Goto 5 Buffer
n;6Goto 6 Buffer
n;7Goto 7 Buffer
n;8Goto 8 Buffer
n;9Goto 9 Buffer
n;AGoto A Buffer
n;BGoto B Buffer
n;CGoto C Buffer
n;DGoto D Buffer
n;EGoto E Buffer
n;FGoto F Buffer
n;GGoto G Buffer
n;HGoto H Buffer
n;IGoto I Buffer
n;JGoto J Buffer
n;KGoto K Buffer
n;LGoto L Buffer
n;MGoto M Buffer
n;NGoto N Buffer
n;bnGoto Next Buffer
n;bpGoto Prev Buffer
n;bfGoto First Buffer
n;blGoto Last Buffer
n;bdDelete Current Buffer
n;bDDelete All Buffer Except Current
n;bRDelete All Right Buffers
n;bLDelete All Left Buffers
n;bsBuffer Sorted By Whether Modified
n;tcTab Create
n;txTab Close
n;tnTab Next
n;tpTab Previous
n;f;sOpen Startify Page
n;tlTag List
n;srSearch By Reg Exp.
n;sfSearch Current Word
n;ffFind files
n;fBFile Browser
n;fRFind Recent Context
n;frFind Recent/History
n;fqFind Query
n;flFind Lines
n;fbFind Buffers
n;fcFind Command History
n;fdOpen Dotfiles
n;fwFind Wiki
n;fjFind Wiki
n;fhFind Recent/History
n;fpFind Project
n;spSave Project
n;fmFind All Mappings
n;f;Find More
n;f;rFind Registers
n;f;hFind Highlights
n;f;tFind Themes
n;f;pFind Planets
n;f;gFind Git Commits
n;f;GFind Git Commits(buffer)
n;f;jFind Jump List
n;f;mFind Marks
n;dqDebug Quit F2
n;dCClear Breaks F4
n;dcRun Continue F5
n;dBStep Back F6
n;daAdvanced Debug
n;dawAdvanced Break F7
n;dacCond Break F8
n;dbToggle Break F9
n;doStep Over F10
n;diStep Into F11
n;dOStep Out F12
n;drRepl Open
n;mtQuick Build
n;ceCode Edit(markdown)
n;mpMarkdown Preview
n<SPACE>fDisplay Formula
n<SPACE>pPaste Image
n;tmToggle Table Mode
n;tfeTable Fomule Eval
n;oaOrg Agenda
n;ocOrg Capture
n;oxOrg Clock
n;oxeOrg Effort Estimate
n;oxiClock In
n;oxoClock Out
n;oxqClock Cancel
n;oxjClock Goto
ncirOrg Priority Down
nciROrg Priority Up
xciROrg Priority Up
ncitOrg Todo Status
nciTOrg Todo Status
ncidOrg Change Date
n;ofOrg Open File
n;otOrg Tag
n;oiOrg Insert
n;oidOrg Insert DEADLINE
n;oihOrg Insert Headline
n;oisOrg Insert SCHEDULED
n;oitOrg Insert TODO
n;oi.Org Insert Time Stamp
n;oiTOrg Inplace Insert TODO
n;oi,Org Insert Inactive Time Stamp
n;oKOrg Move Up
n;oJOrg Move Down
n;o'Org Edit Source
n;o$Org Archive Subtree
n;oAOrg Archive Tag
n;orOrg Refile To
n;o*Org Toggle Headline
n;o,Org Priority
n;oeOrg Export(Emacs)
n;oCCalendar
n;OVimwiki
n;o;Vimwiki Make Note
n;foObsidianSearch
n;onNew Draft Obsidian
n;ttToggle TODO List
n;twTranslate Current Word.
v;twTranslate Current Vision Word.
n,v<CR>Auto Select Span
n;jrJupyter Run
n;j.Jupyter Change Dir to Current
n;jcJupyter Connect
n<SPACE>jeJupyter Run Visual
v<SPACE>eJupyter Run Visual
n;npJupyter Convert
t<ESC>Back to Normal Mode
tkjBack to Normal Mode
v,x<C-S>Send Select Text to First Termianl
n<C-S>Send Current Line to First Termianl
n;tiTerminal IPython
n;reRemote Edit
n;rcRemote Configure
n;cnColor New
n;cpColor Picker
n;csColor Select(CSS)
n;cgColor Gradient 2 Colors
n;ftFile Tree
n;f.Current File Tree
n;toToggle Only Window(ZenMode)
n;skSession Keep
n;sLSession List
n;sdSession Delete
n;slLoad Session(Dir)
n;lcLsp Config
ngdGoto Definition
ngrGoto References
ngiGoto Implementation
n;snPrev Diagnostic
n]eNext Diagnostic
n[ePrev Diagnostic