feat adding all the files
This commit is contained in:
@@ -112,29 +112,6 @@ return {
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
-- 🎮 Keymaps
|
||||
keymap("n", "<leader>dc", dap.continue, { desc = "▶ Start Debugging" })
|
||||
keymap("n", "<leader>do", dap.step_over, { desc = "⏭ Step Over" })
|
||||
keymap("n", "<leader>di", dap.step_into, { desc = "⤵ Step Into" })
|
||||
keymap("n", "<leader>dot", dap.step_out, { desc = "⤴ Step Out" })
|
||||
keymap("n", "<leader>db", dap.toggle_breakpoint, { desc = "🔴 Toggle Breakpoint" })
|
||||
keymap("n", "<leader>dB", function()
|
||||
dap.set_breakpoint(fn.input("Breakpoint condition: "))
|
||||
end, { desc = "⚠ Conditional Breakpoint" })
|
||||
keymap("n", "<leader>dr", dap.repl.open, { desc = "💬 Open REPL" })
|
||||
keymap("n", "<leader>dl", dap.run_last, { desc = "🔁 Run Last Debug" })
|
||||
keymap("n", "<leader>du", dapui.toggle, { desc = "🧩 Toggle DAP UI" })
|
||||
keymap("n", "<leader>dq", dap.terminate, { desc = "⛔ Stop Debugging" })
|
||||
|
||||
-- 🧼 Reset UI
|
||||
keymap("n", "<leader>drt", function()
|
||||
dap.terminate()
|
||||
dapui.close()
|
||||
vim.defer_fn(function()
|
||||
dapui.open()
|
||||
end, 200)
|
||||
end, { desc = "🧼 Reset DAP UI Layout" })
|
||||
|
||||
-- 🧿 Sign Icons
|
||||
for name, icon in pairs({
|
||||
DapBreakpoint = "🔴",
|
||||
|
||||
27
lua/cargdev/plugins/nvim-treesitter-context.lua
Normal file
27
lua/cargdev/plugins/nvim-treesitter-context.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
max_lines = 10, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = true,
|
||||
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
||||
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
-- Separator between context and content. Should be a single character string, like '-'.
|
||||
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||
separator = nil,
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("treesitter-context").setup(opts)
|
||||
|
||||
-- Optional: Add keymaps for navigating context
|
||||
vim.keymap.set("n", "[c", function()
|
||||
require("treesitter-context").go_to_context(vim.v.count1)
|
||||
end, { silent = true, desc = "Jump to context" })
|
||||
end,
|
||||
}
|
||||
17
lua/cargdev/plugins/ship.lua
Normal file
17
lua/cargdev/plugins/ship.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"seandewar/killersheep.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- Required dependency for killersheep.nvim
|
||||
},
|
||||
config = function()
|
||||
require("killersheep").setup({
|
||||
gore = true, -- Enables/disables blood and gore.
|
||||
keymaps = {
|
||||
move_left = "h", -- Keymap to move cannon to the left.
|
||||
move_right = "l", -- Keymap to move cannon to the right.
|
||||
shoot = "<Space>", -- Keymap to shoot the cannon.
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
41
lua/cargdev/plugins/sudoku.lua
Normal file
41
lua/cargdev/plugins/sudoku.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
return {
|
||||
"jim-fx/sudoku.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("sudoku").setup({
|
||||
persist_settings = true, -- safe the settings under vim.fn.stdpath("data"), usually ~/.local/share/nvim,
|
||||
persist_games = true, -- persist a history of all played games
|
||||
default_mappings = true, -- if set to false you need to set your own, like the following:
|
||||
mappings = {
|
||||
{ key = "x", action = "clear_cell" },
|
||||
{ key = "r1", action = "insert=1" },
|
||||
{ key = "r2", action = "insert=2" },
|
||||
{ key = "r3", action = "insert=3" },
|
||||
{ key = "r9", action = "insert=9" },
|
||||
{ key = "gn", action = "new_game" },
|
||||
{ key = "gr", action = "reset_game" },
|
||||
{ key = "gs", action = "view=settings" },
|
||||
{ key = "gt", action = "view=tip" },
|
||||
{ key = "gz", action = "view=zen" },
|
||||
{ key = "gh", action = "view=help" },
|
||||
{ key = "u", action = "undo" },
|
||||
{ key = "<C-r>", action = "redo" },
|
||||
{ key = "+", action = "increment" },
|
||||
{ key = "-", action = "decrement" },
|
||||
},
|
||||
custom_highlights = {
|
||||
board = { fg = "#7d7d7d" },
|
||||
number = { fg = "white", bg = "black" },
|
||||
active_menu = { fg = "white", bg = "black", gui = "bold" },
|
||||
hint_cell = { fg = "white", bg = "yellow" },
|
||||
square = { bg = "#292b35", fg = "white" },
|
||||
column = { bg = "#14151a", fg = "#d5d5d5" },
|
||||
row = { bg = "#14151a", fg = "#d5d5d5" },
|
||||
settings_disabled = { fg = "#8e8e8e", gui = "italic" },
|
||||
same_number = { fg = "white", gui = "bold" },
|
||||
set_number = { fg = "white", gui = "italic" },
|
||||
error = { fg = "white", bg = "#843434" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -50,30 +50,5 @@ return {
|
||||
-- Load extensions
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("dap")
|
||||
|
||||
-- set keymaps
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
-- File navigation
|
||||
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Find files" })
|
||||
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Live grep" })
|
||||
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Grep string" })
|
||||
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Recent files" })
|
||||
|
||||
-- Buffer and session management
|
||||
keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>", { desc = "Find buffers" })
|
||||
keymap.set("n", "<leader>fh", "<cmd>Telescope help_tags<cr>", { desc = "Help tags" })
|
||||
keymap.set("n", "<leader>fm", "<cmd>Telescope marks<cr>", { desc = "Find marks" })
|
||||
keymap.set("n", "<leader>fk", "<cmd>Telescope keymaps<cr>", { desc = "Find keymaps" })
|
||||
keymap.set("n", "<leader>fC", "<cmd>Telescope commands<cr>", { desc = "Find commands" })
|
||||
|
||||
-- Git
|
||||
keymap.set("n", "<leader>fg", "<cmd>Telescope git_commits<cr>", { desc = "Git commits" })
|
||||
keymap.set("n", "<leader>fG", "<cmd>Telescope git_bcommits<cr>", { desc = "Git buffer commits" })
|
||||
keymap.set("n", "<leader>fb", "<cmd>Telescope git_branches<cr>", { desc = "Git branches" })
|
||||
keymap.set("n", "<leader>gs", "<cmd>Telescope git_status<cr>", { desc = "Git status" })
|
||||
|
||||
-- Todos
|
||||
keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" })
|
||||
end,
|
||||
}
|
||||
|
||||
118
lua/cargdev/plugins/ufo.lua
Normal file
118
lua/cargdev/plugins/ufo.lua
Normal file
@@ -0,0 +1,118 @@
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = {
|
||||
"kevinhwang91/promise-async",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
{
|
||||
"luukvbaal/statuscol.nvim",
|
||||
config = function()
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
relculright = true,
|
||||
segments = {
|
||||
{ text = { builtin.foldfunc }, click = "v:lua.ScFa" },
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
init = function()
|
||||
vim.o.foldcolumn = "1"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
-- Use valid Unicode characters for foldopen and foldclose
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:▾,foldsep: ,foldclose:▸]]
|
||||
vim.o.foldmethod = "manual"
|
||||
vim.o.foldexpr = ""
|
||||
end,
|
||||
opts = {
|
||||
open_fold_hl_timeout = 150,
|
||||
close_fold_kinds_for_ft = {
|
||||
default = { 'imports', 'comment' },
|
||||
json = { 'array' },
|
||||
c = { 'comment', 'region' },
|
||||
},
|
||||
preview = {
|
||||
win_config = {
|
||||
border = { "", "─", "", "", "", "─", "", "" },
|
||||
winhighlight = "Normal:Folded",
|
||||
winblend = 0,
|
||||
},
|
||||
mappings = {
|
||||
scrollU = "<C-u>",
|
||||
scrollD = "<C-d>",
|
||||
jumpTop = "[",
|
||||
jumpBot = "]",
|
||||
},
|
||||
},
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
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)
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end,
|
||||
},
|
||||
config = function(_, opts)
|
||||
local ufo = require("ufo")
|
||||
ufo.setup(opts)
|
||||
-- Keymaps are in keymaps/ufo.lua
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "lua", "python", "javascript", "typescript", "c", "cpp", "rust", "go" },
|
||||
callback = function()
|
||||
ufo.setFoldVirtTextHandler(nil, function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
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)
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
10
lua/cargdev/plugins/yaml.lua
Normal file
10
lua/cargdev/plugins/yaml.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
"cuducos/yaml.nvim",
|
||||
ft = { "yaml" }, -- optional
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"folke/snacks.nvim", -- optional
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user