Skip to content

Instantly share code, notes, and snippets.

@jglien
Last active February 7, 2024 22:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jglien/6b223afeaab9228f3d69fbc945e70636 to your computer and use it in GitHub Desktop.
Save jglien/6b223afeaab9228f3d69fbc945e70636 to your computer and use it in GitHub Desktop.
My LunarVim Config
-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
-- tip: have ripgrep installed for telescope
-- note: LunarVim has language support built-in, don't use COC
lvim.plugins = {
-- Appearance
{ "lourenci/github-colors" },
{ "nvim-tree/nvim-web-devicons" },
-- Editing
{
"Pocco81/auto-save.nvim",
config = function()
require("auto-save").setup()
end,
},
-- Git
-- inline git blame
{ "f-person/git-blame.nvim" },
{
-- see docs page at the below github. all commands start with :Octo
"pwntester/octo.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-tree/nvim-web-devicons",
},
config = function()
require "octo".setup()
end
},
-- <leader>gy to copy github share link
{
"ruifm/gitlinker.nvim",
dependencies = "nvim-lua/plenary.nvim",
config = function()
require("gitlinker").setup()
end
},
-- git log + git show w/ side-by-side diffs
{ "sindrets/diffview.nvim" },
-- Copilot
{
"zbirenbaum/copilot-cmp",
event = "InsertEnter",
dependencies = { "zbirenbaum/copilot.lua" },
config = function()
vim.defer_fn(function()
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
})
require("copilot_cmp").setup()
end, 100)
end,
},
-- Persistent dev
{
"folke/persistence.nvim",
event = "BufReadPre", -- this will only start session saving when an actual file was opened
config = function()
require("persistence").setup {
dir = vim.fn.expand(vim.fn.stdpath "config" .. "/session/"),
options = { "buffers", "curdir", "tabpages", "winsize" },
}
end,
},
}
lvim.colorscheme = "github-colors"
-- Seems to be causing issues with ability to undo with auto save
-- lvim.format_on_save.enabled = true
lvim.builtin.which_key.mappings["S"]= {
name = "Session",
c = { "<cmd>lua require('persistence').load()<cr>", "Restore last session for current dir" },
l = { "<cmd>lua require('persistence').load({ last = true })<cr>", "Restore last session" },
Q = { "<cmd>lua require('persistence').stop()<cr>", "Quit without saving session" },
}
vim.opt.wrap = true
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldenable = false -- if this option is true and fold method option is other than normal, every time a document is opened everything will be folded.
@jglien
Copy link
Author

jglien commented Jan 9, 2024

Could overwrite with this by

 wget "{{ raw link }}" -O ~/.config/lvim/config.lua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment