lazy load neoformat + lspkind ( run :PackerSync and :PackerCompile )

This commit is contained in:
siduck76 2021-06-26 07:31:15 +05:30
parent 5f676ffbdb
commit e2717401fe
4 changed files with 16 additions and 7 deletions

View File

@ -40,10 +40,7 @@ require "mappings"
require "telescope-nvim"
require "file-icons"
-- git signs , lsp symbols etc
require "gitsigns-nvim"
require("lspkind").init()
-- hide line numbers , statusline in specific buffers!
vim.api.nvim_exec(

View File

@ -93,7 +93,7 @@ map("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
map("i", "<CR>", "v:lua.completions()", {expr = true})
-- Mappings for nvimtree
vim.api.nvim_set_keymap(
map(
"n",
"<C-n>",
":NvimTreeToggle<CR>",
@ -102,3 +102,5 @@ vim.api.nvim_set_keymap(
silent = true
}
)
map("n", "<Leader>fm", [[<Cmd> Neoformat<CR>]], opt)

View File

@ -30,8 +30,19 @@ return packer.startup(
end
}
use "onsails/lspkind-nvim"
use "sbdchd/neoformat"
use {
"onsails/lspkind-nvim",
event = "BufRead",
config = function()
require("lspkind").init()
end
}
use {
"sbdchd/neoformat",
cmd = "Neoformat"
}
use "nvim-lua/plenary.nvim"
use "kabouzeid/nvim-lspinstall"

View File

@ -72,7 +72,6 @@ vim.api.nvim_set_keymap(
vim.api.nvim_set_keymap("n", "<Leader>fb", [[<Cmd>lua require('telescope.builtin').buffers()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fh", [[<Cmd>lua require('telescope.builtin').help_tags()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fo", [[<Cmd>lua require('telescope.builtin').oldfiles()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fm", [[<Cmd> Neoformat<CR>]], opt)
-- dashboard stuff
vim.api.nvim_set_keymap("n", "<Leader>fw", [[<Cmd> Telescope live_grep<CR>]], opt)