mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 15:42:14 +02:00
various imporovement over the shortcuts for telescope
This commit is contained in:
+28
-3
@@ -4,6 +4,9 @@ vim.o.tabstop = 2
|
|||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
vim.o.relativenumber = true
|
vim.o.relativenumber = true
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
@@ -44,17 +47,17 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
lazy = false,
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<c-n>", "<cmd>NvimTreeOpen<cr>", silent = true, desc = "Open the file tree" }
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
vim.api.nvim_set_keymap("n", "<C-n>", ":NvimTreeOpen<CR>", { silent = true })
|
|
||||||
|
|
||||||
require("nvim-tree").setup({
|
require("nvim-tree").setup({
|
||||||
auto_reload_on_write = true,
|
auto_reload_on_write = true,
|
||||||
sort_by = "case_sensitive",
|
sort_by = "case_sensitive",
|
||||||
@@ -66,5 +69,27 @@ require("lazy").setup({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ff", "<cmd>Telescope find_files<CR>", desc = "Find files (without hidden nor ignored files)" },
|
||||||
|
{ "<leader>fw", "<cmd>Telescope live_grep<CR>", desc = "Find words" },
|
||||||
|
{ "<leader>fc", "<cmd>Telescope find_colorschemes<CR>", desc = "Find color schemes" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("telescope").setup({})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
config = function()
|
||||||
|
vim.o.timeout = true
|
||||||
|
vim.o.timeoutlen = 0
|
||||||
|
require("which-key").setup({})
|
||||||
|
end
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user