Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit742dde8

Browse files
committed
move mkdir out of open_logfile function
1 parentef00754 commit742dde8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎runtime/lua/vim/lsp/log.lua‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ do
2525
end
2626
locallogfilename=path_join(vim.fn.stdpath('cache'),'lsp.log')
2727

28+
-- TODO: Ideally the directory should be created in open_logfile(), right
29+
-- before opening the log file, but open_logfile() can be called from libuv
30+
-- callbacks, where using fn.mkdir() is not allowed.
31+
vim.fn.mkdir(vim.fn.stdpath('cache'),"p")
32+
2833
--- Returns the log filename.
2934
---@returns(string)log filename
3035
functionlog.get_filename()
@@ -39,7 +44,6 @@ do
3944
iflogfilethenreturntrueend
4045
ifopenerrthenreturnfalseend
4146

42-
vim.fn.mkdir(vim.fn.stdpath('cache'),"p")
4347
logfile,openerr=io.open(logfilename,"a+")
4448
ifnotlogfilethen
4549
localerr_msg=string.format("Failed to open LSP client log file: %s",openerr)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp