dotfiles/lvim/lua/plugins/init.lua

279 lines
6.5 KiB
Lua
Raw Normal View History

lvim.plugins = {
2024-08-03 14:57:18 +03:00
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"eslint-lsp",
"js-debug-adapter",
"prettier",
2024-10-05 18:44:15 +03:00
"tinymist",
2024-08-03 14:57:18 +03:00
"typescript-language-server",
}
}
},
2024-10-05 18:44:15 +03:00
{
"kaarmu/typst.vim",
},
{
"neovim/nvim-lspconfig",
dependencies = {
"mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
},
2024-09-02 22:36:54 +03:00
{
'kevinhwang91/nvim-ufo',
opts = {
open_fold_hl_timeout = 400,
close_fold_kinds = { "imports", "comment" },
preview = {
win_config = {
border = { "", "", "", "", "", "", "", "" },
-- winhighlight = "Normal:Folded",
winblend = 0,
},
mappings = {
scrollU = "<C-u>",
scrollD = "<C-d>",
jumpTop = "[",
jumpBot = "]",
},
},
},
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,
2024-09-02 22:36:54 +03:00
},
{
'kevinhwang91/promise-async',
},
{
'rust-lang/rust.vim',
},
{
'MunifTanjim/prettier.nvim'
},
{
'alx741/vim-rustfmt',
},
2024-08-22 16:45:46 +03:00
{
"savq/melange-nvim"
},
2024-09-02 22:36:54 +03:00
{
'theHamsta/nvim-dap-virtual-text',
},
2024-08-22 16:45:46 +03:00
{
"HoNamDuong/hybrid.nvim",
lazy = false,
priority = 1000,
opts = {},
},
{
'marko-cerovac/material.nvim'
},
{
"rebelot/kanagawa.nvim",
},
{
'mountain-theme/vim'
},
{
'fgheng/winbar.nvim'
},
2024-08-22 16:45:46 +03:00
{
"gbprod/nord.nvim",
},
{
"vague2k/huez.nvim",
},
{
2024-09-02 22:36:54 +03:00
"Bekaboo/dropbar.nvim",
dependencies = {
2024-09-02 22:36:54 +03:00
"nvim-telescope/telescope-fzf-native.nvim"
},
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
},
2024-09-02 22:36:54 +03:00
-- load luasnips + cmp related in insert mode only
{
"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 "configs.luasnip"
end,
},
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
},
{
"hrsh7th/cmp-nvim-lsp",
},
2024-08-03 14:57:18 +03:00
{
"luckasRanarison/tailwind-tools.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
},
{
2024-09-02 22:36:54 +03:00
"kyazdani42/nvim-web-devicons"
2024-08-03 14:57:18 +03:00
},
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"nvim-neotest/nvim-nio",
"mfussenegger/nvim-dap",
},
event = "VeryLazy",
config = function()
require("dapui").setup()
end
},
2024-08-22 16:45:46 +03:00
{
"mxsdev/nvim-dap-vscode-js"
},
2024-08-03 14:57:18 +03:00
{
"microsoft/vscode-js-debug",
lazy = true,
build = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out"
2024-08-03 14:57:18 +03:00
},
{
2024-09-02 22:36:54 +03:00
'NvChad/nvim-colorizer.lua',
2024-08-03 14:57:18 +03:00
},
{
"folke/neodev.nvim", opts = {}
},
{
"mlaursen/vim-react-snippets",
},
{
"windwp/nvim-ts-autotag",
},
{
"folke/ts-comments.nvim",
event = "VeryLazy",
enabled = vim.fn.has("nvim-0.10.0") == 1,
},
{
2024-09-02 22:36:54 +03:00
"windwp/nvim-autopairs",
2024-08-03 14:57:18 +03:00
event = "InsertEnter",
config = true
-- use opts = {} for passing setup options
-- this is equalent to setup({}) function
},
{
2024-09-02 22:36:54 +03:00
"nvim-treesitter/nvim-treesitter",
2024-08-03 14:57:18 +03:00
},
{
2024-09-02 22:36:54 +03:00
"mrcjkb/rustaceanvim",
2024-08-03 14:57:18 +03:00
version = '^4', -- Recommended
lazy = false, -- This plugin is already lazy
},
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed, not both.
"nvim-telescope/telescope.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
},
config = true,
},
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000
},
{
"loctvl842/monokai-pro.nvim"
},
{
"tanvirtin/monokai.nvim"
2024-08-03 14:57:18 +03:00
},
{
"folke/noice.nvim",
event = "VeryLazy",
2024-09-22 18:29:25 +03:00
opts = {
routes = {
{
filter = { event = "notify", find = "No information available" },
opts = { skip = true },
},
},
presets = {
lsp_doc_border = true,
},
},
2024-08-03 14:57:18 +03:00
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
2024-08-03 14:57:18 +03:00
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
}
2024-09-22 18:29:25 +03:00
},
}