Update dots:
Add options to not save some filetypes in auto session Remove CMP from command line and search, alsow update wilemenu Remove Oil.nvim and make nvim-tree the default file explorer Add some git pickers from telescope
This commit is contained in:
parent
ea8bd3a653
commit
9c023c015c
8 changed files with 21 additions and 73 deletions
|
|
@ -47,7 +47,6 @@
|
|||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
|
||||
"oil.nvim": { "branch": "master", "commit": "05a80e24f6c920e29ed741d12ede0840e456a3e4" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||
"pretty-fold.nvim": { "branch": "master", "commit": "a7d8b424abe0eedf50116c460fbe6dfd5783b1d5" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "c8a9173d70cbbd1f6e4a414e49e31df2b32a1362" },
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ opt.timeoutlen = 300
|
|||
opt.undofile = true
|
||||
opt.undolevels = 10000
|
||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
||||
opt.wildmode = "longest:full,full" -- Command-line completion mode
|
||||
opt.wildmode = "longest,list:full" -- Command-line completion mode
|
||||
opt.winminwidth = 5 -- Minimum window width
|
||||
opt.wrap = false -- Disable line wrap
|
||||
|
||||
|
|
|
|||
|
|
@ -77,23 +77,5 @@ return {
|
|||
}
|
||||
|
||||
cmp.setup(opts)
|
||||
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ return {
|
|||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
lazy = false,
|
||||
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")
|
||||
|
|
@ -94,47 +97,4 @@ return {
|
|||
-- vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
opts = function()
|
||||
local oil = require("oil")
|
||||
return {
|
||||
win_options = {
|
||||
number = false,
|
||||
},
|
||||
delete_to_trash = true,
|
||||
trash_command = "trash",
|
||||
skip_confirm_for_simple_edits = false,
|
||||
keymaps = {
|
||||
["g?"] = "actions.show_help",
|
||||
["<CR>"] = "actions.select",
|
||||
["l"] = "actions.select",
|
||||
["<C-CR>"] = "actions.open_external",
|
||||
["<C-s>"] = function()
|
||||
oil.select({ vertical = true })
|
||||
vim.cmd.wincmd({ args = { "p" } })
|
||||
oil.close()
|
||||
vim.cmd.wincmd({ args = { "p" } })
|
||||
end,
|
||||
["<C-v>"] = "actions.select_split",
|
||||
["<C-t>"] = "actions.select_tab",
|
||||
["<C-p>"] = "actions.preview",
|
||||
["<C-d>"] = "actions.preview_scroll_down",
|
||||
["<C-u>"] = "actions.preview_scroll_up",
|
||||
["<Esc>"] = "actions.close",
|
||||
["<C-r>"] = "actions.refresh",
|
||||
["y"] = "actions.copy_entry_path",
|
||||
["h"] = "actions.parent",
|
||||
["gs"] = "actions.change_sort",
|
||||
["gx"] = "actions.open_external",
|
||||
["g."] = "actions.toggle_hidden",
|
||||
},
|
||||
}
|
||||
end,
|
||||
-- Optional dependencies
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
keys = {
|
||||
{ "<Leader>e", "<CMD>Oil<CR>", desc = "Open file explorer" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ return {
|
|||
map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk")
|
||||
map("n", "R", gs.reset_buffer, "Reset Buffer")
|
||||
map("n", "p", gs.preview_hunk, "Preview Hunk")
|
||||
map("n", "l", function() gs.blame_line() end, "Blame Line")
|
||||
map("n", "l", function() gs.blame_line({full = true}) end, "Blame Line")
|
||||
map("n", "d", gs.diffthis, "Diff This")
|
||||
end,
|
||||
},
|
||||
|
|
@ -38,9 +38,6 @@ return {
|
|||
{
|
||||
"tpope/vim-fugitive",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>gG", ":Git<CR>", desc = "Fugitive" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
|
|
@ -50,7 +47,7 @@ return {
|
|||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gL", ":LazyGit<CR>", desc = "Lazygit" },
|
||||
{ "<leader>gG", ":LazyGit<CR>", desc = "Lazygit" },
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,13 @@ return {
|
|||
-- sessions
|
||||
"rmagatti/auto-session",
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require("auto-session").setup({
|
||||
log_level = "error",
|
||||
auto_session_suppress_dirs = { "~/", "~/Downloads", "/" },
|
||||
bypass_session_save_file_types = {
|
||||
"NeogitStatus",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ return {
|
|||
layout_config = { vertical = { height = 0.99, mirror = true, prompt_position = "top" } },
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-u>"] = false,
|
||||
["<c-d>"] = false,
|
||||
["<c-u>"] = actions.preview_scrolling_up,
|
||||
["<c-d>"] = actions.preview_scrolling_down,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-s>"] = actions.file_vsplit,
|
||||
|
|
@ -75,8 +75,12 @@ return {
|
|||
-- Help
|
||||
vim.keymap.set("n", "<leader>fc", builtin.command_history, { desc = "Find in commands history" })
|
||||
vim.keymap.set("n", "<leader>fC", builtin.commands, { desc = "Find a command" })
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "[F]ind [H]elp" })
|
||||
vim.keymap.set("n", "<leader>fk", builtin.keymaps, { desc = "[F]ind [K]eymaps" })
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Find Help" })
|
||||
vim.keymap.set("n", "<leader>fk", builtin.keymaps, { desc = "Find Keymaps" })
|
||||
|
||||
-- Git
|
||||
vim.keymap.set("n", "<leader>gb", builtin.git_branches, { desc = "Change branch" })
|
||||
vim.keymap.set("n", "<leader>gL", builtin.git_bcommits, { desc = "Commits of buffer" })
|
||||
|
||||
-- Diagnosticos
|
||||
-- Disabled, handle by trouble
|
||||
|
|
|
|||
2
config/zsh/aliases/git.zsh
Normal file
2
config/zsh/aliases/git.zsh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
alias \
|
||||
glf='git log -p --'
|
||||
Loading…
Add table
Add a link
Reference in a new issue