feat: first commit

This commit is contained in:
2024-12-12 14:07:56 +04:00
parent 41c5b46733
commit 5604b29cdc
29 changed files with 890 additions and 157 deletions

175
lua/plugins/core/init.lua Normal file
View File

@@ -0,0 +1,175 @@
return {
{
'nvim-lua/popup.nvim',
},
{
"akinsho/bufferline.nvim",
},
{
"lewis6991/gitsigns.nvim"
},
{
"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",
},
{
'folke/noice.nvim',
},
{
"kyazdani42/nvim-web-devicons"
},
{
'NvChad/nvim-colorizer.lua',
},
{
'numToStr/Comment.nvim'
},
{
"L3MON4D3/LuaSnip",
lazy = true,
},
{
"folke/neodev.nvim", opts = {}
},
{
"nvim-treesitter/nvim-treesitter",
},
{
'fgheng/winbar.nvim'
},
{
"Bekaboo/dropbar.nvim",
},
{
"vague2k/huez.nvim",
},
{
"neovim/nvim-lspconfig",
dependencies = { "williamboman/mason-lspconfig.nvim", },
},
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
},
{
"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
},
{
"nvim-telescope/telescope.nvim",
},
{
"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,
},
}

View File

@@ -1,38 +0,0 @@
return {
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
config = function()
require "configs.conform"
end,
},
-- These are some examples, uncomment them if you want to see them work!
-- {
-- "neovim/nvim-lspconfig",
-- config = function()
-- require("nvchad.configs.lspconfig").defaults()
-- require "configs.lspconfig"
-- end,
-- },
--
-- {
-- "williamboman/mason.nvim",
-- opts = {
-- ensure_installed = {
-- "lua-language-server", "stylua",
-- "html-lsp", "css-lsp" , "prettier"
-- },
-- },
-- },
--
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
}

View File

@@ -0,0 +1,50 @@
return {
{
"goolord/alpha-nvim",
config = function ()
require'alpha'.setup(require'alpha.themes.dashboard'.config)
end
},
{
"kaarmu/typst.vim",
lazy = true,
},
{
'MunifTanjim/prettier.nvim',
lazy = true,
},
{
"savq/melange-nvim"
},
{
"mlaursen/vim-react-snippets",
lazy = true,
},
{
"windwp/nvim-ts-autotag",
lazy = true,
},
{
"lukas-reineke/indent-blankline.nvim"
},
{
"mxsdev/nvim-dap-vscode-js",
lazy = true,
},
{
"windwp/nvim-autopairs",
lazy = true,
event = "InsertEnter",
config = true
},
{
"microsoft/vscode-js-debug",
lazy = true,
build = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out"
},
{
"mrcjkb/rustaceanvim",
version = '^4', -- Recommended
lazy = false, -- This plugin is already lazy
},
}