VoidVim/lua/plugins/core/init.lua

188 lines
4.6 KiB
Lua
Raw Normal View History

2024-12-12 13:07:56 +03:00
return {
{
"LunarVim/breadcrumbs.nvim",
2024-12-12 13:07:56 +03:00
},
{
"akinsho/bufferline.nvim",
},
{
"lewis6991/gitsigns.nvim"
},
2024-12-22 23:59:51 +03:00
{
"lewis6991/hover.nvim",
},
2024-12-12 13:07:56 +03:00
{
"nvim-lualine/lualine.nvim",
},
{
"akinsho/toggleterm.nvim",
},
{
"windwp/nvim-autopairs",
},
{
'kevinhwang91/promise-async',
},
{
'theHamsta/nvim-dap-virtual-text',
},
{
"hrsh7th/cmp-nvim-lsp",
},
{
"SmiteshP/nvim-navic",
},
{
"kyazdani42/nvim-web-devicons"
},
{
'NvChad/nvim-colorizer.lua',
},
{
'numToStr/Comment.nvim'
},
{
"nvim-treesitter/nvim-treesitter",
},
{
"vague2k/huez.nvim",
2024-12-12 13:07:56 +03:00
},
{
"nvim-telescope/telescope.nvim",
2024-12-12 13:07:56 +03:00
},
{
"neovim/nvim-lspconfig",
dependencies = { "williamboman/mason-lspconfig.nvim", },
},
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
},
{
"L3MON4D3/LuaSnip",
lazy = true,
},
{
'Bekaboo/dropbar.nvim',
dependencies = {
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make'
},
config = function()
local dropbar_api = require('dropbar.api')
vim.keymap.set('n', '<Leader>;', dropbar_api.pick, { desc = 'Pick symbols in winbar' })
vim.keymap.set('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' })
vim.keymap.set('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' })
end
},
2024-12-14 01:54:31 +03:00
{
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
},
2024-12-12 13:07:56 +03:00
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"eslint-lsp",
"js-debug-adapter",
"prettier",
"tinymist",
"typescript-language-server",
}
}
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"nvim-neotest/nvim-nio",
"mfussenegger/nvim-dap",
},
event = "VeryLazy",
config = function()
require("dapui").setup()
end
},
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
config = function(_, opts)
require("luasnip").config.set_config(opts)
require "config.plugins.luasnip"
end,
},
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
},
{
'kevinhwang91/nvim-ufo',
lazy = true,
config = function(_, opts)
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local totalLines = vim.api.nvim_buf_line_count(0)
local foldedLines = endLnum - lnum
local suffix = ("  %d %d%%"):format(foldedLines, foldedLines / totalLines * 100)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
local rAlignAppndx =
math.max(math.min(vim.opt.textwidth["_value"], width - 1) - curWidth - sufWidth, 0)
suffix = (" "):rep(rAlignAppndx) .. suffix
table.insert(newVirtText, { suffix, "MoreMsg" })
return newVirtText
end
opts["fold_virt_text_handler"] = handler
require("ufo").setup(opts)
vim.keymap.set("n", "K", function()
local winid = require("ufo").peekFoldedLinesUnderCursor()
if not winid then
-- vim.lsp.buf.hover()
vim.cmd [[ Lspsaga hover_doc ]]
end
end)
end,
},
}