vitorpy's Dotfiles

Add nvim config with nvim-tree and toggleterm

vitorpy a0d082a5 4965c813

+91
+32
private_dot_config/nvim/init.lua
··· 1 + -- Bootstrap lazy.nvim 2 + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 3 + if not vim.loop.fs_stat(lazypath) then 4 + vim.fn.system({ 5 + "git", 6 + "clone", 7 + "--filter=blob:none", 8 + "https://github.com/folke/lazy.nvim.git", 9 + "--branch=stable", 10 + lazypath, 11 + }) 12 + end 13 + vim.opt.rtp:prepend(lazypath) 14 + 15 + -- Basic settings 16 + vim.g.mapleader = " " 17 + vim.g.maplocalleader = " " 18 + 19 + vim.opt.number = true 20 + vim.opt.relativenumber = true 21 + vim.opt.mouse = "a" 22 + vim.opt.ignorecase = true 23 + vim.opt.smartcase = true 24 + vim.opt.hlsearch = false 25 + vim.opt.wrap = false 26 + vim.opt.tabstop = 2 27 + vim.opt.shiftwidth = 2 28 + vim.opt.expandtab = true 29 + vim.opt.termguicolors = true 30 + 31 + -- Load plugins 32 + require("lazy").setup("plugins")
+24
private_dot_config/nvim/lua/plugins/nvim-tree.lua
··· 1 + return { 2 + "nvim-tree/nvim-tree.lua", 3 + dependencies = { 4 + "nvim-tree/nvim-web-devicons", 5 + }, 6 + config = function() 7 + require("nvim-tree").setup({ 8 + sort_by = "case_sensitive", 9 + view = { 10 + width = 30, 11 + }, 12 + renderer = { 13 + group_empty = true, 14 + }, 15 + filters = { 16 + dotfiles = false, 17 + }, 18 + }) 19 + 20 + -- Keybindings 21 + vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree" }) 22 + vim.keymap.set("n", "<leader>f", ":NvimTreeFindFile<CR>", { desc = "Find current file in tree" }) 23 + end, 24 + }
+8
private_dot_config/nvim/lua/plugins/theme.lua
··· 1 + return { 2 + "phha/zenburn.nvim", 3 + priority = 1000, 4 + config = function() 5 + require("zenburn").setup() 6 + vim.cmd.colorscheme("zenburn") 7 + end, 8 + }
+27
private_dot_config/nvim/lua/plugins/toggleterm.lua
··· 1 + return { 2 + "akinsho/toggleterm.nvim", 3 + version = "*", 4 + config = function() 5 + require("toggleterm").setup({ 6 + size = 20, 7 + open_mapping = [[<c-\>]], 8 + hide_numbers = true, 9 + shade_terminals = true, 10 + start_in_insert = true, 11 + insert_mappings = true, 12 + terminal_mappings = true, 13 + persist_size = true, 14 + direction = "float", 15 + close_on_exit = true, 16 + shell = vim.o.shell, 17 + float_opts = { 18 + border = "curved", 19 + winblend = 0, 20 + }, 21 + }) 22 + 23 + -- Custom terminal keybindings 24 + vim.keymap.set("n", "<leader>t", ":ToggleTerm<CR>", { desc = "Toggle terminal" }) 25 + vim.keymap.set("t", "<esc>", [[<C-\><C-n>]], { desc = "Exit terminal mode" }) 26 + end, 27 + }