cleanup, initial work on snippets
This commit is contained in:
parent
d65267b0e3
commit
b97dcc09d7
31 changed files with 107 additions and 282 deletions
|
@ -38,7 +38,7 @@ M.list = {
|
|||
{
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = "~/.local/src/dwmblocks/config.h",
|
||||
pattern = "*/dwmblocks/config.h",
|
||||
command = "!cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid -f dwmblocks }"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
local M = {}
|
||||
|
||||
M.list = {
|
||||
kind = {
|
||||
Array = "",
|
||||
|
|
|
@ -2,13 +2,8 @@ local M = {}
|
|||
|
||||
local maps = {
|
||||
general = {
|
||||
n = { -- normal mode
|
||||
-- Better window navigation
|
||||
{ "<C-h>", "<C-w>h" },
|
||||
{ "<C-j>", "<C-w>j" },
|
||||
{ "<C-k>", "<C-w>k" },
|
||||
{ "<C-l>", "<C-w>l" },
|
||||
-- Resize with arrows
|
||||
n = {
|
||||
-- Resize windows with arrows
|
||||
{ "<C-Up>", ":resize -2<CR>" },
|
||||
{ "<C-Down>", ":resize +2<CR>" },
|
||||
{ "<C-Left>", ":vertical resize -2<CR>" },
|
||||
|
@ -17,18 +12,18 @@ local maps = {
|
|||
{ "<TAB>", ":bnext<CR>" },
|
||||
{ "<S-TAB>", ":bprevious<CR>" },
|
||||
-- lsp
|
||||
{ "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>" },
|
||||
{ "gd", "<cmd>lua vim.lsp.buf.definition()<CR>" },
|
||||
{ "K", "<cmd>lua vim.lsp.buf.hover()<CR>" },
|
||||
{ "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>" },
|
||||
{ "gr", "<cmd>lua vim.lsp.buf.references()<CR>" },
|
||||
{ "gl", "<cmd>lua vim.diagnostic.open_float()<CR>" },
|
||||
{ "gD", vim.lsp.buf.declaration },
|
||||
{ "gd", vim.lsp.buf.definition },
|
||||
{ "K", vim.lsp.buf.hover },
|
||||
{ "gI", vim.lsp.buf.implementation },
|
||||
{ "gr", vim.lsp.buf.references },
|
||||
{ "gl", vim.diagnostic.open_float },
|
||||
},
|
||||
i = { -- insert mode
|
||||
i = {
|
||||
-- Delete last word with ctrl + del
|
||||
{ "<C-BS>", "<C-W>" },
|
||||
},
|
||||
v = { -- visual mode
|
||||
v = {
|
||||
-- Better paste
|
||||
{ "p", '"_dP' },
|
||||
-- Stay in indent mode
|
||||
|
@ -36,46 +31,50 @@ local maps = {
|
|||
{ ">", ">gv" },
|
||||
}
|
||||
},
|
||||
illuminate = {
|
||||
n = {
|
||||
{ "<a-n>", "<cmd>lua require('illuminate').next_reference{wrap=true}<CR>" },
|
||||
{ "<a-p>", "<cmd>lua require('illuminate').next_reference{reverse=true,wrap=true}<CR>" },
|
||||
}
|
||||
},
|
||||
bufferline = {
|
||||
n = {
|
||||
{ "<TAB>", "<cmd>BufferLineCycleNext<CR>", "Previous" },
|
||||
{ "<S-TAB>", "<cmd>BufferLineCyclePrev<CR>", "Next" },
|
||||
{ "<TAB>", "<cmd>BufferLineCycleNext<CR>" },
|
||||
{ "<S-TAB>", "<cmd>BufferLineCyclePrev<CR>" },
|
||||
}
|
||||
}
|
||||
},
|
||||
blankline = {
|
||||
n = {
|
||||
{ "<c-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
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
local function start_lf()
|
||||
require('lf').start()
|
||||
end
|
||||
|
||||
|
||||
local wkmaps = {
|
||||
general = {
|
||||
n = {
|
||||
["w"] = { "<cmd>w!<CR>", "Save" },
|
||||
["q"] = { function() require("funcs").buf_kill() end, "Close" },
|
||||
["q"] = { require("funcs").buf_kill, "Close" },
|
||||
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
||||
["e"] = { function() require('packer').loader("lf.nvim") start_lf() end, "File Picker" },
|
||||
["n"] = { "<cmd>ene<CR>", "New File" },
|
||||
u = {
|
||||
name = "Utility",
|
||||
c = { "<cmd>w!<CR><cmd>!compiler \"%:p\"<CR>", "Compile" },
|
||||
-- g = { function() require('packer').loader("nvim-ghost.nvim") end, "Start ghost server" },
|
||||
},
|
||||
l = {
|
||||
name = "LSP",
|
||||
a = { function() vim.lsp.buf.code_action() end, "Code Action" },
|
||||
f = { function() require("funcs").format { async = true } end, "Format" },
|
||||
j = { function() vim.diagnostic.goto_next() end, "Next Diagnostic" },
|
||||
k = { function() vim.diagnostic.goto_prev() end, "Prev Diagnostic" },
|
||||
l = { function() vim.lsp.codelens.run() end, "CodeLens Action" },
|
||||
q = { function() vim.diagnostic.setloclist() end, "Quickfix" },
|
||||
r = { function() vim.lsp.buf.rename() end, "Rename" },
|
||||
a = { vim.lsp.buf.code_action, "Code Action" },
|
||||
f = { function() require("funcs").format({ async = true }) end, "Format" },
|
||||
j = { vim.diagnostic.goto_next, "Next Diagnostic" },
|
||||
k = { vim.diagnostic.goto_prev, "Prev Diagnostic" },
|
||||
l = { vim.lsp.codelens.run, "CodeLens Action" },
|
||||
q = { vim.diagnostic.setloclist, "Quickfix" },
|
||||
r = { vim.lsp.buf.rename, "Rename" },
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -84,7 +83,7 @@ local wkmaps = {
|
|||
n = {
|
||||
l = {
|
||||
name = "LSP",
|
||||
i = { "<cmd>LspInfo<cr>", "Info" },
|
||||
i = { "<cmd>LspInfo<cr>", "LSP Info" },
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -100,69 +99,15 @@ local wkmaps = {
|
|||
n = {
|
||||
d = {
|
||||
name = "DAP",
|
||||
b = { function() require("dap").toggle_breakpoint() end, "Toggle Breakpoint" },
|
||||
c = { function() require("dap").continue() end, "Continue" },
|
||||
i = { function() require("dap").step_into() end, "Step Into" },
|
||||
o = { function() require("dap").step_over() end, "Step Over" },
|
||||
O = { function() require("dap").step_out() end, "Step Out" },
|
||||
r = { function() require("dap").repl.toggle() end, "Toggle REPL" },
|
||||
l = { function() require("dap").run_last() end, "Run Last" },
|
||||
t = { function() require("dap").terminate() end, "Stop Debugger" },
|
||||
u = { function() require("dapui").toggle() end, "Toggle DAP UI" },
|
||||
}
|
||||
}
|
||||
},
|
||||
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 = {
|
||||
name = "Search",
|
||||
c = { "<cmd>Telescope colorscheme<cr>", "Colorscheme" },
|
||||
f = { "<cmd>Telescope find_files<cr>", "Find File" },
|
||||
h = { "<cmd>Telescope help_tags<cr>", "Find Help" },
|
||||
H = { "<cmd>Telescope highlights<cr>", "Find highlight groups" },
|
||||
M = { "<cmd>Telescope man_pages<cr>", "Man Pages" },
|
||||
r = { "<cmd>Telescope oldfiles<cr>", "Open Recent File" },
|
||||
R = { "<cmd>Telescope registers<cr>", "Registers" },
|
||||
t = { "<cmd>Telescope live_grep<cr>", "Text" },
|
||||
T = { "<cmd>TodoTelescope<cr>", "Todo Comments" },
|
||||
k = { "<cmd>Telescope keymaps<cr>", "Keymaps" },
|
||||
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",
|
||||
b = { require("dap").toggle_breakpoint, "Toggle Breakpoint" },
|
||||
c = { require("dap").continue, "Continue" },
|
||||
i = { require("dap").step_into, "Step Into" },
|
||||
o = { require("dap").step_over, "Step Over" },
|
||||
O = { require("dap").step_out, "Step Out" },
|
||||
r = { require("dap").repl.toggle, "Toggle REPL" },
|
||||
l = { require("dap").run_last, "Run Last" },
|
||||
t = { require("dap").terminate, "Stop Debugger" },
|
||||
u = { require("dapui").toggle, "Toggle DAP UI" },
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -196,12 +141,7 @@ local wkmaps = {
|
|||
},
|
||||
lf = {
|
||||
n = {
|
||||
["e"] = { function() require("lf").start() end, "File Picker" },
|
||||
}
|
||||
},
|
||||
alpha = {
|
||||
n = {
|
||||
[";"] = { "<cmd>Alpha<CR>", "Dashboard" },
|
||||
["e"] = { require("lf").start, "File Picker" },
|
||||
}
|
||||
},
|
||||
treesitter = {
|
||||
|
@ -224,14 +164,14 @@ local wkmaps = {
|
|||
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" },
|
||||
j = { require("gitsigns").next_hunk, "Next Hunk" },
|
||||
k = { require("gitsigns").prev_hunk, "Prev Hunk" },
|
||||
l = { require("gitsigns").blame_line, "Blame" },
|
||||
p = { require("gitsigns").preview_hunk, "Preview Hunk" },
|
||||
r = { require("gitsigns").reset_hunk, "Reset Hunk" },
|
||||
R = { require("gitsigns").reset_buffer, "Reset Buffer" },
|
||||
s = { require("gitsigns").stage_hunk, "Stage Hunk" },
|
||||
u = { require("gitsigns").undo_stage_hunk, "Undo Stage Hunk" },
|
||||
d = { "<cmd>Gitsigns diffthis HEAD<cr>", "Git Diff" },
|
||||
},
|
||||
}
|
||||
|
@ -245,8 +185,13 @@ M.map = function(section)
|
|||
for mode, binds in pairs(maps[section]) do
|
||||
for _, bind in pairs(binds) do
|
||||
local key = bind[1]
|
||||
local cmd = bind[2]
|
||||
local cmd = ""
|
||||
local opt = { silent = true, noremap = true }
|
||||
if type(bind[2]) == "string" then
|
||||
cmd = bind[2]
|
||||
elseif type(bind[2]) == "function" then
|
||||
opt["callback"] = bind[2]
|
||||
end
|
||||
vim.api.nvim_set_keymap(mode, key, cmd, opt)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -38,12 +38,9 @@ end
|
|||
dashboard.section.header.val = banner
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("f", icons.ui.FindFile .. " Find file", ":Telescope find_files<CR>"),
|
||||
dashboard.button("n", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert<CR>"),
|
||||
dashboard.button("p", icons.ui.Project .. " Find project", ":Telescope projects<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("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
|
||||
dashboard.button("n", icons.ui.NewFile .. " New file", "<CMD>ene<CR>"),
|
||||
dashboard.button("e", icons.ui.FindFile .. " Open file", "<CMD>Lf<CR>"),
|
||||
dashboard.button("q", icons.ui.SignOut .. " Quit", "<CMD>qa<CR>"),
|
||||
}
|
||||
|
||||
dashboard.section.footer.val = "Behold: a Snail's Vim"
|
||||
|
@ -52,5 +49,5 @@ dashboard.section.footer.opts.hl = "Type"
|
|||
dashboard.section.header.opts.hl = "Include"
|
||||
dashboard.section.buttons.opts.hl = "Keyword"
|
||||
|
||||
dashboard.opts.opts.noautocmd = true
|
||||
-- dashboard.opts.opts.noautocmd = true
|
||||
alpha.setup(dashboard.opts)
|
|
@ -11,18 +11,6 @@ autopairs.setup({
|
|||
javascript = { "string", "template_string" },
|
||||
java = false,
|
||||
},
|
||||
fast_wrap = {
|
||||
map = "<M-e>",
|
||||
chars = { "{", "[", "(" },
|
||||
-- chars = { "{", "[", "(", '"', "'" },
|
||||
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
|
||||
offset = 0,
|
||||
end_key = "$",
|
||||
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
||||
check_comma = true,
|
||||
highlight = "PmenuSel",
|
||||
highlight_grey = "LineNr",
|
||||
},
|
||||
})
|
||||
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
|
@ -1,10 +1,9 @@
|
|||
local colors = require('tokyonight.colors').setup({ transform = true })
|
||||
|
||||
local status_ok, bufferline = pcall(require, "bufferline")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local colors = require('tokyonight.colors').setup({ transform = true })
|
||||
local icons = require('config.icons').list
|
||||
|
||||
local function is_ft(b, ft)
|
|
@ -48,10 +48,8 @@ cmp.setup({
|
|||
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-j>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
|
||||
["<C-k>"] = 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(),
|
|
@ -1,7 +0,0 @@
|
|||
-- This file is currently not used anywhere
|
||||
local status_ok, impatient = pcall(require, "impatient")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
impatient.enable_profile()
|
|
@ -1,18 +0,0 @@
|
|||
local status_ok, project = pcall(require, 'project_nvim')
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
project.setup({
|
||||
-- detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project
|
||||
detection_methods = { "pattern" },
|
||||
|
||||
-- patterns used to detect root dir, when **"pattern"** is in detection_methods
|
||||
patterns = { ".git", "Makefile", "package.json" },
|
||||
})
|
||||
|
||||
local tele_status_ok, telescope = pcall(require, 'telescope')
|
||||
if not tele_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
telescope.load_extension('projects')
|
|
@ -1,58 +0,0 @@
|
|||
local status_ok, telescope = pcall(require, 'telescope')
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local icons = require('config.icons').list
|
||||
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"-L",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
},
|
||||
prompt_prefix = " " .. icons.ui.Search .. " ",
|
||||
selection_caret = " ",
|
||||
entry_prefix = " ",
|
||||
initial_mode = "insert",
|
||||
selection_strategy = "reset",
|
||||
sorting_strategy = "ascending",
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "top",
|
||||
preview_width = 0.55,
|
||||
results_width = 0.8,
|
||||
},
|
||||
vertical = {
|
||||
mirror = false,
|
||||
},
|
||||
width = 0.87,
|
||||
height = 0.80,
|
||||
preview_cutoff = 120,
|
||||
},
|
||||
file_sorter = require("telescope.sorters").get_fuzzy_file,
|
||||
file_ignore_patterns = { ".git/", "node_modules" },
|
||||
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
|
||||
path_display = { "truncate" },
|
||||
winblend = 0,
|
||||
border = {},
|
||||
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
||||
color_devicons = true,
|
||||
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
|
||||
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
|
||||
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
|
||||
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
|
||||
-- Developer configurations: Not meant for general override
|
||||
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
|
||||
mappings = {
|
||||
n = { ["q"] = require("telescope.actions").close },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,15 +1,14 @@
|
|||
local icons = require('config.icons').list
|
||||
|
||||
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
|
||||
|
||||
local icons = require('config.icons').list
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = icons.ui.Bug, texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
|
@ -9,7 +9,7 @@ local plugins = {
|
|||
{ "lewis6991/impatient.nvim" },
|
||||
{ "kylechui/nvim-surround",
|
||||
config = function()
|
||||
require('plugins.config.nvim-surround')
|
||||
require('plugins.nvim-surround')
|
||||
end
|
||||
},
|
||||
{ "fladson/vim-kitty",
|
||||
|
@ -21,56 +21,56 @@ local plugins = {
|
|||
},
|
||||
{ "folke/which-key.nvim",
|
||||
config = function()
|
||||
require('plugins.config.whichkey')
|
||||
require('plugins.whichkey')
|
||||
end,
|
||||
},
|
||||
{ "folke/tokyonight.nvim",
|
||||
config = function()
|
||||
require('plugins.config.tokyonight')
|
||||
require('plugins.tokyonight')
|
||||
end
|
||||
},
|
||||
{ "folke/todo-comments.nvim",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.todo-comments')
|
||||
require('plugins.todo-comments')
|
||||
end
|
||||
},
|
||||
{ "akinsho/bufferline.nvim",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.bufferline')
|
||||
require('plugins.bufferline')
|
||||
require('config.keymaps').map("bufferline")
|
||||
end,
|
||||
},
|
||||
{ "nvim-lualine/lualine.nvim",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.lualine')
|
||||
require('plugins.lualine')
|
||||
end,
|
||||
},
|
||||
{ "akinsho/toggleterm.nvim",
|
||||
config = function()
|
||||
require('plugins.config.toggleterm')
|
||||
require('plugins.toggleterm')
|
||||
end,
|
||||
},
|
||||
{ "lukas-reineke/indent-blankline.nvim",
|
||||
after = "nvim-treesitter",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.indent-blankline')
|
||||
require('plugins.indent-blankline')
|
||||
require('config.keymaps').map("blankline")
|
||||
end,
|
||||
},
|
||||
{ "norcalli/nvim-colorizer.lua",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.nvim-colorizer')
|
||||
require('plugins.nvim-colorizer')
|
||||
end,
|
||||
},
|
||||
{ "RRethy/vim-illuminate",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.illuminate')
|
||||
require('plugins.illuminate')
|
||||
require('config.keymaps').map("illuminate")
|
||||
end,
|
||||
},
|
||||
|
@ -86,7 +86,7 @@ local plugins = {
|
|||
},
|
||||
run = ":TSUpdate",
|
||||
config = function()
|
||||
require('plugins.config.treesitter')
|
||||
require('plugins.treesitter')
|
||||
end,
|
||||
},
|
||||
{ "lewis6991/gitsigns.nvim",
|
||||
|
@ -106,7 +106,7 @@ local plugins = {
|
|||
})
|
||||
end,
|
||||
config = function()
|
||||
require('plugins.config.gitsigns')
|
||||
require('plugins.gitsigns')
|
||||
end,
|
||||
},
|
||||
{ "williamboman/mason.nvim",
|
||||
|
@ -114,7 +114,7 @@ local plugins = {
|
|||
require('config.keymaps').map("mason")
|
||||
end,
|
||||
config = function()
|
||||
require "plugins.config.mason"
|
||||
require "plugins.mason"
|
||||
end,
|
||||
},
|
||||
{ "williamboman/mason-lspconfig.nvim" },
|
||||
|
@ -122,42 +122,39 @@ local plugins = {
|
|||
after = "mason-lspconfig.nvim",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.lspconfig')
|
||||
require('plugins.lspconfig')
|
||||
require('config.keymaps').map("lspconfig")
|
||||
end,
|
||||
},
|
||||
{ "jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
require('plugins.config.null-ls')
|
||||
require('plugins.null-ls')
|
||||
end,
|
||||
},
|
||||
{ "rcarriga/nvim-dap-ui",
|
||||
after = "nvim-dap",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.dapui')
|
||||
require('plugins.dapui')
|
||||
end,
|
||||
},
|
||||
{ "mfussenegger/nvim-dap",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.dap')
|
||||
require('plugins.dap')
|
||||
require('config.keymaps').map("dap")
|
||||
end,
|
||||
},
|
||||
{ "rafamadriz/friendly-snippets",
|
||||
event = "InsertEnter",
|
||||
},
|
||||
{ "hrsh7th/nvim-cmp",
|
||||
after = "friendly-snippets",
|
||||
config = function()
|
||||
require('plugins.config.cmp')
|
||||
require('plugins.cmp')
|
||||
end,
|
||||
},
|
||||
{ "L3MON4D3/LuaSnip",
|
||||
after = "nvim-cmp",
|
||||
run = "make install_jsregexp",
|
||||
config = function()
|
||||
require('plugins.config.luasnip')
|
||||
require('plugins.luasnip')
|
||||
end,
|
||||
},
|
||||
{ "saadparwaiz1/cmp_luasnip", after = "LuaSnip" },
|
||||
|
@ -168,43 +165,27 @@ local plugins = {
|
|||
{ "onsails/lspkind.nvim" },
|
||||
{ "windwp/nvim-autopairs",
|
||||
after = "nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require('plugins.config.autopairs')
|
||||
require('plugins.autopairs')
|
||||
end,
|
||||
},
|
||||
{ "goolord/alpha-nvim",
|
||||
config = function()
|
||||
require('plugins.config.alpha')
|
||||
require('plugins.alpha')
|
||||
end,
|
||||
},
|
||||
{ "numToStr/Comment.nvim",
|
||||
event = { "BufRead", "BufWinEnter", "BufNewFile" },
|
||||
config = function()
|
||||
require('plugins.config.comment')
|
||||
require('plugins.comment')
|
||||
require('config.keymaps').map("comment")
|
||||
end,
|
||||
},
|
||||
{ "nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
require('plugins.config.telescope')
|
||||
require('config.keymaps').map("telescope")
|
||||
end,
|
||||
},
|
||||
{ "ahmedkhalf/project.nvim",
|
||||
after = "telescope.nvim",
|
||||
config = function()
|
||||
require('plugins.config.project')
|
||||
end,
|
||||
},
|
||||
-- { "subnut/nvim-ghost.nvim",
|
||||
-- opt = true,
|
||||
-- run = ":call nvim_ghost#installer#install()",
|
||||
-- },
|
||||
{ "lmburns/lf.nvim",
|
||||
opt = true,
|
||||
commit = "383429497292dd8a84271e74a81c6db6993ca7ab",
|
||||
config = function()
|
||||
require('plugins.config.lf')
|
||||
require('plugins.lf')
|
||||
require('config.keymaps').map("lf")
|
||||
end
|
||||
},
|
||||
|
|
|
@ -3,14 +3,9 @@ if not status_ok then
|
|||
return
|
||||
end
|
||||
|
||||
local options = {
|
||||
luasnip.setup({
|
||||
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()
|
|
@ -2,6 +2,7 @@ local status_ok, todo_comments = pcall(require, 'todo-comments')
|
|||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
todo_comments.setup({
|
||||
highlight = {
|
||||
multiline = false,
|
|
@ -2,6 +2,7 @@ local status_ok, configs = pcall(require, 'nvim-treesitter.configs')
|
|||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "lua", "bash", "c" },
|
||||
auto_install = true,
|
|
@ -2,6 +2,7 @@ local status_ok, whichkey = pcall(require, 'which-key')
|
|||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local icons = require('config.icons').list
|
||||
|
||||
whichkey.setup({
|
|
@ -1 +1,3 @@
|
|||
TODO: set nvim-surround keybinds separately from plugin setup
|
||||
TODO: set nvim-surround, nvim-cmp keybinds separately from plugin setup
|
||||
TODO: completely rework snippets, autocomplete
|
||||
TODO: remove project plugin or start using it
|
||||
|
|
Loading…
Add table
Reference in a new issue