chore(neovim): Use snacks.nvim to view images

- Remove `image.nvim` for image display on markdown
- Simple code reorg
This commit is contained in:
Pratik Tripathy
2025-07-22 16:40:36 +05:30
parent 9ed4ee445b
commit eb4bd841b3
4 changed files with 17 additions and 19 deletions

View File

@@ -30,9 +30,12 @@ return {
-- Place cursor on "View Documentation" gx -> Open the docs on browser
map("K", "<cmd>Lspsaga hover_doc<cr>", "Hover Documentation")
map("<F2>", vim.lsp.buf.rename, "Rename Symbol")
map("<C-.>", "<cmd>Lspsaga code_action<cr>", "Code Actions")
map("<leader>ca", "<cmd>Lspsaga code_action<cr>", "Code Actions")
map("<leader>cr", "<cmd>Lspsaga finder<cr>", "Goto References")
map("<leader>cpf", "<cmd>Lspsaga peek_definition<cr>", "Peek definition: Function")
map("<leader>cpt", "<cmd>Lspsaga peek_type_definition<cr>", "Peek definition: Class")
map("<leader>cpi", "<cmd>Lspsaga finder imp<cr>", "Peek: Implementations")
@@ -42,12 +45,15 @@ return {
-- To jump back, press <C-t>.
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
map("<F12>", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
map("<leader>ci", require("telescope.builtin").lsp_implementations, "Goto Implementation")
map("<leader>cs", require("telescope.builtin").lsp_document_symbols, "Search Document Symbols")
map("<leader>cS", require("telescope.builtin").lsp_dynamic_workspace_symbols, "Search Workspace Symbols")
map("<leader>ci", require("telescope.builtin").lsp_implementations, "Goto Implementation")
map("<leader>ct", require("telescope.builtin").lsp_type_definitions, "Goto Type Definition")
-- e to jump to the symbol under cursor; q to quit
map("<leader>co", "<cmd>Lspsaga outline<cr>", "Outline Panel on Left")

View File

@@ -149,14 +149,4 @@ return {
},
-- TIP: Use :PasteImage
},
-- View images in Neovim
{
"3rd/image.nvim",
build = false,
opts = {
-- Use ImageMagick (Fedora) or imagemagick (Debian) installed
processor = "magick_cli",
},
},
}

View File

@@ -35,6 +35,14 @@ return {
input = {
enabled = true,
},
image = {
enabled = true,
doc = {
max_width = 80,
max_height = 68,
},
img_dirs = { "img", "images", "assets", "static", "public", "media", "attachments", ".artifacts/img" },
},
lazygit = {
enabled = true,
configure = true,
@@ -140,7 +148,7 @@ return {
desc = "Notification History",
},
{
"<leader>z",
"<S-Esc>",
function()
Snacks.zen()
end,
@@ -156,12 +164,6 @@ return {
},
},
-- Navigate between NVIM & Tmux splits seamlessly
{
"christoomey/vim-tmux-navigator",
cond = require("config.util").is_not_vscode(),
},
-- Navigate between NVIM & kitty splits
{
"knubie/vim-kitty-navigator",