Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/vyfor/astrocommunity into f…
Browse files Browse the repository at this point in the history
…eat/cord-v2
  • Loading branch information
vyfor committed Jan 25, 2025
2 parents dbf96ae + 6c63109 commit 5fcc73a
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/debugging/nvim-dap-view/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# nvim-dap-view

minimalistic nvim-dap-ui alternative

**Repository:** <https://github.com/igorlfs/nvim-dap-view>
28 changes: 28 additions & 0 deletions lua/astrocommunity/debugging/nvim-dap-view/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
return {
"igorlfs/nvim-dap-view",
lazy = true,
opts = {},
specs = {
{
"AstroNvim/astrocore",
opts = function(_, opts)
local maps = opts.mappings
maps.n["<Leader>d"] = vim.tbl_get(opts, "_map_sections", "d")
maps.n["<Leader>dE"] = { function() require("dap-view").add_expr() end, desc = "Add expression" }
maps.n["<Leader>du"] = { function() require("dap-view").toggle() end, desc = "Toggle Debugger UI" }
end,
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = "igorlfs/nvim-dap-view",
opts = function()
local dap, dap_view = require "dap", require "dap-view"
dap.listeners.after.event_initialized.dapview_config = function() dap_view.open() end
dap.listeners.before.event_terminated.dapview_config = function() dap_view.close() end
dap.listeners.before.event_exited.dapview_config = function() dap_view.close() end
end,
},
{ "rcarriga/nvim-dap-ui", enabled = false },
},
}
5 changes: 5 additions & 0 deletions lua/astrocommunity/fuzzy-finder/snacks-picker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# snacks.picker

Snacks now comes with a modern fuzzy-finder to navigate the Neovim universe.

**Repository:** <https://github.com/folke/snacks.nvim/blob/main/docs/picker.md>
114 changes: 114 additions & 0 deletions lua/astrocommunity/fuzzy-finder/snacks-picker/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = { picker = { ui_select = true } },
specs = {
{
"AstroNvim/astrocore",
opts = function(_, opts)
local maps = opts.mappings
maps.n["<Leader>f"] = vim.tbl_get(opts, "_map_sections", "f")
if vim.fn.executable "git" == 1 then
maps.n["<Leader>g"] = vim.tbl_get(opts, "_map_sections", "g")
maps.n["<Leader>gb"] = { function() require("snacks").picker.git_branches() end, desc = "Git branches" }
maps.n["<Leader>gc"] = {
function() require("snacks").picker.git_log() end,
desc = "Git commits (repository)",
}
maps.n["<Leader>gC"] = {
function() require("snacks").picker.git_log { current_file = true, follow = true } end,
desc = "Git commits (current file)",
}
maps.n["<Leader>gt"] = { function() require("snacks").picker.git_status() end, desc = "Git status" }
end
maps.n["<Leader>f<CR>"] = { function() require("snacks").picker.resume() end, desc = "Resume previous search" }
maps.n["<Leader>f'"] = { function() require("snacks").picker.marks() end, desc = "Find marks" }
maps.n["<Leader>fl"] = {
function() require("snacks").picker.lines() end,
desc = "Find lines",
}
maps.n["<Leader>fa"] = {
function() require("snacks").picker.files { cwd = vim.fn.stdpath "config", desc = "Config Files" } end,
desc = "Find AstroNvim config files",
}
maps.n["<Leader>fb"] = { function() require("snacks").picker.buffers() end, desc = "Find buffers" }
maps.n["<Leader>fc"] = { function() require("snacks").picker.grep_word() end, desc = "Find word under cursor" }
maps.n["<Leader>fC"] = { function() require("snacks").picker.commands() end, desc = "Find commands" }
maps.n["<Leader>ff"] = {
function()
require("snacks").picker.files {
hidden = vim.tbl_get((vim.uv or vim.loop).fs_stat ".git" or {}, "type") == "directory",
}
end,
desc = "Find files",
}
maps.n["<Leader>fF"] = {
function() require("snacks").picker.files { hidden = true, ignored = true } end,
desc = "Find all files",
}
maps.n["<Leader>fg"] = { function() require("snacks").picker.git_files() end, desc = "Find git files" }
maps.n["<Leader>fh"] = { function() require("snacks").picker.help() end, desc = "Find help" }
maps.n["<Leader>fk"] = { function() require("snacks").picker.keymaps() end, desc = "Find keymaps" }
maps.n["<Leader>fm"] = { function() require("snacks").picker.man() end, desc = "Find man" }
maps.n["<Leader>fo"] = { function() require("snacks").picker.recent() end, desc = "Find old files" }
maps.n["<Leader>fO"] =
{ function() require("snacks").picker.recent { cwd = true } end, desc = "Find old files (cwd)" }
maps.n["<Leader>fr"] = { function() require("snacks").picker.registers() end, desc = "Find registers" }
maps.n["<Leader>fs"] = { function() require("snacks").picker.smart() end, desc = "Find buffers/recent/files" }
maps.n["<Leader>ft"] = { function() require("snacks").picker.colorschemes() end, desc = "Find themes" }
if vim.fn.executable "rg" == 1 then
maps.n["<Leader>fw"] = { function() require("snacks").picker.grep() end, desc = "Find words" }
maps.n["<Leader>fW"] = {
function() require("snacks").picker.grep { hidden = true, ignored = true } end,
desc = "Find words in all files",
}
end
maps.n["<Leader>lD"] = { function() require("snacks").picker.diagnostics() end, desc = "Search diagnostics" }
maps.n["<Leader>ls"] = { function() require("snacks").picker.lsp_symbols() end, desc = "Search symbols" }
end,
},
{
"folke/todo-comments.nvim",
optional = true,
dependencies = { "folke/snacks.nvim" },
specs = {
{
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["<Leader>fT"] = {
function()
if not package.loaded["todo-comments"] then -- make sure to load todo-comments
require("lazy").load { plugins = { "todo-comments.nvim" } }
end
require("snacks").picker.todo_comments()
end,
desc = "Todo Comments",
},
},
},
},
},
},
},
{
"nvim-neo-tree/neo-tree.nvim",
optional = true,
opts = {
commands = {
find_in_dir = function(state)
local node = state.tree:get_node()
local path = node.type == "file" and node:get_parent_id() or node:get_id()
require("snacks").picker.files { cwd = path }
end,
},
window = { mappings = { F = "find_in_dir" } },
},
},
{ "nvim-telescope/telescope.nvim", enabled = false },
{ "stevearc/dressing.nvim", opts = { select = { enabled = false } } },
},
}
12 changes: 12 additions & 0 deletions lua/astrocommunity/pack/docker/init.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
return {
{ import = "astrocommunity.pack.yaml" },
{
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = { filetypes = { filename = { ["docker-compose.yaml"] = "yaml.docker-compose" } } },
},
{
"AstroNvim/astrolsp",
optional = true,
opts = {
formatting = {
disabled = {
"docker_compose_language_service",
},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
optional = true,
Expand Down

0 comments on commit 5fcc73a

Please sign in to comment.