nvim rework
This commit is contained in:
parent
2420c048b2
commit
a58b47b917
49 changed files with 1359 additions and 802 deletions
.config/nvim
TODOinit.lua
lua
config
funcs.luapluginlist.luaplugins
config
alpha.luaautopairs.luabufferline.luacmp.luacomment.luadap.luadapui.luagitsigns.luailluminate.luaimpatient.luaindent-blankline.lualspconfig.lualualine.lualuasnip.luamason-lspconfig.luamason.luanull-ls.luanvim-colorizer.luanvim-tree.luaproject.luatelescope.luatodo-comments.luatoggleterm.luatokyonight.luatreesitter.luawhichkey.lua
init.luauser
plugin
2
.config/nvim/TODO
Normal file
2
.config/nvim/TODO
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
port telescope theme from nvchad
|
||||||
|
test your dumbass keybind function
|
|
@ -1,24 +1,4 @@
|
||||||
require 'user.plugins'
|
require('config.options')
|
||||||
require 'user.keymaps'
|
require('plugins')
|
||||||
require 'user.options'
|
require('funcs').autocmd(require('config.autocmdlist'))
|
||||||
require 'user.autocmds'
|
require('funcs').map('general')
|
||||||
require 'user.theme'
|
|
||||||
require 'user.cmp'
|
|
||||||
require 'user.plugins.telescope'
|
|
||||||
require 'user.plugins.whichkey'
|
|
||||||
require 'user.plugins.gitsigns'
|
|
||||||
require 'user.plugins.treesitter'
|
|
||||||
require 'user.plugins.autopairs'
|
|
||||||
require 'user.plugins.comment'
|
|
||||||
require 'user.plugins.nvim-tree'
|
|
||||||
require 'user.plugins.bufferline'
|
|
||||||
require 'user.plugins.lualine'
|
|
||||||
require 'user.plugins.toggleterm'
|
|
||||||
require 'user.plugins.project'
|
|
||||||
require 'user.plugins.impatient'
|
|
||||||
require 'user.plugins.illuminate'
|
|
||||||
require 'user.plugins.indentline'
|
|
||||||
require 'user.plugins.alpha'
|
|
||||||
require 'user.plugins.nvim-colorizer'
|
|
||||||
require 'user.plugins.todo-comments'
|
|
||||||
require 'user.adapters'
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ return {
|
||||||
LineMiddle = "│",
|
LineMiddle = "│",
|
||||||
List = "",
|
List = "",
|
||||||
Lock = "",
|
Lock = "",
|
||||||
|
MinusCircle = "",
|
||||||
NewFile = "",
|
NewFile = "",
|
||||||
Note = "",
|
Note = "",
|
||||||
Package = "",
|
Package = "",
|
|
@ -1,124 +1,66 @@
|
||||||
local kbopts = { silent = true, noremap = true }
|
local M = {}
|
||||||
|
M.maps = {
|
||||||
return {
|
general = {
|
||||||
kb = {
|
n = { -- normal mode
|
||||||
['n'] = { -- normal mode
|
|
||||||
-- Better window navigation
|
-- Better window navigation
|
||||||
{"<C-h>", "<C-w>h", kbopts},
|
{"<C-h>", "<C-w>h"},
|
||||||
{"<C-j>", "<C-w>j", kbopts},
|
{"<C-j>", "<C-w>j"},
|
||||||
{"<C-k>", "<C-w>k", kbopts},
|
{"<C-k>", "<C-w>k"},
|
||||||
{"<C-l>", "<C-w>l", kbopts},
|
{"<C-l>", "<C-w>l"},
|
||||||
-- Resize with arrows
|
-- Resize with arrows
|
||||||
{"<C-Up>", ":resize -2<CR>", kbopts},
|
{"<C-Up>", ":resize -2<CR>"},
|
||||||
{"<C-Down>", ":resize +2<CR>", kbopts},
|
{"<C-Down>", ":resize +2<CR>"},
|
||||||
{"<C-Left>", ":vertical resize -2<CR>", kbopts},
|
{"<C-Left>", ":vertical resize -2<CR>"},
|
||||||
{"<C-Right>", ":vertical resize +2<CR>", kbopts},
|
{"<C-Right>", ":vertical resize +2<CR>"},
|
||||||
-- Navigate buffers
|
-- Navigate buffers
|
||||||
{"<S-l>", ":bnext<CR>", kbopts},
|
{"<TAB>", ":bnext<CR>"},
|
||||||
{"<S-h>", ":bprevious<CR>", kbopts},
|
{"<S-TAB>", ":bprevious<CR>"},
|
||||||
-- LSP
|
-- LSP
|
||||||
{"gD", "<cmd>lua vim.lsp.buf.declaration()", kbopts},
|
{"gD", "<cmd>lua vim.lsp.buf.declaration()<CR>"},
|
||||||
{"gd", "<cmd>lua vim.lsp.buf.definition()", kbopts},
|
{"gd", "<cmd>lua vim.lsp.buf.definition()<CR>"},
|
||||||
{"K", "<cmd>lua vim.lsp.buf.hover()", kbopts},
|
{"K", "<cmd>lua vim.lsp.buf.hover()<CR>"},
|
||||||
{"gI", "<cmd>lua vim.lsp.buf.implementation()", kbopts},
|
{"gI", "<cmd>lua vim.lsp.buf.implementation()<CR>"},
|
||||||
{"gr", "<cmd>lua vim.lsp.buf.references()", kbopts},
|
{"gr", "<cmd>lua vim.lsp.buf.references()<CR>"},
|
||||||
{"gl", "<cmd>lua vim.diagnostic.open_float()", kbopts},
|
{"gl", "<cmd>lua vim.diagnostic.open_float()<CR>"},
|
||||||
-- Illuminate
|
|
||||||
{'<a-n>', "<cmd>lua require('illuminate').next_reference{wrap=true}", kbopts},
|
|
||||||
{'<a-p>', "<cmd>lua require('illuminate').next_reference{reverse=true,wrap=true}", kbopts},
|
|
||||||
},
|
},
|
||||||
['i'] = { -- insert mode
|
i = { -- insert mode
|
||||||
-- Delete last word with ctrl + del
|
-- Delete last word with ctrl + del
|
||||||
{"<C-BS>", "<C-W>", kbopts},
|
{"<C-BS>", "<C-W>"},
|
||||||
},
|
},
|
||||||
['v'] = { -- visual mode
|
v = { -- visual mode
|
||||||
-- Better paste
|
-- Better paste
|
||||||
{"p", '"_dP', kbopts},
|
{"p", '"_dP'},
|
||||||
-- Stay in indent mode
|
-- Stay in indent mode
|
||||||
{"<", "<gv", kbopts},
|
{"<", "<gv"},
|
||||||
{">", ">gv", kbopts},
|
{">", ">gv"},
|
||||||
},
|
|
||||||
['x'] = { -- visual block mode
|
|
||||||
},
|
|
||||||
['t'] = { -- terminal mode
|
|
||||||
},
|
|
||||||
['c'] = { -- command mode
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
wk = {
|
illuminate = {
|
||||||
vopts = {
|
n = {
|
||||||
mode = "n",
|
{"<a-n>", "<cmd>lua require('illuminate').next_reference{wrap=true}<CR>"},
|
||||||
prefix = "<leader>",
|
{"<a-p>", "<cmd>lua require('illuminate').next_reference{reverse=true,wrap=true}<CR>"},
|
||||||
buffer = nil,
|
}
|
||||||
silent = true,
|
},
|
||||||
noremap = true,
|
toggleterm = {
|
||||||
nowait = true,
|
t = {
|
||||||
},
|
{"<C-h>", [[<C-\><C-n><C-W>h]]},
|
||||||
nopts = {
|
{"<C-j>", [[<C-\><C-n><C-W>j]]},
|
||||||
mode = "n",
|
{"<C-k>", [[<C-\><C-n><C-W>k]]},
|
||||||
prefix = "<leader>",
|
{"<C-l>", [[<C-\><C-n><C-W>l]]},
|
||||||
buffer = nil,
|
}
|
||||||
silent = true,
|
}
|
||||||
noremap = true,
|
}
|
||||||
nowait = true,
|
|
||||||
},
|
M.whichkey = {
|
||||||
vmaps = {
|
general = {
|
||||||
["/"] = { "<Plug>(comment_toggle_linewise_visual)", "Comment toggle linewise (visual)" },
|
n = {
|
||||||
},
|
|
||||||
nmaps = {
|
|
||||||
[";"] = { "<cmd>Alpha<CR>", "Dashboard" },
|
|
||||||
["/"] = { "<Plug>(comment_toggle_linewise_current)", "Comment toggle current line" },
|
|
||||||
["w"] = { "<cmd>w!<CR>", "Save" },
|
["w"] = { "<cmd>w!<CR>", "Save" },
|
||||||
["c"] = { function() require("user.funcs").buf_kill() end, "Close" },
|
["q"] = { function() require("funcs").buf_kill() end, "Close" },
|
||||||
-- TODO: filepicker ["f"] = {},
|
-- TODO: filepicker ["f"] = {},
|
||||||
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
||||||
["e"] = { "<cmd>NvimTreeToggle<CR>", "Toggle Filetree" },
|
|
||||||
b = {
|
|
||||||
name = "Buffers",
|
|
||||||
j = { "<cmd>BufferLinePick<cr>", "Jump" },
|
|
||||||
f = { "<cmd>Telescope buffers<cr>", "Find" },
|
|
||||||
b = { "<cmd>BufferLineCyclePrev<cr>", "Previous" },
|
|
||||||
n = { "<cmd>BufferLineCycleNext<cr>", "Next" },
|
|
||||||
e = { "<cmd>BufferLinePickClose<cr>", "Pick which buffer to close" },
|
|
||||||
h = { "<cmd>BufferLineCloseLeft<cr>", "Close all to the left" },
|
|
||||||
l = { "<cmd>BufferLineCloseRight<cr>", "Close all to the right" },
|
|
||||||
D = { "<cmd>BufferLineSortByDirectory<cr>", "Sort by directory" },
|
|
||||||
L = { "<cmd>BufferLineSortByExtension<cr>", "Sort by language" },
|
|
||||||
},
|
|
||||||
p = {
|
|
||||||
name = "Packer",
|
|
||||||
c = { "<cmd>PackerCompile<cr>", "Compile" },
|
|
||||||
i = { "<cmd>PackerInstall<cr>", "Install" },
|
|
||||||
s = { "<cmd>PackerSync<cr>", "Sync" },
|
|
||||||
S = { "<cmd>PackerStatus<cr>", "Status" },
|
|
||||||
u = { "<cmd>PackerUpdate<cr>", "Update" },
|
|
||||||
},
|
|
||||||
t = {
|
|
||||||
name = "Todo Comments",
|
|
||||||
j = { function() require("todo-comments").jump_next() end, "Next Comment" },
|
|
||||||
k = { function() require("todo-comments").jump_prev() end, "Previous Comment" },
|
|
||||||
},
|
|
||||||
g = {
|
|
||||||
name = "Git",
|
|
||||||
j = { function() require("gitsigns").next_hunk() end, "Next Hunk" },
|
|
||||||
k = { function() require("gitsigns").prev_hunk() end, "Prev Hunk" },
|
|
||||||
l = { function() require("gitsigns").blame_line() end, "Blame" },
|
|
||||||
p = { function() require("gitsigns").preview_hunk() end, "Preview Hunk" },
|
|
||||||
r = { function() require("gitsigns").reset_hunk() end, "Reset Hunk" },
|
|
||||||
R = { function() require("gitsigns").reset_buffer() end, "Reset Buffer" },
|
|
||||||
s = { function() require("gitsigns").stage_hunk() end, "Stage Hunk" },
|
|
||||||
u = { function() require("gitsigns").undo_stage_hunk() end, "Undo Stage Hunk" },
|
|
||||||
o = { "<cmd>Telescope git_status<cr>", "Open changed file" },
|
|
||||||
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
|
|
||||||
c = { "<cmd>Telescope git_commits<cr>", "Checkout commit" },
|
|
||||||
C = { "<cmd>Telescope git_bcommits<cr>", "Checkout commit(for current file)" },
|
|
||||||
d = { "<cmd>Gitsigns diffthis HEAD<cr>", "Git Diff" },
|
|
||||||
},
|
|
||||||
l = {
|
l = {
|
||||||
name = "LSP",
|
name = "LSP",
|
||||||
a = { function() vim.lsp.buf.code_action() end, "Code Action" },
|
a = { function() vim.lsp.buf.code_action() end, "Code Action" },
|
||||||
d = { "<cmd>Telescope diagnostics bufnr=0 theme=get_ivy<cr>", "Buffer Diagnostics" },
|
|
||||||
w = { "<cmd>Telescope diagnostics<cr>", "Diagnostics" },
|
|
||||||
f = { function() vim.lsp.buf.format{ async = true }() end, "Format" },
|
f = { function() vim.lsp.buf.format{ async = true }() end, "Format" },
|
||||||
i = { "<cmd>LspInfo<cr>", "Info" },
|
i = { "<cmd>LspInfo<cr>", "Info" },
|
||||||
I = { "<cmd>Mason<cr>", "Mason Info" },
|
I = { "<cmd>Mason<cr>", "Mason Info" },
|
||||||
|
@ -127,26 +69,46 @@ return {
|
||||||
l = { function() vim.lsp.codelens.run() end, "CodeLens Action" },
|
l = { function() vim.lsp.codelens.run() end, "CodeLens Action" },
|
||||||
q = { function() vim.diagnostic.setloclist() end, "Quickfix" },
|
q = { function() vim.diagnostic.setloclist() end, "Quickfix" },
|
||||||
r = { function() vim.lsp.buf.rename() end, "Rename" },
|
r = { function() vim.lsp.buf.rename() end, "Rename" },
|
||||||
s = { "<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols" },
|
|
||||||
S = { "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", "Workspace Symbols" },
|
|
||||||
e = { "<cmd>Telescope quickfix<cr>", "Telescope Quickfix" },
|
|
||||||
},
|
},
|
||||||
d = {
|
d = {
|
||||||
name = "DAP",
|
name = "DAP",
|
||||||
b = { function() require('dap').toggle_breakpoint() end, "Toggle Breakpoint"},
|
b = { function() require("dap").toggle_breakpoint() end, "Toggle Breakpoint"},
|
||||||
c = { function() require('dap').continue() end, "Continue"},
|
c = { function() require("dap").continue() end, "Continue"},
|
||||||
i = { function() require('dap').step_into() end, "Step Into"},
|
i = { function() require("dap").step_into() end, "Step Into"},
|
||||||
o = { function() require('dap').step_over() end, "Step Over"},
|
o = { function() require("dap").step_over() end, "Step Over"},
|
||||||
O = { function() require('dap').step_out() end, "Step Out"},
|
O = { function() require("dap").step_out() end, "Step Out"},
|
||||||
r = { function() require('dap').repl.toggle() end, "Toggle REPL"},
|
r = { function() require("dap").repl.toggle() end, "Toggle REPL"},
|
||||||
l = { function() require('dap').run_last() end, "Run Last"},
|
l = { function() require("dap").run_last() end, "Run Last"},
|
||||||
u = { function() require('dapui').toggle() end, "Toggle DAP UI"},
|
t = { function() require("dap").terminate() end, "Stop Debugger"},
|
||||||
t = { function() require('dap').terminate() end, "Stop Debugger"},
|
u = { function() require("dapui").toggle() end, "Toggle DAP UI"},
|
||||||
},
|
},
|
||||||
u = {
|
u = {
|
||||||
name = "Utility",
|
name = "Utility",
|
||||||
c = { "<cmd>w!<CR><cmd>!compiler \"%:p\"<CR>", "Compile" },
|
c = { "<cmd>w!<CR><cmd>!compiler \"%:p\"<CR>", "Compile" },
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
telescope = {
|
||||||
|
n = {
|
||||||
|
b = {
|
||||||
|
name = "Buffers",
|
||||||
|
f = { "<cmd>Telescope buffers<CR>", "Find" },
|
||||||
|
},
|
||||||
|
g = {
|
||||||
|
name = "Git",
|
||||||
|
o = { "<cmd>Telescope git_status<cr>", "Open changed file" },
|
||||||
|
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
|
||||||
|
c = { "<cmd>Telescope git_commits<cr>", "Checkout commit" },
|
||||||
|
C = { "<cmd>Telescope git_bcommits<cr>", "Checkout commit(for current file)" },
|
||||||
|
},
|
||||||
|
l = {
|
||||||
|
name = "LSP",
|
||||||
|
d = { "<cmd>Telescope diagnostics bufnr=0 theme=get_ivy<cr>", "Buffer Diagnostics" },
|
||||||
|
w = { "<cmd>Telescope diagnostics<cr>", "Diagnostics" },
|
||||||
|
s = { "<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols" },
|
||||||
|
S = { "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", "Workspace Symbols" },
|
||||||
|
e = { "<cmd>Telescope quickfix<cr>", "Telescope Quickfix" },
|
||||||
|
},
|
||||||
s = {
|
s = {
|
||||||
name = "Search",
|
name = "Search",
|
||||||
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
|
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
|
||||||
|
@ -160,11 +122,104 @@ return {
|
||||||
t = { "<cmd>Telescope live_grep<cr>", "Text" },
|
t = { "<cmd>Telescope live_grep<cr>", "Text" },
|
||||||
k = { "<cmd>Telescope keymaps<cr>", "Keymaps" },
|
k = { "<cmd>Telescope keymaps<cr>", "Keymaps" },
|
||||||
C = { "<cmd>Telescope commands<cr>", "Commands" },
|
C = { "<cmd>Telescope commands<cr>", "Commands" },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
blankline = {
|
||||||
|
n ={
|
||||||
|
["c"] = {
|
||||||
|
function()
|
||||||
|
local ok, start = require("indent_blankline.utils").get_current_context(
|
||||||
|
vim.g.indent_blankline_context_patterns,
|
||||||
|
vim.g.indent_blankline_use_treesitter_scope
|
||||||
|
)
|
||||||
|
if ok then
|
||||||
|
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
|
||||||
|
vim.cmd [[normal! _]]
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
"Jump to current_context",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
bufferline = {
|
||||||
|
n = {
|
||||||
|
b = {
|
||||||
|
name = "Buffers",
|
||||||
|
j = { "<cmd>BufferLinePick<CR>", "Jump" },
|
||||||
|
b = { "<cmd>BufferLineCyclePrev<CR>", "Previous" },
|
||||||
|
n = { "<cmd>BufferLineCycleNext<CR>", "Next" },
|
||||||
|
e = { "<cmd>BufferLinePickClose<CR>", "Pick which buffer to close" },
|
||||||
|
h = { "<cmd>BufferLineCloseLeft<CR>", "Close all to the left" },
|
||||||
|
l = { "<cmd>BufferLineCloseRight<CR>", "Close all to the right" },
|
||||||
|
D = { "<cmd>BufferLineSortByDirectory<CR>", "Sort by directory" },
|
||||||
|
L = { "<cmd>BufferLineSortByExtension<CR>", "Sort by language" },
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
packer = {
|
||||||
|
n = {
|
||||||
|
p = {
|
||||||
|
name = "Packer",
|
||||||
|
c = { function() require('packer').Compile() end, "Compile" },
|
||||||
|
i = { function() require('packer').Install() end, "Install" },
|
||||||
|
s = { function() require('packer').Sync() end, "Sync" },
|
||||||
|
S = { function() require('packer').Status() end, "Status" },
|
||||||
|
u = { function() require('packer').Update() end, "Update" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nvimtree = {
|
||||||
|
n = {
|
||||||
|
["e"] = { "<cmd>NvimTreeToggle<CR>", "Toggle Filetree" },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
alpha = {
|
||||||
|
n = {
|
||||||
|
[";"] = { "<cmd>Alpha<CR>", "Dashboard" },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
treesitter = {
|
||||||
|
n = {
|
||||||
T = {
|
T = {
|
||||||
name = "Treesitter",
|
name = "Treesitter",
|
||||||
i = { "<cmd>TSConfigInfo<cr>", "Info" },
|
i = { "<cmd>TSConfigInfo<cr>", "Info" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
comment = {
|
||||||
|
v = {
|
||||||
|
["/"] = { "<Plug>(comment_toggle_linewise_visual)", "Comment toggle linewise" },
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["/"] = { "<Plug>(comment_toggle_linewise_current)", "Comment toggle current line" },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
todo = {
|
||||||
|
n = {
|
||||||
|
t = {
|
||||||
|
name = "Todo Comments",
|
||||||
|
j = { function() require("todo-comments").jump_next() end, "Next Comment" },
|
||||||
|
k = { function() require("todo-comments").jump_prev() end, "Previous Comment" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gitsigns = {
|
||||||
|
n = {
|
||||||
|
g = {
|
||||||
|
name = "Git",
|
||||||
|
j = { function() require("gitsigns").next_hunk() end, "Next Hunk" },
|
||||||
|
k = { function() require("gitsigns").prev_hunk() end, "Prev Hunk" },
|
||||||
|
l = { function() require("gitsigns").blame_line() end, "Blame" },
|
||||||
|
p = { function() require("gitsigns").preview_hunk() end, "Preview Hunk" },
|
||||||
|
r = { function() require("gitsigns").reset_hunk() end, "Reset Hunk" },
|
||||||
|
R = { function() require("gitsigns").reset_buffer() end, "Reset Buffer" },
|
||||||
|
s = { function() require("gitsigns").stage_hunk() end, "Stage Hunk" },
|
||||||
|
u = { function() require("gitsigns").undo_stage_hunk() end, "Undo Stage Hunk" },
|
||||||
|
d = { "<cmd>Gitsigns diffthis HEAD<cr>", "Git Diff" },
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return M
|
26
.config/nvim/lua/config/lsp.lua
Normal file
26
.config/nvim/lua/config/lsp.lua
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
return {
|
||||||
|
["sumneko_lua"] = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = {
|
||||||
|
globals = { "vim" },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
library = {
|
||||||
|
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
|
||||||
|
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
telemetry = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
maxPreload = 100000,
|
||||||
|
preloadFileSize = 10000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["bashls"] = {
|
||||||
|
},
|
||||||
|
["clangd"] = {
|
||||||
|
},
|
||||||
|
}
|
39
.config/nvim/lua/config/options.lua
Normal file
39
.config/nvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
local o = vim.opt
|
||||||
|
local g = vim.g
|
||||||
|
|
||||||
|
o.undodir = vim.fn.stdpath "cache" .. "/undo"
|
||||||
|
o.clipboard = "unnamedplus"
|
||||||
|
o.conceallevel = 0
|
||||||
|
o.numberwidth = 3
|
||||||
|
o.hlsearch = true
|
||||||
|
o.ignorecase = true
|
||||||
|
o.showmode = false
|
||||||
|
o.smartindent = true
|
||||||
|
o.splitbelow = true
|
||||||
|
o.splitbelow = true
|
||||||
|
o.splitbelow = true
|
||||||
|
o.updatetime = 250
|
||||||
|
o.writebackup = false
|
||||||
|
o.expandtab = true
|
||||||
|
o.shiftwidth = 2
|
||||||
|
o.tabstop = 2
|
||||||
|
o.cursorline = true
|
||||||
|
o.signcolumn = "yes"
|
||||||
|
o.wrap = false
|
||||||
|
o.scrolloff = 8
|
||||||
|
o.sidescrolloff = 8
|
||||||
|
o.undofile = true
|
||||||
|
o.title = true
|
||||||
|
o.titlestring = " %t"
|
||||||
|
o.termguicolors = true
|
||||||
|
o.timeoutlen = 500
|
||||||
|
o.foldmethod = "expr"
|
||||||
|
o.foldlevelstart = 99
|
||||||
|
o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
o.number = true
|
||||||
|
o.relativenumber = true
|
||||||
|
o.laststatus = 3
|
||||||
|
o.completeopt = "menu,menuone,noselect"
|
||||||
|
|
||||||
|
g.Illuminate_ftblacklist = {'alpha', 'NvimTree'}
|
||||||
|
g.mapleader = ' '
|
184
.config/nvim/lua/funcs.lua
Normal file
184
.config/nvim/lua/funcs.lua
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.autocmd(list)
|
||||||
|
vim.api.nvim_create_augroup('packer_user_config', {clear = true})
|
||||||
|
|
||||||
|
for _, entry in ipairs(list) do
|
||||||
|
local event = entry[1]
|
||||||
|
local opts = entry[2]
|
||||||
|
if type(opts.group) == "string" and opts.group ~= "" then
|
||||||
|
local exists, _ = pcall(vim.api.nvim_get_autocmds, { group = opts.group })
|
||||||
|
if not exists then
|
||||||
|
vim.api.nvim_create_augroup(opts.group, {})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.api.nvim_create_autocmd(event, opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.lazy_load(tb)
|
||||||
|
vim.api.nvim_create_autocmd(tb.events, {
|
||||||
|
group = vim.api.nvim_create_augroup(tb.augroup_name, {}),
|
||||||
|
callback = function()
|
||||||
|
if tb.condition() then
|
||||||
|
vim.api.nvim_del_augroup_by_name(tb.augroup_name)
|
||||||
|
-- dont defer for treesitter as it will show slow highlighting
|
||||||
|
-- This deferring only happens only when we do "nvim filename"
|
||||||
|
if tb.plugin ~= "nvim-treesitter" then
|
||||||
|
vim.defer_fn(function()
|
||||||
|
require("packer").loader(tb.plugin)
|
||||||
|
if tb.plugin == "nvim-lspconfig" then
|
||||||
|
vim.cmd "silent! do FileType"
|
||||||
|
end
|
||||||
|
end, 0)
|
||||||
|
else
|
||||||
|
require("packer").loader(tb.plugin)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.gitsigns()
|
||||||
|
vim.api.nvim_create_autocmd({ "BufRead" }, {
|
||||||
|
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h")
|
||||||
|
if vim.v.shell_error == 0 then
|
||||||
|
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
|
||||||
|
vim.schedule(function()
|
||||||
|
require("packer").loader "gitsigns.nvim"
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.on_file_open(plugin_name)
|
||||||
|
M.lazy_load {
|
||||||
|
events = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||||
|
augroup_name = "BeLazyOnFileOpen" .. plugin_name,
|
||||||
|
plugin = plugin_name,
|
||||||
|
condition = function()
|
||||||
|
local file = vim.fn.expand "%"
|
||||||
|
return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= ""
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.bootstrap()
|
||||||
|
local fn = vim.fn
|
||||||
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
|
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.map(section)
|
||||||
|
local maps = require('config.keymaplist').maps[section]
|
||||||
|
if maps then
|
||||||
|
for mode, binds in pairs(maps) do
|
||||||
|
for _, bind in pairs(binds) do
|
||||||
|
local key = bind[1]
|
||||||
|
local cmd = bind[2]
|
||||||
|
local opt = { silent = true, noremap = true }
|
||||||
|
vim.api.nvim_set_keymap(mode, key, cmd, opt)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local wk_ok, whichkey = pcall(require, 'which-key')
|
||||||
|
local wkopts = {
|
||||||
|
mode = "",
|
||||||
|
prefix = "<leader>",
|
||||||
|
buffer = nil,
|
||||||
|
silent = true,
|
||||||
|
noremap = true,
|
||||||
|
nowait = true,
|
||||||
|
}
|
||||||
|
if wk_ok then
|
||||||
|
local wkmaps = require('config.keymaplist').whichkey[section]
|
||||||
|
if wkmaps then
|
||||||
|
for mode, binds in pairs(wkmaps) do
|
||||||
|
wkopts.mode = mode
|
||||||
|
whichkey.register(binds, wkopts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Modified version of a function stolen from LunarVim
|
||||||
|
function M.buf_kill(kill_command, bufnr, force)
|
||||||
|
kill_command = kill_command or "bd"
|
||||||
|
|
||||||
|
local bo = vim.bo
|
||||||
|
local api = vim.api
|
||||||
|
local fmt = string.format
|
||||||
|
local fnamemodify = vim.fn.fnamemodify
|
||||||
|
|
||||||
|
if bufnr == 0 or bufnr == nil then
|
||||||
|
bufnr = api.nvim_get_current_buf()
|
||||||
|
end
|
||||||
|
|
||||||
|
local bufname = api.nvim_buf_get_name(bufnr)
|
||||||
|
|
||||||
|
if not force then
|
||||||
|
local warning
|
||||||
|
if bo[bufnr].modified then
|
||||||
|
warning = fmt([[No write since last change for (%s)]], fnamemodify(bufname, ":t"))
|
||||||
|
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then
|
||||||
|
warning = fmt([[Terminal %s will be killed]], bufname)
|
||||||
|
end
|
||||||
|
if warning then
|
||||||
|
vim.ui.input({
|
||||||
|
prompt = string.format([[%s. Close it anyway? [y]es or [n]o (default: no): ]], warning),
|
||||||
|
}, function(choice)
|
||||||
|
if choice:match "ye?s?" then force = true end
|
||||||
|
end)
|
||||||
|
if not force then return end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get list of windows IDs with the buffer to close
|
||||||
|
local windows = vim.tbl_filter(function(win)
|
||||||
|
return api.nvim_win_get_buf(win) == bufnr
|
||||||
|
end, api.nvim_list_wins())
|
||||||
|
|
||||||
|
if #windows == 0 then return end
|
||||||
|
|
||||||
|
if force then
|
||||||
|
kill_command = kill_command .. "!"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get list of active buffers
|
||||||
|
local buffers = vim.tbl_filter(function(buf)
|
||||||
|
return api.nvim_buf_is_valid(buf) and bo[buf].buflisted
|
||||||
|
end, api.nvim_list_bufs())
|
||||||
|
|
||||||
|
-- If there is only one buffer (which has to be the current one), vim will
|
||||||
|
-- create a new buffer on :bd.
|
||||||
|
-- For more than one buffer, pick the previous buffer (wrapping around if necessary)
|
||||||
|
if #buffers > 1 then
|
||||||
|
for i, v in ipairs(buffers) do
|
||||||
|
if v == bufnr then
|
||||||
|
local prev_buf_idx = i == 1 and (#buffers - 1) or (i - 1)
|
||||||
|
local prev_buffer = buffers[prev_buf_idx]
|
||||||
|
for _, win in ipairs(windows) do
|
||||||
|
api.nvim_win_set_buf(win, prev_buffer)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
vim.cmd('q!')
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Check if buffer still exists, to ensure the target buffer wasn't killed
|
||||||
|
-- due to options like bufhidden=wipe.
|
||||||
|
if api.nvim_buf_is_valid(bufnr) and bo[bufnr].buflisted then
|
||||||
|
vim.cmd(string.format("%s %d", kill_command, bufnr))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -1,55 +0,0 @@
|
||||||
return {
|
|
||||||
-- General Functionality
|
|
||||||
'wbthomason/packer.nvim',
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
'numToStr/Comment.nvim',
|
|
||||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
|
||||||
'kyazdani42/nvim-web-devicons',
|
|
||||||
'kyazdani42/nvim-tree.lua',
|
|
||||||
'akinsho/bufferline.nvim',
|
|
||||||
'moll/vim-bbye',
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
'akinsho/toggleterm.nvim',
|
|
||||||
'ahmedkhalf/project.nvim',
|
|
||||||
'lewis6991/impatient.nvim',
|
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
|
||||||
'goolord/alpha-nvim',
|
|
||||||
'RRethy/vim-illuminate',
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
'folke/lua-dev.nvim',
|
|
||||||
'tpope/vim-surround',
|
|
||||||
'tpope/vim-repeat',
|
|
||||||
'norcalli/nvim-colorizer.lua',
|
|
||||||
'vimwiki/vimwiki',
|
|
||||||
'folke/which-key.nvim',
|
|
||||||
'felipec/vim-sanegx',
|
|
||||||
'sindrets/diffview.nvim',
|
|
||||||
'folke/todo-comments.nvim',
|
|
||||||
'felipec/vim-sanegx',
|
|
||||||
'norcalli/nvim-colorizer.lua',
|
|
||||||
'fladson/vim-kitty',
|
|
||||||
'tpope/vim-surround',
|
|
||||||
'tpope/vim-repeat',
|
|
||||||
-- Color Schemes,
|
|
||||||
'folke/tokyonight.nvim',
|
|
||||||
-- Completion,
|
|
||||||
'hrsh7th/nvim-cmp',
|
|
||||||
'hrsh7th/cmp-buffer',
|
|
||||||
'hrsh7th/cmp-path',
|
|
||||||
'saadparwaiz1/cmp_luasnip',
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
'hrsh7th/cmp-nvim-lua',
|
|
||||||
-- Snippets,
|
|
||||||
'L3MON4D3/LuaSnip',
|
|
||||||
'rafamadriz/friendly-snippets',
|
|
||||||
-- LSP/DAP,
|
|
||||||
'williamboman/mason.nvim',
|
|
||||||
'jose-elias-alvarez/null-ls.nvim',
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
'williamboman/mason-lspconfig.nvim',
|
|
||||||
'mfussenegger/nvim-dap',
|
|
||||||
'rcarriga/nvim-dap-ui',
|
|
||||||
}
|
|
|
@ -1,10 +1,10 @@
|
||||||
local status_ok, alpha = pcall(require, "alpha")
|
local status_ok, alpha = pcall(require, 'alpha')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local dashboard = require 'alpha.themes.dashboard'
|
local dashboard = require 'alpha.themes.dashboard'
|
||||||
local icons = require 'iconlist'
|
local icons = require 'config.iconlist'
|
||||||
|
|
||||||
local banner = {
|
local banner = {
|
||||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⣿⣷⣶⣤⡀⠀⠀⠀⠀⠀⠀",
|
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⣿⣷⣶⣤⡀⠀⠀⠀⠀⠀⠀",
|
||||||
|
@ -43,7 +43,7 @@ dashboard.section.buttons.val = {
|
||||||
dashboard.button("p", icons.ui.Project .. " Find project", ":lua require('telescope').extensions.projects.projects()<CR>"),
|
dashboard.button("p", icons.ui.Project .. " Find project", ":lua require('telescope').extensions.projects.projects()<CR>"),
|
||||||
dashboard.button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
|
dashboard.button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
|
||||||
dashboard.button("t", icons.ui.FindText .. " Find text", ":Telescope live_grep <CR>"),
|
dashboard.button("t", icons.ui.FindText .. " Find text", ":Telescope live_grep <CR>"),
|
||||||
dashboard.button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
|
--dashboard.button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
|
||||||
dashboard.button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
|
dashboard.button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
-- Setup nvim-cmp.
|
local status_ok, autopairs = pcall(require, "nvim-autopairs")
|
||||||
local status_ok, npairs = pcall(require, "nvim-autopairs")
|
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
npairs.setup({
|
autopairs.setup({
|
||||||
check_ts = true, -- treesitter integration
|
check_ts = true,
|
||||||
disable_filetype = { "TelescopePrompt" },
|
disable_filetype = { "TelescopePrompt", "vim" },
|
||||||
ts_config = {
|
ts_config = {
|
||||||
lua = { "string", "source" },
|
lua = { "string", "source" },
|
||||||
javascript = { "string", "template_string" },
|
javascript = { "string", "template_string" },
|
||||||
|
@ -16,7 +15,7 @@ npairs.setup({
|
||||||
map = "<M-e>",
|
map = "<M-e>",
|
||||||
chars = { "{", "[", "(", '"', "'" },
|
chars = { "{", "[", "(", '"', "'" },
|
||||||
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
|
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
|
||||||
offset = 0, -- Offset from pattern match
|
offset = 0,
|
||||||
end_key = "$",
|
end_key = "$",
|
||||||
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
||||||
check_comma = true,
|
check_comma = true,
|
||||||
|
@ -30,4 +29,4 @@ local cmp_status_ok, cmp = pcall(require, "cmp")
|
||||||
if not cmp_status_ok then
|
if not cmp_status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({}))
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
@ -7,7 +7,7 @@ local function is_ft(b, ft)
|
||||||
return vim.bo[b].filetype == ft
|
return vim.bo[b].filetype == ft
|
||||||
end
|
end
|
||||||
|
|
||||||
local icons = require 'iconlist'
|
local icons = require 'config.iconlist'
|
||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
highlights = {
|
highlights = {
|
113
.config/nvim/lua/plugins/config/cmp.lua
Normal file
113
.config/nvim/lua/plugins/config/cmp.lua
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
local cmp_status_ok, cmp = pcall(require, 'cmp')
|
||||||
|
if not cmp_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local snip_status_ok, luasnip = pcall(require, 'luasnip')
|
||||||
|
if not snip_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local function border(hl_name)
|
||||||
|
return {
|
||||||
|
{ "╭", hl_name },
|
||||||
|
{ "─", hl_name },
|
||||||
|
{ "╮", hl_name },
|
||||||
|
{ "│", hl_name },
|
||||||
|
{ "╯", hl_name },
|
||||||
|
{ "─", hl_name },
|
||||||
|
{ "╰", hl_name },
|
||||||
|
{ "│", hl_name },}
|
||||||
|
end
|
||||||
|
|
||||||
|
local check_backspace = function()
|
||||||
|
local col = vim.fn.col(".") - 1
|
||||||
|
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
|
||||||
|
end
|
||||||
|
|
||||||
|
local cmp_window = require "cmp.utils.window"
|
||||||
|
|
||||||
|
cmp_window.info_ = cmp_window.info
|
||||||
|
cmp_window.info = function(self)
|
||||||
|
local info = self:info_()
|
||||||
|
info.scrollable = false
|
||||||
|
return info
|
||||||
|
end
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
window = {
|
||||||
|
completion = {
|
||||||
|
border = border "CmpBorder",
|
||||||
|
winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None",
|
||||||
|
},
|
||||||
|
documentation = {
|
||||||
|
border = border "CmpDocBorder",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
formatting = {
|
||||||
|
format = function(_, vim_item)
|
||||||
|
local icons = require('config.iconlist').kind
|
||||||
|
vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind)
|
||||||
|
return vim_item
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
|
||||||
|
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
|
||||||
|
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||||
|
["<C-e>"] = cmp.mapping({
|
||||||
|
i = cmp.mapping.abort(),
|
||||||
|
c = cmp.mapping.close(),
|
||||||
|
}),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expandable() then
|
||||||
|
luasnip.expand()
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
elseif check_backspace() then
|
||||||
|
fallback()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
"i",
|
||||||
|
"s",
|
||||||
|
}),
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
"i",
|
||||||
|
"s",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "nvim_lua" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
{ name = "path" },
|
||||||
|
},
|
||||||
|
experimental = {
|
||||||
|
ghost_text = true,
|
||||||
|
},
|
||||||
|
confirm_opts = {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = false,
|
||||||
|
}
|
||||||
|
})
|
25
.config/nvim/lua/plugins/config/dap.lua
Normal file
25
.config/nvim/lua/plugins/config/dap.lua
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
local icons = require('config.iconlist')
|
||||||
|
|
||||||
|
local dap_status_ok, dap = pcall(require, 'dap')
|
||||||
|
if not dap_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local dap_ui_status_ok, dapui = pcall(require, 'dapui')
|
||||||
|
if not dap_ui_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.fn.sign_define("DapBreakpoint", { text = icons.ui.Bug, texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||||
|
|
||||||
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
|
||||||
|
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
|
||||||
|
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
27
.config/nvim/lua/plugins/config/dapui.lua
Normal file
27
.config/nvim/lua/plugins/config/dapui.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
local dap_ui_status_ok, dapui = pcall(require, 'nvim-dap-ui')
|
||||||
|
if not dap_ui_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
dapui.setup {
|
||||||
|
layouts = {
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
'scopes',
|
||||||
|
'breakpoints',
|
||||||
|
'stacks',
|
||||||
|
'watches',
|
||||||
|
},
|
||||||
|
size = 40,
|
||||||
|
position = 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
'repl',
|
||||||
|
'console',
|
||||||
|
},
|
||||||
|
size = 10,
|
||||||
|
position = 'bottom',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -4,8 +4,6 @@ if not status_ok then
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.g.Illuminate_ftblacklist = {'alpha', 'NvimTree'}
|
vim.g.Illuminate_ftblacklist = {'alpha', 'NvimTree'}
|
||||||
vim.api.nvim_set_keymap('n', '<a-n>', '<cmd>lua require"illuminate".next_reference{wrap=true}<cr>', {noremap=true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<a-p>', '<cmd>lua require"illuminate".next_reference{reverse=true,wrap=true}<cr>', {noremap=true})
|
|
||||||
|
|
||||||
illuminate.configure {
|
illuminate.configure {
|
||||||
providers = {
|
providers = {
|
42
.config/nvim/lua/plugins/config/lspconfig.lua
Normal file
42
.config/nvim/lua/plugins/config/lspconfig.lua
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
local lspconfig_status_ok, lspconfig = pcall(require, 'lspconfig')
|
||||||
|
if not lspconfig_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local servers = require('config.lsp')
|
||||||
|
local opts = {}
|
||||||
|
|
||||||
|
local on_attach = function(client, bufnr)
|
||||||
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
|
client.server_capabilities.documentRangeFormattingProvider = false
|
||||||
|
-- TODO: load keymaps
|
||||||
|
end
|
||||||
|
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem = {
|
||||||
|
documentationFormat = { "markdown", "plaintext" },
|
||||||
|
snippetSupport = true,
|
||||||
|
preselectSupport = true,
|
||||||
|
insertReplaceSupport = true,
|
||||||
|
labelDetailsSupport = true,
|
||||||
|
deprecatedSupport = true,
|
||||||
|
commitCharactersSupport = true,
|
||||||
|
tagSupport = { valueSet = { 1 } },
|
||||||
|
resolveSupport = {
|
||||||
|
properties = {
|
||||||
|
"documentation",
|
||||||
|
"detail",
|
||||||
|
"additionalTextEdits",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for server, config in pairs(servers) do
|
||||||
|
opts = {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities
|
||||||
|
}
|
||||||
|
server = vim.split(server, "@")[1]
|
||||||
|
opts = vim.tbl_deep_extend("force", config, opts)
|
||||||
|
lspconfig[server].setup(opts)
|
||||||
|
end
|
|
@ -1,10 +1,10 @@
|
||||||
local status_ok, lualine = pcall(require, "lualine")
|
local status_ok, lualine = pcall(require, 'lualine')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local colors = require("tokyonight.colors").setup({ transform = true })
|
local colors = require('tokyonight.colors').setup({ transform = true })
|
||||||
local icons = require('iconlist')
|
local icons = require('config.iconlist')
|
||||||
|
|
||||||
local conditions = {
|
local conditions = {
|
||||||
buffer_not_empty = function()
|
buffer_not_empty = function()
|
24
.config/nvim/lua/plugins/config/luasnip.lua
Normal file
24
.config/nvim/lua/plugins/config/luasnip.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
local status_ok, luasnip = pcall(require, "LuaSnip")
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local options = {
|
||||||
|
history = true,
|
||||||
|
updateevents = "TextChanged,TextChangedI",
|
||||||
|
}
|
||||||
|
|
||||||
|
luasnip.config.set_config(options)
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" }
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
|
callback = function()
|
||||||
|
if
|
||||||
|
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||||
|
and not require("luasnip").session.jump_active
|
||||||
|
then
|
||||||
|
require("luasnip").unlink_current()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
15
.config/nvim/lua/plugins/config/mason-lspconfig.lua
Normal file
15
.config/nvim/lua/plugins/config/mason-lspconfig.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
local status_ok, mason_lspconfig = pcall(require, 'mason-lspconfig')
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local serverlist = require('config.lsp')
|
||||||
|
local servers = {}
|
||||||
|
for key,_ in pairs(serverlist) do
|
||||||
|
table.insert(servers, key)
|
||||||
|
end
|
||||||
|
|
||||||
|
mason_lspconfig.setup({
|
||||||
|
ensure_installed = servers,
|
||||||
|
automatic_installation = false,
|
||||||
|
})
|
26
.config/nvim/lua/plugins/config/mason.lua
Normal file
26
.config/nvim/lua/plugins/config/mason.lua
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
local status_ok, mason = pcall(require, 'mason')
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local serverlist = require('config.lsp')
|
||||||
|
local servers = {}
|
||||||
|
for key,_ in pairs(serverlist) do
|
||||||
|
table.insert(servers, key)
|
||||||
|
end
|
||||||
|
local icons = require('config.iconlist')
|
||||||
|
|
||||||
|
local settings = {
|
||||||
|
ui = {
|
||||||
|
border = "none",
|
||||||
|
icons = {
|
||||||
|
package_installed = icons.ui.Check,
|
||||||
|
package_pending = icons.ui.BoldArrowRight,
|
||||||
|
package_uninstalled = icons.ui.BoldClose,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
log_level = vim.log.levels.INFO,
|
||||||
|
max_concurrent_installers = 4,
|
||||||
|
}
|
||||||
|
|
||||||
|
mason.setup(settings)
|
|
@ -1,4 +1,4 @@
|
||||||
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
local null_ls_status_ok, null_ls = pcall(require, 'null-ls')
|
||||||
if not null_ls_status_ok then
|
if not null_ls_status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
|
@ -1,15 +1,15 @@
|
||||||
local status_ok, nvim_tree = pcall(require, "nvim-tree")
|
local status_ok, nvim_tree = pcall(require, 'nvim-tree')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
|
local config_status_ok, nvim_tree_config = pcall(require, 'nvim-tree.config')
|
||||||
if not config_status_ok then
|
if not config_status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local tree_cb = nvim_tree_config.nvim_tree_callback
|
local tree_cb = nvim_tree_config.nvim_tree_callback
|
||||||
local icons = require 'iconlist'
|
local icons = require('config.iconlist')
|
||||||
|
|
||||||
nvim_tree.setup {
|
nvim_tree.setup {
|
||||||
update_focused_file = {
|
update_focused_file = {
|
|
@ -1,9 +1,8 @@
|
||||||
local status_ok, project = pcall(require, "project_nvim")
|
local status_ok, project = pcall(require, 'project_nvim')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
project.setup({
|
project.setup({
|
||||||
|
|
||||||
-- detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project
|
-- detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project
|
||||||
detection_methods = { "pattern" },
|
detection_methods = { "pattern" },
|
||||||
|
|
||||||
|
@ -11,7 +10,7 @@ project.setup({
|
||||||
patterns = { ".git", "Makefile", "package.json" },
|
patterns = { ".git", "Makefile", "package.json" },
|
||||||
})
|
})
|
||||||
|
|
||||||
local tele_status_ok, telescope = pcall(require, "telescope")
|
local tele_status_ok, telescope = pcall(require, 'telescope')
|
||||||
if not tele_status_ok then
|
if not tele_status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
|
@ -1,10 +1,10 @@
|
||||||
local status_ok, telescope = pcall(require, "telescope")
|
local status_ok, telescope = pcall(require, 'telescope')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local actions = require "telescope.actions"
|
local actions = require ('telescope.actions')
|
||||||
local icons = require "iconlist"
|
local icons = require ('config.iconlist')
|
||||||
|
|
||||||
telescope.setup {
|
telescope.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
|
@ -24,3 +24,4 @@ telescope.setup {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
6
.config/nvim/lua/plugins/config/todo-comments.lua
Normal file
6
.config/nvim/lua/plugins/config/todo-comments.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
local status_ok, todocomments = pcall(require, 'todo-comments')
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
todocomments.setup {}
|
30
.config/nvim/lua/plugins/config/toggleterm.lua
Normal file
30
.config/nvim/lua/plugins/config/toggleterm.lua
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
local status_ok, toggleterm = pcall(require, 'toggleterm')
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
toggleterm.setup({
|
||||||
|
size = 20,
|
||||||
|
open_mapping = [[<c-\>]],
|
||||||
|
hide_numbers = true,
|
||||||
|
shade_terminals = true,
|
||||||
|
shading_factor = 2,
|
||||||
|
start_in_insert = true,
|
||||||
|
insert_mappings = true,
|
||||||
|
persist_size = true,
|
||||||
|
direction = "float",
|
||||||
|
close_on_exit = true,
|
||||||
|
shell = vim.o.shell,
|
||||||
|
float_opts = {
|
||||||
|
border = "curved",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd("autocmd! TermOpen term://* lua require('core.funcs').map('toggleterm')")
|
||||||
|
|
||||||
|
local Terminal = require("toggleterm.terminal").Terminal
|
||||||
|
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
|
||||||
|
|
||||||
|
function _LAZYGIT_TOGGLE()
|
||||||
|
lazygit:toggle()
|
||||||
|
end
|
|
@ -1,9 +1,9 @@
|
||||||
local status_ok, treesitter = pcall(require, "nvim-treesitter")
|
local status_ok, treesitter = pcall(require, 'nvim-treesitter')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
local status_ok, configs = pcall(require, 'nvim-treesitter.configs')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
|
@ -1,10 +1,8 @@
|
||||||
local status_ok, whichkey = pcall(require, "which-key")
|
local status_ok, whichkey = pcall(require, 'which-key')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local icons = require('iconlist')
|
local icons = require('config.iconlist')
|
||||||
|
|
||||||
local maps = require('keymaplist').wk
|
|
||||||
|
|
||||||
whichkey.setup {
|
whichkey.setup {
|
||||||
marks = false,
|
marks = false,
|
||||||
|
@ -48,9 +46,7 @@ whichkey.setup {
|
||||||
triggers = "auto",
|
triggers = "auto",
|
||||||
triggers_blacklist = {
|
triggers_blacklist = {
|
||||||
i = { "j", "k" },
|
i = { "j", "k" },
|
||||||
v = { "j", "k" },
|
v = { "j", "k", "c", "y", "d", "v" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
whichkey.register(maps.nmaps, maps.nopts)
|
|
||||||
whichkey.register(maps.vmaps, maps.vopts)
|
|
258
.config/nvim/lua/plugins/init.lua
Normal file
258
.config/nvim/lua/plugins/init.lua
Normal file
|
@ -0,0 +1,258 @@
|
||||||
|
local packer_bootstrap = require('funcs').bootstrap()
|
||||||
|
local icons = require "config.iconlist"
|
||||||
|
local plugins = {
|
||||||
|
{ "wbthomason/packer.nvim" },
|
||||||
|
{ "nvim-lua/plenary.nvim" },
|
||||||
|
{ "lewis6991/impatient.nvim" },
|
||||||
|
{ "tpope/vim-surround",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("vim-surround")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "tpope/vim-repeat",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("vim-repeat")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "fladson/vim-kitty",
|
||||||
|
ft = "kitty"
|
||||||
|
},
|
||||||
|
{ "kyazdani42/nvim-web-devicons" },
|
||||||
|
{ "felipec/vim-sanegx" },
|
||||||
|
{ "folke/which-key.nvim",
|
||||||
|
config = function()
|
||||||
|
require "plugins.config.whichkey"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "folke/tokyonight.nvim",
|
||||||
|
config = function()
|
||||||
|
require('plugins.config.tokyonight')
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{ "folke/todo-comments.nvim",
|
||||||
|
opt = true,
|
||||||
|
after = "which-key.nvim",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("todo-comments.nvim")
|
||||||
|
require('funcs').map("todo")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require('plugins.config.todo-comments')
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{ "akinsho/bufferline.nvim",
|
||||||
|
opt = true,
|
||||||
|
after = "which-key.nvim",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("bufferline.nvim")
|
||||||
|
require('funcs').map("bufferline")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.bufferline")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "nvim-lualine/lualine.nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.lualine")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "akinsho/toggleterm.nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.toggleterm")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "lukas-reineke/indent-blankline.nvim",
|
||||||
|
opt = true,
|
||||||
|
after = "which-key.nvim",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("indent-blankline.nvim")
|
||||||
|
require('funcs').map("blankline")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.indent-blankline")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "norcalli/nvim-colorizer.lua",
|
||||||
|
opt = true,
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("nvim-colorizer.lua")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.nvim-colorizer")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "RRethy/vim-illuminate",
|
||||||
|
opt = true,
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("vim-illuminate")
|
||||||
|
require('funcs').map("illuminate")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.illuminate")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "nvim-treesitter/nvim-treesitter",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("nvim-treesitter")
|
||||||
|
end,
|
||||||
|
cmd = {
|
||||||
|
"TSInstall",
|
||||||
|
"TSBufEnable",
|
||||||
|
"TSBufDisable",
|
||||||
|
"TSEnable",
|
||||||
|
"TSDisable",
|
||||||
|
"TSModuleInfo"
|
||||||
|
},
|
||||||
|
run = ":TSUpdate",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.treesitter")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "lewis6991/gitsigns.nvim",
|
||||||
|
ft = "gitcommit",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').gitsigns()
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.gitsigns")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "williamboman/mason.nvim",
|
||||||
|
config = function()
|
||||||
|
require "plugins.config.mason"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "williamboman/mason-lspconfig.nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.mason-lspconfig")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "neovim/nvim-lspconfig",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("nvim-lspconfig")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.lspconfig")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "jose-elias-alvarez/null-ls.nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.null-ls")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "rcarriga/nvim-dap-ui",
|
||||||
|
opt = true,
|
||||||
|
after = "nvim-dap",
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("nvim-dap-ui")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.dapui")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "mfussenegger/nvim-dap",
|
||||||
|
opt = true,
|
||||||
|
setup = function()
|
||||||
|
require('funcs').on_file_open("nvim-dap")
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.dap")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "rafamadriz/friendly-snippets",
|
||||||
|
module = { "cmp", "cmp_nvim_lsp" },
|
||||||
|
},
|
||||||
|
{ "hrsh7th/nvim-cmp",
|
||||||
|
after = "friendly-snippets",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.cmp")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "L3MON4D3/LuaSnip",
|
||||||
|
after = "nvim-cmp",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.luasnip")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "saadparwaiz1/cmp_luasnip", after = "LuaSnip" },
|
||||||
|
{ "hrsh7th/cmp-nvim-lua", after = "cmp_luasnip" },
|
||||||
|
{ "hrsh7th/cmp-nvim-lsp", after = "cmp-nvim-lua" },
|
||||||
|
{ "hrsh7th/cmp-buffer", after = "cmp-nvim-lsp" },
|
||||||
|
{ "hrsh7th/cmp-path", after = "cmp-buffer" },
|
||||||
|
{ "windwp/nvim-autopairs",
|
||||||
|
after = "nvim-cmp",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.autopairs")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "goolord/alpha-nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.alpha")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "numToStr/Comment.nvim",
|
||||||
|
module = "Comment",
|
||||||
|
after = "which-key.nvim",
|
||||||
|
keys = { "gc", "gb" },
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.comment")
|
||||||
|
end,
|
||||||
|
setup = function()
|
||||||
|
require('funcs').map("comment")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "kyazdani42/nvim-tree.lua",
|
||||||
|
ft = "alpha",
|
||||||
|
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
|
||||||
|
after = "which-key.nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.nvim-tree")
|
||||||
|
end,
|
||||||
|
setup = function()
|
||||||
|
require('funcs').map("nvimtree")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "nvim-telescope/telescope.nvim",
|
||||||
|
cmd = "Telescope",
|
||||||
|
after = "which-key.nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.telescope")
|
||||||
|
end,
|
||||||
|
setup = function()
|
||||||
|
require('funcs').map("telescope")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "ahmedkhalf/project.nvim",
|
||||||
|
ft = "alpha",
|
||||||
|
cmd = "lua require('telescope').extensions.projects.projects()<CR>",
|
||||||
|
after = "telescope.nvim",
|
||||||
|
config = function()
|
||||||
|
require("plugins.config.project")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local status_ok, packer = pcall(require, "packer")
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
vim.cmd("packadd packer.nvim")
|
||||||
|
packer.init {
|
||||||
|
auto_clean = true,
|
||||||
|
compile_on_sync = true,
|
||||||
|
git = { clone_timeout = 6000 },
|
||||||
|
display = {
|
||||||
|
working_sym = icons.misc.Watch,
|
||||||
|
error_sym = icons.ui.Close,
|
||||||
|
done_sym = icons.ui.Check,
|
||||||
|
removed_sym = icons.ui.MinusCircle,
|
||||||
|
moved_sym = icons.ui.Forward,
|
||||||
|
open_fn = function()
|
||||||
|
return require("packer.util").float { border = "single" }
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
packer.startup { plugins }
|
||||||
|
if packer_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
|
@ -1,60 +0,0 @@
|
||||||
local icons = require('iconlist')
|
|
||||||
|
|
||||||
local dap_status_ok, dap = pcall(require, "dap")
|
|
||||||
if not dap_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local dap_ui_status_ok, dapui = pcall(require, "dapui")
|
|
||||||
if not dap_ui_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Debugger installation is now handled by mason
|
|
||||||
|
|
||||||
-- local dap_install_status_ok, dap_install = pcall(require, "dap-install")
|
|
||||||
-- if not dap_install_status_ok then
|
|
||||||
-- return
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- dap_install.setup {}
|
|
||||||
--
|
|
||||||
-- dap_install.config("python", {})
|
|
||||||
-- -- add other configs here
|
|
||||||
|
|
||||||
dapui.setup {
|
|
||||||
layouts = {
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
'scopes',
|
|
||||||
'breakpoints',
|
|
||||||
'stacks',
|
|
||||||
'watches',
|
|
||||||
},
|
|
||||||
size = 40,
|
|
||||||
position = 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
'repl',
|
|
||||||
'console',
|
|
||||||
},
|
|
||||||
size = 10,
|
|
||||||
position = 'bottom',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.fn.sign_define("DapBreakpoint", { text = icons.ui.Bug, texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
|
||||||
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
|
||||||
dapui.open()
|
|
||||||
end
|
|
||||||
|
|
||||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
|
||||||
dapui.close()
|
|
||||||
end
|
|
||||||
|
|
||||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
|
||||||
dapui.close()
|
|
||||||
end
|
|
|
@ -1,68 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
local icons = require('iconlist')
|
|
||||||
|
|
||||||
local status_cmp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
|
||||||
if not status_cmp_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
M.capabilities.textDocument.completion.completionItem.snippetSupport = true
|
|
||||||
M.capabilities = cmp_nvim_lsp.update_capabilities(M.capabilities)
|
|
||||||
|
|
||||||
M.setup = function()
|
|
||||||
local signs = {
|
|
||||||
|
|
||||||
{ name = "DiagnosticSignError", text = icons.diagnostics.BoldError },
|
|
||||||
{ name = "DiagnosticSignWarn", text = icons.diagnostics.BoldWarning },
|
|
||||||
{ name = "DiagnosticSignHint", text = icons.diagnostics.BoldHint },
|
|
||||||
{ name = "DiagnosticSignInfo", text = icons.diagnostics.BoldInformation },
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, sign in ipairs(signs) do
|
|
||||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
|
||||||
end
|
|
||||||
|
|
||||||
local config = {
|
|
||||||
virtual_text = false, -- disable virtual text
|
|
||||||
signs = {
|
|
||||||
active = signs, -- show signs
|
|
||||||
},
|
|
||||||
update_in_insert = true,
|
|
||||||
underline = true,
|
|
||||||
severity_sort = true,
|
|
||||||
float = {
|
|
||||||
focusable = true,
|
|
||||||
style = "minimal",
|
|
||||||
border = "rounded",
|
|
||||||
source = "always",
|
|
||||||
header = "",
|
|
||||||
prefix = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.diagnostic.config(config)
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
|
||||||
border = "rounded",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
|
||||||
border = "rounded",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
M.on_attach = function(client, bufnr)
|
|
||||||
if client.name == "sumneko_lua" then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
|
|
||||||
local status_ok, illuminate = pcall(require, "illuminate")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
illuminate.on_attach(client)
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,9 +0,0 @@
|
||||||
local status_ok, _ = pcall(require, "lspconfig")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
require "user.adapters.mason"
|
|
||||||
require("user.adapters.handlers").setup()
|
|
||||||
require "user.adapters.null-ls"
|
|
||||||
require "user.adapters.dap"
|
|
|
@ -1,49 +0,0 @@
|
||||||
local servers = {
|
|
||||||
"sumneko_lua",
|
|
||||||
"bashls",
|
|
||||||
"clangd",
|
|
||||||
}
|
|
||||||
|
|
||||||
local icons = require('iconlist')
|
|
||||||
|
|
||||||
local settings = {
|
|
||||||
ui = {
|
|
||||||
border = "none",
|
|
||||||
icons = {
|
|
||||||
package_installed = icons.ui.Check,
|
|
||||||
package_pending = icons.ui.BoldArrowRight,
|
|
||||||
package_uninstalled = icons.ui.BoldClose,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
log_level = vim.log.levels.INFO,
|
|
||||||
max_concurrent_installers = 4,
|
|
||||||
}
|
|
||||||
|
|
||||||
require("mason").setup(settings)
|
|
||||||
require("mason-lspconfig").setup({
|
|
||||||
ensure_installed = servers,
|
|
||||||
automatic_installation = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
|
||||||
if not lspconfig_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local opts = {}
|
|
||||||
|
|
||||||
for _, server in pairs(servers) do
|
|
||||||
opts = {
|
|
||||||
on_attach = require("user.adapters.handlers").on_attach,
|
|
||||||
capabilities = require("user.adapters.handlers").capabilities,
|
|
||||||
}
|
|
||||||
|
|
||||||
server = vim.split(server, "@")[1]
|
|
||||||
|
|
||||||
local require_ok, conf_opts = pcall(require, "user.adapters.settings." .. server)
|
|
||||||
if require_ok then
|
|
||||||
opts = vim.tbl_deep_extend("force", conf_opts, opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
lspconfig[server].setup(opts)
|
|
||||||
end
|
|
|
@ -1,15 +0,0 @@
|
||||||
autocmds = require('autocmdlist')
|
|
||||||
|
|
||||||
vim.api.nvim_create_augroup('packer_user_config', {clear = true})
|
|
||||||
|
|
||||||
for _, entry in ipairs(autocmds) do
|
|
||||||
local event = entry[1]
|
|
||||||
local opts = entry[2]
|
|
||||||
if type(opts.group) == "string" and opts.group ~= "" then
|
|
||||||
local exists, _ = pcall(vim.api.nvim_get_autocmds, { group = opts.group })
|
|
||||||
if not exists then
|
|
||||||
vim.api.nvim_create_augroup(opts.group, {})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vim.api.nvim_create_autocmd(event, opts)
|
|
||||||
end
|
|
|
@ -1,101 +0,0 @@
|
||||||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
|
||||||
if not cmp_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local snip_status_ok, luasnip = pcall(require, "luasnip")
|
|
||||||
if not snip_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
require("luasnip/loaders/from_vscode").lazy_load()
|
|
||||||
|
|
||||||
local check_backspace = function()
|
|
||||||
local col = vim.fn.col(".") - 1
|
|
||||||
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
|
|
||||||
end
|
|
||||||
|
|
||||||
local kind_icons = require('iconlist').kind
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body) -- For `luasnip` users.
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
|
||||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
|
||||||
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
|
|
||||||
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
|
|
||||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
|
||||||
["<C-e>"] = cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
}),
|
|
||||||
-- Accept currently selected item. If none selected, `select` first item.
|
|
||||||
-- Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expandable() then
|
|
||||||
luasnip.expand()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
elseif check_backspace() then
|
|
||||||
fallback()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
formatting = {
|
|
||||||
fields = { "kind", "abbr", "menu" },
|
|
||||||
format = function(entry, vim_item)
|
|
||||||
vim_item.kind = kind_icons[vim_item.kind]
|
|
||||||
vim_item.menu = ({
|
|
||||||
nvim_lsp = "",
|
|
||||||
nvim_lua = "",
|
|
||||||
luasnip = "",
|
|
||||||
buffer = "",
|
|
||||||
path = "",
|
|
||||||
emoji = "",
|
|
||||||
})[entry.source.name]
|
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "nvim_lua" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
},
|
|
||||||
confirm_opts = {
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = false,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
experimental = {
|
|
||||||
ghost_text = true,
|
|
||||||
},
|
|
||||||
})
|
|
|
@ -1,74 +0,0 @@
|
||||||
local M = {}
|
|
||||||
-- Modified version of a function stolen from LunarVim
|
|
||||||
function M.buf_kill(kill_command, bufnr, force)
|
|
||||||
kill_command = kill_command or "bd"
|
|
||||||
|
|
||||||
local bo = vim.bo
|
|
||||||
local api = vim.api
|
|
||||||
local fmt = string.format
|
|
||||||
local fnamemodify = vim.fn.fnamemodify
|
|
||||||
|
|
||||||
if bufnr == 0 or bufnr == nil then
|
|
||||||
bufnr = api.nvim_get_current_buf()
|
|
||||||
end
|
|
||||||
|
|
||||||
local bufname = api.nvim_buf_get_name(bufnr)
|
|
||||||
|
|
||||||
if not force then
|
|
||||||
local warning
|
|
||||||
if bo[bufnr].modified then
|
|
||||||
warning = fmt([[No write since last change for (%s)]], fnamemodify(bufname, ":t"))
|
|
||||||
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then
|
|
||||||
warning = fmt([[Terminal %s will be killed]], bufname)
|
|
||||||
end
|
|
||||||
if warning then
|
|
||||||
vim.ui.input({
|
|
||||||
prompt = string.format([[%s. Close it anyway? [y]es or [n]o (default: no): ]], warning),
|
|
||||||
}, function(choice)
|
|
||||||
if choice:match "ye?s?" then force = true end
|
|
||||||
end)
|
|
||||||
if not force then return end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Get list of windows IDs with the buffer to close
|
|
||||||
local windows = vim.tbl_filter(function(win)
|
|
||||||
return api.nvim_win_get_buf(win) == bufnr
|
|
||||||
end, api.nvim_list_wins())
|
|
||||||
|
|
||||||
if #windows == 0 then return end
|
|
||||||
|
|
||||||
if force then
|
|
||||||
kill_command = kill_command .. "!"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Get list of active buffers
|
|
||||||
local buffers = vim.tbl_filter(function(buf)
|
|
||||||
return api.nvim_buf_is_valid(buf) and bo[buf].buflisted
|
|
||||||
end, api.nvim_list_bufs())
|
|
||||||
|
|
||||||
-- If there is only one buffer (which has to be the current one), vim will
|
|
||||||
-- create a new buffer on :bd.
|
|
||||||
-- For more than one buffer, pick the previous buffer (wrapping around if necessary)
|
|
||||||
if #buffers > 1 then
|
|
||||||
for i, v in ipairs(buffers) do
|
|
||||||
if v == bufnr then
|
|
||||||
local prev_buf_idx = i == 1 and (#buffers - 1) or (i - 1)
|
|
||||||
local prev_buffer = buffers[prev_buf_idx]
|
|
||||||
for _, win in ipairs(windows) do
|
|
||||||
api.nvim_win_set_buf(win, prev_buffer)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
vim.cmd("quit")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Check if buffer still exists, to ensure the target buffer wasn't killed
|
|
||||||
-- due to options like bufhidden=wipe.
|
|
||||||
if api.nvim_buf_is_valid(bufnr) and bo[bufnr].buflisted then
|
|
||||||
vim.cmd(string.format("%s %d", kill_command, bufnr))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,11 +0,0 @@
|
||||||
maps = require('keymaplist').kb
|
|
||||||
vim.keymap.set("", "<Space>", "<Nop>", { silent = true, noremap = true })
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
for mode, binds in pairs(maps) do
|
|
||||||
for _, bind in pairs(binds) do
|
|
||||||
local key = bind[1]
|
|
||||||
local cmd = bind[2]
|
|
||||||
local opt = bind[3]
|
|
||||||
vim.api.nvim_set_keymap(mode, key, cmd, opt)
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,33 +0,0 @@
|
||||||
vim.opt.undodir = vim.fn.stdpath "cache" .. "/undo"
|
|
||||||
vim.opt.clipboard = "unnamedplus"
|
|
||||||
vim.opt.conceallevel = 0
|
|
||||||
vim.opt.numberwidth = 3
|
|
||||||
vim.opt.hlsearch = true
|
|
||||||
vim.opt.ignorecase = true
|
|
||||||
vim.opt.showmode = false
|
|
||||||
vim.opt.smartindent = true
|
|
||||||
vim.opt.splitbelow = true
|
|
||||||
vim.opt.splitbelow = true
|
|
||||||
vim.opt.splitbelow = true
|
|
||||||
vim.opt.updatetime = 300
|
|
||||||
vim.opt.writebackup = false
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
vim.opt.shiftwidth = 2
|
|
||||||
vim.opt.tabstop = 2
|
|
||||||
vim.opt.cursorline = true
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
vim.opt.wrap = false
|
|
||||||
vim.opt.scrolloff = 8
|
|
||||||
vim.opt.sidescrolloff = 8
|
|
||||||
vim.opt.undofile = true
|
|
||||||
vim.opt.title = true
|
|
||||||
vim.opt.titlestring = " %t"
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
vim.opt.timeoutlen = 500
|
|
||||||
vim.opt.foldmethod = "expr"
|
|
||||||
vim.opt.foldlevelstart = 99
|
|
||||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
|
|
||||||
vim.g.Illuminate_ftblacklist = {'alpha', 'NvimTree'}
|
|
|
@ -1,35 +0,0 @@
|
||||||
local ensure_packer = function()
|
|
||||||
local fn = vim.fn
|
|
||||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
|
||||||
vim.cmd [[packadd packer.nvim]]
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local packer_bootstrap = ensure_packer()
|
|
||||||
local pluginlist = require "pluginlist"
|
|
||||||
|
|
||||||
local status_ok, packer = pcall(require, "packer")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
packer.init {
|
|
||||||
display = {
|
|
||||||
open_fn = function()
|
|
||||||
return require("packer.util").float { border = "rounded" }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return packer.startup(function(use)
|
|
||||||
for _, entry in ipairs(pluginlist) do
|
|
||||||
use(entry)
|
|
||||||
end
|
|
||||||
if packer_bootstrap then
|
|
||||||
require('packer').sync()
|
|
||||||
end
|
|
||||||
end)
|
|
|
@ -1,6 +0,0 @@
|
||||||
local status_ok, todocomments = pcall(require, "todo-comments")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
todocomments.setup {}
|
|
|
@ -1,39 +0,0 @@
|
||||||
local status_ok, toggleterm = pcall(require, "toggleterm")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
toggleterm.setup({
|
|
||||||
size = 20,
|
|
||||||
open_mapping = [[<c-\>]],
|
|
||||||
hide_numbers = true,
|
|
||||||
shade_terminals = true,
|
|
||||||
shading_factor = 2,
|
|
||||||
start_in_insert = true,
|
|
||||||
insert_mappings = true,
|
|
||||||
persist_size = true,
|
|
||||||
direction = "float",
|
|
||||||
close_on_exit = true,
|
|
||||||
shell = vim.o.shell,
|
|
||||||
float_opts = {
|
|
||||||
border = "curved",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
function _G.set_terminal_keymaps()
|
|
||||||
local opts = {noremap = true}
|
|
||||||
-- vim.api.nvim_buf_set_keymap(0, 't', '<esc>', [[<C-\><C-n>]], opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-h>', [[<C-\><C-n><C-W>h]], opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-j>', [[<C-\><C-n><C-W>j]], opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-k>', [[<C-\><C-n><C-W>k]], opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-l>', [[<C-\><C-n><C-W>l]], opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
|
|
||||||
|
|
||||||
local Terminal = require("toggleterm.terminal").Terminal
|
|
||||||
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
|
|
||||||
|
|
||||||
function _LAZYGIT_TOGGLE()
|
|
||||||
lazygit:toggle()
|
|
||||||
end
|
|
|
@ -75,63 +75,108 @@ time([[try_loadstring definition]], false)
|
||||||
time([[Defining packer_plugins]], true)
|
time([[Defining packer_plugins]], true)
|
||||||
_G.packer_plugins = {
|
_G.packer_plugins = {
|
||||||
["Comment.nvim"] = {
|
["Comment.nvim"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.config.comment\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/Comment.nvim",
|
keys = { { "", "gc" }, { "", "gb" } },
|
||||||
|
load_after = {},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/Comment.nvim",
|
||||||
url = "https://github.com/numToStr/Comment.nvim"
|
url = "https://github.com/numToStr/Comment.nvim"
|
||||||
},
|
},
|
||||||
LuaSnip = {
|
LuaSnip = {
|
||||||
loaded = true,
|
after = { "cmp_luasnip" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.config.luasnip\frequire\0" },
|
||||||
|
load_after = {
|
||||||
|
["nvim-cmp"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = true,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/LuaSnip",
|
||||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||||
},
|
},
|
||||||
["alpha-nvim"] = {
|
["alpha-nvim"] = {
|
||||||
|
config = { "\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins.config.alpha\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/alpha-nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/alpha-nvim",
|
||||||
url = "https://github.com/goolord/alpha-nvim"
|
url = "https://github.com/goolord/alpha-nvim"
|
||||||
},
|
},
|
||||||
["bufferline.nvim"] = {
|
["bufferline.nvim"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.config.bufferline\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/bufferline.nvim",
|
load_after = {},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/bufferline.nvim",
|
||||||
url = "https://github.com/akinsho/bufferline.nvim"
|
url = "https://github.com/akinsho/bufferline.nvim"
|
||||||
},
|
},
|
||||||
["cmp-buffer"] = {
|
["cmp-buffer"] = {
|
||||||
loaded = true,
|
after = { "cmp-path" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
after_files = { "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-buffer/after/plugin/cmp_buffer.lua" },
|
||||||
|
load_after = {
|
||||||
|
["cmp-nvim-lsp"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-buffer",
|
||||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||||
},
|
},
|
||||||
["cmp-nvim-lsp"] = {
|
["cmp-nvim-lsp"] = {
|
||||||
loaded = true,
|
after = { "cmp-buffer" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
after_files = { "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp/after/plugin/cmp_nvim_lsp.lua" },
|
||||||
|
load_after = {
|
||||||
|
["cmp-nvim-lua"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp",
|
||||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
},
|
},
|
||||||
["cmp-nvim-lua"] = {
|
["cmp-nvim-lua"] = {
|
||||||
loaded = true,
|
after = { "cmp-nvim-lsp" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
|
after_files = { "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua/after/plugin/cmp_nvim_lua.lua" },
|
||||||
|
load_after = {
|
||||||
|
cmp_luasnip = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua",
|
||||||
url = "https://github.com/hrsh7th/cmp-nvim-lua"
|
url = "https://github.com/hrsh7th/cmp-nvim-lua"
|
||||||
},
|
},
|
||||||
["cmp-path"] = {
|
["cmp-path"] = {
|
||||||
loaded = true,
|
after_files = { "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-path/after/plugin/cmp_path.lua" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/cmp-path",
|
load_after = {
|
||||||
|
["cmp-buffer"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp-path",
|
||||||
url = "https://github.com/hrsh7th/cmp-path"
|
url = "https://github.com/hrsh7th/cmp-path"
|
||||||
},
|
},
|
||||||
cmp_luasnip = {
|
cmp_luasnip = {
|
||||||
loaded = true,
|
after = { "cmp-nvim-lua" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
after_files = { "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp_luasnip/after/plugin/cmp_luasnip.lua" },
|
||||||
|
load_after = {
|
||||||
|
LuaSnip = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/cmp_luasnip",
|
||||||
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||||
},
|
},
|
||||||
["diffview.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/diffview.nvim",
|
|
||||||
url = "https://github.com/sindrets/diffview.nvim"
|
|
||||||
},
|
|
||||||
["friendly-snippets"] = {
|
["friendly-snippets"] = {
|
||||||
loaded = true,
|
after = { "nvim-cmp" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/friendly-snippets",
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/friendly-snippets",
|
||||||
url = "https://github.com/rafamadriz/friendly-snippets"
|
url = "https://github.com/rafamadriz/friendly-snippets"
|
||||||
},
|
},
|
||||||
["gitsigns.nvim"] = {
|
["gitsigns.nvim"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins.config.gitsigns\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim",
|
||||||
url = "https://github.com/lewis6991/gitsigns.nvim"
|
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
},
|
},
|
||||||
["impatient.nvim"] = {
|
["impatient.nvim"] = {
|
||||||
|
@ -140,80 +185,109 @@ _G.packer_plugins = {
|
||||||
url = "https://github.com/lewis6991/impatient.nvim"
|
url = "https://github.com/lewis6991/impatient.nvim"
|
||||||
},
|
},
|
||||||
["indent-blankline.nvim"] = {
|
["indent-blankline.nvim"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n?\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0$plugins.config.indent-blankline\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
|
load_after = {},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim",
|
||||||
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||||
},
|
},
|
||||||
["lua-dev.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/lua-dev.nvim",
|
|
||||||
url = "https://github.com/folke/lua-dev.nvim"
|
|
||||||
},
|
|
||||||
["lualine.nvim"] = {
|
["lualine.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.config.lualine\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
},
|
},
|
||||||
["mason-lspconfig.nvim"] = {
|
["mason-lspconfig.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n>\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0#plugins.config.mason-lspconfig\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
||||||
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||||
},
|
},
|
||||||
["mason.nvim"] = {
|
["mason.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins.config.mason\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
||||||
url = "https://github.com/williamboman/mason.nvim"
|
url = "https://github.com/williamboman/mason.nvim"
|
||||||
},
|
},
|
||||||
["null-ls.nvim"] = {
|
["null-ls.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.config.null-ls\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
|
||||||
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
|
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
|
||||||
},
|
},
|
||||||
["nvim-autopairs"] = {
|
["nvim-autopairs"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.config.autopairs\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
|
load_after = {
|
||||||
|
["nvim-cmp"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-autopairs",
|
||||||
url = "https://github.com/windwp/nvim-autopairs"
|
url = "https://github.com/windwp/nvim-autopairs"
|
||||||
},
|
},
|
||||||
["nvim-cmp"] = {
|
["nvim-cmp"] = {
|
||||||
loaded = true,
|
after = { "nvim-autopairs", "LuaSnip" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins.config.cmp\frequire\0" },
|
||||||
|
load_after = {
|
||||||
|
["friendly-snippets"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-cmp",
|
||||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||||
},
|
},
|
||||||
["nvim-colorizer.lua"] = {
|
["nvim-colorizer.lua"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n=\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\"plugins.config.nvim-colorizer\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua",
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-colorizer.lua",
|
||||||
url = "https://github.com/norcalli/nvim-colorizer.lua"
|
url = "https://github.com/norcalli/nvim-colorizer.lua"
|
||||||
},
|
},
|
||||||
["nvim-dap"] = {
|
["nvim-dap"] = {
|
||||||
loaded = true,
|
after = { "nvim-dap-ui" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-dap",
|
config = { "\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins.config.dap\frequire\0" },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-dap",
|
||||||
url = "https://github.com/mfussenegger/nvim-dap"
|
url = "https://github.com/mfussenegger/nvim-dap"
|
||||||
},
|
},
|
||||||
["nvim-dap-ui"] = {
|
["nvim-dap-ui"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins.config.dapui\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-dap-ui",
|
load_after = {
|
||||||
|
["nvim-dap"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-dap-ui",
|
||||||
url = "https://github.com/rcarriga/nvim-dap-ui"
|
url = "https://github.com/rcarriga/nvim-dap-ui"
|
||||||
},
|
},
|
||||||
["nvim-lspconfig"] = {
|
["nvim-lspconfig"] = {
|
||||||
|
config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.config.lspconfig\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig",
|
||||||
url = "https://github.com/neovim/nvim-lspconfig"
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
["nvim-tree.lua"] = {
|
["nvim-tree.lua"] = {
|
||||||
loaded = true,
|
commands = { "NvimTreeToggle", "NvimTreeFocus" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
|
config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.config.nvim-tree\frequire\0" },
|
||||||
|
load_after = {},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-tree.lua",
|
||||||
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||||
},
|
},
|
||||||
["nvim-treesitter"] = {
|
["nvim-treesitter"] = {
|
||||||
loaded = true,
|
commands = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.config.treesitter\frequire\0" },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/nvim-treesitter",
|
||||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
["nvim-ts-context-commentstring"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring",
|
|
||||||
url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring"
|
|
||||||
},
|
|
||||||
["nvim-web-devicons"] = {
|
["nvim-web-devicons"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
@ -230,43 +304,66 @@ _G.packer_plugins = {
|
||||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||||
},
|
},
|
||||||
["project.nvim"] = {
|
["project.nvim"] = {
|
||||||
loaded = true,
|
commands = { "lua require('telescope').extensions.projects.projects()<CR>" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/project.nvim",
|
config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.config.project\frequire\0" },
|
||||||
|
load_after = {
|
||||||
|
["telescope.nvim"] = true
|
||||||
|
},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/project.nvim",
|
||||||
url = "https://github.com/ahmedkhalf/project.nvim"
|
url = "https://github.com/ahmedkhalf/project.nvim"
|
||||||
},
|
},
|
||||||
["telescope.nvim"] = {
|
["telescope.nvim"] = {
|
||||||
loaded = true,
|
after = { "project.nvim" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
commands = { "Telescope" },
|
||||||
|
config = { "\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.config.telescope\frequire\0" },
|
||||||
|
load_after = {},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = true,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/telescope.nvim",
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
["todo-comments.nvim"] = {
|
["todo-comments.nvim"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n<\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0!plugins.config.todo-comments\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
|
load_after = {},
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/todo-comments.nvim",
|
||||||
url = "https://github.com/folke/todo-comments.nvim"
|
url = "https://github.com/folke/todo-comments.nvim"
|
||||||
},
|
},
|
||||||
["toggleterm.nvim"] = {
|
["toggleterm.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.config.toggleterm\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
|
||||||
url = "https://github.com/akinsho/toggleterm.nvim"
|
url = "https://github.com/akinsho/toggleterm.nvim"
|
||||||
},
|
},
|
||||||
["tokyonight.nvim"] = {
|
["tokyonight.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.config.tokyonight\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/tokyonight.nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/tokyonight.nvim",
|
||||||
url = "https://github.com/folke/tokyonight.nvim"
|
url = "https://github.com/folke/tokyonight.nvim"
|
||||||
},
|
},
|
||||||
["vim-bbye"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/vim-bbye",
|
|
||||||
url = "https://github.com/moll/vim-bbye"
|
|
||||||
},
|
|
||||||
["vim-illuminate"] = {
|
["vim-illuminate"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.config.illuminate\frequire\0" },
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/vim-illuminate",
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/vim-illuminate",
|
||||||
url = "https://github.com/RRethy/vim-illuminate"
|
url = "https://github.com/RRethy/vim-illuminate"
|
||||||
},
|
},
|
||||||
|
["vim-kitty"] = {
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = true,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/vim-kitty",
|
||||||
|
url = "https://github.com/fladson/vim-kitty"
|
||||||
|
},
|
||||||
["vim-repeat"] = {
|
["vim-repeat"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/vim-repeat",
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/vim-repeat",
|
||||||
url = "https://github.com/tpope/vim-repeat"
|
url = "https://github.com/tpope/vim-repeat"
|
||||||
},
|
},
|
||||||
["vim-sanegx"] = {
|
["vim-sanegx"] = {
|
||||||
|
@ -276,22 +373,191 @@ _G.packer_plugins = {
|
||||||
},
|
},
|
||||||
["vim-surround"] = {
|
["vim-surround"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/vim-surround",
|
needs_bufread = false,
|
||||||
|
path = "/home/luca/.local/share/nvim/site/pack/packer/opt/vim-surround",
|
||||||
url = "https://github.com/tpope/vim-surround"
|
url = "https://github.com/tpope/vim-surround"
|
||||||
},
|
},
|
||||||
vimwiki = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/vimwiki",
|
|
||||||
url = "https://github.com/vimwiki/vimwiki"
|
|
||||||
},
|
|
||||||
["which-key.nvim"] = {
|
["which-key.nvim"] = {
|
||||||
|
after = { "indent-blankline.nvim", "telescope.nvim", "todo-comments.nvim", "bufferline.nvim", "nvim-tree.lua", "Comment.nvim" },
|
||||||
|
config = { "\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins.config.whichkey\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
|
only_config = true,
|
||||||
path = "/home/luca/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
path = "/home/luca/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
||||||
url = "https://github.com/folke/which-key.nvim"
|
url = "https://github.com/folke/which-key.nvim"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
|
local module_lazy_loads = {
|
||||||
|
["^Comment"] = "Comment.nvim",
|
||||||
|
["^cmp"] = "friendly-snippets",
|
||||||
|
["^cmp_nvim_lsp"] = "friendly-snippets"
|
||||||
|
}
|
||||||
|
local lazy_load_called = {['packer.load'] = true}
|
||||||
|
local function lazy_load_module(module_name)
|
||||||
|
local to_load = {}
|
||||||
|
if lazy_load_called[module_name] then return nil end
|
||||||
|
lazy_load_called[module_name] = true
|
||||||
|
for module_pat, plugin_name in pairs(module_lazy_loads) do
|
||||||
|
if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then
|
||||||
|
to_load[#to_load + 1] = plugin_name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if #to_load > 0 then
|
||||||
|
require('packer.load')(to_load, {module = module_name}, _G.packer_plugins)
|
||||||
|
local loaded_mod = package.loaded[module_name]
|
||||||
|
if loaded_mod then
|
||||||
|
return function(modname) return loaded_mod end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not vim.g.packer_custom_loader_enabled then
|
||||||
|
table.insert(package.loaders, 1, lazy_load_module)
|
||||||
|
vim.g.packer_custom_loader_enabled = true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Setup for: Comment.nvim
|
||||||
|
time([[Setup for Comment.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n=\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\fcomment\bmap\nfuncs\frequire\0", "setup", "Comment.nvim")
|
||||||
|
time([[Setup for Comment.nvim]], false)
|
||||||
|
-- Setup for: indent-blankline.nvim
|
||||||
|
time([[Setup for indent-blankline.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\nz\0\0\3\0\6\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\4\0'\2\5\0B\0\2\1K\0\1\0\14blankline\bmap\26indent-blankline.nvim\17on_file_open\nfuncs\frequire\0", "setup", "indent-blankline.nvim")
|
||||||
|
time([[Setup for indent-blankline.nvim]], false)
|
||||||
|
-- Setup for: nvim-tree.lua
|
||||||
|
time([[Setup for nvim-tree.lua]], true)
|
||||||
|
try_loadstring("\27LJ\2\n>\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\rnvimtree\bmap\nfuncs\frequire\0", "setup", "nvim-tree.lua")
|
||||||
|
time([[Setup for nvim-tree.lua]], false)
|
||||||
|
-- Setup for: nvim-dap
|
||||||
|
time([[Setup for nvim-dap]], true)
|
||||||
|
try_loadstring("\27LJ\2\nG\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\rnvim-dap\17on_file_open\nfuncs\frequire\0", "setup", "nvim-dap")
|
||||||
|
time([[Setup for nvim-dap]], false)
|
||||||
|
-- Setup for: gitsigns.nvim
|
||||||
|
time([[Setup for gitsigns.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\rgitsigns\nfuncs\frequire\0", "setup", "gitsigns.nvim")
|
||||||
|
time([[Setup for gitsigns.nvim]], false)
|
||||||
|
-- Setup for: nvim-colorizer.lua
|
||||||
|
time([[Setup for nvim-colorizer.lua]], true)
|
||||||
|
try_loadstring("\27LJ\2\nQ\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\23nvim-colorizer.lua\17on_file_open\nfuncs\frequire\0", "setup", "nvim-colorizer.lua")
|
||||||
|
time([[Setup for nvim-colorizer.lua]], false)
|
||||||
|
-- Setup for: vim-surround
|
||||||
|
time([[Setup for vim-surround]], true)
|
||||||
|
try_loadstring("\27LJ\2\nK\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\17vim-surround\17on_file_open\nfuncs\frequire\0", "setup", "vim-surround")
|
||||||
|
time([[Setup for vim-surround]], false)
|
||||||
|
time([[packadd for vim-surround]], true)
|
||||||
|
vim.cmd [[packadd vim-surround]]
|
||||||
|
time([[packadd for vim-surround]], false)
|
||||||
|
-- Setup for: todo-comments.nvim
|
||||||
|
time([[Setup for todo-comments.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\nr\0\0\3\0\6\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\4\0'\2\5\0B\0\2\1K\0\1\0\ttodo\bmap\23todo-comments.nvim\17on_file_open\nfuncs\frequire\0", "setup", "todo-comments.nvim")
|
||||||
|
time([[Setup for todo-comments.nvim]], false)
|
||||||
|
-- Setup for: vim-illuminate
|
||||||
|
time([[Setup for vim-illuminate]], true)
|
||||||
|
try_loadstring("\27LJ\2\nt\0\0\3\0\6\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\4\0'\2\5\0B\0\2\1K\0\1\0\15illuminate\bmap\19vim-illuminate\17on_file_open\nfuncs\frequire\0", "setup", "vim-illuminate")
|
||||||
|
time([[Setup for vim-illuminate]], false)
|
||||||
|
-- Setup for: bufferline.nvim
|
||||||
|
time([[Setup for bufferline.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\nu\0\0\3\0\6\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\4\0'\2\5\0B\0\2\1K\0\1\0\15bufferline\bmap\20bufferline.nvim\17on_file_open\nfuncs\frequire\0", "setup", "bufferline.nvim")
|
||||||
|
time([[Setup for bufferline.nvim]], false)
|
||||||
|
-- Setup for: vim-repeat
|
||||||
|
time([[Setup for vim-repeat]], true)
|
||||||
|
try_loadstring("\27LJ\2\nI\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\15vim-repeat\17on_file_open\nfuncs\frequire\0", "setup", "vim-repeat")
|
||||||
|
time([[Setup for vim-repeat]], false)
|
||||||
|
time([[packadd for vim-repeat]], true)
|
||||||
|
vim.cmd [[packadd vim-repeat]]
|
||||||
|
time([[packadd for vim-repeat]], false)
|
||||||
|
-- Setup for: telescope.nvim
|
||||||
|
time([[Setup for telescope.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n?\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\14telescope\bmap\nfuncs\frequire\0", "setup", "telescope.nvim")
|
||||||
|
time([[Setup for telescope.nvim]], false)
|
||||||
|
-- Setup for: nvim-treesitter
|
||||||
|
time([[Setup for nvim-treesitter]], true)
|
||||||
|
try_loadstring("\27LJ\2\nN\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\20nvim-treesitter\17on_file_open\nfuncs\frequire\0", "setup", "nvim-treesitter")
|
||||||
|
time([[Setup for nvim-treesitter]], false)
|
||||||
|
-- Setup for: nvim-dap-ui
|
||||||
|
time([[Setup for nvim-dap-ui]], true)
|
||||||
|
try_loadstring("\27LJ\2\nJ\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\16nvim-dap-ui\17on_file_open\nfuncs\frequire\0", "setup", "nvim-dap-ui")
|
||||||
|
time([[Setup for nvim-dap-ui]], false)
|
||||||
|
-- Setup for: nvim-lspconfig
|
||||||
|
time([[Setup for nvim-lspconfig]], true)
|
||||||
|
try_loadstring("\27LJ\2\nM\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0\19nvim-lspconfig\17on_file_open\nfuncs\frequire\0", "setup", "nvim-lspconfig")
|
||||||
|
time([[Setup for nvim-lspconfig]], false)
|
||||||
|
time([[packadd for nvim-lspconfig]], true)
|
||||||
|
vim.cmd [[packadd nvim-lspconfig]]
|
||||||
|
time([[packadd for nvim-lspconfig]], false)
|
||||||
|
-- Config for: null-ls.nvim
|
||||||
|
time([[Config for null-ls.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.config.null-ls\frequire\0", "config", "null-ls.nvim")
|
||||||
|
time([[Config for null-ls.nvim]], false)
|
||||||
|
-- Config for: alpha-nvim
|
||||||
|
time([[Config for alpha-nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins.config.alpha\frequire\0", "config", "alpha-nvim")
|
||||||
|
time([[Config for alpha-nvim]], false)
|
||||||
|
-- Config for: which-key.nvim
|
||||||
|
time([[Config for which-key.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins.config.whichkey\frequire\0", "config", "which-key.nvim")
|
||||||
|
time([[Config for which-key.nvim]], false)
|
||||||
|
-- Config for: lualine.nvim
|
||||||
|
time([[Config for lualine.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins.config.lualine\frequire\0", "config", "lualine.nvim")
|
||||||
|
time([[Config for lualine.nvim]], false)
|
||||||
|
-- Config for: mason-lspconfig.nvim
|
||||||
|
time([[Config for mason-lspconfig.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n>\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0#plugins.config.mason-lspconfig\frequire\0", "config", "mason-lspconfig.nvim")
|
||||||
|
time([[Config for mason-lspconfig.nvim]], false)
|
||||||
|
-- Config for: tokyonight.nvim
|
||||||
|
time([[Config for tokyonight.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.config.tokyonight\frequire\0", "config", "tokyonight.nvim")
|
||||||
|
time([[Config for tokyonight.nvim]], false)
|
||||||
|
-- Config for: toggleterm.nvim
|
||||||
|
time([[Config for toggleterm.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins.config.toggleterm\frequire\0", "config", "toggleterm.nvim")
|
||||||
|
time([[Config for toggleterm.nvim]], false)
|
||||||
|
-- Config for: mason.nvim
|
||||||
|
time([[Config for mason.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins.config.mason\frequire\0", "config", "mason.nvim")
|
||||||
|
time([[Config for mason.nvim]], false)
|
||||||
|
-- Config for: nvim-lspconfig
|
||||||
|
time([[Config for nvim-lspconfig]], true)
|
||||||
|
try_loadstring("\27LJ\2\n8\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\29plugins.config.lspconfig\frequire\0", "config", "nvim-lspconfig")
|
||||||
|
time([[Config for nvim-lspconfig]], false)
|
||||||
|
|
||||||
|
-- Command lazy-loads
|
||||||
|
time([[Defining lazy-load commands]], true)
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSBufDisable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSBufDisable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSEnable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSEnable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSDisable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSDisable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSModuleInfo lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSModuleInfo", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _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>, mods = "<mods>" }, _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>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeFocus lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeFocus", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[au CmdUndefined lua require('telescope').extensions.projects.projects()<CR> ++once lua require"packer.load"({'project.nvim'}, {}, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSInstall lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSInstall", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSBufEnable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSBufEnable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
time([[Defining lazy-load commands]], false)
|
||||||
|
|
||||||
|
-- Keymap lazy-loads
|
||||||
|
time([[Defining lazy-load keymaps]], true)
|
||||||
|
vim.cmd [[noremap <silent> gb <cmd>lua require("packer.load")({'Comment.nvim'}, { keys = "gb", prefix = "" }, _G.packer_plugins)<cr>]]
|
||||||
|
vim.cmd [[noremap <silent> gc <cmd>lua require("packer.load")({'Comment.nvim'}, { keys = "gc", prefix = "" }, _G.packer_plugins)<cr>]]
|
||||||
|
time([[Defining lazy-load keymaps]], false)
|
||||||
|
|
||||||
|
vim.cmd [[augroup packer_load_aucmds]]
|
||||||
|
vim.cmd [[au!]]
|
||||||
|
-- Filetype lazy-loads
|
||||||
|
time([[Defining lazy-load filetype autocommands]], true)
|
||||||
|
vim.cmd [[au FileType kitty ++once lua require("packer.load")({'vim-kitty'}, { ft = "kitty" }, _G.packer_plugins)]]
|
||||||
|
vim.cmd [[au FileType alpha ++once lua require("packer.load")({'project.nvim', 'nvim-tree.lua'}, { ft = "alpha" }, _G.packer_plugins)]]
|
||||||
|
vim.cmd [[au FileType gitcommit ++once lua require("packer.load")({'gitsigns.nvim'}, { ft = "gitcommit" }, _G.packer_plugins)]]
|
||||||
|
time([[Defining lazy-load filetype autocommands]], false)
|
||||||
|
vim.cmd("augroup END")
|
||||||
|
vim.cmd [[augroup filetypedetect]]
|
||||||
|
time([[Sourcing ftdetect script at: /home/luca/.local/share/nvim/site/pack/packer/opt/vim-kitty/ftdetect/kitty.vim]], true)
|
||||||
|
vim.cmd [[source /home/luca/.local/share/nvim/site/pack/packer/opt/vim-kitty/ftdetect/kitty.vim]]
|
||||||
|
time([[Sourcing ftdetect script at: /home/luca/.local/share/nvim/site/pack/packer/opt/vim-kitty/ftdetect/kitty.vim]], false)
|
||||||
|
vim.cmd("augroup END")
|
||||||
|
|
||||||
_G._packer.inside_compile = false
|
_G._packer.inside_compile = false
|
||||||
if _G._packer.needs_bufread == true then
|
if _G._packer.needs_bufread == true then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue