diff options
author | glepnir <glephunter@gmail.com> | 2024-11-27 21:44:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-27 05:44:29 -0800 |
commit | 203e7a43d1f209168a3cdae1650a9ef01db9cd72 (patch) | |
tree | d4dba7e89c8d655c0b0bdb9e49695d3fc8544301 /runtime/lua/vim/lsp/util.lua | |
parent | c24e6e66dd24a7920f48df7effe50c16527fe880 (diff) | |
download | rneovim-203e7a43d1f209168a3cdae1650a9ef01db9cd72.tar.gz rneovim-203e7a43d1f209168a3cdae1650a9ef01db9cd72.tar.bz2 rneovim-203e7a43d1f209168a3cdae1650a9ef01db9cd72.zip |
fix(lsp): mention function name in warning #31301
Problem: The warning message is the same in different functions.
It is not convenient to locate the specific function name
Solution: add function name in warning message
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 3de76f93a6..ced8aa5745 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -1894,7 +1894,7 @@ function M.make_position_params(window, position_encoding) local buf = api.nvim_win_get_buf(window) if position_encoding == nil then vim.notify_once( - 'warning: position_encoding is required, using the offset_encoding from the first client', + 'position_encoding param is required in vim.lsp.util.make_position_params. Defaulting to position encoding of the first client.', vim.log.levels.WARN ) position_encoding = M._get_offset_encoding(buf) @@ -1950,7 +1950,7 @@ function M.make_range_params(window, position_encoding) local buf = api.nvim_win_get_buf(window or 0) if position_encoding == nil then vim.notify_once( - 'warning: position_encoding is required, using the offset_encoding from the first client', + 'position_encoding param is required in vim.lsp.util.make_range_params. Defaulting to position encoding of the first client.', vim.log.levels.WARN ) position_encoding = M._get_offset_encoding(buf) @@ -1979,7 +1979,7 @@ function M.make_given_range_params(start_pos, end_pos, bufnr, position_encoding) bufnr = bufnr or api.nvim_get_current_buf() if position_encoding == nil then vim.notify_once( - 'warning: position_encoding is required, using the offset_encoding from the first client', + 'position_encoding param is required in vim.lsp.util.make_given_range_params. Defaulting to position encoding of the first client.', vim.log.levels.WARN ) position_encoding = M._get_offset_encoding(bufnr) |