Added telescope configuration
This commit is contained in:
parent
ab53be3749
commit
1502bfe4b0
@ -35,7 +35,15 @@ require("lazy").setup({
|
|||||||
"nathanaelkane/vim-indent-guides",
|
"nathanaelkane/vim-indent-guides",
|
||||||
-- "https://github.com/intel-sandbox/vim-iosf.git", -- intel
|
-- "https://github.com/intel-sandbox/vim-iosf.git", -- intel
|
||||||
-- "https://github.com/intel-sandbox/vim-pcietrk", -- intel
|
-- "https://github.com/intel-sandbox/vim-pcietrk", -- intel
|
||||||
"vhda/verilog_systemverilog.vim"
|
"vhda/verilog_systemverilog.vim",
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.2',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- LuaLine
|
-- LuaLine
|
||||||
@ -86,17 +94,17 @@ require('lualine').setup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Gitsigns
|
-- -- Gitsigns
|
||||||
-- See `:help gitsigns.txt`
|
-- -- See `:help gitsigns.txt`
|
||||||
require('gitsigns').setup {
|
-- require('gitsigns').setup {
|
||||||
signs = {
|
-- signs = {
|
||||||
add = { text = '+' },
|
-- add = { text = '+' },
|
||||||
change = { text = '~' },
|
-- change = { text = '~' },
|
||||||
delete = { text = '_' },
|
-- delete = { text = '_' },
|
||||||
topdelete = { text = '‾' },
|
-- topdelete = { text = '‾' },
|
||||||
changedelete = { text = '~' },
|
-- changedelete = { text = '~' },
|
||||||
},
|
-- },
|
||||||
}
|
-- }
|
||||||
|
|
||||||
-- Onedark theme
|
-- Onedark theme
|
||||||
require('onedark').setup {
|
require('onedark').setup {
|
||||||
@ -233,5 +241,37 @@ vim.cmd("au! BufRead,BufNewFile *.sv,*.svh set filetype=verilog_systemv
|
|||||||
vim.cmd("au! BufRead,BufNewFile *iosfsb_trk.out set filetype=iosfsbtrk")
|
vim.cmd("au! BufRead,BufNewFile *iosfsb_trk.out set filetype=iosfsbtrk")
|
||||||
vim.cmd("au! BufRead,BufNewFile *iosf_trk.out set filetype=iosftrk")
|
vim.cmd("au! BufRead,BufNewFile *iosf_trk.out set filetype=iosftrk")
|
||||||
|
|
||||||
|
-- [[ Configure Telescope ]]
|
||||||
|
-- See `:help telescope` and `:help telescope.setup()`
|
||||||
|
require('telescope').setup {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
['<C-u>'] = false,
|
||||||
|
['<C-d>'] = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Enable telescope fzf native, if installed
|
||||||
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
|
||||||
|
-- See `:help telescope.builtin`
|
||||||
|
vim.keymap.set('n', '<ldeader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
||||||
|
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
||||||
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
|
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||||
|
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||||
|
winblend = 10,
|
||||||
|
previewer = false,
|
||||||
|
})
|
||||||
|
end, { desc = '[/] Fuzzily search in current buffer]' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
|
||||||
|
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
|
||||||
|
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
|
||||||
|
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
|
||||||
|
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ft=lua ts=4 sts=4 sw=4 et
|
-- vim: ft=lua ts=4 sts=4 sw=4 et
|
||||||
|
Loading…
Reference in New Issue
Block a user