added nvimtree and toggleterm

This commit is contained in:
Nikurasu 2022-12-23 15:52:20 +01:00
parent adefa5ce2a
commit 45a17fe9df
6 changed files with 46 additions and 2 deletions

View file

@ -61,6 +61,8 @@ vim.cmd [[colorscheme base16-tomorrow-night-eighties]]
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
vim.g.loaded_netrw = 1
-- [[ Basic Keymaps ]]
-- Set <space> as the leader key
-- See `:help mapleader`
@ -82,6 +84,8 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist)
local api = require("nvim-tree.api")
vim.keymap.set('n', '<leader>ft', api.tree.toggle)
require('plugins')
-- LSP settings.
@ -132,3 +136,6 @@ end
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- disable some stock plugins
vim.g.loaded_netrwPlugin = 1

View file

@ -0,0 +1 @@
local db = require('dashboard')

View file

@ -7,3 +7,6 @@ require('plugins.treesitter')
require('plugins.mason')
require('plugins.fidget')
require('plugins.cmp')
require('plugins.nvim-tree')
require('plugins.toggleterm')
require('plugins.dashboard')

View file

@ -0,0 +1,5 @@
require("nvim-tree").setup({
filters = {
dotfiles = true,
},
})

View file

@ -40,11 +40,26 @@ require('packer').startup(function(use)
after = 'nvim-treesitter',
}
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional, for file icons
},
}
use {
'akinsho/toggleterm.nvim'
}
use { -- rainbow brackets using treesitter
'p00f/nvim-ts-rainbow',
after = 'nvim-treesitter'
}
use {
'glepnir/dashboard-nvim'
}
-- Git related plugins
use 'tpope/vim-fugitive'
use 'tpope/vim-rhubarb'

View file

@ -0,0 +1,13 @@
require("toggleterm").setup({
open_mapping = [[<leader>tt]]
})
vim.cmd "autocmd! TermOpen term://* lua set_terminal_keymaps()"
local Terminal = require("toggleterm.terminal").Terminal
local lazygit = Terminal:new { cmd = 'lazygit', hidden = true, direction = 'float' }
function _LAZYGIT_TOGGLE()
lazygit:toggle()
end