diff --git a/lua/options/keybind.lua b/lua/options/keybind.lua index d1aba33..541f89b 100755 --- a/lua/options/keybind.lua +++ b/lua/options/keybind.lua @@ -7,6 +7,8 @@ local options = { noremap = true } local cmd_options = { noremap = true, silent = true } +map('n', '', 'Telescope buffers', options) + -- slef explanitory map("n", "tw", "lua MiniTrailspace.trim()", options) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 97ab96c..6b02a0a 100755 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -12,3 +12,4 @@ require("plugins.wilder") require("plugins.mini") require("plugins.oil") -- require("plugins.fterm") +require("plugins.telescope") diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua index 8f0710b..d9816e1 100755 --- a/lua/plugins/lazy.lua +++ b/lua/plugins/lazy.lua @@ -1,13 +1,13 @@ -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 vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release + 'git', + 'clone', + '--filter=blob:none', + 'https://github.com/folke/lazy.nvim.git', + '--branch=stable', -- latest stable release lazypath, }) end @@ -15,7 +15,7 @@ end vim.opt.rtp:prepend(lazypath) -require("lazy").setup({ +require('lazy').setup({ 'EdenEast/nightfox.nvim', 'luckasRanarison/tree-sitter-hypr', @@ -26,10 +26,18 @@ require("lazy").setup({ 'bkad/camelcasemotion', 'lewis6991/gitsigns.nvim', + { + 'nvim-telescope/telescope.nvim', + tag = '0.1.8', + dependencies = { + 'nvim-lua/plenary.nvim' + } + }, + { 'stevearc/oil.nvim', dependencies = { - "nvim-tree/nvim-web-devicons" + 'nvim-tree/nvim-web-devicons' }, }, @@ -96,5 +104,5 @@ require("lazy").setup({ vim.opt.laststatus=2 -vim.keymap.set('i', '', [[pumvisible() ? "\" : "\"]], { expr = true }) -vim.keymap.set('i', '', [[pumvisible() ? "\" : "\"]], { expr = true }) +vim.keymap.set('i', '', [[pumvisible() ? '\' : '\']], { expr = true }) +vim.keymap.set('i', '', [[pumvisible() ? '\' : '\']], { expr = true }) diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index 5e450cd..fdb68d4 100755 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -4,6 +4,67 @@ require('mini.comment').setup() require('mini.pairs').setup() +local miniclue = require('mini.clue') +miniclue.setup({ + triggers = { + -- Leader triggers + { mode = 'n', keys = '' }, + { mode = 'x', keys = '' }, + + -- Built-in completion + { mode = 'i', keys = '' }, + + -- `g` key + { mode = 'n', keys = 'g' }, + { mode = 'x', keys = 'g' }, + + -- Marks + { mode = 'n', keys = "'" }, + { mode = 'n', keys = '`' }, + { mode = 'x', keys = "'" }, + { mode = 'x', keys = '`' }, + + -- Registers + { mode = 'n', keys = '"' }, + { mode = 'x', keys = '"' }, + { mode = 'i', keys = '' }, + { mode = 'c', keys = '' }, + + -- Window commands + { mode = 'n', keys = '' }, + + -- `z` key + { mode = 'n', keys = 'z' }, + { mode = 'x', keys = 'z' }, + }, + + clues = { + -- Enhance this by adding descriptions for mapping groups + miniclue.gen_clues.builtin_completion(), + miniclue.gen_clues.g(), + miniclue.gen_clues.marks(), + miniclue.gen_clues.registers(), + miniclue.gen_clues.windows(), + miniclue.gen_clues.z(), + }, + + -- Array of opt-in triggers which start custom key query process. + -- **Needs to have something in order to show clues**. + -- Clue window settings + window = { + -- Floating window config + config = {}, + + -- Delay before showing clue window + delay = 200, + + -- Keys to scroll inside the clue window + scroll_down = '', + scroll_up = '', + }, +}) + + require('mini.surround').setup( { -- Add custom surroundings to be used on top of builtin ones. For more diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..9808531 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,30 @@ +require('telescope').setup{ + defaults = { + -- Default configuration for telescope goes here: + -- config_key = value, + mappings = { + i = { + -- map actions.which_key to (default: ) + -- actions.which_key shows the mappings for your picker, + -- e.g. git_{create, delete, ...}_branch for the git_branches picker + [""] = "which_key" + } + } + }, + pickers = { + -- Default configuration for builtin pickers goes here: + -- picker_name = { + -- picker_config_key = value, + -- ... + -- } + -- Now the picker_config_key will be applied every time you call this + -- builtin picker + }, + extensions = { + -- Your extension configuration goes here: + -- extension_name = { + -- extension_config_key = value, + -- } + -- please take a look at the readme of the extension you want to configure + } +}