lazy loading : nvimtree and autopairs
This commit is contained in:
parent
922089fc07
commit
4e23587ca3
2
init.lua
2
init.lua
@ -39,12 +39,10 @@ g.indent_blankline_show_first_indent_level = false
|
|||||||
require "mappings"
|
require "mappings"
|
||||||
|
|
||||||
require "telescope-nvim"
|
require "telescope-nvim"
|
||||||
require "nvimTree" -- file tree stuff
|
|
||||||
require "file-icons"
|
require "file-icons"
|
||||||
|
|
||||||
-- git signs , lsp symbols etc
|
-- git signs , lsp symbols etc
|
||||||
require "gitsigns-nvim"
|
require "gitsigns-nvim"
|
||||||
require("nvim-autopairs").setup()
|
|
||||||
require("lspkind").init()
|
require("lspkind").init()
|
||||||
|
|
||||||
-- hide line numbers , statusline in specific buffers!
|
-- hide line numbers , statusline in specific buffers!
|
||||||
|
@ -91,3 +91,14 @@ map("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
|||||||
map("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
map("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
||||||
map("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
map("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
||||||
map("i", "<CR>", "v:lua.completions()", {expr = true})
|
map("i", "<CR>", "v:lua.completions()", {expr = true})
|
||||||
|
|
||||||
|
-- Mappings for nvimtree
|
||||||
|
vim.api.nvim_set_keymap(
|
||||||
|
"n",
|
||||||
|
"<C-n>",
|
||||||
|
":NvimTreeToggle<CR>",
|
||||||
|
{
|
||||||
|
noremap = true,
|
||||||
|
silent = true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.config = function()
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
|
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
@ -43,17 +46,6 @@ g.nvim_tree_icons = {
|
|||||||
symlink_open = ""
|
symlink_open = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-- Mappings for nvimtree
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap(
|
|
||||||
"n",
|
|
||||||
"<C-n>",
|
|
||||||
":NvimTreeToggle<CR>",
|
|
||||||
{
|
|
||||||
noremap = true,
|
|
||||||
silent = true
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
local tree_cb = require "nvim-tree.config".nvim_tree_callback
|
local tree_cb = require "nvim-tree.config".nvim_tree_callback
|
||||||
|
|
||||||
@ -91,3 +83,6 @@ g.nvim_tree_bindings = {
|
|||||||
["-"] = tree_cb("dir_up"),
|
["-"] = tree_cb("dir_up"),
|
||||||
["q"] = tree_cb("close")
|
["q"] = tree_cb("close")
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
@ -38,10 +38,16 @@ return packer.startup(
|
|||||||
use "lewis6991/gitsigns.nvim"
|
use "lewis6991/gitsigns.nvim"
|
||||||
use "akinsho/nvim-bufferline.lua"
|
use "akinsho/nvim-bufferline.lua"
|
||||||
use "glepnir/galaxyline.nvim"
|
use "glepnir/galaxyline.nvim"
|
||||||
use "windwp/nvim-autopairs"
|
|
||||||
|
use {
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
require("nvim-autopairs").setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
-- use "alvan/vim-closetag" -- for html
|
-- use "alvan/vim-closetag" -- for html
|
||||||
|
|
||||||
-- Comment
|
|
||||||
use "terrortylor/nvim-comment" -- snippet support
|
use "terrortylor/nvim-comment" -- snippet support
|
||||||
|
|
||||||
-- snippet
|
-- snippet
|
||||||
@ -52,7 +58,14 @@ return packer.startup(
|
|||||||
use "rafamadriz/friendly-snippets"
|
use "rafamadriz/friendly-snippets"
|
||||||
|
|
||||||
-- file managing , picker etc
|
-- file managing , picker etc
|
||||||
use "kyazdani42/nvim-tree.lua"
|
use {
|
||||||
|
"kyazdani42/nvim-tree.lua",
|
||||||
|
cmd = "NvimTreeToggle",
|
||||||
|
config = function()
|
||||||
|
require("nvimTree").config()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
use "kyazdani42/nvim-web-devicons"
|
use "kyazdani42/nvim-web-devicons"
|
||||||
use "nvim-telescope/telescope.nvim"
|
use "nvim-telescope/telescope.nvim"
|
||||||
use "nvim-telescope/telescope-media-files.nvim"
|
use "nvim-telescope/telescope-media-files.nvim"
|
||||||
|
Loading…
Reference in New Issue
Block a user