forked from dineshsalunke/nvim-config
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
eaf23496e9 | ||
|
629d950126 | ||
|
6a5a899429 | ||
|
6cd3836bd7 | ||
|
e087408b1f | ||
|
0758db6327 | ||
|
81b0f8593e | ||
|
a9ada7444e | ||
|
68050d2123 | ||
|
ed6dd19238 | ||
|
b6a9376e6e | ||
|
354db1f435 | ||
|
68d31dfb1c | ||
|
86ab0af01d | ||
385bf1bd50 | |||
e1930ef9d3 | |||
356110906d | |||
22e43507bf | |||
a17e69d419 | |||
dabb532500 | |||
f3aee592e1 |
@ -1,54 +1,55 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "4b36c1ca9ea475bdc006896657cf1ccc486aeffa" },
|
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "d6cb9b7cac52887bcac65f8698e67479553c0748" },
|
"bufferline.nvim": { "branch": "main", "commit": "9f0826ae6adfd836a23bf8a4910e3c07450211f4" },
|
||||||
"catppuccin": { "branch": "main", "commit": "afab7ec2a79c7127627dede79c0018b6e45663d0" },
|
"catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "0e88293ce3459f4bb310125f3366304af6dc7990" },
|
"conform.nvim": { "branch": "master", "commit": "990d37017e193fe40bdabf058e598e76f5e7d929" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
|
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||||
"formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" },
|
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
||||||
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
|
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
|
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||||
"lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" },
|
"lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" },
|
||||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" },
|
"lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
|
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "b9084b1f42f790d6230dc66dbcb6bcc35b148552" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "dcd0ea30ccfc7d47e879878d1270d6847a519181" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"mini.bufremove": { "branch": "main", "commit": "020243bfed8c8b941f2c20626faf3ea39c0c0e1b" },
|
"mdx.nvim": { "branch": "main", "commit": "ae83959b61a9fec8da228ebb5d6b045fd532d2cc" },
|
||||||
"mini.indentscope": { "branch": "main", "commit": "5a8369475cd7cd6f207a4d288406d03b0fc48bdb" },
|
"mini.bufremove": { "branch": "main", "commit": "285bdac9596ee7375db50c0f76ed04336dcd2685" },
|
||||||
"mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" },
|
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
|
||||||
"mini.surround": { "branch": "main", "commit": "3c98c6be8028139a114081e06d2a9f1ac3f4b7fc" },
|
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||||
|
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" },
|
||||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
|
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "64b2a51b02c6f2ae177c745e4d8bc801a339fe09" },
|
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
|
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
|
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
"nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" },
|
"nvim-lspconfig": { "branch": "master", "commit": "a8ef5e6e497b3ebeaaf35b939c07c211563b2e05" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "80b67b265530632505193553d05127ae7fe09ddd" },
|
"nvim-notify": { "branch": "master", "commit": "bd9cd51f9ef2f6326fc2bc9931d0718c1794e247" },
|
||||||
|
"nvim-spectre": { "branch": "master", "commit": "08be31c104df3b4b049607694ebb2b6ced4f928b" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "b6492f41c46d9c3bc3550ecfb10c3f261e73cba6" },
|
"nvim-treesitter": { "branch": "master", "commit": "b6492f41c46d9c3bc3550ecfb10c3f261e73cba6" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "a65b202cfd08e0e69e531eab737205ff5bc082a4" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "b427ac5f9dff494f839e81441fb3f04a58cbcfbc" },
|
"nvim-web-devicons": { "branch": "master", "commit": "5740b7382429d20b6ed0bbdb0694185af9507d44" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "663246936325062427597964d81d30eaa42ab1e4" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
"rest.nvim": { "branch": "main", "commit": "2d7bd3d398940ce2692941e6cd052c072207b9f9" },
|
"smart-splits.nvim": { "branch": "master", "commit": "d2da32b76b89126609f4142bd55279c8723cb050" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "36bfe63246386fc5ae2679aa9b17a7746b7403d5" },
|
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "2f3857c25bbd00ed7ac593c9d4071906369e4d20" },
|
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
|
||||||
"twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
|
"typescript-tools.nvim": { "branch": "master", "commit": "35e397ce467bedbbbb5bfcd0aa79727b59a08d4a" },
|
||||||
"typescript-tools.nvim": { "branch": "master", "commit": "c43d9580c3ff5999a1eabca849f807ab33787ea7" },
|
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "97c1265ff0b67064b6cfdc15bafc50202a537ae2" },
|
|
||||||
"vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" },
|
"vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
|
"which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" },
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
|
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
|
||||||
}
|
}
|
||||||
|
79
lua/_plugins/tnf.nvim/lua/telescope/_extensions/tnf.lua
Normal file
79
lua/_plugins/tnf.nvim/lua/telescope/_extensions/tnf.lua
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
local actions = require("telescope.actions")
|
||||||
|
local action_state = require("telescope.actions.state")
|
||||||
|
local Path = require("plenary.path")
|
||||||
|
local built_in = require("telescope.builtin")
|
||||||
|
|
||||||
|
local os_sep = Path.path.sep
|
||||||
|
|
||||||
|
local is_dir = function(path)
|
||||||
|
if Path.is_path(path) then
|
||||||
|
return path:is_dir()
|
||||||
|
end
|
||||||
|
return string.sub(path, -1, -1) == os_sep
|
||||||
|
end
|
||||||
|
|
||||||
|
local create_file = function(file)
|
||||||
|
if not file then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if file == "" then
|
||||||
|
vim.notify(
|
||||||
|
string.format("[file_browser.%s] %s", "actions.create", "Please enter a valid file or folder name!"),
|
||||||
|
vim.log.levels.WARN,
|
||||||
|
{
|
||||||
|
title = "telescope-file-browser.nvim",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
file = Path:new(file)
|
||||||
|
if file:exists() then
|
||||||
|
vim.notify(
|
||||||
|
string.format("[file_browser.%s] %s", "actions.create", "Selection already exists!"),
|
||||||
|
vim.log.levels.WARN,
|
||||||
|
{
|
||||||
|
title = "telescope-file-browser.nvim",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not is_dir(file.filename) then
|
||||||
|
file:touch({ parents = true })
|
||||||
|
else
|
||||||
|
Path:new(file.filename:sub(1, -2)):mkdir({ parents = true, mode = 493 }) -- 493 => decimal for mode 0755
|
||||||
|
end
|
||||||
|
|
||||||
|
return file
|
||||||
|
end
|
||||||
|
local get_dropdown = require("telescope.themes").get_dropdown
|
||||||
|
local tnf = function()
|
||||||
|
built_in.find_files(get_dropdown({
|
||||||
|
previewer = false,
|
||||||
|
find_command = { "find", ".", "-type", "d", "-not", "-path", "*/node_modules/*" },
|
||||||
|
attach_mappings = function(prompt_bufnr)
|
||||||
|
actions.select_default:replace(function()
|
||||||
|
local current_picker = action_state.get_current_picker(prompt_bufnr)
|
||||||
|
local entry = action_state.get_selected_entry()
|
||||||
|
if entry then
|
||||||
|
local base_dir = action_state.get_selected_entry().value .. os_sep
|
||||||
|
current_picker:reset_prompt(base_dir, true)
|
||||||
|
else
|
||||||
|
local file_path = current_picker:_get_prompt()
|
||||||
|
actions.close(prompt_bufnr)
|
||||||
|
local file = create_file(file_path)
|
||||||
|
if file then
|
||||||
|
vim.cmd.edit(file:absolute())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
}))
|
||||||
|
end
|
||||||
|
|
||||||
|
return require("telescope").register_extension({
|
||||||
|
exports = {
|
||||||
|
tnf = tnf,
|
||||||
|
},
|
||||||
|
})
|
@ -35,9 +35,3 @@ vim.api.nvim_create_autocmd("BufEnter", {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_augroup("__formatter__", { clear = true })
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
|
||||||
group = "__formatter__",
|
|
||||||
command = ":FormatWrite"
|
|
||||||
})
|
|
||||||
|
@ -71,3 +71,5 @@ map("n", "<leader><tab>[", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
|
|||||||
-- map("t", "<esc>", [[<c-\><c-n>]], { desc = "Escape on terminal" })
|
-- map("t", "<esc>", [[<c-\><c-n>]], { desc = "Escape on terminal" })
|
||||||
|
|
||||||
map("n", "<C-a>", "gg<S-v>G", { desc = "Select all" })
|
map("n", "<C-a>", "gg<S-v>G", { desc = "Select all" })
|
||||||
|
|
||||||
|
map("n", "<leader>nf", "<cmd>Telescope tnf<cr>", { desc = "Telescope new file" })
|
||||||
|
@ -67,6 +67,7 @@ opt.grepformat = "%f:%l:%c:%m"
|
|||||||
opt.grepprg = "rg --vimgrep"
|
opt.grepprg = "rg --vimgrep"
|
||||||
opt.inccommand = "nosplit" -- preview incremental substitute
|
opt.inccommand = "nosplit" -- preview incremental substitute
|
||||||
opt.list = true -- Show some invisible characters (tabs...
|
opt.list = true -- Show some invisible characters (tabs...
|
||||||
|
opt.listchars = "tab:→ ,space:·,nbsp:␣,trail:•,precedes:«,extends:»"
|
||||||
|
|
||||||
opt.pumblend = 12 -- Popup blend
|
opt.pumblend = 12 -- Popup blend
|
||||||
opt.pumheight = 12 -- Maximum number of entries in a popup
|
opt.pumheight = 12 -- Maximum number of entries in a popup
|
||||||
|
8
lua/plugins/Comment.lua
Normal file
8
lua/plugins/Comment.lua
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
58
lua/plugins/alpha.lua
Normal file
58
lua/plugins/alpha.lua
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
opts = function()
|
||||||
|
local dashboard = require("alpha.themes.dashboard")
|
||||||
|
local logo = [[
|
||||||
|
|
||||||
|
]]
|
||||||
|
|
||||||
|
dashboard.section.header.val = vim.split(logo, "\n")
|
||||||
|
dashboard.section.buttons.val = {
|
||||||
|
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
|
||||||
|
dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
|
||||||
|
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
|
||||||
|
dashboard.button("g", " " .. " Find text", ":Telescope live_grep <CR>"),
|
||||||
|
dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"),
|
||||||
|
dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
|
||||||
|
dashboard.button("l", " " .. " Lazy", ":Lazy<CR>"),
|
||||||
|
dashboard.button("q", " " .. " Quit", ":qa<CR>"),
|
||||||
|
}
|
||||||
|
for _, button in ipairs(dashboard.section.buttons.val) do
|
||||||
|
button.opts.hl = "AlphaButtons"
|
||||||
|
button.opts.hl_shortcut = "AlphaShortcut"
|
||||||
|
end
|
||||||
|
dashboard.section.header.opts.hl = "AlphaHeader"
|
||||||
|
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
||||||
|
dashboard.section.footer.opts.hl = "AlphaFooter"
|
||||||
|
dashboard.opts.layout[1].val = 8
|
||||||
|
return dashboard
|
||||||
|
end,
|
||||||
|
config = function(_, dashboard)
|
||||||
|
local lazy = require("lazy")
|
||||||
|
-- close Lazy and re-open when the dashboard is ready
|
||||||
|
if vim.o.filetype == "lazy" then
|
||||||
|
vim.cmd.close()
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "AlphaReady",
|
||||||
|
callback = function()
|
||||||
|
lazy.show()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
require("alpha").setup(dashboard.opts)
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "LazyVimStarted",
|
||||||
|
callback = function()
|
||||||
|
local stats = lazy.stats()
|
||||||
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
|
dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
|
||||||
|
pcall(vim.cmd.AlphaRedraw)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
16
lua/plugins/autotag.lua
Normal file
16
lua/plugins/autotag.lua
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
config = function(_, _)
|
||||||
|
local autotag = require("nvim-ts-autotag")
|
||||||
|
|
||||||
|
autotag.setup({
|
||||||
|
opts = {
|
||||||
|
enable_rename = true,
|
||||||
|
enable_close = true,
|
||||||
|
enable_close_on_slash = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
19
lua/plugins/bufferline.lua
Normal file
19
lua/plugins/bufferline.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
||||||
|
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
offsets = {
|
||||||
|
{
|
||||||
|
filetype = "neo-tree",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
10
lua/plugins/bufremove.lua
Normal file
10
lua/plugins/bufremove.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"echasnovski/mini.bufremove",
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "<leader>bd", function() require("mini.bufremove").delete(0, false) end, desc = "Delete Buffer" },
|
||||||
|
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1,215 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
version = "2.*",
|
|
||||||
build = (not jit.os:find("Windows"))
|
|
||||||
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
|
|
||||||
or nil,
|
|
||||||
opts = {
|
|
||||||
history = true,
|
|
||||||
delete_check_events = "TextChanged",
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local ls = require("luasnip")
|
|
||||||
ls.setup({
|
|
||||||
history = true,
|
|
||||||
delete_check_events = "TextChanged",
|
|
||||||
})
|
|
||||||
require("luasnip.loaders.from_lua").load({ paths = "~/snippets" })
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
},
|
|
||||||
-- stylua: ignore
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
version = false,
|
|
||||||
event = "InsertEnter",
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-nvim-lua",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
|
||||||
"onsails/lspkind.nvim",
|
|
||||||
},
|
|
||||||
opts = function()
|
|
||||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
|
||||||
local luasnip = require("luasnip")
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local border_opts = {
|
|
||||||
border = {
|
|
||||||
{ "╭", "CmpDocBorder" },
|
|
||||||
{ "─", "CmpDocBorder" },
|
|
||||||
{ "╮", "CmpDocBorder" },
|
|
||||||
{ "│", "CmpDocBorder" },
|
|
||||||
{ "╯", "CmpDocBorder" },
|
|
||||||
{ "─", "CmpDocBorder" },
|
|
||||||
{ "╰", "CmpDocBorder" },
|
|
||||||
{ "│", "CmpDocBorder" },
|
|
||||||
},
|
|
||||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
|
|
||||||
}
|
|
||||||
local has_words_before = function()
|
|
||||||
unpack = unpack or table.unpack
|
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
|
||||||
return col ~= 0
|
|
||||||
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
|
||||||
end
|
|
||||||
return {
|
|
||||||
formatting = {
|
|
||||||
fields = {
|
|
||||||
"abbr",
|
|
||||||
"kind",
|
|
||||||
"menu",
|
|
||||||
},
|
|
||||||
format = require("lspkind").cmp_format({
|
|
||||||
mode = "symbol_text",
|
|
||||||
maxwidth = 150,
|
|
||||||
ellipsis_char = "...",
|
|
||||||
before = function(entry, vim_item)
|
|
||||||
vim_item.menu = ({
|
|
||||||
nvim_lsp = "[LSP]",
|
|
||||||
buffer = "[Buffer]",
|
|
||||||
})[entry.source.name]
|
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
completion = {
|
|
||||||
completeopt = "menu,menuone,noinsert",
|
|
||||||
},
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ behavior = cmp.SelectBehavior.Replace, select = true }),
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
|
||||||
-- they way you will only jump inside the snippet region
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
elseif has_words_before() then
|
|
||||||
cmp.complete()
|
|
||||||
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 = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "nvim_lsp_signature_help" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
}),
|
|
||||||
window = {
|
|
||||||
scrollbar = false,
|
|
||||||
completion = cmp.config.window.bordered(border_opts),
|
|
||||||
documentation = cmp.config.window.bordered(border_opts),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"mhartington/formatter.nvim",
|
|
||||||
opts = {},
|
|
||||||
config = function()
|
|
||||||
local formatter = require("formatter")
|
|
||||||
formatter.setup({
|
|
||||||
filetype = {
|
|
||||||
lua = {
|
|
||||||
require("formatter.filetypes.lua").stylua,
|
|
||||||
},
|
|
||||||
typescript = {
|
|
||||||
require("formatter.filetypes.typescript").prettierd,
|
|
||||||
require("formatter.filetypes.typescript").eslint_d,
|
|
||||||
},
|
|
||||||
typescriptreact = {
|
|
||||||
require("formatter.filetypes.typescript").prettierd,
|
|
||||||
require("formatter.filetypes.typescript").eslint_d,
|
|
||||||
},
|
|
||||||
javascript = {
|
|
||||||
require("formatter.filetypes.typescript").prettierd,
|
|
||||||
require("formatter.filetypes.typescript").eslint_d,
|
|
||||||
},
|
|
||||||
javascriptreact = {
|
|
||||||
require("formatter.filetypes.typescript").prettierd,
|
|
||||||
require("formatter.filetypes.typescript").eslint_d,
|
|
||||||
},
|
|
||||||
json = {
|
|
||||||
require("formatter.filetypes.typescript").prettierd,
|
|
||||||
},
|
|
||||||
go = {
|
|
||||||
require("formatter.filetypes.go").gofumpt,
|
|
||||||
require("formatter.filetypes.go").goimports,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"echasnovski/mini.pairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"echasnovski/mini.surround",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/zen-mode.nvim",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>zm",
|
|
||||||
function()
|
|
||||||
require("zen-mode").toggle({
|
|
||||||
window = {
|
|
||||||
width = 0.85,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
plugins = {
|
|
||||||
twilight = { enabled = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/twilight.nvim",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
|
@ -8,7 +8,28 @@ return {
|
|||||||
neotree = true,
|
neotree = true,
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme("catppuccin-mocha")
|
local catppuccin = require("catppuccin")
|
||||||
|
catppuccin.setup({
|
||||||
|
flavour = "auto",
|
||||||
|
background = {
|
||||||
|
dark = "mocha",
|
||||||
|
light = "latte",
|
||||||
|
},
|
||||||
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
nvimtree = true,
|
||||||
|
treesitter = true,
|
||||||
|
notify = false,
|
||||||
|
mini = {
|
||||||
|
enabled = true,
|
||||||
|
indentscope_color = "",
|
||||||
|
},
|
||||||
|
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||||
|
},
|
||||||
|
transparent_background = true,
|
||||||
|
})
|
||||||
|
vim.cmd.colorscheme("catppuccin")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
26
lua/plugins/conform.lua
Normal file
26
lua/plugins/conform.lua
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
local confrom = require("conform")
|
||||||
|
confrom.setup({
|
||||||
|
log_level = vim.log.levels.DEBUG,
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
javascript = { "prettierd", "eslint_d" },
|
||||||
|
typescript = { "prettierd", "eslint_d" },
|
||||||
|
typescriptreact = { "prettierd", "eslint_d" },
|
||||||
|
json = { "prettierd" },
|
||||||
|
jsonc = { "prettierd" },
|
||||||
|
go = { "gofumpt", "goimports" },
|
||||||
|
yaml = { "prettierd" },
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_fallback = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
17
lua/plugins/dressing.lua
Normal file
17
lua/plugins/dressing.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
opts = {
|
||||||
|
select = {
|
||||||
|
enabled = true,
|
||||||
|
backend = {
|
||||||
|
"telescope",
|
||||||
|
"fzf",
|
||||||
|
"builtin",
|
||||||
|
"nui",
|
||||||
|
},
|
||||||
|
telescope = require("telescope.themes").get_ivy(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1,408 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
cmd = "Neotree",
|
|
||||||
branch = "v2.x",
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
close_if_last_window = true,
|
|
||||||
sources = {
|
|
||||||
"filesystem",
|
|
||||||
"buffers",
|
|
||||||
"git_status",
|
|
||||||
},
|
|
||||||
source_selector = {
|
|
||||||
winbar = true,
|
|
||||||
content_layout = "center",
|
|
||||||
sources = {
|
|
||||||
{ source = "filesystem", display_name = require("config.icons").FolderClosed .. " File" },
|
|
||||||
{ source = "buffers", display_name = require("config.icons").DefaultFile .. " Bufs" },
|
|
||||||
{ source = "git_status", display_name = require("config.icons").Git .. " Git" },
|
|
||||||
{ source = "diagnostics", display_name = require("config.icons").Diagnostic .. " Diagnostic" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
default_component_configs = {
|
|
||||||
indent = {
|
|
||||||
padding = 0,
|
|
||||||
},
|
|
||||||
icon = {
|
|
||||||
folder_closed = require("config.icons").FolderClosed,
|
|
||||||
folder_open = require("config.icons").FolderOpen,
|
|
||||||
folder_empty = require("config.icons").FolderEmpty,
|
|
||||||
folder_empty_open = require("config.icons").FolderEmpty,
|
|
||||||
default = require("config.icons").DefaultFile,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filesystem = {
|
|
||||||
follow_current_file = true,
|
|
||||||
hijack_netrw_behavior = "open_current",
|
|
||||||
use_libuv_file_watcher = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>fe",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({
|
|
||||||
toggle = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
cmd = "Telescope",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>ff",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").find_files()
|
|
||||||
end,
|
|
||||||
desc = "[ F ]ind files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fF",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").find_files({ hidden = true, no_ignore = true })
|
|
||||||
end,
|
|
||||||
desc = "[ F ]ind [ F ]iles",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"<leader>lg",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").live_grep()
|
|
||||||
end,
|
|
||||||
desc = "Live grep",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>gf",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").git_files()
|
|
||||||
end,
|
|
||||||
desc = "Live grep",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"<leader>fc",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").git_commits()
|
|
||||||
end,
|
|
||||||
desc = "Git Commits",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"<leader>of",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").oldfiles()
|
|
||||||
end,
|
|
||||||
desc = "[ O ]ld [ F ]iles",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"<leader>ds",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_document_symbols()
|
|
||||||
end,
|
|
||||||
desc = "[ D ]ocument [ S ]ymbols",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"<leader>wss",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_dynamic_workspace_symbols()
|
|
||||||
end,
|
|
||||||
desc = "[ W ]orkspace [ S ]ymbol[ s ]",
|
|
||||||
remap = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"<leader>lr",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_references()
|
|
||||||
end,
|
|
||||||
desc = "[L]ist [R]erefrences",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ld",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").diagnostics()
|
|
||||||
end,
|
|
||||||
desc = "[ L ]ist [ D ]iagnostics",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>li",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_implementations()
|
|
||||||
end,
|
|
||||||
desc = "[ L ]ist [ I ]mplementation",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ldi",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_definitions()
|
|
||||||
end,
|
|
||||||
desc = "[ L ]ist [ D ]ef[ i ]nitions",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
prompt_prefix = "",
|
|
||||||
selection_caret = "",
|
|
||||||
sorting_strategy = "ascending",
|
|
||||||
path_display = {
|
|
||||||
"smart",
|
|
||||||
},
|
|
||||||
layout_config = {
|
|
||||||
horizontal = {
|
|
||||||
prompt_position = "top",
|
|
||||||
width = 0.75,
|
|
||||||
height = 0.65,
|
|
||||||
preview_width = 0.6,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<C-k>"] = function(...)
|
|
||||||
require("telescope.actions").move_selection_previous(...)
|
|
||||||
end,
|
|
||||||
["<C-j>"] = function(...)
|
|
||||||
require("telescope.actions").move_selection_next(...)
|
|
||||||
end,
|
|
||||||
["<c-t>"] = function(...)
|
|
||||||
require("trouble.providers.telescope").open_with_trouble(...)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
n = {
|
|
||||||
q = function(...)
|
|
||||||
require("telescope.actions").close(...)
|
|
||||||
end,
|
|
||||||
["<c-t>"] = function(...)
|
|
||||||
require("trouble.providers.telescope").open_with_trouble(...)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/flash.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
vscode = true,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"s",
|
|
||||||
mode = { "n", "x", "o" },
|
|
||||||
function()
|
|
||||||
require("flash").jump()
|
|
||||||
end,
|
|
||||||
desc = "Flash",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"S",
|
|
||||||
mode = { "n", "o", "x" },
|
|
||||||
function()
|
|
||||||
require("flash").treesitter()
|
|
||||||
end,
|
|
||||||
desc = "Flash Treesitter",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"r",
|
|
||||||
mode = "o",
|
|
||||||
function()
|
|
||||||
require("flash").remote()
|
|
||||||
end,
|
|
||||||
desc = "Remote Flash",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"R",
|
|
||||||
mode = { "o", "x" },
|
|
||||||
function()
|
|
||||||
require("flash").treesitter_search()
|
|
||||||
end,
|
|
||||||
desc = "Treesitter Search",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-s>",
|
|
||||||
mode = { "c" },
|
|
||||||
function()
|
|
||||||
require("flash").toggle()
|
|
||||||
end,
|
|
||||||
desc = "Toggle Flash Search",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
plugins = {
|
|
||||||
spelling = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
event = {
|
|
||||||
"BufReadPre",
|
|
||||||
"BufNewFile",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
signs = {
|
|
||||||
add = { text = "▎" },
|
|
||||||
change = { text = "▎" },
|
|
||||||
delete = { text = "" },
|
|
||||||
topdelete = { text = "" },
|
|
||||||
changedelete = { text = "▎" },
|
|
||||||
untracked = { text = "▎" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"RRethy/vim-illuminate",
|
|
||||||
event = {
|
|
||||||
"BufReadPost",
|
|
||||||
"BufNewFile",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
delay = 200,
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("illuminate").configure(opts)
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "]]", desc = "Next Reference" },
|
|
||||||
{ "[[", desc = "Prev Reference" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"echasnovski/mini.bufremove",
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "<leader>bd", function() require("mini.bufremove").delete(0, false) end, desc = "Delete Buffer" },
|
|
||||||
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>", desc = "Document Diagnostics (Trouble)" },
|
|
||||||
{ "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Workspace Diagnostics (Trouble)" },
|
|
||||||
{ "<leader>xl", "<cmd>TroubleToggle loclist<cr>", desc = "Location List (Trouble)" },
|
|
||||||
{ "<leader>xq", "<cmd>TroubleToggle quickfix<cr>", desc = "Quickfix List (Trouble)" },
|
|
||||||
},
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"kdheepak/lazygit.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>gg",
|
|
||||||
function()
|
|
||||||
require("lazygit").lazygit()
|
|
||||||
end,
|
|
||||||
desc = "Lazygit",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("lazygit")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
-- you can enable a preset for easier configuration
|
|
||||||
presets = {
|
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = true, -- add a border to hover docs and signature help
|
|
||||||
},
|
|
||||||
routes = {
|
|
||||||
{
|
|
||||||
filter = {
|
|
||||||
event = "msg_show",
|
|
||||||
kind = "",
|
|
||||||
find = "written",
|
|
||||||
},
|
|
||||||
opts = { skip = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
views = {
|
|
||||||
cmdline_popup = {
|
|
||||||
position = {
|
|
||||||
row = 5,
|
|
||||||
col = "50%",
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
width = 60,
|
|
||||||
height = "auto",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
popupmenu = {
|
|
||||||
relative = "editor",
|
|
||||||
position = {
|
|
||||||
row = 8,
|
|
||||||
col = "50%",
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
width = 60,
|
|
||||||
height = 10,
|
|
||||||
},
|
|
||||||
border = {
|
|
||||||
style = "rounded",
|
|
||||||
padding = { 0, 1 },
|
|
||||||
},
|
|
||||||
win_options = {
|
|
||||||
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"psliwka/vim-smoothie",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"mrjones2014/smart-splits.nvim",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
|
49
lua/plugins/flash.lua
Normal file
49
lua/plugins/flash.lua
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
vscode = true,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"s",
|
||||||
|
mode = { "n", "x", "o" },
|
||||||
|
function()
|
||||||
|
require("flash").jump()
|
||||||
|
end,
|
||||||
|
desc = "Flash",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"S",
|
||||||
|
mode = { "n", "o", "x" },
|
||||||
|
function()
|
||||||
|
require("flash").treesitter()
|
||||||
|
end,
|
||||||
|
desc = "Flash Treesitter",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"r",
|
||||||
|
mode = "o",
|
||||||
|
function()
|
||||||
|
require("flash").remote()
|
||||||
|
end,
|
||||||
|
desc = "Remote Flash",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"R",
|
||||||
|
mode = { "o", "x" },
|
||||||
|
function()
|
||||||
|
require("flash").treesitter_search()
|
||||||
|
end,
|
||||||
|
desc = "Treesitter Search",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<c-s>",
|
||||||
|
mode = { "c" },
|
||||||
|
function()
|
||||||
|
require("flash").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Flash Search",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
19
lua/plugins/gitsigns.lua
Normal file
19
lua/plugins/gitsigns.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
event = {
|
||||||
|
"BufReadPre",
|
||||||
|
"BufNewFile",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
signs = {
|
||||||
|
add = { text = "▎" },
|
||||||
|
change = { text = "▎" },
|
||||||
|
delete = { text = "" },
|
||||||
|
topdelete = { text = "" },
|
||||||
|
changedelete = { text = "▎" },
|
||||||
|
untracked = { text = "▎" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
19
lua/plugins/illuminate.lua
Normal file
19
lua/plugins/illuminate.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"RRethy/vim-illuminate",
|
||||||
|
event = {
|
||||||
|
"BufReadPost",
|
||||||
|
"BufNewFile",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
delay = 200,
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("illuminate").configure(opts)
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "]]", desc = "Next Reference" },
|
||||||
|
{ "[[", desc = "Prev Reference" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
32
lua/plugins/indent-blanklike.lua
Normal file
32
lua/plugins/indent-blanklike.lua
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
main = "ibl",
|
||||||
|
opts = {
|
||||||
|
indent = {
|
||||||
|
char = "┊",
|
||||||
|
},
|
||||||
|
whitespace = {
|
||||||
|
highlight = {
|
||||||
|
"CursorColumn",
|
||||||
|
"Whitespace",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exclude = {
|
||||||
|
filetypes = {
|
||||||
|
"help",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"notify",
|
||||||
|
"toggleterm",
|
||||||
|
"lazyterm",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
32
lua/plugins/indentscope.lua
Normal file
32
lua/plugins/indentscope.lua
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
return {
|
||||||
|
-- active indent guide and indent text objects
|
||||||
|
{
|
||||||
|
"echasnovski/mini.indentscope",
|
||||||
|
version = false, -- wait till new 0.7.0 release to put it back on semver
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
-- symbol = "▏",
|
||||||
|
symbol = "│",
|
||||||
|
options = { try_as_border = true },
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = {
|
||||||
|
"help",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"notify",
|
||||||
|
"toggleterm",
|
||||||
|
"lazyterm",
|
||||||
|
},
|
||||||
|
callback = function()
|
||||||
|
vim.b.miniindentscope_disable = true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
21
lua/plugins/lazygit.lua
Normal file
21
lua/plugins/lazygit.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>gg",
|
||||||
|
function()
|
||||||
|
require("lazygit").lazygit()
|
||||||
|
end,
|
||||||
|
desc = "Lazygit",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("lazygit")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
@ -1,12 +1,4 @@
|
|||||||
return {
|
return {
|
||||||
{
|
|
||||||
"VonHeikemen/lsp-zero.nvim",
|
|
||||||
branch = "v2.x",
|
|
||||||
lazy = true,
|
|
||||||
config = function()
|
|
||||||
require("lsp-zero.settings").preset({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
@ -46,6 +38,7 @@ return {
|
|||||||
"lua_ls",
|
"lua_ls",
|
||||||
"gopls",
|
"gopls",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
|
"ruby_lsp",
|
||||||
})
|
})
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
@ -62,22 +55,9 @@ return {
|
|||||||
},
|
},
|
||||||
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
|
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
|
||||||
})
|
})
|
||||||
|
lspconfig.ruby_lsp.setup({})
|
||||||
|
|
||||||
lsp.setup()
|
lsp.setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"pmizio/typescript-tools.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
|
||||||
config = function()
|
|
||||||
require("typescript-tools").setup({})
|
|
||||||
vim.keymap.set("n", "<leader>toi", vim.lsp.buf.rename, { desc = "[T]ypescript [O]rganize [I]mports" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/neodev.nvim",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
}
|
10
lua/plugins/lspzero.lua
Normal file
10
lua/plugins/lspzero.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
|
branch = "v2.x",
|
||||||
|
lazy = true,
|
||||||
|
config = function()
|
||||||
|
require("lsp-zero.settings").preset({})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
35
lua/plugins/lualine.lua
Normal file
35
lua/plugins/lualine.lua
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
theme = "catppuccin",
|
||||||
|
globalstatus = true,
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = {
|
||||||
|
"dashboard",
|
||||||
|
"alpha",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
section_separators = "",
|
||||||
|
component_separators = "",
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {
|
||||||
|
{ "mode", icons_enabled = true },
|
||||||
|
},
|
||||||
|
lualine_b = {
|
||||||
|
"branch",
|
||||||
|
"diff",
|
||||||
|
"diagnostics",
|
||||||
|
},
|
||||||
|
lualine_c = {
|
||||||
|
{ "filename", path = 1 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
26
lua/plugins/luasnip.lua
Normal file
26
lua/plugins/luasnip.lua
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
version = "2.*",
|
||||||
|
build = (not jit.os:find("Windows"))
|
||||||
|
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
|
||||||
|
or nil,
|
||||||
|
opts = {
|
||||||
|
history = true,
|
||||||
|
delete_check_events = "TextChanged",
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local ls = require("luasnip")
|
||||||
|
ls.setup({
|
||||||
|
history = true,
|
||||||
|
delete_check_events = "TextChanged",
|
||||||
|
})
|
||||||
|
require("luasnip.loaders.from_lua").load({ paths = "~/snippets" })
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
},
|
||||||
|
-- stylua: ignore
|
||||||
|
},
|
||||||
|
}
|
7
lua/plugins/mdx.lua
Normal file
7
lua/plugins/mdx.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"davidmh/mdx.nvim",
|
||||||
|
config = true,
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
|
},
|
||||||
|
}
|
8
lua/plugins/mini-pairs.lua
Normal file
8
lua/plugins/mini-pairs.lua
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"echasnovski/mini.pairs",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
7
lua/plugins/mini-surround.lua
Normal file
7
lua/plugins/mini-surround.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"echasnovski/mini.surround",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
7
lua/plugins/neodev.lua
Normal file
7
lua/plugins/neodev.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/neodev.nvim",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
56
lua/plugins/neotree.lua
Normal file
56
lua/plugins/neotree.lua
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
cmd = "Neotree",
|
||||||
|
branch = "v2.x",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
close_if_last_window = true,
|
||||||
|
sources = {
|
||||||
|
"filesystem",
|
||||||
|
"buffers",
|
||||||
|
"git_status",
|
||||||
|
},
|
||||||
|
source_selector = {
|
||||||
|
winbar = true,
|
||||||
|
content_layout = "center",
|
||||||
|
sources = {
|
||||||
|
{ source = "filesystem", display_name = require("config.icons").FolderClosed .. " File" },
|
||||||
|
{ source = "buffers", display_name = require("config.icons").DefaultFile .. " Bufs" },
|
||||||
|
{ source = "git_status", display_name = require("config.icons").Git .. " Git" },
|
||||||
|
{ source = "diagnostics", display_name = require("config.icons").Diagnostic .. " Diagnostic" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
padding = 0,
|
||||||
|
},
|
||||||
|
icon = {
|
||||||
|
folder_closed = require("config.icons").FolderClosed,
|
||||||
|
folder_open = require("config.icons").FolderOpen,
|
||||||
|
folder_empty = require("config.icons").FolderEmpty,
|
||||||
|
folder_empty_open = require("config.icons").FolderEmpty,
|
||||||
|
default = require("config.icons").DefaultFile,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filesystem = {
|
||||||
|
follow_current_file = true,
|
||||||
|
hijack_netrw_behavior = "open_current",
|
||||||
|
use_libuv_file_watcher = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>fe",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({
|
||||||
|
toggle = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
68
lua/plugins/noice.lua
Normal file
68
lua/plugins/noice.lua
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- you can enable a preset for easier configuration
|
||||||
|
presets = {
|
||||||
|
bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
|
lsp_doc_border = true, -- add a border to hover docs and signature help
|
||||||
|
},
|
||||||
|
routes = {
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "msg_show",
|
||||||
|
kind = "",
|
||||||
|
find = "written",
|
||||||
|
},
|
||||||
|
opts = { skip = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
views = {
|
||||||
|
cmdline_popup = {
|
||||||
|
position = {
|
||||||
|
row = 5,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
popupmenu = {
|
||||||
|
relative = "editor",
|
||||||
|
position = {
|
||||||
|
row = 8,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = 10,
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
style = "rounded",
|
||||||
|
padding = { 0, 1 },
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp = {
|
||||||
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
|
override = {
|
||||||
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
["cmp.entry.get_documentation"] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
11
lua/plugins/notify.lua
Normal file
11
lua/plugins/notify.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
config = function(_, opts)
|
||||||
|
local notify = require("notify")
|
||||||
|
notify.setup(vim.tbl_extend("keep", {
|
||||||
|
background_colour = "#000000",
|
||||||
|
}, opts))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
113
lua/plugins/nvim-cmp.lua
Normal file
113
lua/plugins/nvim-cmp.lua
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
version = false,
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-nvim-lua",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||||
|
"onsails/lspkind.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
local border_opts = {
|
||||||
|
border = {
|
||||||
|
{ "╭", "CmpDocBorder" },
|
||||||
|
{ "─", "CmpDocBorder" },
|
||||||
|
{ "╮", "CmpDocBorder" },
|
||||||
|
{ "│", "CmpDocBorder" },
|
||||||
|
{ "╯", "CmpDocBorder" },
|
||||||
|
{ "─", "CmpDocBorder" },
|
||||||
|
{ "╰", "CmpDocBorder" },
|
||||||
|
{ "│", "CmpDocBorder" },
|
||||||
|
},
|
||||||
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
|
||||||
|
}
|
||||||
|
---@diagnostic disable: missing-fields
|
||||||
|
cmp.setup({
|
||||||
|
formatting = {
|
||||||
|
preselect = cmp.PreselectMode.None,
|
||||||
|
fields = {
|
||||||
|
"abbr",
|
||||||
|
"kind",
|
||||||
|
"menu",
|
||||||
|
},
|
||||||
|
format = require("lspkind").cmp_format({
|
||||||
|
mode = "symbol_text",
|
||||||
|
maxwidth = 150,
|
||||||
|
ellipsis_char = "...",
|
||||||
|
before = function(entry, vim_item)
|
||||||
|
vim_item.menu = ({
|
||||||
|
nvim_lsp = "[LSP]",
|
||||||
|
buffer = "[Buffer]",
|
||||||
|
})[entry.source.name]
|
||||||
|
return vim_item
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
completeopt = "menu,menuone,noinsert",
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
view = {
|
||||||
|
docs = {
|
||||||
|
auto_open = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ behavior = cmp.SelectBehavior.Replace, select = true }),
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
["<C-d>"] = function()
|
||||||
|
if cmp.visible_docs() then
|
||||||
|
cmp.close_docs()
|
||||||
|
else
|
||||||
|
cmp.open_docs()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "nvim_lsp_signature_help" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
{ name = "path" },
|
||||||
|
}),
|
||||||
|
window = {
|
||||||
|
scrollbar = false,
|
||||||
|
completion = cmp.config.window.bordered(border_opts),
|
||||||
|
documentation = cmp.config.window.bordered(border_opts),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
---@diagnostic enable: missing-fields
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
6
lua/plugins/smart-splits.lua
Normal file
6
lua/plugins/smart-splits.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"mrjones2014/smart-splits.nvim",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
5
lua/plugins/smoothie.lua
Normal file
5
lua/plugins/smoothie.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"psliwka/vim-smoothie",
|
||||||
|
},
|
||||||
|
}
|
6
lua/plugins/spectre.lua
Normal file
6
lua/plugins/spectre.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-pack/nvim-spectre",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
153
lua/plugins/telescope.lua
Normal file
153
lua/plugins/telescope.lua
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
cmd = "Telescope",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>ff",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").find_files()
|
||||||
|
end,
|
||||||
|
desc = "[ F ]ind files",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fF",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").find_files({ hidden = true, no_ignore = true })
|
||||||
|
end,
|
||||||
|
desc = "[ F ]ind [ F ]iles",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"<leader>lg",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").live_grep()
|
||||||
|
end,
|
||||||
|
desc = "Live grep",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gf",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").git_files()
|
||||||
|
end,
|
||||||
|
desc = "Live grep",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gs",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").git_status()
|
||||||
|
end,
|
||||||
|
desc = "Live grep",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fc",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").git_commits()
|
||||||
|
end,
|
||||||
|
desc = "Git Commits",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"<leader>of",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").oldfiles()
|
||||||
|
end,
|
||||||
|
desc = "[ O ]ld [ F ]iles",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"<leader>ds",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_document_symbols()
|
||||||
|
end,
|
||||||
|
desc = "[ D ]ocument [ S ]ymbols",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"<leader>wss",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_dynamic_workspace_symbols()
|
||||||
|
end,
|
||||||
|
desc = "[ W ]orkspace [ S ]ymbol[ s ]",
|
||||||
|
remap = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"<leader>lr",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_references()
|
||||||
|
end,
|
||||||
|
desc = "[L]ist [R]erefrences",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ld",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").diagnostics()
|
||||||
|
end,
|
||||||
|
desc = "[ L ]ist [ D ]iagnostics",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>li",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_implementations()
|
||||||
|
end,
|
||||||
|
desc = "[ L ]ist [ I ]mplementation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ldi",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_definitions()
|
||||||
|
end,
|
||||||
|
desc = "[ L ]ist [ D ]ef[ i ]nitions",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local telescope = require("telescope")
|
||||||
|
|
||||||
|
telescope.setup({
|
||||||
|
defaults = {
|
||||||
|
prompt_prefix = "",
|
||||||
|
selection_caret = "",
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
path_display = {
|
||||||
|
"smart",
|
||||||
|
},
|
||||||
|
layout_config = {
|
||||||
|
horizontal = {
|
||||||
|
prompt_position = "top",
|
||||||
|
width = 0.75,
|
||||||
|
height = 0.65,
|
||||||
|
preview_width = 0.6,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-k>"] = function(...)
|
||||||
|
require("telescope.actions").move_selection_previous(...)
|
||||||
|
end,
|
||||||
|
["<C-j>"] = function(...)
|
||||||
|
require("telescope.actions").move_selection_next(...)
|
||||||
|
end,
|
||||||
|
["<c-t>"] = function(...)
|
||||||
|
require("trouble.providers.telescope").open_with_trouble(...)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
q = function(...)
|
||||||
|
require("telescope.actions").close(...)
|
||||||
|
end,
|
||||||
|
["<c-t>"] = function(...)
|
||||||
|
require("trouble.providers.telescope").open_with_trouble(...)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
telescope.load_extension("tnf")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
5
lua/plugins/tnf.lua
Normal file
5
lua/plugins/tnf.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
"thob/tnf.nvim",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
||||||
|
dir = "~/.config/nvim/lua/_plugins/tnf.nvim",
|
||||||
|
}
|
@ -64,13 +64,4 @@ return {
|
|||||||
{
|
{
|
||||||
"nvim-treesitter/playground",
|
"nvim-treesitter/playground",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"windwp/nvim-ts-autotag",
|
|
||||||
opts = {
|
|
||||||
enable_rename = true,
|
|
||||||
enable_close = true,
|
|
||||||
enable_close_on_slash = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
41
lua/plugins/trouble.lua
Normal file
41
lua/plugins/trouble.lua
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>xx",
|
||||||
|
"<cmd>Trouble diagnostics toggle<cr>",
|
||||||
|
desc = "Diagnostics (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leadr>xb",
|
||||||
|
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||||
|
desc = "Buffer Diagnostics (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cs",
|
||||||
|
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||||
|
desc = "Symbols (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cl",
|
||||||
|
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||||
|
desc = "LSP Definitions / references / ... (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>xL",
|
||||||
|
"<cmd>Trouble loclist toggle<cr>",
|
||||||
|
desc = "Location List (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>xQ",
|
||||||
|
"<cmd>Trouble qflist toggle<cr>",
|
||||||
|
desc = "Quickfix List (Trouble)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
7
lua/plugins/twilight.lua
Normal file
7
lua/plugins/twilight.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/twilight.nvim",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
21
lua/plugins/typescript-tools.lua
Normal file
21
lua/plugins/typescript-tools.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"pmizio/typescript-tools.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
||||||
|
config = function()
|
||||||
|
require("typescript-tools").setup({
|
||||||
|
single_file_support = true,
|
||||||
|
settings = {
|
||||||
|
single_file_support = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>toi",
|
||||||
|
"<CMD>TSToolsOrganizeImports<CR>",
|
||||||
|
{ desc = "[T]ypescript [O]rganize [I]mports" }
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
@ -1,187 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
theme = "catppuccin",
|
|
||||||
globalstatus = true,
|
|
||||||
disabled_filetypes = {
|
|
||||||
statusline = {
|
|
||||||
"dashboard",
|
|
||||||
"alpha",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
section_separators = "",
|
|
||||||
component_separators = "",
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {
|
|
||||||
{ "mode", icons_enabled = true },
|
|
||||||
},
|
|
||||||
lualine_b = {
|
|
||||||
"branch",
|
|
||||||
"diff",
|
|
||||||
"diagnostics",
|
|
||||||
},
|
|
||||||
lualine_c = {
|
|
||||||
{ "filename", path = 1 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"akinsho/bufferline.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
keys = {
|
|
||||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
|
||||||
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
offsets = {
|
|
||||||
{
|
|
||||||
filetype = "neo-tree",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
|
||||||
main = "ibl",
|
|
||||||
opts = {
|
|
||||||
indent = {
|
|
||||||
char = "┊",
|
|
||||||
},
|
|
||||||
exclude = {
|
|
||||||
filetypes = {
|
|
||||||
"help",
|
|
||||||
"alpha",
|
|
||||||
"dashboard",
|
|
||||||
"neo-tree",
|
|
||||||
"Trouble",
|
|
||||||
"lazy",
|
|
||||||
"mason",
|
|
||||||
"notify",
|
|
||||||
"toggleterm",
|
|
||||||
"lazyterm",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- active indent guide and indent text objects
|
|
||||||
{
|
|
||||||
"echasnovski/mini.indentscope",
|
|
||||||
version = false, -- wait till new 0.7.0 release to put it back on semver
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
opts = {
|
|
||||||
-- symbol = "▏",
|
|
||||||
symbol = "│",
|
|
||||||
options = { try_as_border = true },
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = {
|
|
||||||
"help",
|
|
||||||
"alpha",
|
|
||||||
"dashboard",
|
|
||||||
"neo-tree",
|
|
||||||
"Trouble",
|
|
||||||
"lazy",
|
|
||||||
"mason",
|
|
||||||
"notify",
|
|
||||||
"toggleterm",
|
|
||||||
"lazyterm",
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.b.miniindentscope_disable = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
opts = {
|
|
||||||
select = {
|
|
||||||
enabled = true,
|
|
||||||
backend = {
|
|
||||||
"telescope",
|
|
||||||
"fzf",
|
|
||||||
"builtin",
|
|
||||||
"nui",
|
|
||||||
},
|
|
||||||
telescope = require("telescope.themes").get_ivy(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"goolord/alpha-nvim",
|
|
||||||
event = "VimEnter",
|
|
||||||
opts = function()
|
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
local logo = [[
|
|
||||||
|
|
||||||
]]
|
|
||||||
|
|
||||||
dashboard.section.header.val = vim.split(logo, "\n")
|
|
||||||
dashboard.section.buttons.val = {
|
|
||||||
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
|
|
||||||
dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
|
|
||||||
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
|
|
||||||
dashboard.button("g", " " .. " Find text", ":Telescope live_grep <CR>"),
|
|
||||||
dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"),
|
|
||||||
dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
|
|
||||||
dashboard.button("l", " " .. " Lazy", ":Lazy<CR>"),
|
|
||||||
dashboard.button("q", " " .. " Quit", ":qa<CR>"),
|
|
||||||
}
|
|
||||||
for _, button in ipairs(dashboard.section.buttons.val) do
|
|
||||||
button.opts.hl = "AlphaButtons"
|
|
||||||
button.opts.hl_shortcut = "AlphaShortcut"
|
|
||||||
end
|
|
||||||
dashboard.section.header.opts.hl = "AlphaHeader"
|
|
||||||
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
|
||||||
dashboard.section.footer.opts.hl = "AlphaFooter"
|
|
||||||
dashboard.opts.layout[1].val = 8
|
|
||||||
return dashboard
|
|
||||||
end,
|
|
||||||
config = function(_, dashboard)
|
|
||||||
local lazy = require("lazy")
|
|
||||||
-- close Lazy and re-open when the dashboard is ready
|
|
||||||
if vim.o.filetype == "lazy" then
|
|
||||||
vim.cmd.close()
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "AlphaReady",
|
|
||||||
callback = function()
|
|
||||||
lazy.show()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
require("alpha").setup(dashboard.opts)
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "LazyVimStarted",
|
|
||||||
callback = function()
|
|
||||||
local stats = lazy.stats()
|
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
|
||||||
dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
|
|
||||||
pcall(vim.cmd.AlphaRedraw)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -4,20 +4,6 @@ return {
|
|||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"rest-nvim/rest.nvim",
|
|
||||||
opts = {},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>rt",
|
|
||||||
function()
|
|
||||||
require("rest-nvim").run()
|
|
||||||
end,
|
|
||||||
desc = "Run the rest request in the current buffer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"ellisonleao/glow.nvim",
|
"ellisonleao/glow.nvim",
|
||||||
config = true,
|
config = true,
|
||||||
|
11
lua/plugins/whichkey.lua
Normal file
11
lua/plugins/whichkey.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
plugins = {
|
||||||
|
spelling = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
23
lua/plugins/zenmode.lua
Normal file
23
lua/plugins/zenmode.lua
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/zen-mode.nvim",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>zm",
|
||||||
|
function()
|
||||||
|
require("zen-mode").toggle({
|
||||||
|
window = {
|
||||||
|
width = 0.85,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
plugins = {
|
||||||
|
twilight = { enabled = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user