better telescope config
This commit is contained in:
@@ -1,13 +1,34 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
cmd = "Telescope",
|
||||
opts = function()
|
||||
require "configs.telescope"
|
||||
return require "configs.telescope"
|
||||
end,
|
||||
keys = {
|
||||
{ "<C-p>", require("telescope.builtin").find_files, desc = "Find Files (root dir)" },
|
||||
{ "<C-f>", require("telescope.builtin").live_grep, desc = "Fast live grep" },
|
||||
{ "<C-S-f>", require("telescope.builtin").grep_string, desc = "Fast string grep" },
|
||||
{
|
||||
"<C-p>",
|
||||
function()
|
||||
require("telescope.builtin").find_files()
|
||||
end,
|
||||
desc = "File files",
|
||||
},
|
||||
{
|
||||
"<C-S-f>",
|
||||
function()
|
||||
require("telescope.builtin").grep_string { search = "" }
|
||||
end,
|
||||
desc = "Fuzzy search",
|
||||
},
|
||||
{
|
||||
"<C-f>",
|
||||
function()
|
||||
require("telescope.builtin").live_grep()
|
||||
end,
|
||||
desc = "Grep string",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.cmd.colorscheme "catppuccin-mocha"
|
||||
require("catppuccin").setup {
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = { "italic" },
|
||||
hints = { "italic" },
|
||||
warnings = { "italic" },
|
||||
information = { "italic" },
|
||||
},
|
||||
underlines = {
|
||||
errors = { "underline" },
|
||||
hints = { "underline" },
|
||||
warnings = { "underline" },
|
||||
information = { "underline" },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
+82
-40
@@ -1,48 +1,90 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"vimdoc",
|
||||
"html",
|
||||
"css",
|
||||
"rust",
|
||||
"regex",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"solidity",
|
||||
"toml",
|
||||
"bash",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"json",
|
||||
"elixir",
|
||||
"erlang",
|
||||
"eex",
|
||||
"kdl",
|
||||
"yuck",
|
||||
"sql",
|
||||
"typst"
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = "<nop>",
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = { enable = true },
|
||||
},
|
||||
},
|
||||
"rust",
|
||||
"regex",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"solidity",
|
||||
"toml",
|
||||
"bash",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"json",
|
||||
"elixir",
|
||||
"erlang",
|
||||
"eex",
|
||||
"kdl",
|
||||
"yuck",
|
||||
"sql",
|
||||
"typst",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = "<nop>",
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
highlight = { enable = true },
|
||||
textobjects = {
|
||||
lsp_interop = {
|
||||
enable = true,
|
||||
peek_definition_code = {
|
||||
["df"] = "@function.outer",
|
||||
["dc"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@function.outer",
|
||||
["ic"] = "@function.inner",
|
||||
["ae"] = "@block.outer",
|
||||
["ie"] = "@block.inner",
|
||||
["as"] = "@statement.outer",
|
||||
["is"] = "@statement.inner",
|
||||
["am"] = "@call.outer",
|
||||
["im"] = "@call.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user