How to use lazyvim on macos elegantly?
Welcome to my blog! What I want to share today is how to use lazyvim as your IDE on the mac platform.
0x01. Installation
Before staring the discuss of today’s topic, you need to install neovim
firstly by command as follows:
1 | brew install neovim |
Then, let’s start to use lazyvim
to turn neovim into an IDE quickly.
The official document link is as follows:
1 | https://www.lazyvim.org/ |
Through the official documentation, you can quickly get started (if you have some basic knowledge of vim)
- Firstly, Make a backup of your current config files:
1 | # required |
If you are using neovim for the first time, the file~/.config/nvim
should not exist.
Clone it
1
git clone https://github.com/LazyVim/starter ~/.config/nvim
Remove the .git file to own your repo
1
rm -rf ~/.config/nvim/.git
Start Neovim!
1
nvim
Now, We successfully installed our lightly IDE !!
0x02. Configuration Files
First of all, we need to make it clear that the configuration file in lazyvim provides two modes: single file
and multi-file
,
I won’t go into too much detail about the two here.
Next, I will use an example to show how to make lazyvim more useful through the configuration file. Here I will use a reference case:
1 | https://zorchp.github.io/tips/%E5%AE%9A%E5%88%B6Neovim%E7%9A%84%E4%B8%80%E9%94%AE%E7%BC%96%E8%AF%91%E8%BF%90%E8%A1%8C%E5%BF%AB%E6%8D%B7%E9%94%AE/#fn:1 |
You can open the neovim configuration file in this way:
1 | nvim ~/.config/nvim/lua/config/lazy.lua |
Here you can see that the configuration file entry for multi-file configuration is lazy.lua
, Here I will demonstrate how to quickly compile and run a single Python file using the shortcut F7
Here I will demonstrate how to quickly write and run a python file.
Firstly, we open the python script we want to run through nvim
We have already written the configuration file. Here I press F7 to see the running result of my python file.
At this point, this brief introduction is complete. ^_^
- Title: How to use lazyvim on macos elegantly?
- Author: zder
- Created at : 2025-01-15 03:06:06
- Updated at : 2025-01-15 03:06:06
- Link: https://fluxword.net/2025/01/15/nvim/
- License: This work is licensed under CC BY-NC-SA 4.0.