aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/log.lua
diff options
context:
space:
mode:
authorIvan <etircopyhdot@gmail.com>2021-09-06 20:35:34 +0300
committerJustin M. Keyes <justinkz@gmail.com>2022-05-12 07:13:45 -0700
commit78a1e6bc0060eec1afa7de099c4cee35ca35527f (patch)
tree1795ae99329c58f8e34f3828b888014afb1318f6 /runtime/lua/vim/lsp/log.lua
parenta1b663cce861a76f78d65aa538426d0cf635c379 (diff)
downloadrneovim-78a1e6bc0060eec1afa7de099c4cee35ca35527f.tar.gz
rneovim-78a1e6bc0060eec1afa7de099c4cee35ca35527f.tar.bz2
rneovim-78a1e6bc0060eec1afa7de099c4cee35ca35527f.zip
feat(defaults): session data in $XDG_STATE_HOME #15583
See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b - Move session persistent data to $XDG_STATE_HOME Change 'directory', 'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to $XDG_STATE_HOME/nvim. - Move logs to $XDG_STATE_HOME, too. - Add stdpath('log') support. Fixes: #14805
Diffstat (limited to 'runtime/lua/vim/lsp/log.lua')
-rw-r--r--runtime/lua/vim/lsp/log.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/log.lua b/runtime/lua/vim/lsp/log.lua
index 66e82ecfeb..29cb27d373 100644
--- a/runtime/lua/vim/lsp/log.lua
+++ b/runtime/lua/vim/lsp/log.lua
@@ -25,12 +25,12 @@ do
local function path_join(...)
return table.concat(vim.tbl_flatten({ ... }), path_sep)
end
- local logfilename = path_join(vim.fn.stdpath('cache'), 'lsp.log')
+ local logfilename = path_join(vim.fn.stdpath('log'), 'lsp.log')
-- TODO: Ideally the directory should be created in open_logfile(), right
-- before opening the log file, but open_logfile() can be called from libuv
-- callbacks, where using fn.mkdir() is not allowed.
- vim.fn.mkdir(vim.fn.stdpath('cache'), 'p')
+ vim.fn.mkdir(vim.fn.stdpath('log'), 'p')
--- Returns the log filename.
---@returns (string) log filename