1. 46

Saw similar thread for emacs & vim and decided to open one for an editor I use daily to write code in, VS Code.

I use quite a few extensions mostly to write Go & TypeScript with Monokai Night theme and Vim mode.

What does your setup look like?

  1.  

  2. 7

    Aside from a number of settings that I’ve changed. I use the following extensions.

    Some settings changes:

    • Turn off Auto Closing Brackets, Auto Closing Quotes, Folding, Minimap
    • Add 80 column ruler
    • Convert tabs to space
    • Tab stop 2
    • Turn off tab preview
    • Font ‘Roboto Mono’ 18 pt
    • Turn off HotExit
    • Turn on “Insert Final Newline”
    • Turn on “Trim Trailing Whitespace”
    • Turn off “Enable Preview”
    • Zen mode: turn off “Center Layout”
    • Restore Windows: “none”
    • Terminal font: ’Anonymous Pro for Powerline” 16pt
    • Integrated shell: fish

    Theme:

    • Verdandi

    Language:

    • Pony Language Colorizer

    File type support:

    • Autohotkey
    • Docker

    Other:

    • Code Spell Checker
    • Live Share (all of them)
    • Remote * extensions (all of them- WSL, SSH, Containers)
    1. 4

      Nothing by deliberate choice, but I install the syntax highlighting plugins when prompted.

      That said, it’s obviously not my main editor/IDE - it’s my trusty fallback IDE for all my non-main languages at the time (since a few years). It’s good enough to just use it, and I say that as someone with quite a vimrc.

      1. 4

        Language-agnostic, I’ve got:

        • Code Spell Checker, which does what it sounds like;
        • Firefox Theme, which means that VS Code and Firefox’s dev tools look more-or-less identical. This has had positives and negatives, but I’ve mostly really appreciated it; and
        • GitLens, which is amazing at providing things like “what is the history of this function?” in a method so transparent I get addicted to it and almost am tempted away from Mercurial for personal projects.

        And language-specific, I’ve got:

        • Go, which is an IDE-quality plugin;
        • Python, which is, again, an IDE-quality plugin;
        • ESLint, which is, again, an IDE-quality plugin;
        • Beautify, which makes a one-click stop for cleaning up my JavaScript and TypeScript; and
        • Bazel, which is at best okay, but the main thing I work on is a Bazel project, so…yeah.
        1. 1

          I like code spell, but I can’t figure out how to make it ignore package names or stuff in comments or strings.

          1. 3

            I have a very low-tech solution of just very aggressively adding that kind of stuff to the workspace’s spell check dictionary. In general, it treats FooBarBaz as foo, bar, and baz, but there are exceptions that I neither understand nor care to find out, so I just add FooBarBaz and move on with my life.

            1. 1

              I do that for my solo projects but feel bad cluttering up team projects. It also bugs me that it seems like setting I just can’t figure out.

        2. 3

          Can anybody tell me how to disable the “preview tab” state, where you click on something once in the explorer (or more importantly open it with cmd-p), and it opens but in a “preview” tab that will be replaced? Or better yet, I’d like to promote “preview” tabs (I’m probably using the wrong term here) into real tabs once you’ve had it open and/or focused for a few minutes?

          1. 3

            I haven’t figured out how to disable, but I did learn double click opens for real. Now I use lame open on purpose for files I just want to preview.

            I wish the function was reversed.

            1. 8

              You can disable “preview” mode entirely with this setting:

              "workbench.editor.enablePreview": false
              

              …or just from Quick Open with this one:

              "workbench.editor.enablePreviewFromQuickOpen": false
              
            2. 2

              If you save the file (cmd+s) it will make the tab permanent. If I understand what you meant.

              1. 1

                That’s a useful trick I need to keep in mind, chur.

                1. 3

                  Saving works—there’s also a command to just keep the file open named “View: Keep Editor” (workbench.action.keepEditor). The default keyboard shortcut is ⌘K Enter.

              2. 1

                I’ve disables preview, it’s annoying (see other comments for details). As for “promoting” you can double click on the tab to do that.

              3. 3

                The vim mode in VSCode with the neovim backend is actually surprisingly good, the least awkward vi emulation I’ve found yet.

                1. 2

                  I’m now a fan of Ayu Adapta theme, combined with City Light Gray icons, yes, Vim mode.

                  1. 1

                    To give a bit of context as to where VS Code fits into my development workflow: I use Xcode for iOS development as using anything else feels masochistic, when I need to make quick edits to config files or scripts I use vi, and for basically everything else I use VS Code.

                    For my main use case of JavaScript, Ruby, and occasional Rust development, I have the following setup:

                    • Dracula Colour Theme - which I sometimes find a little garish, but provides good contrast and also supports every piece of software under the sun
                    • Material Icon Theme - which I’ve found makes it easier for me to quickly recognise file types compared to the built in icon theme
                    • Prettier - a very nice formatter for TS / JS / CSS / HTML and many other languages
                    • ESLint - my linter of choice for both vanilla JS and TypeScript projects
                    • Ruby - for integration with linters, slightly better syntax highlighting, and a few other small niceties
                    • Ruby Solargraph - very basic IDE integration for Ruby projects. It doesn’t work amazingly well, but static analysis of Ruby programs seems like a tough problem to solve.
                    • Rust (pls) - for powerful IDE style features when working on Rust projects, configure language-specific indentation preferences, and so on.

                    I’ve also made a few settings tweaks to hide the useless “Open Editors” sidebar section,

                    1. 1

                      You can find my VSCode Setup here and here is my settings-file.

                      1. 1

                        I use vscode a lot, mostly for typescript/css/html, but sometimes for C# too (though I still mostly use real VS for that).

                        Theme: Dark+

                        Config changes:

                        "workbench.editor.enablePreview": false,
                        "editor.minimap.enabled": false,
                        "files.trimTrailingWhitespace": true,
                        "tslint.alwaysShowRuleFailuresAsWarnings": true,
                        "editor.codeActionsOnSave": {
                            "source.fixAll.tslint": true
                        },
                        "html.autoClosingTags": false,
                        "zenMode.hideTabs": false,
                        "search.location": "panel",
                        "search.smartCase": true,
                        "workbench.panel.defaultLocation": "right",
                        "files.autoSave": "off",
                        "terminal.integrated.shell.windows": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                        

                        Plugins:

                        • vim
                        • visual studio keybindings
                        • tslint
                        • gitlens
                        • angular language services
                        • c#
                        • c# extensons
                        1. 1

                          Just curious: What makes you open VS rather than VS Code? I use Rider on MacOS because the R#-like functionality gives me a great productivity boost.

                          1. 2

                            We use some third party tools that only have VS plugins. Unit testing support for .NET Framework (as opposed to .NET Core) seems sketchy in VS Code, too. Plus, if I’m completely honest, VS is just better at a lot of things like large scale refactoring.

                            Once we switch to Core, I think the delta will narrow and VSCode may be a viable full time option.

                        2. 1

                          Not sure where mine fits in the scheme of typical VS Code customisation but it works well for me.

                          1. 1

                            Typical Rust + JS setup I’d guess ?

                            • Ansible
                            • Better Jinja
                            • crates
                            • IntelliJ IDEA Keybindings
                            • Rust (rls)
                            • SQLTools
                            • TOML Language Support
                            1. 1

                              I found this thread pretty useful with encouraging me to finally see if I could disable a lot of my bugbears with Code, in particular preview.

                              A useful setting if you’re on a retina / high-DPI screen:

                              "workbench.fontAliasing": "auto"

                              or indeed:

                              "workbench.fontAliasing": "antialiased"

                              1. 1

                                “Broken” would be the one word to describe my setup. I keep getting “extension host terminated unexpectedly” :|

                                1. 1

                                  I have all my vscode config in source control:

                                  Settings, keybindings, snippets:
                                  https://github.com/kbd/setup/tree/master/HOME/Library/Application%20Support/Code/User

                                  Extensions:
                                  https://github.com/kbd/setup/blob/master/conf/vscode.txt

                                  I use the “Spacegray Eighties Dark” theme with some color customizations (comments should be highly visible; bright green, not dull gray!) and Fantasque Sans Mono for my font (highly recommended).

                                  Notable extensions include GitLens, Peacock, Rewrap, Dash (to integrate with https://kapeli.com/dash, which is awesome), Bracket Pair Colorizer 2, and Bookmarks, plus a bunch of language-specific extensions, like Python, Go, Prettier, etc.

                                  1. 1

                                    I use Chromodynamics theme together with VSCode Great Icons. And from functional side besides various language extensions, I often use(in order of usage/usefulness): Code Spell Checker, GitLens, Ungit, Todo Tree and hexdump

                                    Keybindings mostly vanilla, besides a few which were used by my desktop environment.

                                    1. 1

                                      I don’t use many extensions, mostly because everything I want is already built-in! The three extensions I have installed:

                                      1. One Dark Pro - by far my favorite syntax theme. I use it everywhere.
                                      2. Prettier - I do a lot of JavaScript development, so having Prettier an “Format on Save” enabled is a delight.
                                      3. vscode-icons - I find that the icons in this extension are super helpful when distinguishing between different folders.
                                      1. 1

                                        Solarized Light/Railgun, VsCodeVim (without the neovim stuff), language support for JS/C#/OCaml. I don’t like VsCodeVim a lot, but the only other vim emulation extension that’s in a decent enough state is amVim and that also has its fair share of annoyances and bugs. I started writing one myself in OCaml with BuckleScript… but you know how these things go.