Code Monkey home page Code Monkey logo

Comments (11)

mherrmann avatar mherrmann commented on August 11, 2024 6

A note to people who don't have Copilot: Sign In in the Command Palette: There seem to be a few caveats.

Firstly, for me, any Copilot commands only show up in the Command Palette if I have a file open. So make sure to have an open file in front of you. It's strange that this also seems to be the case for the "Sign In" command. It shouldn't require a file.

Secondly, if you already signed into Copilot from another IDE, then you will also not see Sign In. At least, that's how it was for me. I signed into Copilot via JetBrains PyCharm. It seems that the plugin in Sublime Text picks this up and doesn't show Sign In in that case. I do have Sign Out and others, despite never logging into Copilot in ST.

from lsp-copilot.

jfcherng avatar jfcherng commented on August 11, 2024 3

From my experiment, it doesn't play well with Node v18 (I can reproduce freezing with Node v18.7.0 on Win10 x64 as well). As a workaround, you can create Packages/User/lsp_utils.sublime-settings with the following settings to use portable Node LTS (v16 at this moment) for LSP-* plugins.

{
    // Specifies the type and priority of the Node.js installation that should be used for Node.js-based servers.
    // The allowed values are:
    //  - 'system' - a Node.js runtime found on the PATH
    //  - 'local' - a Node.js runtime managed by LSP that doesn't affect the system
    // The order in which the values are specified determines which one is tried first,
    // with the later one being used as a fallback.
    // You can also specify just a single value to disable the fallback.
    "nodejs_runtime": [
        // "system",
        "local",
    ],
}

Or, if you have Node v16/v17 somewhere on your machine as well, you can revise LSP-copilot's setting to use it.

{
	"command": [
		"THE_PATH_OF_THE_NODE_EXECUTABLE",
		"${server_path}",
		"--stdio"
	],
}

from lsp-copilot.

solrevdev avatar solrevdev commented on August 11, 2024 1

YES!

Thank you so much for your help @jfcherng its very much appreciated.

I now have copilot working in sublime text.

from lsp-copilot.

jfcherng avatar jfcherng commented on August 11, 2024 1

Fyi, the latest release should support Node.js v18.

from lsp-copilot.

jfcherng avatar jfcherng commented on August 11, 2024

Could you take a screenshot (or copy text) for ST console? Maybe there are some error messages.

from lsp-copilot.

solrevdev avatar solrevdev commented on August 11, 2024

Could you take a screenshot (or copy text) for ST console? Maybe there are some error messages.

I'll try killing the process and restarting and see if I can get the console up before it freezes. In meantime here is my activity monitor while it beach ball freezes...

node --version
v18.7.0

Thanks for looking at this for me by the way I'm so excited to get copilot working with sublime!

from lsp-copilot.

solrevdev avatar solrevdev commented on August 11, 2024

Ok I managed to get here before the freeze. Now any movement is just beach ball!

I will leave it open and update here in case more gets written to the console at any point

UPDATE

  • Ok I now have control of sublime text again however node is using 100% cpu.
  • Again no CoPilot: menu items ( I see the same as the screenshot)
  • So eventually after about 5-10 minutes I get control of sublime text but the node process running at close to 100% means realistically I have to quit sublime which closes the node process and gets my machine back.
  • A restart of sublime does same thing. Freezes for 10 minutes with 100% node process before I can eventually quit it

Is there anything else I can get information wise that would help?

I have found an article on how to manually remove a package to get my sublime working again in the meantime.

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/solrevdev/Library/Application Support/Sublime Text/Packages
state path: /Users/solrevdev/Library/Application Support/Sublime Text/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/solrevdev/Library/Application Support/Sublime Text/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.42146
loading dictionary Packages/Language - English/en_GB.dic
OpenGL Context Information:
  GL API Version: 4.1 INTEL-16.5.13
  GLSL Version: 4.10
  Vendor: Intel Inc.
  Renderer: Intel Iris OpenGL Engine
startup time: 0.615404
first paint time: 0.630461
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-pygments
reloading plugin Default.auto_indent_tag
reloading python 3.3 plugin 0_package_control_loader.01-sublime_lib
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.10-wcwidth
reloading python 3.3 plugin 0_package_control_loader.40-ptyprocess
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 plugin Default.colors
reloading python 3.3 plugin 0_package_control_loader.50-pymdownx
reloading python 3.3 plugin 0_package_control_loader.50-pyte
reloading python 3.3 plugin 0_package_control_loader.50-python-markdown
reloading python 3.3 plugin 0_package_control_loader.50-pyyaml
reloading python 3.3 plugin 0_package_control_loader.55-mdpopups
reloading python 3.3 plugin 0_package_control_loader.55-wcmatch
reloading python 3.3 plugin LSP-bash.plugin
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 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
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 plugin Emmet.main
reloading plugin Pretty JSON.PrettyJson
reloading plugin Pretty JSON.PrettyJsonListeners
reloading plugin REST Client.plugin
reloading plugin Sass.sass_completions
reloading python 3.3 plugin LSP-copilot.boot
reloading python 3.3 plugin LSP-css.plugin
reloading python 3.3 plugin LSP-dockerfile.plugin
reloading python 3.3 plugin LSP-html.plugin
reloading python 3.3 plugin LSP-json.plugin
reloading python 3.3 plugin LSP-OmniSharp.plugin
reloading python 3.3 plugin LSP-PowerShellEditorServices.plugin
reloading python 3.3 plugin LSP-typescript.commands
reloading python 3.3 plugin LSP-typescript.plugin
reloading python 3.3 plugin LSP-typescript.protocol
reloading python 3.3 plugin LSP-yaml.plugin
reloading python 3.3 plugin LSP.boot
reloading python 3.3 plugin MarkdownPreview.browser
reloading python 3.3 plugin MarkdownPreview.markdown_preview
reloading python 3.3 plugin MarkdownPreview.markdown_settings
reloading python 3.3 plugin MarkdownPreview.markdown_wrapper
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 SCSS Compiler.scsscompile
reloading python 3.3 plugin SqlBeautifier.sqlbeautifier
reloading python 3.3 plugin Terminus.main
reloading python 3.3 plugin Vagrant.Vagrant
plugins loaded
Package Control: Skipping automatic upgrade, last run at 2022-08-16 10:39:06, next run at 2022-08-16 11:39:06 or after

from lsp-copilot.

jfcherng avatar jfcherng commented on August 11, 2024

Okay, so the latest server release obviously mark Node v18 as unsupported.
https://github.com/github/copilot.vim#getting-started

from lsp-copilot.

hakusaro avatar hakusaro commented on August 11, 2024

I suggest pinning this issue (I ended up here from #58) because I nearly made another dupe of it.

from lsp-copilot.

jfcherng avatar jfcherng commented on August 11, 2024

Firstly, for me, any Copilot commands only show up in the Command Palette if I have a file open. So make sure to have an open file in front of you. It's strange that this also seems to be the case for the "Sign In" command. It shouldn't require a file.

yes, the command only shows if LSP-copilot is activated on the current view...

Secondly, if you already signed into Copilot from another IDE, then you will also not see Sign In. At least, that's how it was for me. I signed into Copilot via JetBrains PyCharm. It seems that the plugin in Sublime Text picks this up and doesn't show Sign In in that case. I do have Sign Out and others, despite never logging into Copilot in ST.

Interesting, didn't know this. Sign Out only shows if you've already signed in 😄

from lsp-copilot.

TerminalFi avatar TerminalFi commented on August 11, 2024

Signin is due to the fact that copilot saves its signin info in your ~/ location for all editors.

from lsp-copilot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.