From a02e2257bc461a7a82831228b51b5f9fcef02593 Mon Sep 17 00:00:00 2001 From: jhe Date: Thu, 23 May 2024 16:22:16 +0200 Subject: [PATCH] upd --- init.lua | 53 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/init.lua b/init.lua index a188c471..f0805293 100644 --- a/init.lua +++ b/init.lua @@ -201,26 +201,6 @@ vim.api.nvim_create_autocmd({ 'BufReadPost' }, { end, }) --- Function to set tab width ---[[ -local set_tab_width = function(ft, width) - vim.api.nvim_create_autocmd('FileType', { - pattern = ft, - callback = function() - vim.bo.shiftwidth = width - vim.bo.tabstop = width - --vim.bo.expandtab = true - end, - }) -end -]] --- - --- Set tabwidth for file types ---set_tab_width('python', 4) ---set_tab_width('c', 4) ---set_tab_width('c++', 2) - -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()` @@ -331,6 +311,39 @@ require('lazy').setup({ -- -- Use the `dependencies` key to specify the dependencies of a particular plugin + { + 'nvim-neo-tree/neo-tree.nvim', + cmd = 'Neotree', + branch = 'v3.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + }, + keys = { + { + 't', + function() + require('neo-tree.command').execute { toggle = true } + end, + desc = 'Explorer NeoTree (Root Dir)', + }, + }, + opts = { + event_handlers = { + { + event = 'neo_tree_buffer_enter', + handler = function(arg) + vim.cmd [[ + setlocal relativenumber + ]] + end, + }, + }, + }, + }, + { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', event = 'VimEnter',