aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/log.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-07-07 18:27:18 +0200
committerGitHub <noreply@github.com>2022-07-07 18:27:18 +0200
commitaa4f9c5341f5280f16cce0630ea54b84eef717b3 (patch)
tree52e82a04b3f364f50b810c92c0e0a3378ccd17a0 /runtime/lua/vim/lsp/log.lua
parent34d41baf8a8e4ab8c006b7f29a8106e60e311aa2 (diff)
downloadrneovim-aa4f9c5341f5280f16cce0630ea54b84eef717b3.tar.gz
rneovim-aa4f9c5341f5280f16cce0630ea54b84eef717b3.tar.bz2
rneovim-aa4f9c5341f5280f16cce0630ea54b84eef717b3.zip
refactor(lua): reformat with stylua 0.14.0 (#19264)
* reformat Lua runtime to make lint CI pass * reduce max line length to 100
Diffstat (limited to 'runtime/lua/vim/lsp/log.lua')
-rw-r--r--runtime/lua/vim/lsp/log.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/log.lua b/runtime/lua/vim/lsp/log.lua
index 29cb27d373..6c6ba0f206 100644
--- a/runtime/lua/vim/lsp/log.lua
+++ b/runtime/lua/vim/lsp/log.lua
@@ -59,7 +59,11 @@ do
local log_info = vim.loop.fs_stat(logfilename)
if log_info and log_info.size > 1e9 then
- local warn_msg = string.format('LSP client log is large (%d MB): %s', log_info.size / (1000 * 1000), logfilename)
+ local warn_msg = string.format(
+ 'LSP client log is large (%d MB): %s',
+ log_info.size / (1000 * 1000),
+ logfilename
+ )
vim.notify(warn_msg)
end
@@ -129,7 +133,8 @@ vim.tbl_add_reverse_lookup(log.levels)
---@param level (string or number) One of `vim.lsp.log.levels`
function log.set_level(level)
if type(level) == 'string' then
- current_log_level = assert(log.levels[level:upper()], string.format('Invalid log level: %q', level))
+ current_log_level =
+ assert(log.levels[level:upper()], string.format('Invalid log level: %q', level))
else
assert(type(level) == 'number', 'level must be a number or string')
assert(log.levels[level], string.format('Invalid log level: %d', level))