initial commit

This commit is contained in:
2025-06-03 14:16:01 +03:00
commit 6fed9ef617
683 changed files with 109296 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
return {
{
"APZelos/blamer.nvim"
}
}

View File

@@ -0,0 +1,38 @@
-- using lazy.nvim
return {
"LintaoAmons/cd-project.nvim",
-- Don't need call the setup function if you think you are good with the default configuration
tag = "v0.6.1", -- Optional, You can also use tag to pin the plugin version for stability
init = function() -- use init if you want enable auto_register_project, otherwise config is good
require("cd-project").setup({
-- this json file is acting like a database to update and read the projects in real time.
-- So because it's just a json file, you can edit directly to add more paths you want manually
projects_config_filepath = vim.fs.normalize(vim.fn.stdpath("config") .. "/cd-project.nvim.json"),
-- this controls the behaviour of `CdProjectAdd` command about how to get the project directory
project_dir_pattern = { "__main__.py", "*.csproj", ".git", ".gitignore", "Cargo.toml", "package.json", "go.mod" },
choice_format = "both", -- optional, you can switch to "name" or "path"
projects_picker = "telescope", -- optional, you can switch to `telescope`
auto_register_project = false, -- optional, toggle on/off the auto add project behaviour
-- do whatever you like by hooks
hooks = {
-- Run before cd to project, add a bookmark here, then can use `CdProjectBack` to switch back
-- {
-- trigger_point = "BEFORE_CD",
-- callback = function(_)
-- vim.print("before cd project")
-- require("bookmarks").api.mark({name = "before cd project"})
-- end,
-- },
-- Run after cd to project, find and open a file in the target project by smart-open
-- {
-- callback = function(_)
-- require("telescope").extensions.smart_open.smart_open({
-- cwd_only = true,
-- filename_first = false,
-- })
-- end,
-- },
}
})
end,
}

View File

@@ -0,0 +1,45 @@
return {
"Exafunction/codeium.vim",
event = 'BufEnter',
enabled = false,
-- Rebind accept completion to shift + enter in edit mode
-- config = function()
-- require("codeium").setup({
-- virtual_text = {
-- enabled = true,
-- key_bindings = {
-- accept = "<S-Enter>",
-- accept_word = "<M-Enter>",
-- accept_line = "<M-\\>",
-- clear = "<M-[>",
-- next = "<M-]>"
-- }
-- },
-- })
-- end
init = function()
vim.g.codeium_disable_bindings = 1
-- Completion
vim.keymap.set("i", "<S-Enter>", function()
return vim.fn["codeium#Accept"]()
end, { expr = true })
-- Complete next word
vim.keymap.set("i", "<M-Enter>", function()
return vim.fn["codeium#AcceptNextWord"]()
end, { expr = true })
-- Complete line
vim.keymap.set("i", "<M-\\>", function()
return vim.fn["codeium#AcceptNextLine"]()
end, { expr = true })
-- Next
vim.keymap.set("i", "<M-]>", function()
return vim.fn["codeium#CycleCompletions"](1)
end, { expr = true })
-- Previous
vim.keymap.set("i", "<M-[>", function()
return vim.fn["codeium#Clear"]()
end, { expr = true })
end
}

View File

@@ -0,0 +1,9 @@
return {{
'nativerv/cyrillic.nvim',
event = { 'VeryLazy' },
config = function()
require('cyrillic').setup({
no_cyrillic_abbrev = true,
})
end,
}}

177
nvim/lua/plugins/dap.lua Normal file
View File

@@ -0,0 +1,177 @@
return {
{
"mfussenegger/nvim-dap",
dependencies = {
"leoluz/nvim-dap-go",
"mfussenegger/nvim-dap-python",
"rcarriga/nvim-dap-ui",
"theHamsta/nvim-dap-virtual-text",
"nvim-neotest/nvim-nio",
"williamboman/mason.nvim",
},
config = function()
local dap = require "dap"
local ui = require "dapui"
require("dapui").setup()
require("dap-go").setup()
require("dap-python").setup()
vim.fn.sign_define('DapBreakpoint', { text='', texthl='DapBreakpoint', linehl='DapBreakpoint', numhl='DapBreakpoint' })
vim.fn.sign_define('DapBreakpointCondition', { text='', texthl='DapBreakpoint', linehl='DapBreakpoint', numhl='DapBreakpoint' })
vim.fn.sign_define('DapBreakpointRejected', { text='', texthl='DapBreakpoint', linehl='DapBreakpoint', numhl= 'DapBreakpoint' })
vim.fn.sign_define('DapLogPoint', { text='', texthl='DapLogPoint', linehl='DapLogPoint', numhl= 'DapLogPoint' })
vim.fn.sign_define('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' })
require("nvim-dap-virtual-text").setup {
-- This just tries to mitigate the chance that I leak tokens here. Probably won't stop it from happening...
display_callback = function(variable)
local name = string.lower(variable.name)
local value = string.lower(variable.value)
if name:match "secret" or name:match "api" or value:match "secret" or value:match "api" then
return "*****"
end
if #variable.value > 15 then
return " " .. string.sub(variable.value, 1, 15) .. "... "
end
return " " .. variable.value
end,
}
-- Handled by nvim-dap-go
-- dap.adapters.go = {
-- type = "server",
-- port = "${port}",
-- executable = {
-- command = "dlv",
-- args = { "dap", "-l", "127.0.0.1:${port}" },
-- },
-- }
dap.configurations.python = {
{
type = 'python';
request = 'launch';
name = "Launch file";
console = "integratedTerminal",
program = "${file}";
pythonPath = function()
return 'python'
end;
},
}
dap.adapters.coreclr = {
type = 'executable',
command = '/home/greg/.netcoredbg/netcoredbg',
args = {'--interpreter=vscode'}
}
dap.configurations.cs = {
{
type = "coreclr",
name = "launch - netcoredbg",
request = "launch",
program = function()
local path = vim.fn.getcwd() .. '/bin/Debug/net9.0/'
local dllFiles = vim.fn.glob(path .. '*.dll', false, true)
if #dllFiles == 0 then
return vim.fn.input('Path to dll', vim.fn.getcwd() .. '/bin/Debug/', 'file')
end
-- Sort files by modification time (newest first)
table.sort(dllFiles, function(a, b)
return vim.fn.getftime(b) < vim.fn.getftime(a)
end)
return dllFiles[1] -- Return the most recent DLL file
end,
},
}
dap.adapters.lldb = {
type = "executable",
command = "/usr/bin/lldb", -- adjust as needed
name = "lldb",
}
dap.configurations.rust = {
{
name = "hello-world",
type = "lldb",
request = "launch",
program = function()
return vim.fn.getcwd() .. "/target/debug/hello-world"
end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
},
{
name = "hello-dap",
type = "lldb",
request = "launch",
program = function()
return vim.fn.getcwd() .. "/target/debug/hello-dap"
end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
},
}
local elixir_ls_debugger = vim.fn.exepath "elixir-ls-debugger"
if elixir_ls_debugger ~= "" then
dap.adapters.mix_task = {
type = "executable",
command = elixir_ls_debugger,
}
dap.configurations.elixir = {
{
type = "mix_task",
name = "phoenix server",
task = "phx.server",
request = "launch",
projectDir = "${workspaceFolder}",
exitAfterTaskReturns = false,
debugAutoInterpretAllModules = false,
},
}
end
vim.keymap.set("n", "<space>pb", dap.toggle_breakpoint)
vim.keymap.set("n", "<space>gb", dap.run_to_cursor)
-- Eval var under cursor
vim.keymap.set("n", "<space>?", function()
require("dapui").eval(nil, { enter = true })
end)
-- Close nvimtree if it's open and start debugging
vim.keymap.set("n", "<F1>", function()
vim.cmd('NvimTreeClose')
dap.continue()
end)
vim.keymap.set("n", "<F2>", dap.step_into, { desc = "Dap Step into" })
vim.keymap.set("n", "<F3>", dap.step_over, { desc = "Dap Step over" })
vim.keymap.set("n", "<F4>", dap.step_out, { desc = "Dap Step out" })
vim.keymap.set("n", "<F5>", dap.step_back, { desc = "Dap Step back" })
vim.keymap.set("n", "<F6>", dap.restart, { desc = "Dap Restart" })
vim.keymap.set("n", "<space>pb", dap.toggle_breakpoint, { desc = "Dap Toggle breakpoint" })
vim.keymap.set("n", "<space>gb", dap.run_to_cursor, { desc = "Dap Run to cursor" })
dap.listeners.before.attach.dapui_config = function()
ui.open()
end
dap.listeners.before.launch.dapui_config = function()
ui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
ui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
ui.close()
end
end,
},
}

View File

@@ -0,0 +1,8 @@
return {
{
"m4xshen/hardtime.nvim",
dependencies = { "MunifTanjim/nui.nvim" },
opts = {}
},
}

20
nvim/lua/plugins/hop.lua Normal file
View File

@@ -0,0 +1,20 @@
return {
{
'smoka7/hop.nvim',
version = "*",
opts = {
multi_windows = true,
keys = 'asdfghjklcvnmqp', --'etovxqpdygfblzhckisuran',
uppercase_labels = true
},
keys = {
{
"<leader>gg",
function()
require("hop").hint_words()
end,
mode = {"n", "x", "o", "v"}
}
}
}
}

25
nvim/lua/plugins/init.lua Normal file
View File

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

View File

@@ -0,0 +1,24 @@
return {{
"brenton-leighton/multiple-cursors.nvim",
version = "*", -- Use the latest tagged version
opts = {}, -- This causes the plugin setup function to be called
keys = {
{"<C-j>", "<Cmd>MultipleCursorsAddDown<CR>", mode = {"n", "x"}, desc = "Multicursor Add cursor and move down"},
{"<C-k>", "<Cmd>MultipleCursorsAddUp<CR>", mode = {"n", "x"}, desc = "Multicursor Add cursor and move up"},
{"<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = {"n", "i", "x"}, desc = "Multicursor Add cursor and move up"},
{"<C-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = {"n", "i", "x"}, desc = "Multicursor Add cursor and move down"},
{"<C-LeftMouse>", "<Cmd>MultipleCursorsMouseAddDelete<CR>", mode = {"n", "i"}, desc = "Multicursor Add or remove cursor"},
{"<Leader>mm", "<Cmd>MultipleCursorsAddVisualArea<CR>", mode = {"x"}, desc = "Multicursor Add cursors to the lines of the visual area"},
{"<Leader>a", "<Cmd>MultipleCursorsAddMatches<CR>", mode = {"n", "x"}, desc = "Add cursors to cword"},
--{"<Leader>A", "<Cmd>MultipleCursorsAddMatchesV<CR>", mode = {"n", "x"}, desc = "Add cursors to cword in previous area"},
--{"<Leader>d", "<Cmd>MultipleCursorsAddJumpNextMatch<CR>", mode = {"n", "x"}, desc = "Add cursor and jump to next cword"},
--{"<Leader>D", "<Cmd>MultipleCursorsJumpNextMatch<CR>", mode = {"n", "x"}, desc = "Jump to next cword"},
{"<Leader>l", "<Cmd>MultipleCursorsLock<CR>", mode = {"n", "x"}, desc = "Multicursor Lock virtual cursors"},
},
}}

View File

@@ -0,0 +1,15 @@
return {
"d7omdev/nuget.nvim",
event = 'BufEnter',
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
require("nuget").setup({
keys = {
install = { "n", "<leader>pi" },
remove = { "n", "<leader>pr" },
}
})
end,
}

View File

@@ -0,0 +1,36 @@
return {
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
highlight = {
multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
-- regex that will be used to match keywords.
-- don't replace the (KEYWORDS) placeholder
pattern = [[(--\s*(KEYWORDS):.*$|#\s*(KEYWORDS):.*$|//\s*(KEYWORDS):.*$)]], -- ripgrep regex
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
}
},
lazy = false
}
}

View File

@@ -0,0 +1,15 @@
return {
-- lazy.nvim
{
"sontungexpt/url-open",
event = "VeryLazy",
cmd = "URLOpenUnderCursor",
config = function()
local status_ok, url_open = pcall(require, "url-open")
if not status_ok then
return
end
url_open.setup ({})
end,
},
}

View File

@@ -0,0 +1,43 @@
return {
{
'Mofiqul/vscode.nvim',
event = 'BufEnter',
init = function()
require('vscode').load('dark')
end,
config = function()
local c = require('vscode.colors').get_colors()
require('vscode').setup({
-- Alternatively set style in setup
-- style = 'light'
-- Enable transparent background
transparent = false,
-- Enable italic comment
italic_comments = true,
-- Underline `@markup.link.*` variants
underline_links = true,
-- Disable nvim-tree background color
disable_nvimtree_bg = false,
-- Apply theme colors to terminal
terminal_colors = true,
-- Override colors (see ./lua/vscode/colors.lua)
color_overrides = {
vscLineNumber = '#FFFFFF',
},
-- Override highlight groups (see ./lua/vscode/theme.lua)
group_overrides = {
-- this supports the same val table as vim.api.nvim_set_hl
-- use colors from this colorscheme by requiring vscode.colors!
Cursor = { fg=c.vscDarkBlue, bg=c.vscLightGreen, bold=true },
}
})
end
}
}