diff options
Diffstat (limited to '.config/nvim/lua')
| -rw-r--r-- | .config/nvim/lua/justsaumit/keymaps.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/justsaumit/plugins.lua | 4 | ||||
| -rw-r--r-- | .config/nvim/lua/justsaumit/telescope-config.lua | 50 | ||||
| -rw-r--r-- | .config/nvim/lua/justsaumit/which-key-config.lua | 4 | 
4 files changed, 58 insertions, 2 deletions
diff --git a/.config/nvim/lua/justsaumit/keymaps.lua b/.config/nvim/lua/justsaumit/keymaps.lua index 2a29f46..5b06bdc 100644 --- a/.config/nvim/lua/justsaumit/keymaps.lua +++ b/.config/nvim/lua/justsaumit/keymaps.lua @@ -20,6 +20,8 @@ vim.g.maplocalleader = " "  keymap("n", "<C-s>", ":w<CR>", opts)  --Toggle nvim-tree  keymap("n", "<m-e>", ":NvimTreeToggle<CR>", opts) +--Disable C-e +keymap("n", "<c-e>", ":<CR>", opts)  -- Better window navigation for split  keymap("n", "<C-h>", "<C-w>h", opts) diff --git a/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua index 8c075ec..9d2b36e 100644 --- a/.config/nvim/lua/justsaumit/plugins.lua +++ b/.config/nvim/lua/justsaumit/plugins.lua @@ -61,9 +61,11 @@ return packer.startup(function(use)  --Nvim-tree File explorer for nvim      use {'kyazdani42/nvim-tree.lua',  requires = { 'kyazdani42/nvim-web-devicons'}}  --Whick-key - displays a popup with possible key bindings -    use {'folke/which-key.nvim'} +    use 'folke/which-key.nvim'  --HTML      use 'windwp/nvim-ts-autotag' +--Telescope +use {'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = { {'nvim-lua/plenary.nvim'} }}  --cmp  --  use 'neovim/nvim-lspconfig'  --  use 'hrsh7th/cmp-nvim-lsp' diff --git a/.config/nvim/lua/justsaumit/telescope-config.lua b/.config/nvim/lua/justsaumit/telescope-config.lua new file mode 100644 index 0000000..c1bb44d --- /dev/null +++ b/.config/nvim/lua/justsaumit/telescope-config.lua @@ -0,0 +1,50 @@ +local actions = require('telescope.actions') +require('telescope').setup { +  defaults = { +    layout_config = { +      width = 0.75, +      prompt_position = "top", +      preview_cutoff = 120, +      horizontal = {mirror = false}, +      vertical = {mirror = false} +    }, +    find_command = { +      'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' +    }, +    prompt_prefix = " ", +    selection_caret = " ", +    entry_prefix = "  ", +    initial_mode = "insert", +    selection_strategy = "reset", +    sorting_strategy = "descending", +    layout_strategy = "horizontal", +    file_sorter = require'telescope.sorters'.get_fuzzy_file, +    file_ignore_patterns = {}, +    generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, +    path_display = {}, +    winblend = 0, +    border = {}, +    borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}, +    color_devicons = true, +    use_less = true, +    set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil, +    file_previewer = require'telescope.previewers'.vim_buffer_cat.new, +    grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, +    qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, +    buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, +    mappings = { +      i = { +        ["<C-j>"] = actions.move_selection_next, +        ["<C-k>"] = actions.move_selection_previous, +        ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist, +        ["<esc>"] = actions.close, +        ["<CR>"] = actions.select_default + actions.center +      }, +      n = { +        ["<C-j>"] = actions.move_selection_next, +        ["<C-k>"] = actions.move_selection_previous, +        ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist +      } +    } +  } +} diff --git a/.config/nvim/lua/justsaumit/which-key-config.lua b/.config/nvim/lua/justsaumit/which-key-config.lua index 11bb49c..b438f7e 100644 --- a/.config/nvim/lua/justsaumit/which-key-config.lua +++ b/.config/nvim/lua/justsaumit/which-key-config.lua @@ -3,7 +3,9 @@ local mappings = {      q = {":q<CR>", "Quit"},      Z = {":wq<CR>", "Save and Quit"},      w = {":w<CR>", "Save"}, -    x ={":bdelete<CR>", "Close"} +    x ={":bdelete<CR>", "Close"}, +    f = { ":Telescope find_files<cr>", "Telescope Find Files" }, +    g = { ":Telescope live_grep<cr>", "Telescope Live Grep" }  }  local opts = {prefix = '<leader>'}  wk.register(mappings, opts)  | 
