Skip to content

How to initialize code-server with extensions, settings, shortcuts, etc. using config file? #2831

Closed

Description

@arita37

We want to initialize code-server with some-preset
save into a yaml file on disk.

Activity

  1. jsjoeio commented on Mar 8, 2021

    @jsjoeio
    Contributor

    Hi @arita37 - this is already possible, to some extent. If you look at the logs when code-server starts, it uses a config file somewhere on your machine like: ~/.config/code-server/config.yaml

    image

    Here's what the file looks like:

    bind-addr: 127.0.0.1:8080
    auth: password
    password: helloworld
    cert: false

    Any flag that the CLI accepts should be configurable in the yaml file. Hope that helps! Please reopen if I misunderstood and you need something else!

  2. arita37 commented on Mar 8, 2021

    @arita37
    Author
  3. jsjoeio commented on Mar 8, 2021

    @jsjoeio
    Contributor

    A few things you can do:

    • you could write a script that installs extensions like so: code-server --install-extension ms-python.python (see more)
    • you could reuse your VS Code configuration (see more) (i.e. for dark mode or a theme) and it should work for shortcuts as well
  4. changed the title [-]Create extension/config to initialize code-server[/-] [+]How to initialize code-server with extensions, settings, shortcuts, etc. using config file?[/+] on Mar 8, 2021
  5. locked and limited conversation to collaborators on Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew user visible feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions