update nvim plugins

- remove unused plugins
- change file explorer plugin

closes #3
This commit is contained in:
Alexander Navarro 2024-11-18 10:12:46 -03:00
parent 00e3f8f8e9
commit c7b411f60f
10 changed files with 40 additions and 245 deletions

View file

@ -1,6 +1,5 @@
{
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"auto-session": { "branch": "main", "commit": "4b0728715e674ad9c18f1519127dcaed59f9981b" },
"ccc.nvim": { "branch": "main", "commit": "4fb5abaef2f2e0540fe22d4d74a9841205fff9e4" },
"chezmoi.nvim": { "branch": "main", "commit": "faf61465718424696269b2647077331b3e4605f1" },
@ -18,14 +17,12 @@
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
"copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" },
"copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" },
"debugprint.nvim": { "branch": "main", "commit": "8f2a335fb0e6ebf0291a3551e0198363437e3a38" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" },
"gitsigns.nvim": { "branch": "main", "commit": "e9c4187c3774a46df2d086a66cf3a7e6bea4c432" },
"gopher.nvim": { "branch": "main", "commit": "f55c15ada8e02398000c04a96ef44d986cd01051" },
"grapple.nvim": { "branch": "main", "commit": "7aedc261b05a6c030397c4bc26416efbe746ebf1" },
"hurl.nvim": { "branch": "main", "commit": "d708158dda9a175c0f83cd106ea232301f4317cb" },
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
"lazy.nvim": { "branch": "main", "commit": "b02c9eae6a250f98908c146d1dc1a891f5019f0a" },
"lazygit.nvim": { "branch": "main", "commit": "dc56df433bfbf107fee0139e187eb9750878fa84" },
@ -61,7 +58,6 @@
"smart-splits.nvim": { "branch": "master", "commit": "95833675cd92538bf9cded1d2d58d1fc271c5428" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"tfm.nvim": { "branch": "main", "commit": "fb0de2c96bf303216ac5d91ce9bdb7f430030f8b" },
"todo-comments.nvim": { "branch": "main", "commit": "d61567557e2ff5c548c74e96b2d9f8d33e5fcb34" },
"treesj": { "branch": "main", "commit": "6e8bd008bacd5ad001c3953017c1dca20709e915" },
"trouble.nvim": { "branch": "main", "commit": "03c1fbf518bef683422a3be9643c3da190903488" },
@ -74,6 +70,7 @@
"vim-dadbod-ui": { "branch": "master", "commit": "f74a31e8c6c5a9dccc63450a09d5cd64a9294330" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"yazi.nvim": { "branch": "main", "commit": "faa03e9acb894533b91c811d0dafd816b995088f" },
"zen-mode.nvim": { "branch": "main", "commit": "2694c5a2bc4dc26c7a9e74b9e2b812920c90a830" },
"zk-nvim": { "branch": "main", "commit": "dbf4eeab55b08856c9d6b6722dbff39630bb35eb" }
}

View file

@ -1,35 +0,0 @@
return {
"goolord/alpha-nvim",
lazy = false,
opts = function()
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = {
" ████ ███ █████ █████ ",
" ░░███ ░░░ ░░███ ░░███ ",
" ██████ ░███ ██████ ████ ███████ ░███ █████",
" ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ",
" ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ",
" ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ",
"░░████████ █████░░██████ █████░░████████ ████ █████",
" ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ",
}
dashboard.section.header.opts.hl = "DashboardHeader"
dashboard.section.buttons.val = {
dashboard.button("LDR f f", " Find File ", "<leader>ff"),
dashboard.button("LDR LDR t", " Bookmars", "<leader><leader>t"),
dashboard.button("LDR g g", " Git ", "<leader>gg"),
}
dashboard.section.footer.val =
{ " ", " ", " ", "Nvim loaded " .. require("lazy").stats().count .. " plugins " }
dashboard.section.footer.opts.hl = "DashboardFooter"
dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) })
dashboard.config.layout[3].val = 5
dashboard.config.opts.noautocmd = true
return dashboard.opts
end,
}

View file

@ -1,7 +0,0 @@
return {
"andrewferrier/debugprint.nvim",
opts = {},
-- Remove the following line to use development versions,
-- not just the formal releases
version = "*",
}

View file

@ -1,100 +0,0 @@
return {
{
"nvim-tree/nvim-tree.lua",
enabled = false,
version = "*",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
keys = {
{ "<Leader>e", "<CMD>NvimTreeToggle<CR>", desc = "Open file explorer" },
},
cmd = { "NvimTreeToggle", "Tree" },
config = function()
local tree = require("nvim-tree")
local api = require("nvim-tree.api")
tree.setup({
hijack_unnamed_buffer_when_opening = true,
disable_netrw = false,
hijack_netrw = false, -- handle by telescope browser
hijack_cursor = true, -- cursor at the start of filename
sync_root_with_cwd = true,
respect_buf_cwd = true,
update_focused_file = {
enable = true, -- focus curren file
update_root = true,
},
actions = { open_file = { quit_on_open = true } },
renderer = {
full_name = true, -- show remaining name in floating text
group_empty = true, -- group empty folders
add_trailing = true, -- Trailing slash to folders
highlight_opened_files = "all",
highlight_git = true,
},
view = {
centralize_selection = true, -- center current file on enter
width = 30, -- N° of columns or %
},
on_attach = function(bufnr)
local function opts(desc)
return {
desc = "nvim-tree: " .. desc,
buffer = bufnr,
noremap = true,
silent = true,
nowait = true,
}
end
-- Check defaults here: https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
api.config.mappings.default_on_attach(bufnr)
vim.keymap.set("n", "l", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "o", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "<CR>", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "s", api.node.open.vertical, opts("Open in vsplit"))
vim.keymap.set("n", "v", api.node.open.horizontal, opts("Open in hsplit"))
vim.keymap.set("n", "t", api.node.open.tab, opts("Open in tab"))
vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close dir"))
vim.keymap.set("n", "<BS>", api.node.navigate.parent_close, opts("Close dir"))
vim.keymap.set("n", "i", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles"))
vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore"))
end,
})
-- Auto open when a dir is opened
local function open_nvim_tree(data)
-- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1
if not directory then
return
end
-- create a new, empty buffer
vim.cmd.enew()
-- wipe the directory buffer
vim.cmd.bw(data.buf)
-- change to the directory
vim.cmd.cd(data.file)
-- open the tree
require("nvim-tree.api").tree.open()
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
vim.api.nvim_create_user_command("Tree", "NvimTreeToggle", {})
-- bindings
-- disabled to discourage the use of this plugin without disabling it
-- vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
-- vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
end,
},
}

View file

@ -1,66 +1,44 @@
---@type LazySpec
return {
"rolv-apneseth/tfm.nvim",
lazy = false,
opts = {
-- TFM to use
-- Possible choices: "ranger" | "nnn" | "lf" | "vifm" | "yazi" (default)
file_manager = "yazi",
-- Replace netrw entirely
-- Default: false
replace_netrw = true,
-- Enable creation of commands
-- Default: false
-- Commands:
-- Tfm: selected file(s) will be opened in the current window
-- TfmSplit: selected file(s) will be opened in a horizontal split
-- TfmVsplit: selected file(s) will be opened in a vertical split
-- TfmTabedit: selected file(s) will be opened in a new tab page
enable_cmds = true,
-- Custom keybindings only applied within the TFM buffer
-- Default: {}
keybindings = {
["<ESC>"] = "q",
},
-- Customise UI. The below options are the default
ui = {
border = "rounded",
height = 1,
width = 1,
x = 0.5,
y = 0.5,
},
},
"mikavilpas/yazi.nvim",
event = "VeryLazy",
keys = {
-- 👇 in this section, choose your own keymappings!
{
"<leader>e",
function()
require("tfm").open()
end,
desc = "TFM",
"<cmd>Yazi<cr>",
desc = "Open yazi at the current file",
},
{
"<leader>mh",
function()
local tfm = require("tfm")
tfm.open(nil, tfm.OPEN_MODE.split)
end,
desc = "TFM - horizontal split",
-- Open in the current working directory
"<leader>-",
"<cmd>Yazi cwd<cr>",
desc = "Open the file manager in nvim's working directory",
},
{
"<leader>mv",
function()
local tfm = require("tfm")
tfm.open(nil, tfm.OPEN_MODE.vsplit)
end,
desc = "TFM - vertical split",
},
{
"<leader>mt",
function()
local tfm = require("tfm")
tfm.open(nil, tfm.OPEN_MODE.tabedit)
end,
desc = "TFM - new tab",
-- {
-- -- NOTE: this requires a version of yazi that includes
-- -- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18
-- '<c-up>',
-- "<cmd>Yazi toggle<cr>",
-- desc = "Resume the last yazi session",
-- },
},
---@type YaziConfig
opts = {
-- if you want to open yazi instead of netrw, see below for more info
open_for_directories = true,
open_multiple_tabs = true,
floating_window_scaling_factor = 1,
keymaps = {
show_help = '<f1>',
open_file_in_vertical_split = '<c-v>',
open_file_in_horizontal_split = '<c-s>',
open_file_in_tab = '<c-t>',
grep_in_directory = '<c-w>',
cycle_open_buffers = '<tab>',
copy_relative_path_to_selected_files = '<c-y>',
send_to_quickfix_list = '<c-q>',
change_working_directory = "<c-\\>",
},
},
}

View file

@ -1,38 +0,0 @@
return {
"jellydn/hurl.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter"
},
ft = "hurl",
opts = {
-- Show debugging info
debug = false,
-- Show notification on run
show_notification = false,
-- Show response in popup or split
mode = "popup",
-- Default formatter
formatters = {
json = { 'jq' }, -- Make sure you have install jq in your system, e.g: brew install jq
html = {
'prettierd', -- Make sure you have install prettier in your system, e.g: npm install -g prettier
'--parser',
'html',
},
},
env_file = {
'hurl.env',
'.env',
'.env.local',
},
},
keys = {
-- Run API request
{ "<leader>ph", "<cmd>HurlRunnerAt<CR>", desc = "Run HTTP request" },
{ "<leader>pH", "<cmd>HurlRunner<CR>", desc = "Run all HTTP requests" },
-- Run Hurl request in visual mode
{ "<leader>ph", ":HurlRunner<CR>", desc = "Run HTTP requests", mode = "v" },
},
}