From 695b4a28e4e98a4a386802f5174045419f23615b Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 4 Jul 2024 17:08:26 +0200 Subject: [PATCH] do things --- lua/custom/plugins/configs/lsp.lua | 1 - lua/custom/plugins/telescope.lua | 9 ++-- lua/custom/plugins/ui.lua | 78 ++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 6 deletions(-) diff --git a/lua/custom/plugins/configs/lsp.lua b/lua/custom/plugins/configs/lsp.lua index 3da5cf6..14438b9 100644 --- a/lua/custom/plugins/configs/lsp.lua +++ b/lua/custom/plugins/configs/lsp.lua @@ -146,7 +146,6 @@ local servers = { cmake = {}, yamlls = {}, texlab = {}, - csharp_ls = {}, basedpyright = { root_dir = vim.loop.cwd, flags = { debounce_text_changes = 300 }, diff --git a/lua/custom/plugins/telescope.lua b/lua/custom/plugins/telescope.lua index b69cc98..42a94c9 100644 --- a/lua/custom/plugins/telescope.lua +++ b/lua/custom/plugins/telescope.lua @@ -49,11 +49,6 @@ return { -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, -- pickers = {} extensions = { ['ui-select'] = { @@ -61,6 +56,10 @@ return { }, }, defaults = { + mappings = { + i = { [''] = 'to_fuzzy_refine' }, + n = { ['q'] = require('telescope.actions').close }, + }, vimgrep_arguments = { 'rg', '-L', diff --git a/lua/custom/plugins/ui.lua b/lua/custom/plugins/ui.lua index a24ef5b..2d41693 100644 --- a/lua/custom/plugins/ui.lua +++ b/lua/custom/plugins/ui.lua @@ -2,6 +2,82 @@ return { { 'nvim-tree/nvim-tree.lua', cmd = { 'NvimTreeToggle', 'NvimTreeFocus' }, + + opts = { + filters = { + dotfiles = false, + exclude = { vim.fn.stdpath 'config' .. '/lua/custom' }, + }, + disable_netrw = true, + hijack_netrw = true, + hijack_cursor = true, + hijack_unnamed_buffer_when_opening = false, + sync_root_with_cwd = true, + update_focused_file = { + enable = true, + update_root = false, + }, + view = { + adaptive_size = false, + side = 'left', + width = 30, + preserve_window_proportions = true, + }, + git = { + enable = false, + ignore = true, + }, + filesystem_watchers = { + enable = true, + }, + actions = { + open_file = { + resize_window = true, + }, + }, + renderer = { + root_folder_label = false, + highlight_git = false, + highlight_opened_files = 'none', + + indent_markers = { + enable = false, + }, + + icons = { + show = { + file = true, + folder = true, + folder_arrow = true, + git = false, + }, + + glyphs = { + default = '󰈚', + symlink = '', + folder = { + default = '', + empty = '', + empty_open = '', + open = '', + symlink = '', + symlink_open = '', + arrow_open = '', + arrow_closed = '', + }, + git = { + unstaged = '✗', + staged = '✓', + unmerged = '', + renamed = '➜', + untracked = '★', + deleted = '', + ignored = '◌', + }, + }, + }, + }, + }, config = function(_, opts) require('nvim-tree').setup(opts) end, @@ -75,6 +151,8 @@ return { '', -- spelling 'z=', + 'o', + 'O', }, triggers_blacklist = { -- list of mode / prefixes that should never be hooked by WhichKey