added nvimtree and toggleterm
This commit is contained in:
parent
adefa5ce2a
commit
45a17fe9df
6 changed files with 46 additions and 2 deletions
|
@ -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
|
||||
|
|
1
nvim/lua/plugins/dashboard.lua
Normal file
1
nvim/lua/plugins/dashboard.lua
Normal file
|
@ -0,0 +1 @@
|
|||
local db = require('dashboard')
|
|
@ -6,4 +6,7 @@ require('plugins.gitsigns')
|
|||
require('plugins.treesitter')
|
||||
require('plugins.mason')
|
||||
require('plugins.fidget')
|
||||
require('plugins.cmp')
|
||||
require('plugins.cmp')
|
||||
require('plugins.nvim-tree')
|
||||
require('plugins.toggleterm')
|
||||
require('plugins.dashboard')
|
||||
|
|
5
nvim/lua/plugins/nvim-tree.lua
Normal file
5
nvim/lua/plugins/nvim-tree.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
require("nvim-tree").setup({
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
},
|
||||
})
|
|
@ -39,11 +39,26 @@ require('packer').startup(function(use)
|
|||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
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'
|
||||
|
@ -58,4 +73,4 @@ require('packer').startup(function(use)
|
|||
if is_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
|
13
nvim/lua/plugins/toggleterm.lua
Normal file
13
nvim/lua/plugins/toggleterm.lua
Normal 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
|
||||
|
Loading…
Reference in a new issue