Initial commit

This commit is contained in:
2025-10-14 19:12:58 +03:00
commit 03a71a5e16
83 changed files with 2457 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup({})
end,
}

View File

@@ -0,0 +1,27 @@
return {
"lukas-reineke/indent-blankline.nvim",
config = function()
local highlight = {
-- "RainbowRed",
"RainbowYellow",
"RainbowBlue",
"RainbowOrange",
"RainbowGreen",
"RainbowViolet",
"RainbowCyan",
}
local hooks = require("ibl.hooks")
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
-- vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
end)
require("ibl").setup({ indent = { highlight = highlight } })
end,
}

View File

@@ -0,0 +1,17 @@
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
config = function()
require("catppuccin").setup({
flavour = "auto", -- latte, frappe, macchiato, mocha
background = { -- :h background
light = "latte",
dark = "mocha",
},
transparent_background = true,
})
vim.cmd.colorscheme("catppuccin")
end,
}

View File

@@ -0,0 +1,34 @@
-- completion engine plugin for neovim
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
},
config = function()
local cmp = require("cmp")
cmp.setup({
mapping = {
["<A-d>"] = cmp.mapping(function(fallback)
if cmp.visible_docs() then
cmp.close_docs()
elseif cmp.visible() then
cmp.open_docs()
else
fallback()
end
end),
["<A-j>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "s" }),
["<A-k>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "s" }),
["<C-Space>"] = cmp.mapping.complete(),
["<Tab>"] = cmp.mapping.confirm({ select = true }),
},
snippet = {
expand = function(args)
vim.snippet.expand(args.body)
end,
},
sources = { { name = "nvim_lsp" }, { name = "buffer" } },
})
end,
}

View File

@@ -0,0 +1,9 @@
return {
"numToStr/Comment.nvim",
config = function()
local comment = require("Comment")
comment.setup({
opleader = { line = "|" },
})
end,
}

View File

@@ -0,0 +1,54 @@
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
-- Customize or remove this keymap to your liking
"<leader>F",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
desc = "Format buffer",
},
},
-- Everything in opts will be passed to setup()
opts = {
-- Define your formatters
formatters_by_ft = {
lua = { "stylua" },
python = { "ruff_organize_imports_only" },
javascript = { "prettierd", "prettier", stop_after_first = true },
sh = { "shfmt" },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
css = { "prettierd", "prettier", stop_after_first = true },
html = { "prettierd", "prettier", stop_after_first = true },
-- go = { "goimports", "gofmt" },
-- typescript = { "prettierd", "prettier", stop_after_first = true },
},
-- Custom formatters
formatters = {
ruff_organize_imports_only = {
command = "ruff",
args = {
"check",
"--select",
"I001",
"--fix",
"--stdin-filename",
"$FILENAME",
"-",
},
stdin = true,
},
},
-- Set up format-on-save
format_on_save = { timeout_ms = 500, lsp_fallback = true },
},
init = function()
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
}

View File

@@ -0,0 +1,43 @@
return {
{
"mfussenegger/nvim-dap",
config = function()
local dap = require("dap")
vim.keymap.set("n", "<F5>", dap.continue, opts)
vim.keymap.set("n", "<s-F5>", dap.stop, opts)
vim.keymap.set("n", "<F9>", dap.toggle_breakpoint, opts)
end,
},
{
"rcarriga/nvim-dap-ui",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
local dap, dapui = require("dap"), require("dapui")
dapui.setup()
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end,
},
{
"mfussenegger/nvim-dap-python",
dependencies = {
"mfussenegger/nvim-dap",
},
config = function()
local python_utils = require("functions.python")
local python_path = python_utils.get_python_path()
require("dap-python").setup(python_path)
end,
},
}

View File

@@ -0,0 +1,19 @@
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
-- local harpoon = require("harpoon")
-- harpoon.setup({
-- save_on_toggle = false,
-- save_on_change = true,
-- enter_on_sendcmd = false,
-- tmux_autoclose_windows = false,
-- excluded_filetypes = { "harpoon" },
-- mark_branch = false,
-- })
-- require("harpoon"):setup()
end,
}

View File

@@ -0,0 +1,14 @@
return {
"tpope/vim-fugitive",
config = function()
vim.keymap.set("n", "<leader>p", function()
vim.cmd.Git("pull --rebase")
end, opts)
vim.keymap.set("n", "<leader>P", function()
vim.cmd.Git("push")
end, opts)
vim.keymap.set("n", "<leader>G", function()
vim.cmd.Git()
end, opts)
end,
}

View File

@@ -0,0 +1,44 @@
return {
"neovim/nvim-lspconfig",
config = function()
vim.keymap.set("n", "gd", function()
vim.lsp.buf.definition()
end, opts)
vim.keymap.set("n", "gr", function()
vim.lsp.buf.references()
end, opts)
vim.keymap.set("n", "<C-i>", function()
vim.diagnostic.open_float()
end, opts)
vim.keymap.set("n", "K", function()
vim.lsp.buf.hover()
end, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set("v", "<leader>ca", vim.lsp.buf.code_action, opts)
local python_utils = require("functions.python")
local python_path = python_utils.get_python_path()
vim.lsp.config("ruff", {
settings = { interpreter = python_path },
})
vim.lsp.enable("ruff")
vim.lsp.config("basedpyright", {
settings = {
python = { pythonPath = python_path },
basedpyright = {
analysis = {
typeCheckingMode = "strict",
},
},
},
})
vim.lsp.enable("basedpyright")
vim.lsp.config("bashls", {
cmd = { "bash-language-server", "start" },
filetypes = { "bash", "sh" },
})
vim.lsp.enable("bashls")
end,
}

View File

@@ -0,0 +1,7 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup()
end,
}

View File

@@ -0,0 +1,27 @@
return {
"nvim-neo-tree/neo-tree.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
local tree = require("neo-tree")
tree.setup({
document_symbols = {
custom_kinds = {},
},
window = {
width = 30,
mappings = {
["l"] = "open",
["h"] = "close_node",
["<Right>"] = "open",
["<Left>"] = "close_node",
},
},
})
vim.keymap.set("n", "<F2>", "<CMD>Neotree toggle<CR>")
end,
}

View File

@@ -0,0 +1,5 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" },
opts = {},
}

View File

@@ -0,0 +1,19 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"gbprod/yanky.nvim",
},
config = function()
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, opts)
vim.keymap.set("n", "<leader>fg", builtin.live_grep, opts)
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
require("yanky").setup()
require("telescope").load_extension("yank_history")
vim.keymap.set("n", "<leader>fy", function()
vim.cmd.Telescope("yank_history")
end, opts)
end,
}

View File

@@ -0,0 +1,22 @@
return {
"nvim-treesitter/nvim-treesitter",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"lua",
"python",
"yaml",
"markdown",
"bash",
},
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
})
end,
}

View File

@@ -0,0 +1,3 @@
return {
"lambdalisue/vim-suda",
}