this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvim tree in place

+37 -3
+1 -1
nvim/lazy-lock.json
··· 1 1 { 2 - "auto-dark-mode.nvim": { "branch": "master", "commit": "d365beccca05ffcb01e50109f2adca2459c3995a" }, 2 + "auto-dark-mode.nvim": { "branch": "master", "commit": "4531f8b2b09ed8f0b8875a706419f9cecda1d969" }, 3 3 "avante.nvim": { "branch": "main", "commit": "3c010e38ac6a40d8dbcd91399d316b9da5f53c52" }, 4 4 "bufferline.nvim": { "branch": "main", "commit": "5c528bee3dd797d5bd6bae5f229411939b25b203" }, 5 5 "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
+18 -2
nvim/lua/config/keys.lua
··· 62 62 mode = { "v" }, 63 63 }, 64 64 65 - { "<leader>e", "<cmd>NvimTreeToggle<cr>", desc = "Toggle file tree" }, 66 - { "E", "<cmd>NvimTreeFindFile<cr>", desc = "Reveal file in file tree" }, 65 + { 66 + "<leader>e", 67 + function() 68 + local nvim_tree = require("nvim-tree.api") 69 + nvim_tree.tree.toggle({ current_window = true }) 70 + end, 71 + desc = "Toggle file tree", 72 + }, 73 + 74 + { 75 + "E", 76 + function() 77 + local nvim_tree = require("nvim-tree.api") 78 + nvim_tree.tree.toggle({ current_window = true, find_file = true }) 79 + end, 80 + desc = "Reveal file in file tree", 81 + }, 82 + 67 83 { "<leader>h", "<cmd>noh<cr>", desc = "Clear highlight" }, 68 84 { "<leader>v/", "<cmd>vsp<cr>", desc = "Split vertical" }, 69 85 { "<leader>v?", "<cmd>sp<cr>", desc = "Split horizontal" },
+18
nvim/lua/plugins/ui.lua
··· 13 13 config = function() 14 14 vim.g.loaded_netrw = 1 15 15 vim.g.loaded_netrwPlugin = 1 16 + 16 17 require("nvim-tree").setup({ 17 18 hijack_netrw = true, 18 19 disable_netrw = true, ··· 25 26 view = { 26 27 width = 40, 27 28 }, 29 + on_attach = function(bufnr) 30 + local api = require("nvim-tree.api") 31 + 32 + local function opts(desc) 33 + return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } 34 + end 35 + 36 + -- TODO: disable <C-e> 37 + api.config.mappings.default_on_attach(bufnr) 38 + 39 + vim.keymap.set("n", "<CR>", api.node.open.replace_tree_buffer, opts("Open: In Place")) 40 + end, 28 41 }) 42 + 43 + -- https://github.com/Gelio/ubuntu-dotfiles/pull/1/files 44 + -- local winopts = require("nvim-tree.view").View.winopts 45 + -- winopts.winfixwidth = false 46 + -- winopts.winfixheight = false 29 47 end, 30 48 }, 31 49 {