local M = {} function M.lsp_peek() local params = vim.lsp.util.make_position_params() return vim.lsp.buf_request(0, 'textDocument/definition', params, function(_, result, module, _) if result == nil or vim.tbl_isempty(result) then vim.lsp.log.info(module, 'No location found') return nil end if vim.tbl_islist(result) then vim.lsp.util.preview_location(result[1]) else vim.lsp.util.preview_location(result) end end) end function M.config_home() return os.getenv('XDG_CONFIG_HOME') or (vim.fn.expand('~') .. '/.config') end return M