diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua index dac11cfb..b48745fb 100644 --- a/.config/nvim/lua/config/lazy.lua +++ b/.config/nvim/lua/config/lazy.lua @@ -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 = { diff --git a/.config/nvim/lua/plugins/indent-blankline.lua b/.config/nvim/lua/plugins/indent-blankline.lua deleted file mode 100644 index c9e41f5d..00000000 --- a/.config/nvim/lua/plugins/indent-blankline.lua +++ /dev/null @@ -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, - }, - }, -} diff --git a/.config/nvim/lua/plugins/neo-tree.lua b/.config/nvim/lua/plugins/neo-tree.lua index fecd27a3..947ca79f 100644 --- a/.config/nvim/lua/plugins/neo-tree.lua +++ b/.config/nvim/lua/plugins/neo-tree.lua @@ -20,6 +20,20 @@ return { }, { "e", "fe", desc = "Explorer NeoTree (root dir)", remap = true }, { "E", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, + { + "ge", + function() + require("neo-tree.command").execute({ source = "git_status", toggle = true }) + end, + desc = "Git explorer", + }, + { + "be", + function() + require("neo-tree.command").execute({ source = "buffers", toggle = true }) + end, + desc = "Buffer explorer", + }, }, deactivate = function() vim.cmd([[Neotree close]]) diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index a8c067c8..b9e49364 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -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", }, + { + "sse", + Util.telescope("lsp_document_symbols", { + symbols = { + "Enum", + }, + }), + desc = "Enum", + }, { "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", }, + { + "sSe", + Util.telescope("lsp_dynamic_workspace_symbols", { + symbols = { + "Enum", + }, + }), + desc = "Enum", + }, { "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 = { + [""] = open_with_trouble, + [""] = open_selected_with_trouble, + [""] = find_files_no_ignore, + [""] = find_files_with_hidden, + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.preview_scrolling_down, + [""] = actions.preview_scrolling_up, + [""] = actions.move_selection_previous, + [""] = actions.move_selection_next, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + }, + n = { + ["q"] = actions.close, + }, + }, file_ignore_patterns = { ".gitignore", "node_modules", @@ -373,34 +438,27 @@ return { "*/tmp/*", "Juegos/", }, - mappings = { - i = { - [""] = actions.move_selection_previous, - [""] = actions.move_selection_next, - [""] = actions.send_selected_to_qflist + actions.open_qflist, + pickers = { + find_files = { + hidden = true, + }, + }, + extensions = { + undo = { + side_by_side = true, + layout_strategy = "vertical", + layout_config = { + preview_height = 0.65, + }, + }, + import = { + -- Add imports to the top of the file keeping the cursor in place + insert_at_top = true, }, }, }, - pickers = { - find_files = { - hidden = true, - }, - }, - extensions = { - undo = { - side_by_side = true, - layout_strategy = "vertical", - layout_config = { - preview_height = 0.65, - }, - }, - import = { - -- Add imports to the top of the file keeping the cursor in place - insert_at_top = true, - }, - }, - }) - require("telescope").load_extension("refactoring") + require("telescope").load_extension("refactoring"), + } end, }, }