Skip to content
forked from lvim-tech/lvim

LVIM is a modular Neovim configuration written in LUA with full customization.

License

Notifications You must be signed in to change notification settings

curious-toast/lvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LVIM

lvim-logo

License

About

LVIM is a modular Neovim configuration written in LUA with full customization:

  • Add or remove plugins, rewrite all plugins
  • Add or remove settings, rewrite all settings
  • Dynamic LSP activation
  • Dynamic debugging activation - Vimspector or Dap
  • By default - 63 plugins
  • Loading time - 060.260

HELP FOR LVIM

For HELP press <F11> and Navigate with ] and [

YouTube channel

Screenshots

Dashboard

01.Dashboard.png

WhichKey

02.WhichKey.png

CtrlSpace

03.CtrlSpace.png

NvimTree

04.NvimTree.png

Trouble

05.Trouble.png

SymbolsOutline

06.SymbolsOutline.png

AnyJump

07.AnyJump.png

Spectre

08.Spectre.png

Snap

10.Snap.png

GitSigns

11.GitSigns.png

Fugitive

12.Fugitive.png

13.Fugitive.png

GitBlame

14.GitBlame.png

UndoTree

15.UndoTree.png

Floaterm

16.Floaterm.png

DadbodUI

17.DadbodUI.png

Goyo

18.Goyo.png

Requirements

Base

External apps

Install

  1. Clone repository
git clone https://github.com/lvim-tech/lvim.git ~/.config/nvim
  1. Export path to bin folder in your shell (.bashrc, .zshrc etc)
export PATH="$HOME/.config/nvim/bin:$PATH"

Plugins

UI

lvim-colorscheme

dashboard-nvim

galaxyline.nvim (requires nvim-web-devicons)

indent-blankline.nvim

nvim-tree.lua (requires nvim-web-devicons)

vifm.vim

goyo.vim (requires limelight.vim)

vim-floaterm

lvim-helper

Editor

vim-ctrlspace

snap

nvim-spectre (requires popup.nvim | plenary.nvim)

suda.vim

nvim-comment

neoformat

nvim-autopairs

vim-bookmarks

undotree

vim-doge

gitsigns.nvim (requires plenary.nvim)

vim-fugitive

diffview.nvim

git-blame.nvim

neogit (requires plenary.nvim)

vim-arsync

Languages

nvim-lspconfig

nvim-lspinstall

nvim-jdtls

nvim-lsp-ts-utils

lsp_signature.nvim

nvim-treesitter (requires playground)

any-jump.vim

lsp-trouble.nvim (requires nvim-web-devicons)

symbols-outline.nvim

dependency-assist.nvim

vimspector

nvim-dap (requires nvim-dap-ui)

Completion

nvim-cmp (requires cmp-nvim-lsp | cmp-vsnip | cmp-buffer | cmp-path)

vim-vsnip (requires vim-vsnip-integ | friendly-snippets)

lspkind-nvim

emmet-vim

Tools

nvim-colorizer.lua

vim-dadbod-ui (requires vim-dadbod-ui | vim-dadbod-completion)

nvim-whichkey-setup.lua (requires vim-which-key)

markdown-preview.nvim

vim-rooter

Keymaps

Normal mode

Key Action Description
<F11> :LvimHelper<CR> LvimHelper
<C-space> :CtrlSpace<CR> CtrlSpace
<Esc> <Esc>:noh<CR> Remove highlight after search
<F1> :FloatermToggle<CR> Floaterm toggle
<F2> :FloatermPrev<CR> Floaterm prev
<F3> :FloatermNext<CR> Floaterm next
<F4> :FloatermNew<CR> Floaterm new
<F12> :FloatermKill<CR> Floaterm kill
<F5> :UndotreeToggle<CR> UndoTree toggle
<C-n> :e %:h/filename<CR> Create new file
<C-s> :w<CR> Save
<C-a> :wa<CR> Save all
<C-e> :qa!<CR> Close all, exit nvim
<C-x> <C-w>c Close current window
<C-o> <C-w>o Close other windows
<C-d> :bdelete<CR> Bdelete
<C-h> <C-w>h Move to window left
<C-l> <C-w>l Move to window right
<C-j> <C-w>j Move to window down
<C-k> <C-w>k Move to window up
<C-Left> :vertical resize -2<CR> Resize width -
<C-Right> :vertical resize +2<CR> Resize width +
<C-Up> :resize -2<CR> Resize height -
<C-Down> :resize +2<CR> Resize height +
<S-x> :NvimTreeToggle<CR> NvimTree explorer
<S-u> :Vifm<CR> Vifm explorer
<S-l> :FloatermNew lazygit<CR> Lazygit
<S-m> :MarkdownPreviewToggle<CR> Markdown preview toggle
<A-j> :AnyJump<CR> Any jump
<A-v> :SymbolsOutline<CR> Symbols outline
<A-[> :foldopen<CR> Fold open
<A-]> :foldclose<CR> Fold close
<A-.> :BookmarkToggle<CR> Bookmark toggle
<A-,> :Neoformat<CR> Format code
<A-s> :Spectre<CR> Replace in multiple files
<A-/> :CommentToggle<CR> Comment toggle
<A-f> :LspFormatting<CR> Lsp format code
<A-t> :LspCodeAction<CR> Lsp code action
<A-g> :LspReferences<CR> Lsp references
<A-d> :LspDeclaration<CR> Lsp declaration
<A-p> :LspDefinition<CR> Lsp definition
<A-h> :LspHover<CR> Lsp hover
<A-r> :LspRename<CR> Lsp rename
<A-n> :LspGoToNext<CR> Lsp go to next
<A-p> :LspGoToPrev<CR> Lsp go to prev
<A-e> :LspTroubleToggle<CR> Lsp trouble toggle

Visual mode

Key Action Description
< <gv Tab left
> >gv Tab right
* :<Esc>/\\%V Visual search /
# :<Esc>?\\%V Visual search ?
K :move \'<-2<CR>gv-gv Move up
J :move \'>+1<CR>gv-gv Move down
<A-j> :AnyJumpVisual<CR> Any jump visual
<A-/> :CommentToggle<CR> Comment toggle

Commands

Snap

:Snap<name-of-command>

LSP support

IMPORTANT:  All external programs are in the sdk home folder (~/sdk)

Bash

:LspInstall bash

CPP

:LspInstall cpp

C#

LspInstall csharp
  1. Download .NET 5.0 SDK from this link
  2. Move dotnet folder to your home directory (~/)
  3. Install Mono

Export path to dotnet in your shell (.bashrc, .zshrc etc)

export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet

CSS

:LspInstall css

Dart + Flutter

  1. Download Flutter (includes dart) from here
  2. Copy folder flutter to ~/sdk
  3. Export paths to flutter and dart in your shell (.bashrc, .zshrc etc)
export PATH="$PATH:$HOME/sdk/flutter/bin"
export PATH="$PATH:$HOME/sdk/flutter/bin/cache/dart-sdk/bin"

Upgrade flutter and dart from command line:

flutter upgrade

Docker

:LspInstall dockerfile

Elixir

:LspInstall elixir

Go

:LspInstall go

Graphql

:LspInstall graphql

HTML

:LspInstall html

Java

:LspInstall java

JavaScript

:LspInstall typescript

JSON

:LspInstall jason

LaTeX

:LspInstall latex

Lua

:LspInstall lua

PHP

:LspInstall php

Python

:LspInstall python

Ruby

:LspInstall ruby

Install solargraph with gem

gem install solargraph

Rust

:LspInstall rust

Install Rust with Rustup

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Svelte

:LspInstall svelte

VIM

:LspInstall vim

YAML

:LspInstall yaml

Customize plugins

Modules (plugins)

All included plugins are in this file by default

You can modify plugins from this file

Remove an existing plugin(s)

local modules = {}

modules['kevinhwang91/rnvimr'] = false

return modules

Customize the settings of existing plugin(s)

local modules = {}

modules['kevinhwang91/rnvimr'] = {
    -- Your code
}

return modules

Add a plugin(s)

local modules = {}

modules['sheerun/vim-polyglot'] = {
    -- your code
}

return modules

IMPORTANT:  After any changes run :PackerSync and restart nvim

Customize settings

Configs (settings)

All settings are in this file

You can modify settings from this file

Remove an existing setting(s)

local modules = {}

configs['events'] = false

return modules

Customize an existing setting(s)

local modules = {}

configs['events'] = function()
    -- your code
end

return modules

Add a setting(s)

local modules = {}

configs['any-name'] = function()
    -- your code
end

return modules

IMPORTANT:  After any changes run :PackerSync and restart nvim

Debuggers

You can use Vimpector or DAP (Debug Adapter Protocol)

Vimspector

IMPORTANT:  Before using Vimspector, you need to activate it

:VimspectorInit

IMPORTANT:  Before using Vimspector, install all gadgets

:VimspectorInstall --all

You can generate .vimspector.json file for your current project with script from bin folder

vsconfig

Keymaps

Key Action Description
<A-1> <Plug>VimspectorToggleBreakpoint Toggle breakpoint
<A-2> <Plug>VimspectorContinue Start / continue
<A-3> <Plug>VimspectorStop Stop
<A-4> <Plug>VimpectorRestart Restart
<A-5> <Plug>VimspectorStepOver Step over
<A-6> <Plug>VimspectorStepInto Step into
<A-7> <Plug>VimspectorStepOut Step out
<A-8> <Plug>VimspectorAddFunctionBreakpoint Function breakpoint
<A-9> <Plug>VimspectorRunToCursor Run to cursor
<A-0> :VimspectorReset<CR> Reset

DAP (Debug Adapter Protocol)

IMPORTANT:  Before using DAP, you need to activate it

:DapInit

Requirements

  1. vscode-lldb (for cpp and rust)
  2. delve (for go)
  3. debugpy (for python)
  4. vscode-node-debug2 (for javascript and typescript)

IMPORTANT:  vscode-node-debug2 must be installed in sdk folder (~/sdk/vscode-node-debug2)

IMPORTANT: Command :VimspectorInstall --all will install vscode-lldb and debugpy

:VimspectorInstall --all

IMPORTANT: DAP configuration for python use python from pyenv. You need to install a pyenv and use a python from pyenv. Path is: ~/.pyenv/shims/python

Supported languages

  • cpp
  • dart
  • go
  • java
  • javascript / typescript
  • python
  • rust

Keymaps

Key Action Description
<A-1> <Cmd>DapToggleBreakpoint<CR> Toggle breakpoint
<A-2> <Cmd>DapStart<CR> Start / continue
<A-3> <Cmd>DapStop<CR> Stop
<A-4> <Cmd>DapRestart<CR> Restart
<A-5> <Cmd>DapStepOver<CR> Step over
<A-6> <Cmd>DapStepInto<CR> Step into
<A-7> <Cmd>DapStepOut<CR> Step out
<A-8> <Cmd>DapPause<CR> Pause
<A-9> <Cmd>DapToggleRepl<CR> Toggle repl
<A-0> <Cmd>DapGetSession<CR> Get session

Replace in multiple files

How use:

:Spectre

--- OR ---

Use keymap <A-s>

Format

IMPORTANT: LVIM use Neoformat by default. For more info use this link

IMPORTANT: If you have installed formatters then Neoformat not need of settings

How use:

:Neoformat

--- OR ---

Use keymap <A-,>

Autoformat

Just add custom function to lua/configs/custom/init.lua

local configs = {}
local funcs = require "core.funcs"

configs["custom_events"] = function()
    funcs.augroups({
        custom_bufs = {
            {"BufWritePre", "*.go", ":Neoformat"},
            {"BufWritePre", "*.py", ":Neoformat"},
            {"BufWritePre", "*.rs", ":Neoformat"},
            {"BufWritePre", "*.dart", ":Neoformat"},
            {"BufWritePre", "*.cpp", ":Neoformat"},
            {"BufWritePre", "*.js", ":Neoformat"},
            {"BufWritePre", "*.ts", ":Neoformat"}
        }
    })
end

return configs

Sudo write

:SudaWrite

About

LVIM is a modular Neovim configuration written in LUA with full customization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 91.2%
  • Shell 8.8%