adding some plugins
This commit is contained in:
parent
603532ef61
commit
7b2d7c43cf
71
init.lua
71
init.lua
|
@ -237,39 +237,56 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- Use `opts = {}` to force a plugin to be loaded.
|
-- Use `opts = {}` to force a plugin to be loaded.
|
||||||
--
|
--
|
||||||
|
|
||||||
{
|
{
|
||||||
'nvim-tree/nvim-tree.lua',
|
'windwp/nvim-autopairs',
|
||||||
version = '*',
|
opts = {
|
||||||
lazy = false,
|
fast_wrap = {},
|
||||||
dependencies = {
|
disable_filetype = { 'TelescopePrompt', 'vim' },
|
||||||
'nvim-tree/nvim-web-devicons',
|
|
||||||
enabled = true,
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function(_, opts)
|
||||||
require('nvim-tree').setup {}
|
require('nvim-autopairs').setup(opts)
|
||||||
local function my_on_attach(bufnr)
|
|
||||||
local api = require 'nvim-tree.api'
|
|
||||||
|
|
||||||
local function opts(desc)
|
-- Setup cmp for autopairs
|
||||||
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||||
end
|
local cmp = require 'cmp'
|
||||||
|
|
||||||
-- default mappings
|
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||||
api.config.mappings.default_on_attach(bufnr)
|
|
||||||
|
|
||||||
-- custom mappings
|
|
||||||
vim.keymap.set('n', '<C-t>', api.tree.change_root_to_parent, opts 'Up')
|
|
||||||
vim.keymap.set('n', '?', api.tree.toggle_help, opts 'Help')
|
|
||||||
end
|
|
||||||
|
|
||||||
-- pass to setup along with your other options
|
|
||||||
require('nvim-tree').setup {
|
|
||||||
---
|
|
||||||
on_attach = my_on_attach,
|
|
||||||
---
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
opts = function()
|
||||||
|
dofile(vim.g.base46_cache .. 'devicons')
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
|
event = 'User FilePost',
|
||||||
|
opts = {
|
||||||
|
indent = { char = '│', highlight = 'IblChar' },
|
||||||
|
scope = { char = '│', highlight = 'IblScopeChar' },
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
dofile(vim.g.base46_cache .. 'blankline')
|
||||||
|
|
||||||
|
local hooks = require 'ibl.hooks'
|
||||||
|
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level)
|
||||||
|
require('ibl').setup(opts)
|
||||||
|
|
||||||
|
dofile(vim.g.base46_cache .. 'blankline')
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- File managing, picker etc
|
||||||
|
{
|
||||||
|
'nvim-tree/nvim-tree.lua',
|
||||||
|
cmd = { 'NvimTreeToggle', 'NvimTreeFocus' },
|
||||||
|
opts = function() end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Here is a more advanced example where we pass configuration
|
-- Here is a more advanced example where we pass configuration
|
||||||
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
|
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
|
||||||
-- require('gitsigns').setup({ ... })
|
-- require('gitsigns').setup({ ... })
|
||||||
|
|
Loading…
Reference in New Issue