diff options
| -rw-r--r-- | lsp/gitlab_duo.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lsp/gitlab_duo.lua b/lsp/gitlab_duo.lua index 1b6f0762..08439f6f 100644 --- a/lsp/gitlab_duo.lua +++ b/lsp/gitlab_duo.lua @@ -393,7 +393,7 @@ return { local new_token_data = refresh_access_token(token_data.refresh_token) if new_token_data then client:notify('workspace/didChangeConfiguration', { - settings = { token = new_token_data.access_token }, + settings = { token = new_token_data.access_token, baseUrl = config.gitlab_url }, }) else vim.notify('Run :LspGitLabDuoSignIn to re-authenticate', vim.log.levels.WARN) @@ -416,6 +416,16 @@ return { -- Check authentication status local token, status = get_valid_token() + + if token then + client:notify('workspace/didChangeConfiguration', { + settings = { + token = token, + baseUrl = config.gitlab_url, + }, + }) + end + if not token then vim.notify('GitLab Duo: Not authenticated. Run :LspGitLabDuoSignIn to sign in.', vim.log.levels.WARN) elseif status == 'refreshed' then |
