Vim 也是 Vi 的一个复刻,这使得 Neovim 成为复刻的复刻。
https://linux.cn/article-15680-1.html
sudo yum install neovim
lua
Lua 是一种轻量小巧的脚本语言,用标准C语言编写并以源代码形式开放, 其设计目的是为了嵌入应用程序中,从而为应用程序提供灵活的扩展和定制功能。
下载
https://www.lua.org/ftp/
使用
curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz
tar zxf lua-5.3.0.tar.gz
cd lua-5.3.0
make linux test
make install
neovim的init
https://juejin.cn/book/7051157342770954277/section/7051157342846451748
lazy.nvim
现在我们要使用lazy.nvim 并进行配置
lazy.nvim is a modern plugin manager for Neovim.
使用本教程进行配置
https://www.cnblogs.com/w4ngzhen/p/17493128.html
本教程中前面整体的配置方面都可以work。在plugins的排布方面,.setup(“plugins”)不work
- 可以改用直接放在lazynvim-init.lua的方式进行加载。
require("lazy").setup({{import="plugins"}})
参考https://www.bilibili.com/video/BV1HP411m7mQ/?spm_id_from=333.337.search-card.all.click&vd_source=921d5dd11feef88ed498938e1637f4c5
rest.nvim
用lazy.nvim下载
https://github.com/rest-nvim/rest.nvim/tree/main
-- plugins/rest.lua
return {
"rest-nvim/rest.nvim",
dependencies = { { "nvim-lua/plenary.nvim" } },
config = function()
require("rest-nvim").setup({
--- Get the same options from Packer setup
})
end
}
下好后,在init.lua中绑定快捷键
vim.api.nvim_set_keymap('n', '<Leader>r', '<Plug>RestNvim', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>e', '<Plug>RestNvimPreview', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>t', '<Plug>RestNvimLast', { noremap = true, silent = true })
lualine乱码
https://juejin.cn/s/nerd%20fonts%20%E5%AE%89%E8%A3%85
改成文体 Nerd Font