跳到主要内容
版本:1.4

Development of Lunarvim

Getting started

We recommend setting up a symlink to your fork:

cd ~/.local/share/lunarvim/
ln -s ~/dev/Lunarvim ~/.local/share/lunarvim/lvim_dev

Your output should be something like:

$ ls -a
lrwxrwxrwx 1 user user 37 sep 23 14:35 lvim_dev -> /home/user/dev/LunarVim

Now switch your lvim to the development setup:

cd ~/.local/share/lunarvim/
mv lvim lvim_back
mv lvim_dev lvim

Going back to lvim

cd ~/.local/share/lunarvim/
mv lvim lvim_dev
mv lvim_back lvim

To test that you can get some output from lvim add the following to your init.lua file in your fork.

print ("it works")
lvim

Now type :messages. Happy contributing!

Lua + Neovim = ❤️

To get started, this guide covers many points that will get you going with Lua and how Neovim works.

Official Documentation

The reference manual is the official definition of the Lua language.

If you don't know about it, DevDocs combines multiple API documentations in a fast, organized, and searchable interface.

Neovim Documentation

Neovim provides a standard library which you should know about.

It provides many functions that you wish were implemented in Lua's stdlib, for instance strings.split.

It also comes with a LSP framework and much more.

Style Guide

LuaRock style guide is a complete work that deserves a look if you want learn how to write consistent and robust code.

It is based on many pre-existing guides, provides rationals for all their decisions, and worked successfully in a long-running project.

Code Quality

To ensure code quality and a consistent style, our CI uses the following tools:

  • Lua:
    • Stylua. An opinionated Lua code formatter.
    • Luacheck. A tool for linting and static analysis of Lua code.
  • Shell
    • Shfmt. A shell parser, formatter, and interpreter with bash support.
    • Shellcheck. A static analysis tool for shell scripts.