Giter Club home page Giter Club logo

lunarvim's Introduction

LunarVim Demo

Install In One Command!

Make sure you have the newest version of Neovim (0.5).

bash <(curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/master/utils/installer/install.sh)

Installing

The following command installs LunarVim. Change LVBRANCH to the branch you'd like to install. master for the stable branch and rolling for the latest changes.

LVBRANCH=rolling bash <(curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/rolling/utils/installer/install.sh)

BREAKING CHANGE on rolling and master branches

  • The latest changes to LunarVim require you to remove it completely before upgrading
  • Going forward LunarVim will no longer reside in the nvim configuration folder. LunarVim has been moved to ~/.local/share/lunarvim.
  • To launch Lunarvim use the new lvim command. nvim will only launch standard neovim.
  • Your personal configuration file (lv-config.lua) can now be found in ~/.config/lvim. You can initialize this folder as a git repository to track changes to your configuration files.
  • If you want to keep launching LunarVim with the nvim command, add an alias entry to your shell's config file: alias nvim=lvim. To temporarily revert to the default nvim prefix it with a backslash \nvim.
  • Many options formerly available in lv-config.lua have been renamed. For details look here

Fixing installation problems

If your installation is stuck on Ok to remove? [y/N], it means there are some leftovers,
you can run the script with --overwrite but be warned this will remove the following folders:

  • ~/.cache/nvim
  • ~/.config/nvim #Removed only on Master Branch
  • ~/.local/share/nvim/site/pack/packer #Removed only on Master Branch
  • ~/.local/share/lunarvim #Removed only on Rolling Branch
  • ~/.config/lvim #Removed only on Rolling Branch
curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/rolling/utils/installer/install.sh | LVBRANCH=rolling bash -s -- --overwrite

then run nvim and wait for treesitter to finish the installation

Installing LSP for your language

Just enter :LspInstall followed by <TAB> to see your options

NOTE I recommend installing lua for autocomplete in lv-config.lua

For the julia language server look here

Configuration file

To activate other plugins and language features use the lv-config.lua file provided in the nvim folder (~/.config/nvim/lv-config.lua) in the master branch or (~/.config/lvim/lv-config.lua) on rolling

Example:

-- general
lvim.format_on_save = true
lvim.lint_on_save = true
lvim.colorscheme = "spacegray"

lvim.builtin.compe.autocomplete = true

-- keymappings
lvim.leader = "space"

-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
lvim.builtin.dashboard.active = true
lvim.builtin.terminal.active = true

-- if you don't want all the parsers change this to a table of the ones you want
lvim.builtin.treesitter.ensure_installed = "maintained"
lvim.builtin.treesitter.ignore_install = { "haskell" }
lvim.builtin.treesitter.highlight.enabled = true

lvim.lang.python.formatter.exe = "black"
lvim.lang.python.linters = ""

lvim.lsp.diagnostics.virtual_text = false

-- Additional Plugins
lvim.plugins = {
    {"lunarvim/colorschemes"},
    {"folke/tokyonight.nvim"}, {
        "ray-x/lsp_signature.nvim",
        config = function() require"lsp_signature".on_attach() end,
        event = "InsertEnter"
    }
}

-- Autocommands (https://neovim.io/doc/user/autocmd.html)
-- lvim.autocommands.custom_groups = {
--   { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
-- }

-- Additional Leader bindings for WhichKey
-- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" }
-- lvim.builtin.which_key.mappings["t"] = {
--   name = "+Trouble",
--   r = { "<cmd>Trouble lsp_references<cr>", "References" },
--   f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
--   d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" },
--   q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
--   l = { "<cmd>Trouble loclist<cr>", "LocationList" },
--   w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" },
-- }

In case you want to see all the settings inside LunarVim, run the following:

cd /tmp
lvim --headless +'lua require("utils").generate_settings()' +qa && sort -o lv-settings.lua{,}

and then inspect /tmp/lv-settings.lua file

Updating LunarVim

In order to update you should be aware of three things Plugins, LunarVim and Neovim

To update plugins:

:PackerUpdate

To update LunarVim:

# Master Branch
cd ~/.config/nvim && git pull
:PackerSync  

# Rolling Branch
cd ~/.local/share/lunarvim/lvim && git pull
:PackerSync

To update Neovim use your package manager or compile from source

Project Goals

  1. Provide basic functionalities required from an IDE
    • LSP
    • Formatting/Linting
    • Debugging
    • Treesitter
    • Colorschemes
  2. Be as fast and lean as possible
    • Lazy loading
    • Not a single extra plugin
    • User configurable lang/feature enable/disable
  3. Provide a simple and easy way for users to share their own configuration or use others.
  4. Hot reload of configurations
    • Hot install of lsp/treesitter/formatter required upon openning a filetype for the first time
  5. Provide a stable & maintainable error free configuration layer over neovim
    • With the help of the community behind it
    • Github workflow testing
    • Freezing plugin versions
  6. Provide detailed documentation
    • Video series on how to configure LunarVim as an IDE for each lang
  7. Valhalla

Resources

Testimonials

"I have the processing power of a potato with 4 gb of ram and LunarVim runs perfectly."

  • @juanCortelezzi, LunarVim user.

"My minimal config with a good amount less code than LunarVim loads 40ms slower. Time to switch."

  • @mvllow, Potential LunarVim user.

Lua

lunarvim's People

Contributors

abzcoding avatar afridley avatar atropos112 avatar biserstoilov avatar bob3000 avatar chaesngmin avatar christianchiarulli avatar ghmhd avatar gmardom avatar hulufei avatar ichigo-gyunyu avatar jameswalmsley avatar kylo252 avatar lmarlow avatar luxus avatar mahanrahmati avatar maxxnino avatar mraxime avatar mvllow avatar nawfalmrouyan avatar pasibergman avatar pz31k0naut avatar qverkk avatar rebuilt avatar rmagillxyz avatar roobert avatar tafryn avatar tastyep avatar uzaaft avatar williamgoulois avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.