Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    SFR
    @sfr-:matrix.org
    [m]
    Hello everyone, bit of a weird question -
    I'm creating my own Electron text editor, and I don't know how to tackle linting of different languages.
    I could create a linter for, say, JSON, and find a way to integrate it into my app, but I was wondering whether importing the framework from VSCode, or at least looking at how it's done, would help shorten the process.
    The task isn't necessarily difficult; it's just tedious and I feel like it's a waste to not use available resources.
    Could I feasibly rip the linting/IntelliSense out of Code and use it in my app? Or would it be too complex for my use?
    Brigit Murtaugh
    @bamurtaugh
    Hey @tadejsv - The environment variables come from wherever the Docker command is run, which is currently the local machine for remote containers. The Remote - SSH + Remote - Containers combination would be needed to only use remote.
    Sorin Sbarnea
    @ssbarnea
    Can someone help me with a simple example of extension producing “problems”? I want one without a language server because these reported issues may apply to any text file.
    Tadej Svetina
    @tadejsv
    Thanks for the help everyone. Indeed a simple solution to my problem is not possible currently, but if it helps someone, I found a relatively good substitute:
    I first launch docker compose on the remote machine, and then start VSCode dev container locally - which just connects to the already running docker services. Except for the extra work needed of launching docker compose manually, I found this has no downsides
    shivam kumar
    @Shiva7071007

    @ssbarnea if I am understanding correct, you want messages printed in problem tab by an extension.

    If that so, you can install sonarlint, create any js and write code which is not linted properly.

    image.png
    shivam kumar
    @Shiva7071007

    @sfr-:matrix.org I think for linting purpose, you can include well known linters for the language and and then use their API to provide suggestion.
    ex: eslint for js file
    https://eslint.org/docs/developer-guide/nodejs-api

    You will find the eslint being used in vscode as well.
    And for others they provide API where user can creates their own and integrate with vscode.

    SFR
    @sfr-:matrix.org
    [m]
    I will look into that, thank you very much!
    Evgeniy Labutin
    @LabEG
    https://overmock.com/
    New tool for creating pixel perfect layout =)
    Sorin Sbarnea
    @ssbarnea
    I need to integrate two different yaml linters written in python but without implementing a new language server.
    shivam kumar
    @Shiva7071007
    @ssbarnea u want to create an extension for linting yaml files?
    shivam kumar
    @Shiva7071007
    Or you want to create an extension that uses your python script to lint yaml inside vs code?
    cmario
    @cmario92
    Hello all, quick question - can I have my settings sync per device? my work PC uses proxy and it needs the proxy settings to connect
    3174n
    @3174n:matrix.org
    [m]
    @cmario92: I'm sorry, can you be more clear about what you want to do? I didn't quite understood.
    cmario
    @cmario92
    @3174n:matrix.org - hey - I know that settings for VSCode can be synced on Global level(user), folder and workspace. Using SettingsSync, I can see my 2 devices(home and office laptops). The one in the office is behind proxy, and for VSCode updates and extensions to work, I need to configure the VSCode setting -> proxy.
    3174n
    @3174n:matrix.org
    [m]
    I understand now. I don't think I can help you, sorry.
    cmario
    @cmario92
    no problem :) but there must be a way (or in the near future) to be able to configure settings based on device. Global -> Device -> Folder -> Workspace
    cmario
    @cmario92
    hi @Shiva7071007, thanks for the reply. I am not interested in a 3p extension to do this. I was wondering if VSCode already supports the device level of settings sync
    cmario
    @cmario92
    if you know, is there a feature request similar to what I am asking in the plans for development?
    shivam kumar
    @Shiva7071007
    @cmario92 you can search on their github repo, if there is not, then you can create one.
    They will let u know, if there is a ticket already or how u can do. If not, they will move ur ticket into dev backlog and wait for voting if this feature is really required .
    cmario
    @cmario92
    @Shiva7071007 - thanks! already created a ticket for it :) microsoft/vscode#114036
    brianmingus2
    @brianmingus2
    Does vs-code have macros such as window-jump-up/down/left/right in emacs, for binding the moving of the cursor to the code pane to the top, bottom, right or left with a keyboard shortcut?
    shivam kumar
    @Shiva7071007

    @brianmingus2 see if this helps you
    https://code.visualstudio.com/docs/editor/userdefinedsnippets#_assign-keybindings-to-snippets

    You try 3rd parties Extensions though.

    Arun Kumar
    @arunkumar413
    Hi all
    I'd like to attach debugger to vscode. Any idea on how to sync the watch variables between browser and vscode?
    shivam kumar
    @Shiva7071007
    @arunkumar413 Angular??
    Arun Kumar
    @arunkumar413
    @Shiva7071007 React and nodejs
    I don't care if the app is running on web or node. I just want to watch and debug in my vscode.
    shivam kumar
    @Shiva7071007

    @arunkumar413 for web app debugging, install any of these extension:

    1. https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-edge (if you have new chromium based edge, almost same as running chrome)
    2. https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome (if you have chrome)

    Click on run button on side bar (triangle with bug icon)
    create launch configuration, it will automatically create based on debugger extension you installed.
    "version": "0.2.0", "configurations": [{ "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:8080", "webRoot": "${workspaceFolder}" }, { "name": "Launch Edge", "request": "launch", "type": "pwa-msedge", "url": "http://localhost:4200", "webRoot": "${workspaceFolder}", "sourceMaps": true, "skipFiles": [ "${workspaceFolder}/node_modules/**/*.js", "${workspaceFolder}/node_modules/**/*.es6.js", "${workspaceFolder}/node_modules/", "<node_internals>/**/*.js", "${workspaceFolder}/lib/**/*.js", } ] }

    then run you web app as you usually do.
    select the debugger and then launch to open a debug session.

    In my configuration, I have chosed launch chrome/edge, you can choose attach. Also this is the config that I use for angular debugging.
    Arun Kumar
    @arunkumar413
    @Shiva7071007 But I have to watch and set breakpoints in the browser debug console.
    I want to set breakpoints and watch variables in the vscode.
    Is there a configuration for Firefox developer edition?
    Arun Kumar
    @arunkumar413

    @arunkumar413 for web app debugging, install any of these extension:

    1. https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-edge (if you have new chromium based edge, almost same as running chrome)
    2. https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome (if you have chrome)

    Click on run button on side bar (triangle with bug icon)
    create launch configuration, it will automatically create based on debugger extension you installed.
    "version": "0.2.0", "configurations": [{ "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:8080", "webRoot": "${workspaceFolder}" }, { "name": "Launch Edge", "request": "launch", "type": "pwa-msedge", "url": "http://localhost:4200", "webRoot": "${workspaceFolder}", "sourceMaps": true, "skipFiles": [ "${workspaceFolder}/node_modules/**/*.js", "${workspaceFolder}/node_modules/**/*.es6.js", "${workspaceFolder}/node_modules/", "<node_internals>/**/*.js", "${workspaceFolder}/lib/**/*.js", } ] }

    then run you web app as you usually do.
    select the debugger and then launch to open a debug session.

    Does this also debug the server side code?

    shivam kumar
    @Shiva7071007

    I want to set breakpoints and watch variables in the vscode.

    you can set debugging points in vscode only, you can watch also.
    and it will be in sync wih your browser.

    shivam kumar
    @Shiva7071007

    Does this also debug the server side code?

    do you mean, node/express ?
    Yes, but that you have to run server code in vscode also.
    https://code.visualstudio.com/docs/nodejs/nodejs-debugging

    MOHAMMED BOUICHA
    @mohammedbouicha
    hello everyone I have a problem in visual studio code on zoom in / out
    this software is displayed on the screen full and with the large characters
    help me
    Gers2017
    @Gers2017
    It's possible to install/uninstall an extension using the vscode API (from my own extension)?
    shivam kumar
    @Shiva7071007
    shivam kumar
    @Shiva7071007

    @Gers2017
    I don't think they provide an API (maybe), but you can have a look at code of this extension.
    https://github.com/webstp/extension-manager

    In this, the extension is reading a list, then downloading them and triggering install i.e. what one will do to manual download and install, extension code is doing for them.

    hmt
    @hmt
    is it possible to replace all error code (underlined) with a certain string?
    Gers2017
    @Gers2017
    @Shiva7071007 Thanks! I'll take a look then
    shivam kumar
    @Shiva7071007
    @hmt Can you provide us some sample or screenshots?
    hmt
    @hmt
    @Shiva7071007 solved it. Or rather worked around it
    @woodgear
    hi, guys. is there some way to start a debug by command?