mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-17 16:02:41 +00:00
net config
This commit is contained in:
parent
93b7b93d64
commit
dd59a54b92
36 changed files with 960 additions and 631 deletions
142
lua/plugins/navigation.lua
Normal file
142
lua/plugins/navigation.lua
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
return {
|
||||
-- Telescope fuzzy finder
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
},
|
||||
},
|
||||
cmd = "Telescope",
|
||||
keys = {
|
||||
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" },
|
||||
{
|
||||
"<leader>fs",
|
||||
function()
|
||||
require("telescope.builtin").find_files({
|
||||
find_command = {
|
||||
"fd",
|
||||
"--type", "f",
|
||||
"--max-depth", "3",
|
||||
"--strip-cwd-prefix",
|
||||
"--hidden",
|
||||
"--exclude", ".git",
|
||||
"--exclude", "node_modules",
|
||||
"--exclude", ".next",
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Shallow find files",
|
||||
},
|
||||
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live grep" },
|
||||
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" },
|
||||
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help tags" },
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
"node_modules",
|
||||
".next",
|
||||
".git",
|
||||
"dist",
|
||||
"build",
|
||||
"%.lock",
|
||||
},
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--hidden",
|
||||
"--glob=!.git/",
|
||||
"--glob=!node_modules/",
|
||||
"--glob=!.next/",
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-j>"] = "move_selection_next",
|
||||
["<C-k>"] = "move_selection_previous",
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
find_command = {
|
||||
"fd",
|
||||
"--type", "f",
|
||||
"--strip-cwd-prefix",
|
||||
"--hidden",
|
||||
"--exclude", ".git",
|
||||
"--exclude", "node_modules",
|
||||
"--exclude", ".next",
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
},
|
||||
})
|
||||
telescope.load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Oil file explorer
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
lazy = false,
|
||||
keys = {
|
||||
{ "-", "<cmd>Oil<cr>", desc = "Open parent directory" },
|
||||
},
|
||||
opts = {
|
||||
default_file_explorer = true,
|
||||
columns = {
|
||||
"icon",
|
||||
},
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
},
|
||||
keymaps = {
|
||||
["g?"] = "actions.show_help",
|
||||
["<CR>"] = "actions.select",
|
||||
["<C-v>"] = "actions.select_vsplit",
|
||||
["<C-s>"] = "actions.select_split",
|
||||
["<C-t>"] = "actions.select_tab",
|
||||
["<C-p>"] = "actions.preview",
|
||||
["<C-c>"] = "actions.close",
|
||||
["<C-r>"] = "actions.refresh",
|
||||
["-"] = "actions.parent",
|
||||
["_"] = "actions.open_cwd",
|
||||
["`"] = "actions.cd",
|
||||
["~"] = "actions.tcd",
|
||||
["gs"] = "actions.change_sort",
|
||||
["gx"] = "actions.open_external",
|
||||
["g."] = "actions.toggle_hidden",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Arrow for quick file bookmarks
|
||||
{
|
||||
"otavioschwanck/arrow.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
show_icons = true,
|
||||
leader_key = ";",
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue