Skip to content

Commit

Permalink
fix(plugins): lazy-loading on BufReadPre or BufReadPost, should also …
Browse files Browse the repository at this point in the history
…use BufNewFile
  • Loading branch information
liubang committed Feb 8, 2023
1 parent 4121216 commit 367b470
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lua/plugins/gitsigns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
-- gitsigns.lua -
--
-- Created by liubang on 2022/12/30 22:21
-- Last Modified: 2022/12/30 22:21
-- Last Modified: 2023/02/09 00:43
--
--=====================================================================

-- stylua: ignore start
return {
"lewis6991/gitsigns.nvim",
event = "BufReadPre",
event = {"BufReadPre", "BufNewFile"},
cmd = "Gitsigns",
opts = {
signs = {
Expand Down
4 changes: 2 additions & 2 deletions lua/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- init.lua -
--
-- Created by liubang on 2021/02/06 00:10
-- Last Modified: 2023/01/25 01:49
-- Last Modified: 2023/02/09 00:43
--
-- =====================================================================

Expand All @@ -16,7 +16,7 @@ return {
},
{
"neovim/nvim-lspconfig",
event = "BufReadPre",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"mason.nvim",
"mason-lspconfig.nvim",
Expand Down
5 changes: 2 additions & 3 deletions lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
-- treesitter.lua -
--
-- Created by liubang on 2022/12/30 20:50
-- Last Modified: 2022/12/30 20:50
-- Last Modified: 2023/02/09 00:43
--
--=====================================================================

return {
"JoosepAlviste/nvim-ts-context-commentstring",
-- { "nvim-treesitter/playground", cmd = "TSPlaygroundToggle" },
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdateSync",
event = "BufReadPost",
event = { "BufReadPost", "BufNewFile" },
keys = {
{ "<Leader>v", desc = "Increment selection", mode = "n" },
{ "V", desc = "Schrink selection", mode = "x" },
Expand Down

0 comments on commit 367b470

Please sign in to comment.