diff --git a/nvim/.config/nvim/lua/config/nvimtree.lua b/nvim/.config/nvim/lua/config/nvimtree.lua new file mode 100644 index 0000000..2766032 --- /dev/null +++ b/nvim/.config/nvim/lua/config/nvimtree.lua @@ -0,0 +1,14 @@ +local nvimtree_status_ok, nvimtree = pcall(require, "nvim-tree") +if not nvimtree_status_ok then + return +end + +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 +vim.opt.termguicolors = true + +vim.keymap.set("n", "f", ":NvimTreeToggle", {silent = true, noremap = true}) + +nvimtree.setup({ +}) + diff --git a/nvim/.config/nvim/lua/config/telescope.lua b/nvim/.config/nvim/lua/config/telescope.lua index eb435e7..2da117b 100644 --- a/nvim/.config/nvim/lua/config/telescope.lua +++ b/nvim/.config/nvim/lua/config/telescope.lua @@ -23,7 +23,6 @@ local new_maker = function(filepath, bufnr, opts) }):sync() end -local fb_actions = require "telescope".extensions.file_browser.actions local function telescope_buffer_dir() return vim.fn.expand('%:p:h') end @@ -49,22 +48,10 @@ telescope.setup { case_mode = "smart_case", -- or "ignore_case" or "respect_case" -- the default case_mode is "smart_case" }, - file_browser = { - theme = "dropdown", - -- disables netrw and use telescope-file-browser in its place - hijack_netrw = true, - mappings = { - ["n"] = { - -- your custom normal mode mappings - ["h"] = fb_actions.goto_parent_dir, - }, - }, - }, } } telescope.load_extension('fzf') -telescope.load_extension('file_browser') -- keymaps @@ -85,15 +72,3 @@ end) -- vim.keymap.set('n', 'd', function() -- builtin.diagnostics() -- end) -vim.keymap.set("n", "fb", function() - telescope.extensions.file_browser.file_browser({ - path = "%:p:h", - cwd = telescope_buffer_dir(), - respect_gitignore = false, - hidden = true, - grouped = true, - previewer = false, - initial_mode = "normal", - layout_config = { height = 40 } - }) -end) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index f1753a4..ccb479e 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -107,6 +107,15 @@ return packer.startup(function(use) "nvim-telescope/telescope-file-browser.nvim" } + use { + 'nvim-tree/nvim-tree.lua', + requires = { + 'nvim-tree/nvim-web-devicons', -- optional + }, + config = [[require('config.nvimtree')]], + } + + use { 'lervag/vimtex', config = [[require('config.vimtex')]],