Compare commits

..

No commits in common. "master" and "ea8850339bc37d37678c2620530021a8f4180cf8" have entirely different histories.

28 changed files with 551 additions and 811 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
#exclude precomplied things
/plugin/*

View File

@ -1,28 +1,3 @@
# config.nvim/ ## Nvim.config
<a href="https://dotfyle.com/rywng/confignvim"><img src="https://dotfyle.com/rywng/confignvim/badges/plugins?style=flat" /></a> ### This is my neovim config
<a href="https://dotfyle.com/rywng/confignvim"><img src="https://dotfyle.com/rywng/confignvim/badges/leaderkey?style=flat" /></a>
<a href="https://dotfyle.com/rywng/confignvim"><img src="https://dotfyle.com/rywng/confignvim/badges/plugin-manager?style=flat" /></a>
Minimalistic but fully functional neovim config, with full LSP and TS support and completion
Use lua plugins when possible, lazy load and byte-compile when possible, use neovim builtin features when possible.
Never override default keymap with different functionality.
## Install Instructions
> Install requires Neovim 0.9+. Always review the code before installing a configuration.
Clone the repository and install the plugins:
```sh
git clone git@github.com:rywng/config.nvim ~/.config/rywng/config.nvim
NVIM_APPNAME=rywng/config.nvim/ nvim --headless +"Lazy! sync" +qa
```
Open Neovim with this config:
```sh
NVIM_APPNAME=rywng/config.nvim/ nvim
```

View File

@ -1,2 +1,3 @@
require('core') require('core')
require('lazy-plugins') require('pluginList')
require('mappings')

View File

@ -1,41 +0,0 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"cmp-async-path": { "branch": "main", "commit": "9d581eec5acf812316913565c135b0d1ee2c9a71" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
"gitsigns.nvim": { "branch": "main", "commit": "6b1a14eabcebbcca1b9e9163a26b2f8371364cb7" },
"gruvbox-material": { "branch": "master", "commit": "23371661bac2b7fdd9769c685e4224990c3b9ab8" },
"killersheep.nvim": { "branch": "master", "commit": "506823c47b854df02e78d5fec9468ab0e542dcf5" },
"lazy.nvim": { "branch": "main", "commit": "a9d7ade203b3f3ee3058c082c62afdf8e4bcb416" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"mini.surround": { "branch": "main", "commit": "7098744c8d4573a4b32cb172965f6b2ba03465d2" },
"neogen": { "branch": "main", "commit": "6de0add4805165317ab7d3d36b5cef48b1b865f3" },
"none-ls.nvim": { "branch": "main", "commit": "0d1b3fa2ad0b371b94cb4b9a27ba6e5a1a915c91" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-lspconfig": { "branch": "master", "commit": "53a3c6444ec5006b567071614c83edc8ad651f6d" },
"nvim-treesitter": { "branch": "master", "commit": "ffd7725102f47e7391d7a5e7621d178689602a52" },
"nvim-treesitter-context": { "branch": "master", "commit": "1b9c756c0cad415f0a2661c858448189dd120c15" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"outline.nvim": { "branch": "main", "commit": "028e0bc8ad3d511e9fc1f0678594a608eb908ee5" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"range-highlight.nvim": { "branch": "master", "commit": "8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9" },
"rustaceanvim": { "branch": "master", "commit": "af4de6a35d128ce71c75a9a7846bf089aea76f50" },
"tabout.nvim": { "branch": "master", "commit": "3d7fbc7f5e91ef0f96b4d787c78ad9f8820de3ec" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "935bedf39c440de2f97ce58dbbb44a40402057c1" },
"telescope.nvim": { "branch": "master", "commit": "bfcc7d5c6f12209139f175e6123a7b7de6d9c18a" },
"vim-fugitive": { "branch": "master", "commit": "d0c1a437536778bcc8174b7cb2ffdf98f611e6fe" },
"vim-matchup": { "branch": "master", "commit": "1535a769d5dca851fe7d41b0be95f7c7203a4bef" }
}

View File

@ -1,5 +0,0 @@
{
"diagnostics.disable": [
"undefined-global"
]
}

View File

@ -1,67 +1,21 @@
-- CORE SETTINGS -- Core Settings
local o = vim.o
local g = vim.g local opt = vim.o
local map = vim.keymap.set
-- look and feel -- look and feel
g.netrw_banner = 0 opt.relativenumber = true
g.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl" opt.number = true
g.netrw_liststyle = 3 opt.showmode = false
g.netrw_winsize = 25 opt.scrolloff = 10
o.number = true opt.ruler = true
o.relativenumber = true opt.termguicolors = true
o.ruler = true opt.shiftwidth = 2
o.scrolloff = 10
o.showmode = false
o.termguicolors = true -- Remove this line when updated to neovim v10 TODO
o.title = true
vim.opt.diffopt = { "internal", "filler", "closeoff", "iwhite" }
-- controlling -- controlling
g.mapleader = ' ' opt.ignorecase = true
o.autoindent = true opt.smartcase = true
o.breakindent = true opt.smartindent = true
o.complete = nil opt.mouse = "i"
o.ignorecase = true
o.smartcase = true
o.smartindent = true
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
-- vscode -- completion for lua
if vim.g.vscode then opt.completeopt = 'menuone,noselect'
vim.opt.syntax = "OFF"
g.clipboard = g.vscode_clipboard
-- undo/REDO via vscode
map("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
map("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
map("n", "gf", "<Cmd>call VSCodeCall('editor.action.openLink')<CR>", { noremap = true })
map({ "i", "n" }, " ", "<Cmd>call VSCodeCall('editor.action.triggerParameterHints')<CR>", { noremap = true })
end
-- generic mappings
map('v', '<', '<gv', { noremap = true })
map('v', '>', '>gv', { noremap = true })
map('n', 'Y', 'y$', { noremap = true })
map('n', 'n', 'nzzzv', { noremap = true })
map('n', 'N', 'Nzzzv', { noremap = true })
-- Shortcutting split navigation
map('', '<A-h>', '<C-w>h')
map('', '<A-j>', '<C-w>j')
map('', '<A-k>', '<C-w>k')
map('', '<A-l>', '<C-w>l')
map('', '<A-H>', '<C-w>H')
map('', '<A-J>', '<C-w>J')
map('', '<A-K>', '<C-w>K')
map('', '<A-L>', '<C-w>L')
map('', '<M-S-.>', '<C-w>>')
map('', '<M-S-,>', '<C-w><')
map('', '<M-S-=>', '<C-w>+')
map('', '<M-->', '<C-w>-')
map('', '<A-T>', '<C-w>T')
-- undo to the last , . or !
map('i', ',', ',<c-g>u', { noremap = true })
map('i', '.', '.<c-g>u', { noremap = true })
map('i', '!', '!<c-g>u', { noremap = true })
map('i', '?', '?<c-g>u', { noremap = true })

View File

@ -1,351 +0,0 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local opts = {
defaults = {
lazy = true,
},
dev = {
path = "~/.local/src"
},
install = {
-- try to load one of these colorschemes when starting an installation during startup
colorscheme = { "gruvbox-material", "habamax" },
},
}
local plugins = {
-- main UI
{
"sainnhe/gruvbox-material",
lazy = false,
priority = 1000,
config = function()
vim.g.gruvbox_material_better_performance = true
vim.g.gruvbox_material_enable_bold = true
vim.g.gruvbox_material_enable_italic = true
vim.cmd([[colorscheme gruvbox-material]])
end
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("plugins.statusline")
end,
event = "UIEnter"
},
-- TS, LSP, Completion
{
"williamboman/mason.nvim",
},
{
"nvim-treesitter/nvim-treesitter",
config = function()
require("plugins.treesitter")
end,
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-context",
"nvim-treesitter/nvim-treesitter-textobjects"
}
},
{
"nvim-treesitter/nvim-treesitter-context",
config = function()
require("treesitter-context").setup {
multiline_threshold = 4,
max_lines = 8
}
end
},
{
"L3MON4D3/LuaSnip",
dependencies = { "rafamadriz/friendly-snippets" },
config = function()
require("luasnip").setup()
require("luasnip.loaders.from_vscode").lazy_load()
end,
-- install jsregexp (optional!).
build = "make install_jsregexp"
},
{
"hrsh7th/nvim-cmp",
dependencies = {
"FelipeLema/cmp-async-path",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
{
"saadparwaiz1/cmp_luasnip",
dependencies = {
"L3MON4D3/LuaSnip"
}
},
},
event = { "InsertEnter", "CmdlineEnter" },
config = function()
require("plugins/nvim-cmp")
end
},
{
"hrsh7th/cmp-nvim-lsp",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"neovim/nvim-lspconfig",
},
},
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{
"williamboman/mason-lspconfig.nvim",
dependencies = {
"williamboman/mason.nvim",
}
},
},
config = function()
require("plugins.lsp")
end,
},
{
"jay-babu/mason-null-ls.nvim",
config = function()
require("plugins.null-ls")
end,
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"williamboman/mason.nvim",
"nvimtools/none-ls.nvim"
}
},
-- rust lsp support
{
'mrcjkb/rustaceanvim',
ft = { 'rust' },
key = {
vim.keymap.set('n', '<leader>rr', ':RustLsp runnables<cr>'),
}
},
-- Code editing
{
"echasnovski/mini.surround",
event = "ModeChanged",
keys = "s",
config = function()
require('mini.surround').setup()
end
},
{
"numToStr/Comment.nvim",
event = "ModeChanged",
keys = "g",
config = function()
require("Comment").setup()
end
},
{
"andymass/vim-matchup",
event = { "BufReadPre", "BufNewFile" },
},
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'CFLAGS=-march=native make',
},
{
"nvim-telescope/telescope.nvim",
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope-fzf-native.nvim'
},
event = "CmdlineEnter",
keys = {
vim.keymap.set('n', '<leader>f/', ':Telescope lsp_dynamic_workspace_symbols<cr>'),
vim.keymap.set('n', '<leader>f?', ':Telescope lsp_document_symbols<cr>'),
vim.keymap.set('n', '<leader>fg', ':Telescope live_grep<cr>'),
vim.keymap.set('n', '<leader>fb', ':Telescope buffers<cr>'),
vim.keymap.set('n', '<leader>ff', ':Telescope find_files<cr>'),
vim.keymap.set('n', '<leader>fd', ':Telescope diagnostics<cr>'),
},
config = function()
require("telescope").setup {
defaults = {
layout_strategy = 'flex',
layout_config = {
flex = { flip_columns = 160 }
},
},
}
require('telescope').load_extension('fzf')
end
},
{
'kevinhwang91/nvim-bqf',
ft = 'qf',
opts = {
-- disable fugitive in preview: https://github.com/kevinhwang91/nvim-bqf?tab=readme-ov-file#customize-configuration
preview = {
should_preview_cb = function(bufnr, qwinid)
local ret = true
local bufname = vim.api.nvim_buf_get_name(bufnr)
local fsize = vim.fn.getfsize(bufname)
if fsize > 100 * 1024 then
-- skip file size greater than 100k
ret = false
elseif bufname:match('^fugitive://') then
-- skip fugitive buffer
ret = false
end
return ret
end
},
}
},
{
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
cmd = "Neogen",
opts = {
snippet_engine = "luasnip"
},
config = true,
},
{
'abecodes/tabout.nvim',
event = 'InsertCharPre',
opts = {
tabkey = '<C-l>',
backwards_tabkey = '<C-h>',
act_as_tab = false
},
},
{
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true,
opts = {
check_ts = true,
ts_config = {
lua = { 'string' },
javascript = { 'template_string' },
java = false,
}
}
},
-- Eye candy UI
{
"NvChad/nvim-colorizer.lua",
cmd = { "ColorizerAttachToBuffer",
"ColorizerToggle"
},
event = "BufRead",
config = function()
require 'colorizer'.setup {
filetypes = {
'*',
css = { rgb_fn = true, },
html = { names = false, }
},
}
end
},
{
"winston0410/range-highlight.nvim",
event = "CmdlineEnter"
},
{
'stevearc/dressing.nvim',
event = "UIEnter"
},
{
"tpope/vim-fugitive",
event = "CmdlineEnter"
},
{
"hedyhli/outline.nvim",
cmd = { "Outline", "OutlineOpen" },
keys = {
vim.keymap.set('n', '<leader>o', ':Outline<cr>'),
},
config = function()
require("outline").setup({})
end
},
{
"lewis6991/gitsigns.nvim",
event = "BufEnter",
keys = {
-- View changed in git
vim.keymap.set('n', ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function()
require("gitsigns").next_hunk()
end)
return '<Ignore>'
end, { expr = true }),
vim.keymap.set('n', '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function()
require("gitsigns").prev_hunk()
end)
return '<Ignore>'
end, { expr = true }),
vim.keymap.set("n", "<leader>hp",
function() require("gitsigns").preview_hunk() end)
},
opts = {
signcolumn = false,
numhl = true,
current_line_blame_opts = {
delay = 300,
ignore_whitespace = false,
virt_text_priority = 100,
},
},
},
-- misc and games
{
"seandewar/killersheep.nvim",
cmd = "KillKillKill"
},
}
local vscode_plugins = {
{ 'echasnovski/mini.surround', version = false, lazy = false },
{
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end
},
}
if vim.g.vscode then
-- VSCode extension
require("lazy").setup(vscode_plugins, opts)
else
-- ordinary Neovim
require("lazy").setup(plugins, opts)
end

23
lua/mappings.lua Normal file
View File

@ -0,0 +1,23 @@
-- generic mappings
vim.api.nvim_set_keymap('v', '<', '<gv', {noremap = true})
vim.api.nvim_set_keymap('v', '>', '>gv', {noremap = true})
vim.api.nvim_set_keymap('n', 'Y', 'y$', {noremap = true})
vim.api.nvim_set_keymap('n', 'n', 'nzzzv', {noremap = true})
vim.api.nvim_set_keymap('n', 'N', 'Nzzzv', {noremap = true})
-- Shortcutting split navigation
vim.api.nvim_set_keymap('', '<A-h>', '<C-w>h', {})
vim.api.nvim_set_keymap('', '<A-j>', '<C-w>j', {})
vim.api.nvim_set_keymap('', '<A-k>', '<C-w>k', {})
vim.api.nvim_set_keymap('', '<A-l>', '<C-w>l', {})
vim.api.nvim_set_keymap('', '<A-H>', '<C-w>H', {})
vim.api.nvim_set_keymap('', '<A-J>', '<C-w>J', {})
vim.api.nvim_set_keymap('', '<A-K>', '<C-w>K', {})
vim.api.nvim_set_keymap('', '<A-L>', '<C-w>L', {})
vim.api.nvim_set_keymap('', '<A->>', '<C-w>>', {})
vim.api.nvim_set_keymap('', '<A-<>', '<C-w><', {})
-- undo to the last , . or !
vim.api.nvim_set_keymap('i', ',', ',<c-g>u', {noremap = true})
vim.api.nvim_set_keymap('i', '.', '.<c-g>u', {noremap = true})
vim.api.nvim_set_keymap('i', '!', '!<c-g>u', {noremap = true})
vim.api.nvim_set_keymap('i', '?', '?<c-g>u', {noremap = true})

113
lua/pluginList.lua Normal file
View File

@ -0,0 +1,113 @@
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
require('packer').init {
display = {
open_fn = function()
return require("packer.util").float {border = "single"}
end,
prompt_border = "single"
},
git = {
clone_timeout = 600 -- Timeout, in seconds, for git clones
},
auto_clean = true,
compile_on_sync = true
-- auto_reload_compiled = true
}
return require('packer').startup(function(use)
use {'wbthomason/packer.nvim', event = 'VimEnter'}
-- core UI
use {'kyazdani42/nvim-web-devicons', after = 'packer.nvim'}
use {
'hoob3rt/lualine.nvim',
after = 'nvim-web-devicons',
config = function() require "plugins.statusline" end
}
use {
'RRethy/nvim-base16',
event = 'VimEnter',
config = function() require "plugins.base16" end
}
-- lsp stuff
use {
'nvim-treesitter/nvim-treesitter',
event = 'BufRead',
config = function() require "plugins.treesitter" end,
run = ':TSUpdate'
}
use {'neovim/nvim-lspconfig', event = 'BufRead'}
use {
'kabouzeid/nvim-lspinstall',
config = function() require "plugins.lspinstall" end,
after = 'nvim-lspconfig'
}
use {'onsails/lspkind-nvim', after = 'nvim-lspconfig'}
use {"ray-x/lsp_signature.nvim", after = 'nvim-lspconfig'}
-- packer
use {
'ms-jpq/coq_nvim',
branch = 'coq',
event = 'InsertEnter',
config = function() require "plugins.coq" end
}
use {'ms-jpq/coq.artifacts', after = 'coq_nvim', branch = 'artifacts'}
-- formating and editing
use {"sbdchd/neoformat", cmd = "Neoformat"}
use {
"mattn/emmet-vim",
event = "FileType html,css",
setup = function() require "plugins.emmet" end
}
use {"machakann/vim-sandwich", event = "BufRead"}
use {
"terrortylor/nvim-comment",
config = function() require('nvim_comment').setup() end,
cmd = "CommentToggle"
}
-- navigation
use {
'kyazdani42/nvim-tree.lua',
cmd = 'NvimTreeToggle',
requires = 'kyazdani42/nvim-web-devicons'
}
use {
"vimwiki/vimwiki",
cmd = "VimwikiIndex",
setup = function() require "plugins.vimwiki" end
}
use {
'andymass/vim-matchup',
after = 'nvim-treesitter',
config = function() require "plugins.matchup" end
}
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/plenary.nvim'}},
cmd = 'Telescope'
}
-- eye-candy
use {
'sunjon/shade.nvim',
event = "BufAdd",
config = function() require "plugins.shade" end
}
use {
"lukas-reineke/indent-blankline.nvim",
after = {"nvim-treesitter", "nvim-base16"},
config = function() require "plugins.indent-blankline" end
}
use {
'lewis6991/gitsigns.nvim',
requires = {'nvim-lua/plenary.nvim'},
config = function() require('gitsigns').setup() end
}
end)

19
lua/plugins/base16.lua Normal file
View File

@ -0,0 +1,19 @@
require('base16-colorscheme').setup({
base00 = "#161821",
base01 = "#1e2132",
base02 = "#818596",
base03 = "#6b7089",
base04 = "#161821",
base05 = "#c6c8d1",
base06 = "#e2a478",
base07 = "#e9b189",
base08 = "#89b8c2",
base09 = "#e98989",
base0A = "#e2a478",
base0B = "#b4be82",
base0C = "#91acd1",
base0D = "#84a0c6",
base0E = "#a093c7",
base0F = "#e27878"
})

3
lua/plugins/coq.lua Normal file
View File

@ -0,0 +1,3 @@
vim.g.coq_settings = {auto_start = true, clients = {tabnine = {enabled = true}}}
local coq = require('coq')
vim.cmd('COQnow')

1
lua/plugins/emmet.lua Normal file
View File

@ -0,0 +1 @@
vim.g.emmet_html5 = 1

View File

@ -0,0 +1,9 @@
require("indent_blankline").setup {
buftype_exclude = {"terminal", "help","packer"},
indent_blankline_buftype_exclude = {"terminal"},
indentLine_enabled = 1,
indent_blankline_char = "",
show_current_context = true,
indent_blankline_show_trailing_blankline_indent = false,
indent_blankline_show_first_indent_level = false
}

View File

@ -1,60 +0,0 @@
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
-- vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', '<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<leader>fm', function()
vim.lsp.buf.format { async = true }
end, opts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<leader>ci', vim.lsp.buf.incoming_calls, opts)
vim.keymap.set('n', '<leader>co', vim.lsp.buf.outgoing_calls, opts)
vim.keymap.set('n', '<leader>gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set({ 'n', 'i' }, '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts)
end,
})
require("mason").setup { ui = { icons = { package_installed = "" } } }
require("mason-lspconfig").setup {}
-- Dynamic loading of lsp servers
require("mason-lspconfig").setup_handlers {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {}
end,
-- Next, you can provide targeted overrides for specific servers.
-- For example, a handler override for the `rust_analyzer`:
["rust_analyzer"] = function() require("rust-tools").setup {} end
}
-- customize lsp symbols
local signs = { Error = "󰅚 ", Warn = "󰀪 ", Hint = "󰌶 ", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = nil })
end

View File

@ -0,0 +1,15 @@
local function setup_servers()
require'lspinstall'.setup()
local servers = require'lspinstall'.installed_servers()
for _, server in pairs(servers) do
require'lspconfig'[server].setup{}
end
end
setup_servers()
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
require'lspinstall'.post_install_hook = function ()
setup_servers() -- reload installed servers
vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server
end

5
lua/plugins/matchup.lua Normal file
View File

@ -0,0 +1,5 @@
require'nvim-treesitter.configs'.setup {
matchup = {
enable = true -- mandatory, false will disable the whole extension
}
}

View File

@ -1,15 +0,0 @@
require("mason").setup()
require("mason-null-ls").setup({
ensure_installed = {
-- Opt to list sources here, when available in mason.
},
automatic_installation = false,
handlers = {},
})
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.code_actions.gitsigns,
}
})

View File

@ -1,87 +0,0 @@
require("luasnip.loaders.from_vscode").lazy_load()
local luasnip = require("luasnip")
local cmp = require("cmp")
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
["<C-n>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end),
["<C-p>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<C-y>'] = cmp.mapping.confirm { select = true },
['<C-l>'] = cmp.mapping(function(fallback)
if luasnip.locally_jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end, { "i", "s" }),
['<C-h>'] = cmp.mapping(function(fallback)
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
},
sources = cmp.config.sources({
{ name = "async_path" },
{ name = "luasnip" }, -- For luasnip users.
{ name = "nvim_lsp" },
{ name = 'buffer' },
{ name = 'nvim_lua' },
}),
completion = {
completeopt = 'menu,menuone,noinsert'
}
})
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
completion = {
completeopt = 'menu,menuone,noselect'
},
sources = {
{ name = 'buffer' }
},
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
completion = {
completeopt = 'menu,menuone,noselect'
},
sources = cmp.config.sources({
{ name = 'path' }
}, {
{
name = 'cmdline',
option = {
ignore_cmds = {}
}
}
})
})

7
lua/plugins/shade.lua Normal file
View File

@ -0,0 +1,7 @@
require'shade'.setup({
overlay_opacity = 50,
opacity_step = 1,
keys = {
toggle = '<Leader>s',
}
})

View File

@ -1,23 +1,16 @@
require('lualine').setup { require'lualine'.setup {
options = { options = {
icons_enabled = true, icons_enabled = true,
theme = 'auto', theme = 'iceberg_dark',
component_separators = "", component_separators = {'|', '|'},
section_separators = "", section_separators = {'', ''},
disabled_filetypes = {}
}, },
sections = { sections = {
lualine_a = {'mode'}, lualine_a = {'mode'},
lualine_b = { lualine_b = {'branch'},
'branch', lualine_c = {'filename'},
}, lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_c = {
{ 'filename', path = 1 },
'diff',
},
lualine_x = { 'encoding', 'fileformat', {
'filetype',
icon_only = true
} },
lualine_y = {'progress'}, lualine_y = {'progress'},
lualine_z = {'location'} lualine_z = {'location'}
}, },
@ -29,5 +22,6 @@ require('lualine').setup {
lualine_y = {}, lualine_y = {},
lualine_z = {} lualine_z = {}
}, },
tabline = {},
extensions = {} extensions = {}
} }

View File

@ -1 +0,0 @@
require("symbols-outline").setup(opts)

View File

@ -1,107 +1,15 @@
require("nvim-treesitter.configs").setup({ require'nvim-treesitter.configs'.setup {
ensure_installed = { ensure_installed = {"lua"}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
"lua",
"gitignore",
"gitattributes",
"gitcommit",
"git_config",
"git_rebase",
"vim",
"vimdoc",
"query"
}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
matchup = {
enable = true, -- mandatory, false will disable the whole extension
},
highlight = { highlight = {
enable = true, -- false will disable the whole extension enable = true, -- false will disable the whole extension
additional_vim_regex_highlighting = true, -- git commit, etc. -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
disable = function(lang, buf) -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
local max_filesize = 100 * 1024 -- 100 KB -- Using this option may slow down your editor, and you may see some duplicate highlights.
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) -- Instead of true it can also be a list of languages
if ok and stats and stats.size > max_filesize then additional_vim_regex_highlighting = false,
return true use_languagetree = true
end
end,
}, },
indent = { enable = true }, indent = {
textobjects = { enable = true
select = { }
enable = true, }
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
-- You can optionally set descriptions to the mappings (used in the desc parameter of
-- nvim_buf_set_keymap) which plugins like which-key display
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
-- You can also use captures from other query groups like `locals.scm`
["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
},
selection_modes = {
['@parameter.outer'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise
['@class.outer'] = '<c-v>', -- blockwise
},
-- If you set this to `true` (default is `false`) then any textobject is
-- extended to include preceding or succeeding whitespace. Succeeding
-- whitespace has priority in order to act similarly to eg the built-in
-- `ap`.
--
-- Can also be a function which gets passed a table with the keys
-- * query_string: eg '@function.inner'
-- * selection_mode: eg 'v'
-- and should return true of false
include_surrounding_whitespace = true,
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = { query = "@class.outer", desc = "Next class start" },
["]o"] = "@loop.*",
["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
["[o"] = "@loop.*",
["[z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
},
lsp_interop = {
enable = true,
border = 'none',
floating_preview_opts = {},
peek_definition_code = {
["<leader>df"] = "@function.outer",
["<leader>dF"] = "@class.outer",
},
},
},
})
local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move"
-- Repeat movement with ; and ,
-- vim way: ; goes to the direction you were moving.
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
-- Optionally, make builtin f, F, t, T also repeatable with ; and ,
vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = true })

4
lua/plugins/vimwiki.lua Normal file
View File

@ -0,0 +1,4 @@
vim.api.nvim_set_var('vimwiki_global_ext', 0)
vim.cmd([[
let g:vimwiki_list = [{'path': '~/Documents/Personal/Wiki/', 'syntax': 'markdown', 'ext': '.md'}]
]])

274
plugin/packer_compiled.lua Normal file
View File

@ -0,0 +1,274 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
_G._packer = _G._packer or {}
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/juan/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/juan/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/juan/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/juan/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/juan/.cache/nvim/packer_hererocks/2.0.5/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s))
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["coq.artifacts"] = {
load_after = {
coq_nvim = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/coq.artifacts"
},
coq_nvim = {
after = { "coq.artifacts" },
config = { "\27LJ\1\2+\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\16plugins.coq\frequire\0" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/coq_nvim"
},
["emmet-vim"] = {
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/emmet-vim"
},
["gitsigns.nvim"] = {
config = { "\27LJ\1\0026\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\rgitsigns\frequire\0" },
loaded = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/start/gitsigns.nvim"
},
["indent-blankline.nvim"] = {
config = { "\27LJ\1\0028\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\29plugins.indent-blankline\frequire\0" },
load_after = {
["nvim-base16"] = true,
["nvim-treesitter"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim"
},
["lsp_signature.nvim"] = {
load_after = {
["nvim-lspconfig"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/lsp_signature.nvim"
},
["lspkind-nvim"] = {
load_after = {
["nvim-lspconfig"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/lspkind-nvim"
},
["lualine.nvim"] = {
config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.statusline\frequire\0" },
load_after = {
["nvim-web-devicons"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/lualine.nvim"
},
neoformat = {
commands = { "Neoformat" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/neoformat"
},
["nvim-base16"] = {
after = { "indent-blankline.nvim" },
config = { "\27LJ\1\2.\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\19plugins.base16\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-base16"
},
["nvim-comment"] = {
commands = { "CommentToggle" },
config = { "\27LJ\1\2:\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\17nvim_comment\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-comment"
},
["nvim-lspconfig"] = {
after = { "lsp_signature.nvim", "lspkind-nvim", "nvim-lspinstall" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig"
},
["nvim-lspinstall"] = {
config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.lspinstall\frequire\0" },
load_after = {
["nvim-lspconfig"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-lspinstall"
},
["nvim-tree.lua"] = {
commands = { "NvimTreeToggle" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-tree.lua"
},
["nvim-treesitter"] = {
after = { "indent-blankline.nvim", "vim-matchup" },
config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins.treesitter\frequire\0" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-treesitter"
},
["nvim-web-devicons"] = {
after = { "lualine.nvim" },
load_after = {
["packer.nvim"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons"
},
["packer.nvim"] = {
after = { "nvim-web-devicons" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/start/plenary.nvim"
},
["shade.nvim"] = {
config = { "\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins.shade\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/shade.nvim"
},
["telescope.nvim"] = {
commands = { "Telescope" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/telescope.nvim"
},
["vim-matchup"] = {
after_files = { "/home/juan/.local/share/nvim/site/pack/packer/opt/vim-matchup/after/plugin/matchit.vim" },
config = { "\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins.matchup\frequire\0" },
load_after = {
["nvim-treesitter"] = true
},
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/vim-matchup"
},
["vim-sandwich"] = {
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/vim-sandwich"
},
vimwiki = {
commands = { "VimwikiIndex" },
loaded = false,
needs_bufread = true,
path = "/home/juan/.local/share/nvim/site/pack/packer/opt/vimwiki"
}
}
time([[Defining packer_plugins]], false)
-- Setup for: emmet-vim
time([[Setup for emmet-vim]], true)
try_loadstring("\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins.emmet\frequire\0", "setup", "emmet-vim")
time([[Setup for emmet-vim]], false)
-- Setup for: vimwiki
time([[Setup for vimwiki]], true)
try_loadstring("\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins.vimwiki\frequire\0", "setup", "vimwiki")
time([[Setup for vimwiki]], false)
-- Config for: gitsigns.nvim
time([[Config for gitsigns.nvim]], true)
try_loadstring("\27LJ\1\0026\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\rgitsigns\frequire\0", "config", "gitsigns.nvim")
time([[Config for gitsigns.nvim]], false)
-- Command lazy-loads
time([[Defining lazy-load commands]], true)
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neoformat lua require("packer.load")({'neoformat'}, { cmd = "Neoformat", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Telescope lua require("packer.load")({'telescope.nvim'}, { cmd = "Telescope", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeToggle lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file VimwikiIndex lua require("packer.load")({'vimwiki'}, { cmd = "VimwikiIndex", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file CommentToggle lua require("packer.load")({'nvim-comment'}, { cmd = "CommentToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]])
time([[Defining lazy-load commands]], false)
vim.cmd [[augroup packer_load_aucmds]]
vim.cmd [[au!]]
-- Event lazy-loads
time([[Defining lazy-load event autocommands]], true)
vim.cmd [[au BufRead * ++once lua require("packer.load")({'nvim-treesitter', 'vim-sandwich', 'nvim-lspconfig'}, { event = "BufRead *" }, _G.packer_plugins)]]
vim.cmd [[au FileType html,css ++once lua require("packer.load")({'emmet-vim'}, { event = "FileType html,css" }, _G.packer_plugins)]]
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'packer.nvim', 'nvim-base16'}, { event = "VimEnter *" }, _G.packer_plugins)]]
vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'coq_nvim'}, { event = "InsertEnter *" }, _G.packer_plugins)]]
vim.cmd [[au BufAdd * ++once lua require("packer.load")({'shade.nvim'}, { event = "BufAdd *" }, _G.packer_plugins)]]
time([[Defining lazy-load event autocommands]], false)
vim.cmd("augroup END")
if should_profile then save_profiles() end
end)
if not no_errors then
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end

5
restore.sh Executable file
View File

@ -0,0 +1,5 @@
mv nvim nvim.new
mv nvim.bak nvim
mv /home/juan/.local/share/nvim/site/pack /home/juan/.local/share/nvim/site/pack.new
mv /home/juan/.local/share/nvim/site/pack.bak /home/juan/.local/share/nvim/site/pack

View File

@ -1,20 +0,0 @@
Backend
GL
HDR
HiDPI
Inferrence
Nvidia
TODO
XWayland
args
ascii
backend
config
configs
elster
shiftwidth
tty
tw
udev
v1
winit

Binary file not shown.

12
test.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ~/.config/
mv nvim nvim.bak
mv nvim.new nvim
mv /home/juan/.local/share/nvim/site/pack /home/juan/.local/share/nvim/site/pack.bak
mv /home/juan/.local/share/nvim/site/pack.new /home/juan/.local/share/nvim/site/pack
# nvim
# mv nvim nvim.new
# mv nvim.bak nvim
# mv /home/juan/.local/share/nvim/site/pack /home/juan/.local/share/nvim/site/pack.new
# mv /home/juan/.local/share/nvim/site/pack.bak /home/juan/.local/share/nvim/site/pack