terminalfi / lsp-copilot Goto Github PK
View Code? Open in Web Editor NEWGitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
Looking into the implementation, it might be worth while to add a setting to limit the number of completions in the panel and make it user configurable
Our readme says we don't have a key so, but our code says we do
I have LSP and various others installed and working.
I installed LSP-Copilot and restarted as per the docs but then no Copilot: command pallete items appear and then a few seconds later it freezes forcing me to force quit.
When I restart it freezes again. I managed to get some screenshots before I force quit
System info:
neofetch --off
[email protected]
------------------------------
OS: macOS 11.6.8 20G730 x86_64
Host: Macmini7,1
Kernel: 20.6.0
Uptime: 1 hour, 34 mins
Packages: 329 (brew)
Shell: zsh 5.8
Resolution: 2560x1440
DE: Aqua
WM: Quartz Compositor
WM Theme: Blue (Light)
Terminal: iTerm2
Terminal Font: CaskaydiaCoveNerdFontComplete-Regular 16
CPU: Intel i5-4278U (4) @ 2.60GHz
GPU: Intel Iris
Memory: 9494MiB / 16384MiB
startup, version: 4126 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/sublime_text
application: /Applications/Sublime Text.app
working dir: /
packages path: /Users/aiyuhang/Library/Application Support/Sublime Text/Packages
state path: /Users/aiyuhang/Library/Application Support/Sublime Text/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/aiyuhang/Library/Application Support/Sublime Text/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.28513
font face "Consolas" could not be found, defaulting to "Menlo"
OpenGL Context Information:
GL API Version: 4.1 ATI-4.8.101
GLSL Version: 4.10
Vendor: ATI Technologies Inc.
Renderer: AMD Radeon Pro 5500M OpenGL Engine
startup time: 0.396279
first paint time: 0.512784
git: located Sublime Merge installed at /Applications/Sublime Merge.app
git: using configuration from system git install
git: tracking working dir /Users/aiyuhang/gitee/gitee
git: tracking working dir /Users/aiyuhang/gitee/gitee/tmp/tests/gitlab-test
git: tracking working dir /Users/aiyuhang/gitee/gitee/tmp/tests/gitlab-test-fork
git: tracking working dir /Users/aiyuhang/gitee/gitee/tmp/tests/gitlab-test-wiki
git: tracking working dir /Users/aiyuhang/gitee/gitee/tmp/tests/gitaly
environment variables loaded using: /bin/zsh -l
reloading python 3.3 plugin 0_package_control_loader.00-package_control
reloading plugin Default.arithmetic
reloading python 3.3 plugin 0_package_control_loader.01-sublime_lib
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading python 3.3 plugin 0_package_control_loader.10-lsp_utils
reloading python 3.3 plugin 0_package_control_loader.50-backrefs
reloading python 3.3 plugin 0_package_control_loader.50-bracex
reloading python 3.3 plugin 0_package_control_loader.50-pathlib
reloading python 3.3 plugin 0_package_control_loader.50-pyyaml
reloading python 3.3 plugin 0_package_control_loader.55-mdpopups
reloading plugin Default.colors
reloading python 3.3 plugin 0_package_control_loader.55-wcmatch
reloading python 3.3 plugin ayu.activation
reloading python 3.3 plugin ayu.Icons
reloading python 3.3 plugin Git.git_commands
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading python 3.3 plugin LSP-copilot.boot
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
git: tracking working dir /Users/aiyuhang/gitee/gitee/tmp/tests/gitaly/_build/deps/libgit2/source
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading python 3.3 plugin LSP.boot
reloading python 3.3 plugin Package Control.1_reloader
reloading python 3.3 plugin Package Control.2_bootstrap
reloading python 3.3 plugin Package Control.Package Control
reloading python 3.3 plugin Terminal.Terminal
plugins loaded
[lsp_utils] START output of command: "/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/bin/node/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/bin/npm-cli.jsci--scripts-prepend-node-path=true--verbose--production"
[lsp_utils] Command output END
Unable to start subprocess for LSP-copilot
Traceback (most recent call last):
File "/Users/aiyuhang/Library/Application Support/Sublime Text/Packages/lsp_utils/st3/lsp_utils/server_npm_resource.py", line 107, in install_or_update
self._node_runtime.npm_install(self._server_dest)
File "/Users/aiyuhang/Library/Application Support/Sublime Text/Packages/lsp_utils/st3/lsp_utils/node_runtime.py", line 180, in npm_install
raise Exception('Failed to run npm command "{}":\n{}'.format(' '.join(args), error))
Exception: Failed to run npm command "/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/bin/node /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/bin/npm-cli.js ci --scripts-prepend-node-path=true --verbose --production":
npm verb cli [
npm verb cli '/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/bin/node',
npm verb cli '/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/bin/npm-cli.js',
npm verb cli 'ci',
npm verb cli '--scripts-prepend-node-path=true',
npm verb cli '--verbose',
npm verb cli '--production'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm timing npm:load:whichnode Completed in 0ms
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/npmrc Completed in 1ms
npm timing config:load:builtin Completed in 1ms
npm verb config production Use `--omit=dev` instead.
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 0ms
npm timing config:load:file:/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/LSP-copilot/16.15.0/language-server/.npmrc Completed in 0ms
npm timing config:load:project Completed in 7ms
npm timing config:load:file:/Users/aiyuhang/.npmrc Completed in 1ms
npm timing config:load:user Completed in 1ms
npm timing config:load:file:/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 1ms
npm timing config:load:validate Completed in 1ms
npm timing config:load:credentials Completed in 0ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 15ms
npm timing npm:load:configload Completed in 15ms
npm timing npm:load:setTitle Completed in 15ms
npm timing config:load:flatten Completed in 2ms
npm timing npm:load:display Completed in 5ms
npm verb logfile /Users/aiyuhang/.npm/_logs/2022-10-31T07_18_45_961Z-debug-0.log
npm timing npm:load:logFile Completed in 4ms
npm timing npm:load:timers Completed in 0ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load Completed in 41ms
npm timing arborist:ctor Completed in 1ms
npm timing npm-ci:rm Completed in 3ms
npm timing idealTree:init Completed in 1ms
npm timing idealTree:userRequests Completed in 0ms
npm timing idealTree:#root Completed in 0ms
npm timing idealTree:buildDeps Completed in 1ms
npm timing idealTree:fixDepFlags Completed in 0ms
npm timing idealTree Completed in 4ms
npm timing reify:loadTrees Completed in 2ms
npm timing reify:diffTrees Completed in 1ms
npm timing reify:retireShallow Completed in 0ms
npm timing reify:createSparse Completed in 1ms
npm timing reify:trashOmits Completed in 0ms
npm timing reify:loadBundles Completed in 0ms
npm http fetch POST 404 https://registry.npmmirror.com/-/npm/v1/security/advisories/bulk 242ms (cache skip)
npm http fetch POST 404 https://registry.npmmirror.com/-/npm/v1/security/audits/quick 57ms (cache skip)
npm verb audit error HttpErrorGeneral: 404 Not Found - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick
npm verb audit error at /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:104:15
npm verb audit error at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error at async Map.[getReport] (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:336:21)
npm verb audit error at async Map.run (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:106:19)
npm verb audit error HttpErrorGeneral: 404 Not Found - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick
npm verb audit error at /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:104:15
npm verb audit error at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error at async Map.[getReport] (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:336:21)
npm verb audit error at async Map.run (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:106:19) {
npm verb audit error headers: [Object: null prototype] {
npm verb audit error server: [ 'Tengine' ],
npm verb audit error 'content-type': [ 'text/html; charset=utf-8' ],
npm verb audit error 'content-length': [ '41' ],
npm verb audit error connection: [ 'keep-alive' ],
npm verb audit error 'strict-transport-security': [ 'max-age=5184000' ],
npm verb audit error date: [ 'Mon, 31 Oct 2022 07:18:46 GMT' ],
npm verb audit error vary: [ 'Origin' ],
npm verb audit error 'x-frame-options': [ 'SAMEORIGIN' ],
npm verb audit error 'x-xss-protection': [ '1; mode=block' ],
npm verb audit error 'x-content-type-options': [ 'nosniff' ],
npm verb audit error 'x-download-options': [ 'noopen' ],
npm verb audit error 'x-readtime': [ '2.474' ],
npm verb audit error 'content-encoding': [ 'gzip' ],
npm verb audit error 'ali-swift-global-savetime': [ '1667200726' ],
npm verb audit error via: [
npm verb audit error 'cache15.l2cn1851[39,39,404-1280,M], cache57.l2cn1851[40,0], kunlun3.cn1427[0,0,404-0,H], kunlun10.cn1427[1,0]'
npm verb audit error ],
npm verb audit error age: [ '0' ],
npm verb audit error 'x-cache': [ 'HIT TCP_MEM_HIT dirn:-2:-2' ],
npm verb audit error 'x-swift-savetime': [ 'Mon, 31 Oct 2022 07:18:46 GMT' ],
npm verb audit error 'x-swift-cachetime': [ '1' ],
npm verb audit error 'timing-allow-origin': [ '*' ],
npm verb audit error eagleid: [ '6f7b311e16672007267407022e' ],
npm verb audit error 'x-fetch-attempts': [ '1' ],
npm verb audit error 'x-local-cache-status': [ 'skip' ]
npm verb audit error },
npm verb audit error statusCode: 404,
npm verb audit error code: 'E404',
npm verb audit error method: 'POST',
npm verb audit error uri: 'https://registry.npmmirror.com/-/npm/v1/security/audits/quick',
npm verb audit error body: <Buffer 3c 68 31 3e 34 30 34 20 4e 6f 74 20 46 6f 75 6e 64 3c 2f 68 31 3e>,
npm verb audit error pkgid: undefined
npm verb audit error }
npm timing auditReport:getReport Completed in 308ms
npm timing reify:audit Completed in 308ms
npm http fetch GET 404 https://cdn.npmmirror.com/packages/copilot-node-server/1.6.0/copilot-node-server-1.6.0.tgz 392ms (cache skip)
npm timing reify:rollback:createSparse Completed in 2ms
npm timing reify:rollback:retireShallow Completed in 0ms
npm timing command:ci Completed in 453ms
npm verb stack HttpErrorGeneral: 404 Not Found - GET https://cdn.npmmirror.com/packages/copilot-node-server/1.6.0/copilot-node-server-1.6.0.tgz
npm verb stack at /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:104:15
npm verb stack at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb statusCode 404
npm verb pkgid copilot-node-server@https://registry.npm.taobao.org/copilot-node-server/-/copilot-node-server-1.6.0.tgz
npm verb cwd /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/LSP-copilot/16.15.0/language-server
npm verb Darwin 21.6.0
npm verb argv "/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/bin/node" "/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/bin/npm-cli.js" "ci" "--scripts-prepend-node-path=true" "--verbose" "--production"
npm verb node v16.15.0
npm verb npm v8.5.5
npm ERR! code E404
npm ERR! 404 Not Found - GET https://cdn.npmmirror.com/packages/copilot-node-server/1.6.0/copilot-node-server-1.6.0.tgz
npm ERR! 404
npm ERR! 404 'copilot-node-server@https://registry.npm.taobao.org/copilot-node-server/-/copilot-node-server-1.6.0.tgz' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm verb exit 1
npm timing npm Completed in 757ms
npm verb unfinished npm timer reify 1667200726279
npm verb unfinished npm timer reify:unpack 1667200726291
npm verb unfinished npm timer reifyNode:node_modules/copilot-node-server 1667200726291
npm verb code 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/aiyuhang/.npm/_logs/2022-10-31T07_18_45_961Z-debug-0.log
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/aiyuhang/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 253, in start_async
plugin_class.install_or_update()
File "/Users/aiyuhang/Library/Application Support/Sublime Text/Packages/lsp_utils/st3/lsp_utils/_client_handler/abstract_plugin.py", line 109, in install_or_update
server.install_or_update()
File "/Users/aiyuhang/Library/Application Support/Sublime Text/Packages/lsp_utils/st3/lsp_utils/server_npm_resource.py", line 111, in install_or_update
raise Exception('Error installing the server:\n{}'.format(error))
Exception: Error installing the server:
Failed to run npm command "/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/bin/node /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/bin/npm-cli.js ci --scripts-prepend-node-path=true --verbose --production":
npm verb cli [
npm verb cli '/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/bin/node',
npm verb cli '/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/bin/npm-cli.js',
npm verb cli 'ci',
npm verb cli '--scripts-prepend-node-path=true',
npm verb cli '--verbose',
npm verb cli '--production'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm timing npm:load:whichnode Completed in 0ms
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/npmrc Completed in 1ms
npm timing config:load:builtin Completed in 1ms
npm verb config production Use `--omit=dev` instead.
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 0ms
npm timing config:load:file:/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/LSP-copilot/16.15.0/language-server/.npmrc Completed in 0ms
npm timing config:load:project Completed in 7ms
npm timing config:load:file:/Users/aiyuhang/.npmrc Completed in 1ms
npm timing config:load:user Completed in 1ms
npm timing config:load:file:/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 1ms
npm timing config:load:validate Completed in 1ms
npm timing config:load:credentials Completed in 0ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 15ms
npm timing npm:load:configload Completed in 15ms
npm timing npm:load:setTitle Completed in 15ms
npm timing config:load:flatten Completed in 2ms
npm timing npm:load:display Completed in 5ms
npm verb logfile /Users/aiyuhang/.npm/_logs/2022-10-31T07_18_45_961Z-debug-0.log
npm timing npm:load:logFile Completed in 4ms
npm timing npm:load:timers Completed in 0ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load Completed in 41ms
npm timing arborist:ctor Completed in 1ms
npm timing npm-ci:rm Completed in 3ms
npm timing idealTree:init Completed in 1ms
npm timing idealTree:userRequests Completed in 0ms
npm timing idealTree:#root Completed in 0ms
npm timing idealTree:buildDeps Completed in 1ms
npm timing idealTree:fixDepFlags Completed in 0ms
npm timing idealTree Completed in 4ms
npm timing reify:loadTrees Completed in 2ms
npm timing reify:diffTrees Completed in 1ms
npm timing reify:retireShallow Completed in 0ms
npm timing reify:createSparse Completed in 1ms
npm timing reify:trashOmits Completed in 0ms
npm timing reify:loadBundles Completed in 0ms
npm http fetch POST 404 https://registry.npmmirror.com/-/npm/v1/security/advisories/bulk 242ms (cache skip)
npm http fetch POST 404 https://registry.npmmirror.com/-/npm/v1/security/audits/quick 57ms (cache skip)
npm verb audit error HttpErrorGeneral: 404 Not Found - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick
npm verb audit error at /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:104:15
npm verb audit error at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error at async Map.[getReport] (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:336:21)
npm verb audit error at async Map.run (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:106:19)
npm verb audit error HttpErrorGeneral: 404 Not Found - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick
npm verb audit error at /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:104:15
npm verb audit error at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb audit error at async Map.[getReport] (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:336:21)
npm verb audit error at async Map.run (/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:106:19) {
npm verb audit error headers: [Object: null prototype] {
npm verb audit error server: [ 'Tengine' ],
npm verb audit error 'content-type': [ 'text/html; charset=utf-8' ],
npm verb audit error 'content-length': [ '41' ],
npm verb audit error connection: [ 'keep-alive' ],
npm verb audit error 'strict-transport-security': [ 'max-age=5184000' ],
npm verb audit error date: [ 'Mon, 31 Oct 2022 07:18:46 GMT' ],
npm verb audit error vary: [ 'Origin' ],
npm verb audit error 'x-frame-options': [ 'SAMEORIGIN' ],
npm verb audit error 'x-xss-protection': [ '1; mode=block' ],
npm verb audit error 'x-content-type-options': [ 'nosniff' ],
npm verb audit error 'x-download-options': [ 'noopen' ],
npm verb audit error 'x-readtime': [ '2.474' ],
npm verb audit error 'content-encoding': [ 'gzip' ],
npm verb audit error 'ali-swift-global-savetime': [ '1667200726' ],
npm verb audit error via: [
npm verb audit error 'cache15.l2cn1851[39,39,404-1280,M], cache57.l2cn1851[40,0], kunlun3.cn1427[0,0,404-0,H], kunlun10.cn1427[1,0]'
npm verb audit error ],
npm verb audit error age: [ '0' ],
npm verb audit error 'x-cache': [ 'HIT TCP_MEM_HIT dirn:-2:-2' ],
npm verb audit error 'x-swift-savetime': [ 'Mon, 31 Oct 2022 07:18:46 GMT' ],
npm verb audit error 'x-swift-cachetime': [ '1' ],
npm verb audit error 'timing-allow-origin': [ '*' ],
npm verb audit error eagleid: [ '6f7b311e16672007267407022e' ],
npm verb audit error 'x-fetch-attempts': [ '1' ],
npm verb audit error 'x-local-cache-status': [ 'skip' ]
npm verb audit error },
npm verb audit error statusCode: 404,
npm verb audit error code: 'E404',
npm verb audit error method: 'POST',
npm verb audit error uri: 'https://registry.npmmirror.com/-/npm/v1/security/audits/quick',
npm verb audit error body: <Buffer 3c 68 31 3e 34 30 34 20 4e 6f 74 20 46 6f 75 6e 64 3c 2f 68 31 3e>,
npm verb audit error pkgid: undefined
npm verb audit error }
npm timing auditReport:getReport Completed in 308ms
npm timing reify:audit Completed in 308ms
npm http fetch GET 404 https://cdn.npmmirror.com/packages/copilot-node-server/1.6.0/copilot-node-server-1.6.0.tgz 392ms (cache skip)
npm timing reify:rollback:createSparse Completed in 2ms
npm timing reify:rollback:retireShallow Completed in 0ms
npm timing command:ci Completed in 453ms
npm verb stack HttpErrorGeneral: 404 Not Found - GET https://cdn.npmmirror.com/packages/copilot-node-server/1.6.0/copilot-node-server-1.6.0.tgz
npm verb stack at /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:104:15
npm verb stack at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm verb statusCode 404
npm verb pkgid copilot-node-server@https://registry.npm.taobao.org/copilot-node-server/-/copilot-node-server-1.6.0.tgz
npm verb cwd /Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/LSP-copilot/16.15.0/language-server
npm verb Darwin 21.6.0
npm verb argv "/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/bin/node" "/Users/aiyuhang/Library/Caches/Sublime Text/Package Storage/lsp_utils/node-runtime/16.15.0/node/lib/node_modules/npm/bin/npm-cli.js" "ci" "--scripts-prepend-node-path=true" "--verbose" "--production"
npm verb node v16.15.0
npm verb npm v8.5.5
npm ERR! code E404
npm ERR! 404 Not Found - GET https://cdn.npmmirror.com/packages/copilot-node-server/1.6.0/copilot-node-server-1.6.0.tgz
npm ERR! 404
npm ERR! 404 'copilot-node-server@https://registry.npm.taobao.org/copilot-node-server/-/copilot-node-server-1.6.0.tgz' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm verb exit 1
npm timing npm Completed in 757ms
npm verb unfinished npm timer reify 1667200726279
npm verb unfinished npm timer reify:unpack 1667200726291
npm verb unfinished npm timer reifyNode:node_modules/copilot-node-server 1667200726291
npm verb code 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/aiyuhang/.npm/_logs/2022-10-31T07_18_45_961Z-debug-0.log
Package Control: Skipping automatic upgrade, last run at 2022-10-31 15:11:58, next run at 2022-10-31 16:11:58 or after
Sometimes a completion is partially correct, the first x words or lines. It might be neat to add a complete word command that can be continuously pressed to incrementally complete the current suggestion
After the change in the installation procedure (from subline package to git command) the "Copilot: Sign In" command has disappeared.
There is no ST completion and there is only white spaces or nothing before the caret in the current line.
If you press Tab
, then ST inserts a tab.
There is ST completion and Copilot completion.
If you press Tab
, then ST applies ST completion.
If you are not in situation 1 or 2, then ST applies Copilot completion.
The only solution I can figure out at this moment is using a more dedicated keybinding other than Tab
to explicitly indicate "I want to apply Copilot completion". Like the following keybinding, for example,
{
"keys": ["ctrl+tab"], // Tab is the most abused keybinding when it comes to completion
"command": "copilot_accept_suggestion",
"context": [{ "key": "setting.copilot.completion.is_visible" }],
},
Not sure how this is resolved in VSCode or other editors.
I have everything set up and copilot status says im logged in. However I never get popups with suggestions. LSP logs show this:
:: [11:14:40.322] <- LSP-copilot statusNotification: {'message': '', 'status': 'Normal'}
:: [11:14:40.322] <<< LSP-copilot (16) (duration: 596ms): {'completions': []}
any time I edit a file (.js files and .ts). It looks like everything is setup and "working" but I just never get any suggestions back and therefore no popups with suggestions.
Here are the settings pulled from VSCode
{
"configuration": [
{
"title": "Copilot",
"properties": {
"github.copilot.advanced": {
"type": "object",
"title": "Advanced Settings",
"properties": {
"secret_key": {
"type": "string",
"default": "",
"description": "Secret API key"
},
"length": {
"type": "integer",
"default": 500,
"description": "Length of code to generate in tokens"
},
"temperature": {
"type": "string",
"default": "",
"description": "Override sampling temperature (range 0.0 - 1.0)"
},
"top_p": {
"type": "number",
"default": 1,
"description": "Top probability mass to consider"
},
"stops": {
"type": "object",
"default": {
"*": [
"\\n\\n\\n"
],
"python": [
"\\ndef ",
"\\nclass ",
"\\nif ",
"\\n\\n#"
]
},
"description": "Configure per-language stop sequences"
},
"indentationMode": {
"type": "object",
"default": {
"python": false,
"javascript": false,
"javascriptreact": false,
"jsx": false,
"typescript": false,
"typescriptreact": false,
"go": false,
"ruby": false,
"*": true
},
"markdownDescription": "Enable or disable indentation block termination for specified [languages](https://code.visualstudio.com/docs/languages/identifiers)."
},
"inlineSuggestCount": {
"type": "integer",
"default": 3,
"description": "Number of inline suggestions to fetch"
},
"listCount": {
"type": "integer",
"default": 10,
"description": "Number of solutions to list in Open GitHub Copilot"
},
"debug.showScores": {
"type": "boolean",
"default": false,
"description": "Show scores in sorted solutions"
},
"debug.overrideEngine": {
"type": "string",
"default": "",
"description": "Override engine name"
},
"debug.overrideProxyUrl": {
"type": "string",
"default": "",
"description": "Override GitHub authentication proxy full URL"
},
"debug.testOverrideProxyUrl": {
"type": "string",
"default": "",
"description": "Override GitHub authentication proxy URL when running tests"
},
"debug.overrideLogLevels": {
"type": "object",
"default": {},
"description":"Override what the minimum logged level is per logger (or \'*\' for all loggers). Levels are \'DEBUG\', \'INFO\', \'WARN\', \'ERROR\'. Ex: `{\\"default\\": \\"DEBUG\\"}` to see all things logged to the \'default\' logger."
},
"debug.filterLogCategories": {
"type": "array",
"default": [],
"description": "Show only log categories listed in this setting. If an array is empty, show all loggers"
}
}
},
"github.copilot.enable": {
"type": "object",
"default": {
"*": true,
"yaml": false,
"plaintext": false,
"markdown": false
},
"markdownDescription": "Enable or disable Copilot for specified [languages](https://code.visualstudio.com/docs/languages/identifiers)"
},
"github.copilot.inlineSuggest.enable": {
"type": "boolean",
"default": true,
"description": "Show inline suggestions"
}
}
}
]
}
See description and repro video below :-)
When the same file is opened in separate pane (I know that it feels weird -- but sometimes I forget that a file is a tab in one pane, and I open it again in a different pane), Copilot suggestions don't appear. It seems that suggestions only appear if the file is opened once.
I sometimes write prose or notes to self in sublime, and it's really annoying to get completion suggestions then. Can I turn it off for "Plain Text" files?
If not, that's a big issue for me (as it makes me turn it off altogether temporarily).
If yes, this should be documented in the settings and/or README somewhere. I did look.
We are behind a Proxyserver and can't connect to Copilot.
I really tried everything from env-variables, to overwrite 'agent.js' with hardcoded proxy-settings.
Is there anything we can do, to connect to Copilot over a proxyserver?
Does this respect .gitignore
to prevent sending secrets, passwords, api keys to 3rd parties? Thanks.
When the lsp_format_on_save
is true
, completion can be displayed after saving with lsp_save
I think this repos needs at least a readme for basic setup and usage.
For starters, the plugin needs the latest Node.js but note that Sublime text, if Node.JS is missing will not install the latests - rather 12.x version.
So that is something a readme could mention.
But most of all, after installing the plugin, it will not work because of LSP-copilot] ⚠ Copilot has NOT been signed in.
And there is no clear path as of how to sign in to Copilot.
It must be something in the setting of course, but that is rather unhelpful:
{
"command": ["${node_bin}", "${server_path}", "--stdio"],
"schemes": ["file", "buffer", "res"],
"initializationOptions": {},
"settings": {},
// ST4 configuration
"selector": "source | text",
}
It would be helpful for people to know how to make a basic setup, I think.
Thanks!
Need to move all handler logic into the ViewListener to handle callbacks directly
Hello, loving this so far ... just thinking it would be helpful to have a keybinding option for opening the full (10 suggestion) panel and then closing it without accepting any of them.
Essentially keybindings for the hamburger menu in the auto-suggest popup and the close button in the panel that appears when you click that.
Track all commands which are defined by Copilot and track implementation status
httpRequest
recordTelemetryConsent
notifyShown
debug/verifyState
debug/verifyWorkspaceState
getCompletions
getPanelCompletions
(#18)getCompletionsCycling
(#29)getVersion
setEditorInfo
checkStatus
signInInitiate
signInConfirm
signOut
notifyAccepted
notifyRejected
telemetry/exception
testing/createContext
testing/alwaysAuth
testing/neverAuth
testing/useTestingToken
testing/setCompletionDocuments
testing/setPanelCompletionDocuments
testing/triggerShowMessageRequest
after i install the package i dont get a Copilot: Sign In option in the console
why is this? is it failing to install or something how can I check
This may not be required once Copilot is public? Command is recordTelemetryConsent
Copilot CheckStatus
supports '{"localChecksOnly": true}
What does this mean, should we support his via a setting?
I occasionally noticed that my Esc
key won't remove multi cursors. That functionality is provided in ST default keybinding.
{ "keys": ["escape"], "command": "single_selection", "context":
[
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
]
},
It's gotten override by copilot_reject_completion
somehow when obviously there is no Copilot suggestion visible.
{
"keys": ["escape"],
"command": "copilot_reject_completion",
"context": [{ "key": "setting.copilot.completion.is_visible" }]
},
This means something may go wrong with our status management of a view: why is_visible
is True
when there is no popup visible? Likely some async things?
I don't have a reliable way to reproduce this but just make a log for it here.
Hi,
Copilot is not working anymore. Here is the error I found in log panel :
LSP-copilot 6: {'code': -32602, 'message': "Invalid params: /doc must have required property 'version'"}
Thanks for all ! Copilot helps me a lot.
Currently, when a phantom completion is displayed typing characters that match the beginning of the ghost text hides the completion and instantiates a new request.
This can be improved and the currently displayed ghost text can be updated without triggering a new request when typed characters match the begging of the ghost text
Not sure what new things are or there is no new thing.
Thanks for working on this package, and bringing copilot to Sublime Text!
In my Default.sublime-keymap
I have bound copilot_accept_completion
like this:
{
"keys": ["primary+enter"],
"command": "copilot_accept_completion",
"context": [
{
"key": "setting.copilot.completion.is_visible"
}
]
},
Despite that, the default key binding using "tab"
still exists and takes precedence over other LSP autocompletion.
How do I disable that? Sublime Text now has 4 other bindings for tab, do I have to copy all of them into my key bindings (b/c that seems to work)? That’s inconvenient and might break functionality introduced in the future.
Copilot X looks great but I'm a bit worried Sublime is not suited to support it. Are my fears misplaced?
Missing support for getPanelCompletions.
:: <- LSP-copilot statusNotification: {'message': '', 'status': 'Normal'}
:: <<< LSP-copilot 12: {'completions': []}
:: <- LSP-copilot LogMessage: {'level': 1, 'message': '[INFO] [default] [2022-08-01T07:59:31.840Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 283 ms', 'metadataStr': '[INFO] [default] [2022-08-01T07:59:31.840Z]', 'extra': ['request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 283 ms']}
:: <- LSP-copilot statusNotification: {'message': '', 'status': 'Warning'}
↑ Warning
:: <- LSP-copilot LogMessage: {'level': 1, 'message': '[INFO] [fetch] [2022-08-01T07:59:31.840Z] Cancelled by server', 'metadataStr': '[INFO] [fetch] [2022-08-01T07:59:31.840Z]', 'extra': ['Cancelled by server']}
↑ Cancelled by server
:: <<< LSP-copilot 13: {'completions': []}
↑ Always empty
There seems to be some rate/burst limit things? I encounter Cancelled by server
quite frequently and always get empty completions
when this happens.
When a multi-line phantom completion is displayed the background colour for lines number 2+ is the same as the background colour of the first line
I can only access the settings of the addon, nothing else works for me.
The login command doesn't do anything to me. Not sure how to check my version but I've just downloaded it.
I'm running it on an osx.
Cheers!
I managed to figure this one out, but in case anyone else gets a long error message during the installation with a line that says npm verb audit error FetchError: request to https://registry.npmjs.org/-/npm/v1/security/audits/quick failed, reason: unable to get local issuer certificate
You need to point NPM
to your ca cert file:
npm config set cafile "<path to your certificate file>"
# Confirm this worked
npm config get cafile
Hi,
I am working at a company that uses it’s own certificate for ssl traffic. When trying to use copilot at work I am getting the error
self-signed certificate in certificate chain
.
I guess this is a more general problem, but I wondered if you knew how to solve the issue.
Thanks.
Inputting any character causes the copilot suggestion popup to appear. Aside from being annoying, I don't want to be sending network requests that often. I prefer to have it appear via a keyboard shortcut instead.
Is there a way to disable this?
M1 MacBook Air
macOS: 13.2
Sublime Text: 4143
After installing LSP through package control:
reloading python 3.3 plugin LSP-copilot.boot
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 308, in reload_plugin
m = importlib.import_module(modulename)
File "./python3.3/importlib/__init__.py", line 90, in import_module
File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/user/Library/Application Support/Sublime Text/Installed Packages/LSP-copilot.sublime-package/boot.py", line 12, in <module>
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/user/Library/Application Support/Sublime Text/Installed Packages/LSP-copilot.sublime-package/plugin/__init__.py", line 1, in <module>
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/user/Library/Application Support/Sublime Text/Installed Packages/LSP-copilot.sublime-package/plugin/commands.py", line 5, in <module>
ImportError: No module named 'LSP'
No Copilot: SIgn In
in command palette
Hi,
I have trouble logging to copilot because of my corporate network messing up SSL certificate checks.
Here are the logs of LSP
:: --> LSP-copilot initialize(1): {'rootUri': None, 'processId': 16896, 'workspaceFolders': None, 'clientInfo': {'version': '1.20.0', 'name': 'Sublime Text LSP'}, 'rootPath': None, 'capabilities': {'textDocument': {'colorProvider': {'dynamicRegistration': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'references': {'dynamicRegistration': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'rangeFormatting': {'dynamicRegistration': True}, 'documentSymbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [8, 12, 11, 13, 9, 21, 14, 1, 25, 18, 3, 6, 7, 10, 24, 4, 17, 26, 23, 19, 20, 5, 2, 16, 22, 15]}, 'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'completion': {'completionItemKind': {'valueSet': [5, 3, 8, 6, 4, 21, 17, 24, 2, 18, 10, 15, 13, 1, 23, 19, 16, 14, 11, 22, 25, 7, 9, 20, 12]}, 'dynamicRegistration': True, 'insertTextMode': 2, 'completionItem': {'insertTextModeSupport': {'valueSet': [2]}, 'snippetSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'insertReplaceSupport': True, 'deprecatedSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'labelDetailsSupport': True, 'tagSupport': {'valueSet': [1]}}}, 'signatureHelp': {'dynamicRegistration': True, 'signatureInformation': {'activeParameterSupport': True, 'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}, 'contextSupport': True}, 'documentLink': {'dynamicRegistration': True, 'tooltipSupport': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'codeLens': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'publishDiagnostics': {'relatedInformation': True, 'versionSupport': True, 'dataSupport': True, 'tagSupport': {'valueSet': [1, 2]}, 'codeDescriptionSupport': True}, 'semanticTokens': {'formats': ['relative'], 'multilineTokenSupport': True, 'augmentsSyntaxTokens': True, 'dynamicRegistration': True, 'tokenTypes': ['function', 'interface', 'variable', 'parameter', 'regexp', 'decorator', 'typeParameter', 'operator', 'modifier', 'namespace', 'method', 'macro', 'enum', 'event', 'comment', 'property', 'keyword', 'struct', 'type', 'class', 'number', 'enumMember', 'string'], 'requests': {'full': {'delta': True}, 'range': True}, 'tokenModifiers': ['readonly', 'abstract', 'defaultLibrary', 'definition', 'deprecated', 'modification', 'declaration', 'async', 'documentation', 'static'], 'overlappingTokenSupport': False}, 'codeAction': {'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.fixAll', 'source.organizeImports']}}, 'resolveSupport': {'properties': ['edit']}, 'isPreferredSupport': True, 'dynamicRegistration': True, 'disabledSupport': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'selectionRange': {'dynamicRegistration': True}, 'inlayHint': {'dynamicRegistration': True, 'resolveSupport': {'properties': ['textEdits', 'label.command']}}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True}, 'synchronization': {'willSaveWaitUntil': True, 'dynamicRegistration': True, 'willSave': True, 'didSave': True}}, 'workspace': {'codeLens': {'refreshSupport': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'workspaceFolders': True, 'inlayHint': {'refreshSupport': True}, 'semanticTokens': {'refreshSupport': True}, 'applyEdit': True, 'executeCommand': {}, 'symbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [8, 12, 11, 13, 9, 21, 14, 1, 25, 18, 3, 6, 7, 10, 24, 4, 17, 26, 23, 19, 20, 5, 2, 16, 22, 15]}, 'tagSupport': {'valueSet': [1]}}, 'configuration': True}, 'window': {'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'parser': 'Python-Markdown', 'version': '3.2.2'}}}, 'initializationOptions': {}}
:: <? LSP-copilot LogMessage: {'metadataStr': '[DEBUG] [agent] [2022-11-07T09:41:38.038Z]', 'message': '[DEBUG] [agent] [2022-11-07T09:41:38.038Z] Agent service starting', 'extra': ['Agent service starting'], 'level': 0}
:: <-- LSP-copilot client/registerCapability(0): {'registrations': [{'id': '117fe942-b603-4845-86cf-d9467ef7c45b', 'method': 'workspace/didChangeWorkspaceFolders', 'registerOptions': {}}]}
:: >>> LSP-copilot 0: None
:: <<< LSP-copilot 1: {'capabilities': {'workspace': {'workspaceFolders': {'changeNotifications': True, 'supported': True}}, 'textDocumentSync': {'change': {'syncKind': 2}, 'didOpen': {}, 'didClose': {}}}}
:: -> LSP-copilot initialized: {}
:: -> LSP-copilot workspace/didChangeConfiguration: {'settings': {'debug': True, 'completion_style': 'popup', 'auto_ask_completions': True, 'hook_to_auto_complete_command': False, 'telemetry': False, 'local_checks': False}}
:: --> LSP-copilot checkStatus(2): {}
:: --> LSP-copilot setEditorInfo(3): {'editorPluginInfo': {'version': '0.1.10', 'name': 'LSP-copilot'}, 'editorInfo': {'version': '4126', 'name': 'Sublime Text'}}
:: -> LSP-copilot textDocument/didOpen: {'textDocument': {'uri': 'buffer://sublime/59', 'languageId': 'txt', 'version': 0, 'text': ''}}
:: <- LSP-copilot LogMessage: {'metadataStr': '[DEBUG] [agent] [2022-11-07T09:41:38.329Z]', 'message': '[DEBUG] [agent] [2022-11-07T09:41:38.329Z] Telemetry initialized', 'extra': ['Telemetry initialized'], 'level': 0}
:: <<< LSP-copilot 3: 'OK'
:: <<< LSP-copilot 2: {'status': 'NotSignedIn'}
:: --> LSP-copilot signInInitiate(4): {}
:: <<< LSP-copilot 4: {'expiresIn': 899, 'status': 'PromptUserDeviceFlow', 'interval': 5, 'userCode': 'C6BE-6B1F', 'verificationUri': 'https://github.com/login/device'}
:: --> LSP-copilot signInConfirm(5): {'userCode': 'C6BE-6B1F'}
LSP-copilot: unhandledRejection {"type":"system","errno":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY","code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
So that we won't have questions like #7 or https://github.com/orgs/github-community/discussions/6617#discussioncomment-3160739
Copilot supports returning a list of completions, the current implementation doesn't contain logic to cycle through completions easily
Currently, I feel the indentation of the suggested item is kind of random.
Hi,
A bit of a silly question, but is it possible to use lsp-copilot to request github copilote from the command line.
Simple example:
$ echo "def add(x, y):" | some-script-using-lsp-copilot.sh
def add(x, y):
return x + y
Thank you for making this!
I'm trying to get started but the Copilot: Sign In
command is missing.
Hi!
So this is fixed in the end, but it’s unclear to me how it’s working. I had this error on install/on startup:
Failed to start LSP-Copilot […]
--- Error: ---
Node.js version requirement failed. Expected >= 16, got 15.5.0."
I tried specifying the path to node in my LSP-copilot.sublime-settings
:
{
"command": [
"/home/.../.nvm/versions/node/v18.1.0/bin/node", // instead of "${node_bin}"
"${server_path}",
"--stdio"
]
}
but it didn’t help. Then I noticed one other LSP server I was using (Intelephense) was probably running with NodeJS 15 since it was installed in NVM’s 15.5.0 folder. I upgraded the server by installing it with Node 18, and updated the path for that LSP plugin. Restarting Sublime Text, both LSP servers (Copilot and Intelephense) are starting without errors.
How does Sublime/LSP decide what version of Node to use? For Intelephense, I imagine it depends on what NVM is currently positioned on, but Copilot seems explicitly define the Node version to run (first part of the command in the settings), so why does it seem to be ignoring it?
I tried to use the following key bind and disabled the setting auto_ask_completions
{
"keys": [
"ctrl+shift+space"
],
"command": "copilot_ask_completions",
"context": [
{
"key": "copilot.is_authorized",
}
]
}
But nothing happened, then I was getting tons of errors from sublime debug console
failed to register session LSP-copilot to listener ViewListener(31)
Traceback (most recent call last):
File "C:\Users\Tofu Ninja\Desktop\dev_7_23_22\dev\sublime\Data\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 183, in _publish_sessions_to_listener_async
listener.on_session_initialized_async(session)
File "C:\Users\Tofu Ninja\Desktop\dev_7_23_22\dev\sublime\Data\Installed Packages\LSP.sublime-package\plugin/documents.py", line 210, in on_session_initialized_async
self._session_views[session.config.name] = SessionView(self, session, self._uri)
File "C:\Users\Tofu Ninja\Desktop\dev_7_23_22\dev\sublime\Data\Installed Packages\LSP.sublime-package\plugin/session_view.py", line 63, in __init__
self._clear_auto_complete_triggers(settings)
File "C:\Users\Tofu Ninja\Desktop\dev_7_23_22\dev\sublime\Data\Installed Packages\LSP.sublime-package\plugin/session_view.py", line 152, in _clear_auto_complete_triggers
triggers = [t for t in triggers if self.session.config.name != t.get("server", "")]
File "C:\Users\Tofu Ninja\Desktop\dev_7_23_22\dev\sublime\Data\Installed Packages\LSP.sublime-package\plugin/session_view.py", line 152, in <listcomp>
triggers = [t for t in triggers if self.session.config.name != t.get("server", "")]
AttributeError: 'str' object has no attribute 'get'
I couldn't get the plugin working again after that, had to reinstall it not sure what broke. It was working before I tried to set the binding, tried revering my settings but just kept getting that error. After reinstalling it was working again so I just gave up setting the keybind.
We send plugin version in https://github.com/TheSecEng/LSP-copilot/blob/1703e6a1351874e23b216a0a664a85182d10476d/plugin/plugin.py#L88-L91
If we don't want to maintain that constant manually, we can parse package-metadata.json
from a installed package and get plugin version from it. As for those who are not installed via Package Control, we may just send "unknown"
.
What do you think?
package-metadata.json
{
"dependencies": [],
"platforms": [
"*"
],
"sublime_text": ">=3000",
"version": "0.1.3", // <--------------------------------------------------------------------------
"url": "https://github.com/alepez/LiveReload-sublimetext3",
"description": "LiveReload plugin for SublimeText"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.