lsp: Reload current buffer after startup

so lsp aftually starts for the current buffer, rest buffers are fine
This commit is contained in:
Akianonymus 2021-08-26 23:44:12 +05:30 committed by siduck76
parent 97e155f3a2
commit a1c103b6a8
1 changed files with 4 additions and 0 deletions

View File

@ -120,6 +120,10 @@ return packer.startup(function()
opt = true, opt = true,
setup = function() setup = function()
require("core.utils").packer_lazy_load "nvim-lspinstall" 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, end,
} }