• boonhet@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    Just gitignore that. Same for dot idea and whatever vscode adds, if anything

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      Use this so that the things you need to share do get shared.

      .idea/*
      !.idea/codeStyles
      !.idea/runConfigurations
      
      .vscode/*
      !.vscode/settings.json
      !.vscode/tasks.json
      !.vscode/launch.json
      !.vscode/extensions.json
      !.vscode/*.code-snippets
      

      Note: I haven’t checked the vs code ones in depth, the list might not be perfect.

      • kora@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 month ago

        I personally strongly advise against committing IDE junk to version control. Assuming your IDE workspace defaults are “sane” for the rest of the contributors is not a good practice.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        arrow-down
        1
        ·
        edit-2
        1 month ago

        .vscode doesn’t store cache or any trash like that, so if you’re including all settings, tasks, etc, you can probably just include everything.

        The only thing to keep in mind is to only add settings, extension recommendations, etc that apply to all your collaborators and aren’t just personal preferences. A few good examples are formatting rules, task definitions to run the project, and linting rules that can’t be defined somewhere else.

        • kora@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 month ago

          Linting rules and scripts should never live in an IDE-specific directory. I should not need to know your IDE configuration to run scripts and lint my files.

          I have yet to come across a language that requires configuration to be stored that way. All modern languages have separate configuration and metadata files for use cases you have defined.

          As for workspace defaults, whatever IDE configuration works for you is not guaranteed to work for others. Shoving extension suggestions down their throat each time IDE is booted should not be a part of your source code, as IDE extensions should not be needed to run your code.

      • boonhet@lemm.ee
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        1 month ago

        It’s not, but I still prefer not pushing my config on others, or others pushing theirs on me.