Skip to content

Commit 3bbbc25

Browse files
committed
fix: remove manual LspStart, clese ayamir/nvimdots#1478
1 parent 378ce0e commit 3bbbc25

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lua/modules/configs/completion/lsp.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ return function()
1717
end
1818

1919
pcall(require, "user.configs.lsp")
20-
21-
vim.api.nvim_command([[LspStart]]) -- Start LSPs
2220
end

lua/modules/configs/editor/persisted.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
return function()
2+
vim.api.nvim_create_autocmd("User", {
3+
pattern = "PersistedLoadPost",
4+
desc = "Fix LSP/Highlighting on auto session restore",
5+
callback = function()
6+
local bufname = vim.api.nvim_buf_get_name(0)
7+
if bufname and bufname ~= "" then
8+
vim.defer_fn(function()
9+
vim.cmd("edit")
10+
end, 1)
11+
end
12+
end,
13+
})
214
require("modules.utils").load_plugin("persisted", {
315
save_dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"),
416
autostart = true,

0 commit comments

Comments
 (0)