Skip to content

Commit

Permalink
feat(nvim): add telescope plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kutsan committed Jan 1, 2024
1 parent 041c04f commit c6ae654
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions .config/nvim/pack/bundle/start/telescope
Submodule telescope added at 346615
6 changes: 5 additions & 1 deletion .config/nvim/plugin/packages/catppuccin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ catppuccin.setup({
all = function(colors)
return {
['NvimTreeIndentMarker'] = { fg = '#232637' },
['DiffDelete'] = { fg = "#573d51" },
['DiffDelete'] = { fg = '#573d51' },
['Folded'] = { fg = colors.overlay0, bg = 'NONE' },
['FloatBorder'] = { fg = '#2f3451', bg = '#161927' },
['NormalFloat'] = { bg = '#161927' },
['TelescopeNormal'] = { bg = '#161927' },
['TelescopeBorder'] = { fg = '#2f3451', bg = '#161927' },
-- treesitter
['@constructor.tsx'] = { fg = colors.yellow },
['@tag.tsx'] = { fg = colors.red },
Expand Down
39 changes: 39 additions & 0 deletions .config/nvim/plugin/packages/telescope.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
local keymap = vim.keymap
local telescope = require('telescope')
local builtin = require('telescope.builtin')
local actions = require('telescope.actions')

telescope.setup({
defaults = {
layout_strategy = 'vertical',
layout_config = {
vertical = {
prompt_position = 'top',
preview_cutoff = 10,
width = 0.65,
mirror = true,
},
},
sorting_strategy = 'ascending',
mappings = {
i = {
['<C-j>'] = actions.move_selection_next,
['<C-k>'] = actions.move_selection_previous,
},
},
},
})

local map_opts = { silent = true }

keymap.set('n', '<Space><C-p>', builtin.find_files, map_opts)
keymap.set('n', '<M-x>', builtin.commands, map_opts)
keymap.set('n', '<C-b>', builtin.buffers, map_opts)
keymap.set('n', '<Space>h', builtin.help_tags, map_opts)
keymap.set('n', '<Space>:', builtin.command_history, map_opts)
keymap.set('n', '<Space>/', builtin.search_history, map_opts)
keymap.set('n', '<Space>`', builtin.marks, map_opts)
keymap.set('n', 'gs', builtin.live_grep, map_opts)
keymap.set('n', '<C-p>', builtin.git_files, map_opts)
keymap.set('n', '<Space>gs', builtin.git_status, map_opts)
keymap.set('n', '<C-f>', builtin.lsp_document_symbols, map_opts)
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
[submodule "surround"]
path = .config/nvim/pack/bundle/start/surround
url = https://github.com/kylechui/nvim-surround
[submodule "telescope"]
path = .config/nvim/pack/bundle/start/telescope
url = https://github.com/nvim-telescope/telescope.nvim
[submodule "treesitter"]
path = .config/nvim/pack/bundle/start/treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- [`plenary`](https://github.com/nvim-lua/plenary.nvim) - Asynchronous modules using coroutines
- [`schema-store`](https://github.com/b0o/SchemaStore.nvim) - Access to the SchemaStore catalog for JSON langauge server
- [`surround`](https://github.com/kylechui/nvim-surround) - Add, change and delete surrounding delimiter pairs
- [`telescope`](https://github.com/nvim-telescope/telescope.nvim) - Extendable fuzzy finder
- [`treesitter`](https://github.com/nvim-treesitter/nvim-treesitter) - Neovim plugin of an incremental parsing system for programming tools
- [`treesitter-autotag`](https://github.com/windwp/nvim-ts-autotag) - Treesitter plugin to auto-close and auto-rename HTML tags
- [`treesitter-context`](https://github.com/nvim-treesitter/nvim-treesitter-context) - Show code context using treesitter
Expand Down

0 comments on commit c6ae654

Please sign in to comment.