Telescope Config
This commit is contained in:
parent
259139cf7e
commit
55e3be353c
@ -8,9 +8,9 @@ function M.config()
|
|||||||
|
|
||||||
vim.g.indentLine_enabled = 1
|
vim.g.indentLine_enabled = 1
|
||||||
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
||||||
vim.g.indent_blankline_show_first_indent_level = true
|
vim.g.indent_blankline_show_first_indent_level = false
|
||||||
vim.g.indent_blankline_use_treesitter = true
|
vim.g.indent_blankline_use_treesitter = true
|
||||||
vim.g.indent_blankline_show_current_context = true
|
vim.g.indent_blankline_show_current_context = false
|
||||||
vim.g.indent_blankline_char = "▏"
|
vim.g.indent_blankline_char = "▏"
|
||||||
vim.g.indent_blankline_buftype_exclude = {
|
vim.g.indent_blankline_buftype_exclude = {
|
||||||
"nofile",
|
"nofile",
|
||||||
|
93
lua/configs/telescope.lua
Normal file
93
lua/configs/telescope.lua
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local status_ok, telescope = pcall(require, "telescope")
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local actions = require "telescope.actions"
|
||||||
|
telescope.load_extension "fzf"
|
||||||
|
|
||||||
|
telescope.setup {
|
||||||
|
defaults = {
|
||||||
|
|
||||||
|
prompt_prefix = " ",
|
||||||
|
selection_caret = "❯ ",
|
||||||
|
path_display = { "smart" },
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-n>"] = actions.cycle_history_next,
|
||||||
|
["<C-p>"] = actions.cycle_history_prev,
|
||||||
|
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
|
||||||
|
["<C-c>"] = actions.close,
|
||||||
|
|
||||||
|
["<Down>"] = actions.move_selection_next,
|
||||||
|
["<Up>"] = actions.move_selection_previous,
|
||||||
|
|
||||||
|
["<CR>"] = actions.select_default,
|
||||||
|
["<C-x>"] = actions.select_horizontal,
|
||||||
|
["<C-v>"] = actions.select_vertical,
|
||||||
|
["<C-t>"] = actions.select_tab,
|
||||||
|
|
||||||
|
["<C-u>"] = actions.preview_scrolling_up,
|
||||||
|
["<C-d>"] = actions.preview_scrolling_down,
|
||||||
|
|
||||||
|
["<PageUp>"] = actions.results_scrolling_up,
|
||||||
|
["<PageDown>"] = actions.results_scrolling_down,
|
||||||
|
|
||||||
|
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
|
||||||
|
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
|
||||||
|
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
||||||
|
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||||
|
["<C-l>"] = actions.complete_tag,
|
||||||
|
},
|
||||||
|
|
||||||
|
n = {
|
||||||
|
["<esc>"] = actions.close,
|
||||||
|
["<CR>"] = actions.select_default,
|
||||||
|
["<C-x>"] = actions.select_horizontal,
|
||||||
|
["<C-v>"] = actions.select_vertical,
|
||||||
|
["<C-t>"] = actions.select_tab,
|
||||||
|
|
||||||
|
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
|
||||||
|
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
|
||||||
|
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
||||||
|
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||||
|
|
||||||
|
["j"] = actions.move_selection_next,
|
||||||
|
["k"] = actions.move_selection_previous,
|
||||||
|
["H"] = actions.move_to_top,
|
||||||
|
["M"] = actions.move_to_middle,
|
||||||
|
["L"] = actions.move_to_bottom,
|
||||||
|
|
||||||
|
["<Down>"] = actions.move_selection_next,
|
||||||
|
["<Up>"] = actions.move_selection_previous,
|
||||||
|
["gg"] = actions.move_to_top,
|
||||||
|
["G"] = actions.move_to_bottom,
|
||||||
|
|
||||||
|
["<C-u>"] = actions.preview_scrolling_up,
|
||||||
|
["<C-d>"] = actions.preview_scrolling_down,
|
||||||
|
|
||||||
|
["<PageUp>"] = actions.results_scrolling_up,
|
||||||
|
["<PageDown>"] = actions.results_scrolling_down,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pickers = {},
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true,
|
||||||
|
override_generic_sorter = true,
|
||||||
|
override_file_sorter = true,
|
||||||
|
case_mode = "smart_case",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
@ -29,3 +29,12 @@ map('n', '<leader>o', '<cmd>NvimTreeFocus<CR>', opts)
|
|||||||
map('n', '<leader>/', '<cmd>lua require(\'Comment.api\').toggle_current_linewise()<CR>', opts)
|
map('n', '<leader>/', '<cmd>lua require(\'Comment.api\').toggle_current_linewise()<CR>', opts)
|
||||||
map('v', '<leader>/', '<esc><cmd>lua require(\'Comment.api\').toggle_linewise_op(vim.fn.visualmode())<CR>', opts)
|
map('v', '<leader>/', '<esc><cmd>lua require(\'Comment.api\').toggle_linewise_op(vim.fn.visualmode())<CR>', opts)
|
||||||
|
|
||||||
|
-- Telescope (See also configs/telescope.lua)
|
||||||
|
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", opts)
|
||||||
|
map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", opts)
|
||||||
|
map("n", "<leader>gc", "<cmd>Telescope git_commits<CR>", opts)
|
||||||
|
map("n", "<leader>ff", "<cmd>Telescope find_files<CR>", opts)
|
||||||
|
map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", opts)
|
||||||
|
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", opts)
|
||||||
|
map("n", "<leader>fo", "<cmd>Telescope oldfiles<CR>", opts) -- This isn't working for some reason
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ packer.startup {
|
|||||||
use { 'lukas-reineke/indent-blankline.nvim', config = function() require'configs.indent-blankline'.config() end }
|
use { 'lukas-reineke/indent-blankline.nvim', config = function() require'configs.indent-blankline'.config() end }
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
|
use { 'nvim-telescope/telescope.nvim', config = function() require'configs.telescope'.config() end }
|
||||||
|
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
@ -83,11 +85,7 @@ packer.startup {
|
|||||||
use { 'JoosepAlviste/nvim-ts-context-commentstring', after = 'nvim-treesitter' }
|
use { 'JoosepAlviste/nvim-ts-context-commentstring', after = 'nvim-treesitter' }
|
||||||
|
|
||||||
--
|
--
|
||||||
-- LSP
|
-- LSP / Auto Complete
|
||||||
--
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Auto Complete
|
|
||||||
--
|
--
|
||||||
|
|
||||||
--
|
--
|
||||||
|
10
todo.txt
10
todo.txt
@ -18,19 +18,17 @@
|
|||||||
[ ] Language Processing
|
[ ] Language Processing
|
||||||
[x] Treesitter
|
[x] Treesitter
|
||||||
[x] nvim-ts-autotag
|
[x] nvim-ts-autotag
|
||||||
[ ] indent-blankline.nvim
|
[x] indent-blankline.nvim
|
||||||
[x] comment
|
[x] comment
|
||||||
[x] norcalli/nvim-colorizer.lua
|
[x] norcalli/nvim-colorizer.lua
|
||||||
[x] nvim-ts-context-commentstring
|
[x] nvim-ts-context-commentstring
|
||||||
|
[ ] Native LSP config
|
||||||
[ ] nvim-autopairs
|
[ ] nvim-autopairs
|
||||||
[ ] nvim-lsp-installer
|
[ ] nvim-lsp-installer
|
||||||
[ ] Native LSP
|
|
||||||
[ ] lspsaga
|
[ ] lspsaga
|
||||||
[ ] symbols-outline
|
[ ] symbols-outline
|
||||||
[ ] Null-LS
|
[ ] Null-LS
|
||||||
[ ] SchemaStore
|
[ ] SchemaStore
|
||||||
|
|
||||||
[ ] Autocompletion
|
|
||||||
[ ] LuaSnip
|
[ ] LuaSnip
|
||||||
[ ] nvim-cmp
|
[ ] nvim-cmp
|
||||||
|
|
||||||
@ -47,4 +45,6 @@
|
|||||||
|
|
||||||
|
|
||||||
[ ] Bugs
|
[ ] Bugs
|
||||||
[ ] Comment Colors don't show (but they show if you delete the compiled config and resync)
|
[ ] Web Devicons Colors don't show
|
||||||
|
- But they show if you delete the compiled config and resync)
|
||||||
|
- Also, changing the icon text works, it's just the color that is breaking
|
||||||
|
Loading…
Reference in New Issue
Block a user