Skip to content

ipyffor/astronvim_with_coc_or_mason

 
 

Repository files navigation

AstroNvim User Configuration Example

A user configuration template for AstroNvim

now i use mason more, so this branch mason only have lsp. if you want to use coc, switch branch to main, and set vim.g.lsp_type = "coc"

vim.g.lsp_type = "coc" -- use coc as lsp server
vim.g.lsp_type = "lsp" -- use mason as lsp server

Input Auto Switch

brew install im-select
im-select

copy result to im-select.lua

return {
  "chaozwn/im-select.nvim",
  lazy = false,
  opts = {
    -- modify 'im.rime.inputmethod.Squirrel.Hans' to your own input method
    default_main_select = "im.rime.inputmethod.Squirrel.Hans",
    set_previous_events = { "InsertEnter", "FocusLost" },
  },
}

recommend

brew install fzf
brew install luarocks
brew install lazygit
brew install ripgrep
npm install tree-sitter-cli or cargo install tree-sitter-cli
brew install gdu
brew install bottom

NOTE

vim.lsp.buf.hover() KK jump into signature help float window.

Displays hover information about the symbol under the cursor in a floating
window. Calling the function twice will jump into the floating window.

🛠️ Installation

Make a backup of your current nvim and shared folder

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak

Clone AstroNvim

git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim

Create a new user repository from this template

Press the "Use this template" button above to create a new repository to store your user configuration.

You can also just clone this repository directly if you do not want to track your user configuration in GitHub.

Clone the repository

git clone https://github.com/chaozwn/astronvim_with_coc_or_mason ~/.config/nvim/lua/user

Start Neovim

nvim

General Mappings

Action Mappings
Leader key Space
Resize up Ctrl + Up
Resize Down Ctrl + Down
Resize Left Ctrl + Left
Resize Right Ctrl + Right
Up Window Ctrl + k
Down Window Ctrl + j
Left Window Ctrl + h
Right Window Ctrl + l
Force Write Ctrl + s
Force Quit Ctrl + q
New File Leader + n
Close Buffer Leader + c
Next Tab (real vim tab) ]t
Previous Tab (real vim tab) [t
Comment Leader + /
Horizontal Split \
Vertical Split |

About

astronvim_config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%