Skip to content

Commit 521ed7a

Browse files
committed
Merge remote-tracking branch 'powerman/fix-should_attach-on-sign_in' into pr-test
2 parents 2bb953b + 7e9f508 commit 521ed7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/copilot/client/init.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ function M.use_client(callback)
109109
end
110110

111111
client_config.add_callback(callback)
112+
113+
if not util.should_attach() then
114+
logger.debug("not attaching to buffer based on should_attach criteria")
115+
return
116+
end
117+
112118
local client_id, err = vim.lsp.start(M.config)
113119

114120
if not client_id then

0 commit comments

Comments
 (0)