GithubHelp home page GithubHelp logo

lvim's Introduction

Bloated LunarVim

Do not use as is, use it as a source of inspiration.

I've customized my ZSH/Tmux/Alacritty too much, so it might not work properly ๐Ÿ˜…

141789968-ed61958c-9154-4774-b2e2-dfabe48d9660

Table of Contents (๐Ÿ”Ž Click to expand/collapse)

Theme

Themes are automatically changed based on time of the day:

Theme Time of the day
rose-pine [1am, 9am)
tokyonight [9am, 5pm)
doom-one [5pm, 9pm)
kanagawa [9pm, 11:59pm), [0am, 1am]

You can change this in plugins.lua and lualine.lua

Customization

Customization (๐Ÿ”Ž Click to expand/collapse)
  • I'm on the rolling branch of LunarVim and i'm using neovim 0.7 head
  • Do not use as is, too much bloated! Also do not use on a potato PC!!
  • i have a auto command to disable syntax,etc when you open files larger than 1MB
  • if you don't want to use harpoon, disable it
    • lvim.builtin.harpoon = { active = false }
  • if you want to try out GitHub copilot, change the following
    • lvim.builtin.sell_your_soul_to_devil = true
  • I'm using a custom dashboard, use the default LunarVim one if you like it better
    • lvim.builtin.fancy_dashboard = { active = false }
  • I use a custom lualine disable it if you don't like it
    • lvim.builtin.fancy_statusline = { active = false }
  • I'm using bufferline instead of barbar, if you don't like it, disable it
    • lvim.builtin.fancy_bufferline = { active = false }
  • You can use the fancy wild menu if you want, make sure to do a :UpdateRemotePlugins
    • lvim.builtin.fancy_wild_menu = { active = true }
  • You can use the diffview plugin instead of normal gitsigns diff
    • lvim.builtin.fancy_diff = { active = true }
  • if you want to use debugging, change the following line to true:
    • lvim.builtin.dap.active = true
  • sometimes instead of saving you jump trough jumplist ๐Ÿ˜ข just disable nvim-lastplace
    • lvim.builtin.lastplace = { active = false }
  • sometimes compe-tabnine doesn't play nice, you can disable it :)
    • lvim.builtin.tabnine = { active = false }
  • if you don't need testing, just disable it
    • lvim.builtin.test_runner = { active = false }
  • if you don't want cheat.sh integration, disable it
    • lvim.builtin.cheat = { active = false }
  • if you don't want the SQL integration, disable it
    • lvim.builtin.sql_integration = { active = false }
  • if you don't like smooth scrolling, disable it
    • lvim.builtin.neoscroll = { active = false }
  • if you want an obvious focused window, and you don't get seizures from it
    • lvim.builtin.nonumber_unfocus = true
  • choose between hop and lightspeed as your favorite motion provider
    • lvim.builtin.motion_provider = "hop"
  • if you don't need CSV support, disable it
    • lvim.builtin.csv_support = false
  • if you want to use the cool make and run system, enable it
    • lvim.builtin.async_tasks = { active = true }
  • If you wanna see the issues, remove lvim.lsp.diagnostics.virtual_text = false
  • I'm using skim for latex stuff, change it to zathura if you are on linux
  • Using tailwinds CSS for markdown, disable it if you want

Install

Prerequisites (๐Ÿ”Ž Click to expand/collapse)

Prerequisites

  brew install neovim --nightly
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
cargo install ripgrep fd-find
  • NodeJS >= v16.13.0 most language servers need this
brew install node
# install LunarVim
mv ~/.config/lvim ~/.config/lvim_backup
git clone https://github.com/abzcoding/lvim.git ~/.config/lvim
lvim +LvimUpdate +LvimCacheReset +q
lvim # run :PackerSync

Recommended Fonts

On macOS with Homebrew, choose one of the Nerd Fonts, for example, here are some popular fonts:

brew tap homebrew/cask-fonts
brew search nerd-font
brew install --cask font-fira-code-nerd-font
brew install --cask font-victor-mono-nerd-font
brew install --cask font-iosevka-nerd-font-mono
brew install --cask font-hack-nerd-font
Other Stuff (๐Ÿ”Ž Click to expand/collapse)

Language-Server Protocol (LSP)

To leverage LSP auto-completions and other functionalities, after you open a file in Neovim, run :LspInstall <server> to use nvim-lsp-installer installation feature. Use Tab to list available servers.

Here are some common LSP server installations:

  • :LspInstall html cssls jsonls yamlls
  • :LspInstall gopls
  • :LspInstall pylsp
  • :LspInstall bashls vimls sumneko_lua
  • :LspInstall diagnosticls
  • and moreโ€ฆ

Upgrade

cd ~/.config/lvim
git pull
lvim # run :PackerSync

Recommended Linters

brew install luarocks
luarocks install luacheck  # if you want to use luacheck
cargo install selene  # if you want to use selene instead of luacheck
brew install hadolint  # if you want to lint dockerfiles
pip install vim-vint  # for vim linting
# install llvm and clang_format for clang stuff
npm install -g @fsouza/prettierd # if you want to use prettierd
pip install yapf flake8 black  # for python stuff
# if you want to use the markdown thingy
brew install vale markdownlint-cli
cp -r ~/.config/lvim/.vale ~/.config/vale
# fix the address inside .vale.ini
cp ~/.config/lvim/vale_config.ini ~/.vale.ini
# if you want the latex stuff
# brew install --cask mactex-no-gui # for mac
# or install zathura and chktex on linux

In case you want a better tex support in mac, check this out

if you want the custom gostructhelper, first get the pkg:

cd /tmp
git clone https://github.com/vanhtuan0409/gostructhelper.git
cd gostructhelper/cmds/gostructhelper
go build -o /usr/local/bin/gostructhelper && chmod 0755 /usr/local/bin/gostructhelper

Collaborative Editing

The default is to serve localhost only, on port 8080. For a more advanced (remote server) overview see Deploy a server

Server side

  • :InstantStartServer [host] [port] : Start the server using
    • :InstantStartSingle [host] [port] : This only shares the current buffer.
    • :InstantStartSession [host] [port] :This shares all opened (and newly opened) buffers with the other clients

Client side

  • let g:instant_username="sth" : Set your preferred username.
    • :InstantJoinSingle [host] [port] : Use this command if another client already initiated a single share.
    • :InstantJoinSession [host] [port] : Use this command if another client already initiated a session share

Screenshot

Screenshots (๐Ÿ”Ž Click to expand/collapse) Screen Shot 2021-10-20 at 1 09 24 PM

BufferLine

Screen Shot 2021-10-18 at 5 44 20 PM

StatusLine

Screen Shot 2021-10-18 at 5 45 16 PM

Dashboard

Screen Shot 2021-10-18 at 5 40 16 PM Screen Shot 2021-10-18 at 5 51 50 PM

lsp_signature

lsp_signature_2 lsp_signature

Tabnine

tabnine

Lang Server

completion Screen Shot 2021-10-18 at 5 43 22 PM

diagnostics using gl Screen_Shot_2021-07-31_at_7 54 52_PM

code_actions using ga Screen Shot 2021-10-18 at 6 25 58 PM

code_lens and inlay_hints when supported by lang server Screen Shot 2021-10-18 at 6 26 47 PM

references in qf Screen Shot 2021-10-18 at 6 31 03 PM

treesitter backed folding Screen Shot 2021-10-18 at 6 05 29 PM

peek using gp

Screen Shot 2021-10-18 at 6 33 06 PM

rename using <leader>lr

Screen Shot 2021-11-04 at 3 54 15 PM

Builtin Terminal

Screen Shot 2021-10-18 at 6 07 13 PM

Test

Screen Shot 2021-10-18 at 6 13 22 PM

ETC

k8s help

Screen Shot 2021-10-18 at 6 23 21 PM

lazy git integration

Screen Shot 2021-10-18 at 6 27 45 PM

zen mode

Screen Shot 2021-10-18 at 6 30 00 PM

Cheat.sh integration

use <leader>? Screen Shot 2021-10-18 at 6 02 31 PM

Screen Shot 2021-10-18 at 6 01 34 PM

Symbols Outline

Screen Shot 2021-10-18 at 6 03 57 PM

Plugins Included

Plugins (๐Ÿ”Ž Click to expand/collapse)

Optional Plugins

Structure

Structure (๐Ÿ”Ž Click to expand/collapse)

Custom Key-mappings

Note that,

  • Leader key set as Space
Key-mappings (๐Ÿ”Ž Click to expand/collapse) Modes: ๐=normal ๐•=visual ๐’=select ๐ˆ=insert ๐‚=command

UI

Key Mode Action Plugin or Mapping
Space+e ๐ Open file tree NvimTree
Space+o ๐ Open symbols Symbols-outline
Space+f ๐ Open file finder Telescope
Space+h ๐ Remove highlight nohlsearch<
Space+/ ๐ Toggle comment Comment.nvim
Space+? ๐ Open cheats cheat.sh
Space+' ๐ Open marks which-key marks
Space+z ๐ Zen mode zen-mode.nvim
Space+P ๐ Projects project.nvim
Ctrl+s ๐ˆ show signature help vim.lsp.buf.signature_help()
Alt+s ๐ˆ snippet selection Telescope luasnip extension
Space+C ๐ Command Palette Telescope command_palette

Motion

Key Mode Action Plugin or Mapping
f ๐ find next character HopChar1CurrentLineAC or Lightspeed_f
F ๐ find previous character HopChar1CurrentLineBC or Lightspeed_F
s ๐ find character HopChar2 or Lightspeed_s
S ๐ find word HopWord or Lightspeed_S
Alt+a ๐ˆ select all ggVG
Alt+a ๐ increment number C-A
Alt+x ๐ decrement number C-X

LSP

Key Mode Action
Tab / Shift-Tab ๐ˆ Navigate completion-menu
Enter ๐ˆ Select completion or expand snippet
Upor Down ๐ˆ Movement in completion pop-up
]+d ๐ Next diagnostic
[+d ๐ Previous diagnostic
Space+l+j or Space+l+k ๐ Next/previous LSP diagnostic
Space+l+r ๐ replace current word in project
Ctrl+e ๐ˆ Close pop-up
Tab / Shift-Tab ๐ˆ ๐’ Navigate snippet placeholders
Space+l ๐ keybindings for lsp
g+a ๐ code actions
g+A ๐ codelens actions
g+d ๐ goto definition
g+D ๐ goto declaration
g+I ๐ goto implementation
g+p ๐ peek implementation
g+r ๐ goto references
g+s ๐ show signature help

Plugin: AsyncTasks

Key Mode Action
Space+m+f ๐ Build File
Space+m+p ๐ Build Project
Space+m+e ๐ Edit Tasks
Space+m+l ๐ List Tasks
Space+r+f ๐ Run File
Space+r+p ๐ Run Project

Plugin: Gitsigns

Key Mode Action
Space+g+j or Space+g+k ๐ Next/previous Git hunk
Space+g+p ๐ Preview hunk
Space+g+l ๐ Blame line
Space+g+s ๐ ๐• Stage hunk
Space+g+u ๐ Undo stage hunk
Space+g+R ๐ ๐• Reset hunk

Plugin: LazyGit

Key Mode Action
Space+g+g ๐ Open lazy git UI

Plugin: Telescope

Key Mode Action
Space+f ๐ File search
Space+P ๐ Project search
Space+s+s ๐ Grep search
Space+s+f ๐ Telescope find_files
Space+s+F ๐ Telescope file_browser
Space+F+l ๐ Reopen last search
Space+b+f ๐ Buffers
Space+s+c ๐ Colorschemes
Space+s+C ๐ Command history
Space+s+h ๐ Find help
Space+s+k ๐ Keymap search
Space+s+M ๐ Man Pages search
Space+s+r ๐ Register search
Space+s+t ๐• Grep string under cursor
Space+s+t ๐ Grep raw
Space+F+b ๐ Builtin search
Space+F+f ๐ Current buffer search
Space+F+g ๐ Git files search
Space+F+i ๐ Installed plugins
Space+F+p ๐ Project search
Space+F+i ๐ Installed plugins
in Telescope window
CR ๐ˆ ๐ Multi/Single Open
Ctrl+c ๐ˆ ๐ Exit telescope
Ctrl+v ๐ˆ ๐ Open in a vertical split
Ctrl+s ๐ˆ ๐ Open in a split
Ctrl+t ๐ˆ ๐ Open in a tab
Ctrl+b ๐ˆ Go back in Command Palette
Tab ๐ˆ ๐ Toggle Selection + Next
Shift+Tab ๐ˆ ๐ Toggle Selection + Prev

Plugin: Harpoon

Key Mode Action
Space+Space ๐ show harpoon shortlist
Space+a ๐ add file to shortlist
Space+1 ๐ jump to first file on shortlist
Space+2 ๐ jump to second file on shortlist
Space+3 ๐ jump to third file on shortlist
Space+4 ๐ jump to forth file on shortlist

Plugin: Neogen

Key Mode Action
Space+n+c ๐ Class documentation
Space+n+f ๐ Function documentation
Space+n+t ๐ Type documentation
Space+n+F ๐ File documentation

Plugin: Persistence

Key Mode Action
Space+q+d ๐ quit without saving session
Space+q+l ๐ restore last session
Space+q+s ๐ restore last session from current dir

Plugin: Bufferline

Key Mode Action
Space+b+f ๐ find buffer
Space+b+b ๐ toggle buffer groups
Space+b+p ๐ pick buffer
Space+b+1 ๐ goto buffer 1

Plugin: Trouble

Key Mode Action
Space+T+d ๐ diagnostics
Space+T+f ๐ definitions
Space+T+r ๐ references
Space+T+t ๐ todo
Space+T+w ๐ workspace diagnostics

Plugin: Ultest

Key Mode Action
Space+t+f ๐ run all tests in a file
Space+t+n ๐ only run nearest test
Space+t+s ๐ open test summary

Plugin: Spectre

Key Mode Action
Space+R+p ๐ replace word in project
Space+R+w ๐ replace visually selected word
Space+R+f ๐ replace word in current buffer

lvim's People

Contributors

abzcoding avatar luxus avatar uzaaft avatar

Watchers

 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.