From a1c103b6a856f420886b9c24ac39ae943ef94ad4 Mon Sep 17 00:00:00 2001
From: Akianonymus <anonymus.aki@gmail.com>
Date: Thu, 26 Aug 2021 23:44:12 +0530
Subject: [PATCH] lsp: Reload current buffer after startup

so lsp aftually starts for the current buffer, rest buffers are fine
---
 lua/plugins/init.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua
index 90e394e..1389d40 100644
--- a/lua/plugins/init.lua
+++ b/lua/plugins/init.lua
@@ -120,6 +120,10 @@ return packer.startup(function()
       opt = true,
       setup = function()
          require("core.utils").packer_lazy_load "nvim-lspinstall"
+         -- reload the current file so lsp actually starts for it
+         vim.defer_fn(function()
+            vim.cmd "silent! e %"
+         end, 0)
       end,
    }