neo-tree bindings, omnisharp and telescope binds

This commit is contained in:
Sergio Laín 2023-09-28 18:56:40 +02:00
parent bf04f8f0d4
commit 11a5f7f2a7
No known key found for this signature in database
GPG key ID: E3BC677C07A2C7AC
4 changed files with 100 additions and 51 deletions

View file

@ -27,6 +27,7 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.util.project" },
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
{ import = "plugins" },
},
defaults = {

View file

@ -1,24 +0,0 @@
return {
{
"lukas-reineke/indent-blankline.nvim",
event = { "BufReadPost", "BufNewFile" },
opts = {
-- char = "▏",
char = "",
filetype_exclude = {
"help",
"alpha",
"dashboard",
"neo-tree",
"Trouble",
"lazy",
"mason",
"notify",
"toggleterm",
"lazyterm",
},
show_trailing_blankline_indent = false,
show_current_context = false,
},
},
}

View file

@ -20,6 +20,20 @@ return {
},
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
{
"<leader>ge",
function()
require("neo-tree.command").execute({ source = "git_status", toggle = true })
end,
desc = "Git explorer",
},
{
"<leader>be",
function()
require("neo-tree.command").execute({ source = "buffers", toggle = true })
end,
desc = "Buffer explorer",
},
},
deactivate = function()
vim.cmd([[Neotree close]])

View file

@ -1,4 +1,5 @@
local Util = require("lazyvim.util")
local macchiato = require("catppuccin.palettes").get_palette("macchiato")
return {
{
@ -130,6 +131,8 @@ return {
"Trait",
"Field",
"Property",
"Enum",
"Constant",
},
}),
desc = "All",
@ -170,6 +173,15 @@ return {
}),
desc = "Constructor",
},
{
"<leader>sse",
Util.telescope("lsp_document_symbols", {
symbols = {
"Enum",
},
}),
desc = "Enum",
},
{
"<leader>ssi",
Util.telescope("lsp_document_symbols", {
@ -248,6 +260,8 @@ return {
"Trait",
"Field",
"Property",
"Enum",
"Constant",
},
}),
desc = "All",
@ -288,6 +302,15 @@ return {
}),
desc = "Constructor",
},
{
"<leader>sSe",
Util.telescope("lsp_dynamic_workspace_symbols", {
symbols = {
"Enum",
},
}),
desc = "Enum",
},
{
"<leader>sSi",
Util.telescope("lsp_dynamic_workspace_symbols", {
@ -359,10 +382,52 @@ return {
desc = "Treesitter Symbols",
},
},
config = function()
opts = function()
local actions = require("telescope.actions")
require("telescope").setup({
local open_with_trouble = function(...)
return require("trouble.providers.telescope").open_with_trouble(...)
end
local open_selected_with_trouble = function(...)
return require("trouble.providers.telescope").open_selected_with_trouble(...)
end
local find_files_no_ignore = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { no_ignore = true, default_text = line })()
end
local find_files_with_hidden = function()
local action_state = require("telescope.actions.state")
local line = action_state.get_current_line()
Util.telescope("find_files", { hidden = true, default_text = line })()
end
local TelescopeColor = {}
return {
defaults = {
prompt_prefix = "",
selection_caret = "",
mappings = {
i = {
["<c-t>"] = open_with_trouble,
["<a-t>"] = open_selected_with_trouble,
["<a-i>"] = find_files_no_ignore,
["<a-h>"] = find_files_with_hidden,
["<C-Down>"] = actions.cycle_history_next,
["<C-Up>"] = actions.cycle_history_prev,
["<C-f>"] = actions.preview_scrolling_down,
["<C-b>"] = actions.preview_scrolling_up,
["<C-k>"] = actions.move_selection_previous,
["<C-j>"] = actions.move_selection_next,
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
},
n = {
["q"] = actions.close,
},
},
file_ignore_patterns = {
".gitignore",
"node_modules",
@ -373,14 +438,6 @@ return {
"*/tmp/*",
"Juegos/",
},
mappings = {
i = {
["<C-k>"] = actions.move_selection_previous,
["<C-j>"] = actions.move_selection_next,
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
},
},
},
pickers = {
find_files = {
hidden = true,
@ -399,8 +456,9 @@ return {
insert_at_top = true,
},
},
})
require("telescope").load_extension("refactoring")
},
require("telescope").load_extension("refactoring"),
}
end,
},
}