Skip to content

Commit 119d998

Browse files
committed
revert: hack no longer necessary, moved to resession extension
Refs: 91cb3a7
1 parent dcbc6ea commit 119d998

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lua/astroui/folding.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,7 @@ function M.setup()
115115
group = augroup,
116116
callback = function(args)
117117
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
118-
if supports_method(client, "textDocument/foldingRange", args.buf) then
119-
-- HACK: start with a single `foldexpr` call as this helps with restoring sessions
120-
if vim.api.nvim_buf_call(args.buf, function() return vim.lsp.foldexpr(1) end) then
121-
lsp_bufs[args.buf] = true
122-
end
123-
end
118+
if supports_method(client, "textDocument/foldingRange", args.buf) then lsp_bufs[args.buf] = true end
124119
end,
125120
})
126121
vim.api.nvim_create_autocmd("LspDetach", {

0 commit comments

Comments
 (0)