Hacker News new | comments | show | ask | jobs | submit login
Why I wrote 33 VSCode extensions and how I manage them (medium.com)
199 points by fabiospampinato 34 days ago | hide | past | web | favorite | 92 comments



As someone that has used VSCode, thank you for the work and effort you've put into this. Extension creators often don't get the thanks they deserve for the labor they put into these things that they're passionate about and also help lots of people.

Keep up the great work!


Thank you so much! If you want the authors of the tools you're using to feel more appreciated I can definitely tell you that every time somebody makes a nice review, or just says a few kind words, about a tool I've written it definitely improves my day :)


Agreed! So cool to see people maintaining tools that make life for the rest of us easier.


I agree as well. In a talk the creator of Asana said something along the lines of their goal is enabling others to do good and do so more effectively. Software is pretty amazing.


I love VSCode, but the plugin system is probably its weakest feature. Opening any new file type and VSCode will say "we have an extension for this file type!" and then open the sidebar with 200 extensions with random vote counts, and you have no idea which ones are good, official, supported, or even suit your needs. And the in-editor documentation pages, and plugin hosted web pages, reek of Microsoft. It needs a major change, maybe like separating plugins into official ones, full IDE extensions, and simple commands.


I am curious what you would prefer over this?

"200 extensions with random vote counts" is what you get when there is an engaged community. Would you rather MS told you which extensions they think you should use?


> Would you rather MS told you which extensions they think you should use?

Actually yes. Unopinionated systems leave me too much choice, and lead to a fragmented community.

One practical example are keyboard shortcuts. With VSCode I'm never too sure if I used the right ones, or if some plugin is messing with them... Where as for Jetbrains IDEs I'm certain that code formatting is Ctrl+Alt+L and I could tell other people that ask me.


Not sure why you were downvoted, but I mostly agree.

Most people don't want to fiddle with loads of plugins to fit their personal sensitivities.

Most people want simple and robust software that just works.


I'm curious what the alternative you'd suggest here is, then. The options I'm aware of mostly clump into a few options that I like even less:

Editors like emacs and vim where getting plugins installed involves just as much of a scattered forest of different options with varying levels of quality and support, only the installation process is more manual. Also Eclipse fits here.

IntelliJ or Visual Studio, which have great support for their primary languages, and plugin ecosystems that taper off very quickly (in terms of both quantity and quality) compared to vscode. Also, all your RAM are belong to us.

Single-language IDEs like PyCharm or Flash Builder.


There’s a format shortcut in VSCode. I’ve never had an extension mess with the shortcut and I install a bunch.


I prefer something like the SpaceEmacs layer system, where yes, the modules are written by the community, but then they're curated and tuned to actually work well together.


I thought that's what the official language extensions are.


> "we have an extension for this file type!"

There's a setting for disabling that, arguably these sort of annoyances should be easier to eliminate though.

IMHO the plugins per-se are one of VSCode's strengths, you can find plenty of high-quality ones, and the APIs are good enough that making your own is overall a pleasant experience. What sucks is the Marketplace [1]: 1. searching is basically broken 2. the downloads count, and therefor the ranking system, is skewed towards extensions publishing lots of updates.

[1] https://github.com/Microsoft/vscode/issues/42890


I think there is a preference setting

    "extensions.ignoreRecommendations": true
which will turn off these notifications. Thank you for prompting to do so. I often prefer to find and install extensions when I get the itch, rather than have a popup ask me.


I've had entirely the opposite experience. Have you ever tried to install a package in Sublime? You have to use a separate tool, Package Control, whose installation instructions are arcane:

  import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
And once it's installed interaction is limited to the textual omnimenu-thing, since Sublime's extension API is extremely limited. Package Control is awesome for what it is, but it's severely constrained by not being a first-class feature of the UI.

In VSCode, by contrast, there's a proper UI for extension installation that's part of the core product. Clicking on the extension brings up a full-viewport window with the README and quick links to the reviews and GitHub. I've had a lot of luck finding quality extensions by installing the official Microsoft extension, if one exists, or otherwise using number of downloads/reviews/GitHub activity as a rough proxy for quality.

JetBrains IDEs have a very similar extension installation experience to VSCode (i.e., good), but I've anecdotally found the available JetBrains extensions to be lower quality than their analogous VSCode extensions. For example, I _still_ can't find a good comment-wrapping plugin for JetBrains—everything I've tried has some weird deficiency, like not being able to wrap comments at a different column than the code width, or sometimes butchering surrounding code, etc.

I'll admit that the one frustration I have with VSCode is that there is no way, at least not that I've found, to export your entire configuration, both settings and plugins, and use that to bootstrap a new VSCode installation. I recently set up a new computer and spent the first few weeks rediscovering all the extensions I'd installed on my old computer.

I'm curious to know if there's an editor/IDE that you think has a far superior plugin experience than VSCode.


>I've had entirely the opposite experience. Have you ever tried to install a package in Sublime? You have to use a separate tool, Package Control, whose installation instructions are arcane:

Not since the last 5 years or so, where it's built-in to ST.


This has only officially been built-in since last year with ST3 which took an age to come out of beta.


I've been using ST3 for like 5 years (in beta) and it was just as stable as the "stable" release.

There was absolutely no reason to use ST3 for the past 3 years if you already used ST/ST2.

That was already the case for ST2, which was stable for years before it officially announced it was "stable".

Stable/unstable for STx are just labels, they don't actually reflect the state of stability. Plus all the real work (new plugins, etc) happened on the "beta" ST3 side for years...


> Have you ever tried to install a package in Sublime?

> You have to use a separate tool, Package Control, whose installation instructions are arcane:

It's been a long time since that command is not necessary anymore.

You just click an option in the menu and it installs “Package Control” by itself.

Here's the proof — https://i.imgur.com/edxKQ7T.png


> I'll admit that the one frustration I have with VSCode is that there is no way, at least not that I've found, to export your entire configuration, both settings and plugins, and use that to bootstrap a new VSCode installation. I recently set up a new computer and spent the first few weeks rediscovering all the extensions I'd installed on my old computer.

https://marketplace.visualstudio.com/items?itemName=Shan.cod...

I've used this with success, but in the end I found my settings / plugins are minimal so I don't bother with it now. I have like 4 settings and 5 plugins.


Have you ever tried to install a package in Sublime? [...] In VSCode, by contrast

It's probably not actually true but I've often felt the people working on the VSCode UI are guided by the core principle of 'it has to be less infuriating than Sublime'. They are very good at this.


> there is no way, at least not that I've found, to export your entire configuration, both settings and plugins, and use that to bootstrap a new VSCode installation

You can define workspace plugins in `.vscode/settings.json` and make extensions recommended for a project by putting them in `.vscode/extensions.json`. Hope this helps!


Just a heads up - there is an extension for syncing extensions. It's aptly named Settings Sync, and uses a Github gist to share a manifest of plugins and configuration. You can find it here: https://marketplace.visualstudio.com/items?itemName=Shan.cod...


Can you give me an example? I've only done .NET, HTML/CSS/JS, Vue, and go-lang, in VSCode, never had that happen.

I only have installed Beautify, C#, Go, Git History, Vetur.


Sure. Rename a file with a .old extension, and voila: VS Code reports it has an extension for that.


As a developer it is important to get to know your tools. You can disable the extension recommendations in your configuration:

- extensions.showRecommendationsOnlyOnDemand

- extensions.ignoreRecommendations


>reek of Microsoft.

What does this even mean?


I was wondering the same, the feature he is talking about is excellent and done better than any other editor or IDE I've used, but somehow I don't think that's what he means.


I love that feature. Yes you need to use some savvy about who to trust. But I have had no problems with the plugins I have chosen, usually 5 stars means it works pretty well.


If I’m being completely honest I just see 33 reasons why I still use JetBrains IDEs. Every single one of these features is baked in with the exception of the templates for directory creation which isn’t user configurable most of the time however in the few cases it isn’t baked in they also have a rich plugin ecosystem

Still worthy the money every time. I have to say though VS Code is still one of the best free editors you can get

None the less. Mad props! I think it’s great that they have a rich extension ecosystem


Some would argue VSCode can be lighter because these 33 things aren't baked in for those who don't want them.


You can disable most of the plugins in the jetbrain suite, too.


Also not being Electron apps they're probably more lightweight anyway despite the extra features.


>they're probably more lightweight anyway

Jetbrains IDEs and lightweight in the same sentence. Notepad++ and Sublime Text are lightweight, Jetbrains IDEs are not...


I literally laughed out loud sitting here at my desk. JetBrains IDEs are many things, but "lightweight" is not one of them. Electron does not have a monopoly on bloat.


But they are Java apps. I use IntelliJ daily (for Scala development) and I'm happy with it, but it doesn't feel lightweight or snappy.


IntelliJ IDEA is easily the worst performing application I use.

I only use it because of the top class Kotlin support (figures, given JetBrains created it).

I end up regularly toggling Power Save mode on and off to reduce how much my CPU gets blown up. That mode turns off code suggestion, auto-imports, and error detection among other pretty core things.


Practice has shown that it's easier to add things than to remove them.


It could have been if it was a real (native) app.


You have a way to auto-create changelogs in JetBrains?


If one uses a specification for defining changes, then you can easily generate changelogs regardless of IDE/editors.

e.g. https://www.conventionalcommits.org/en/v1.0.0-beta.2/ has implementations[1] that generate changelogs and bump package versions.

[1] - https://github.com/conventional-changelog/standard-version


I'd be very surprised if every single feature provided by those extensions is integrated in JetBrains to be honest, if it is I might have picked the wrong editor! I'll definitely look into that, thank you.


They really are, I know I may have exaggerated mildly perhaps as I know a couple of these features aren’t without a jetbrains plugin however I’d say 27 of them are for sure.


Do you know if there's a plugin for the 'bump' thing, as described in the article?


[flagged]


VSCode is not Open Source and is spyware too : https://code.visualstudio.com/License/.

It's only open source if you build it yourself from Github


Having it built in seems just as likely to be a "bad thing", since that version is "baked" in, there's no alternatives. That's why the extension approach by VS code is so surpreme. I'm sure JetBrains would love to have a similar ecosystem.


JetBrains definitely doesn't want a similar ecosystem and having things that work properly 100% of the time baked in is why people use the IDEs.


JetBrains IDEs have a fairly healthy extension ecosystem in my experience.


My problem with adding plugins or extending my environment much past the default is that eventually I have to deal with a co-workers non-extended default installation. I end up relying too much on the add-ins.


I used to have this feeling to an extent as well but I got over it. Because my coworkers are using a different editor altogether. Or a different operating system. Or a different keyboard. I can't write code productively on any other system than my own, so I just embrace that and optimize.


There's a fine line between optimize and overfit. It takes a lot of experience to differentiate the two.


Yes, like not buying a car with too many creature comforts because sometimes you have to borrow your wife's car and go without. Completely illogical.


i mean yeah, you'll survive if you have to drive a car without heated seats for a few days, but sometimes i wonder if i overuse the navigation feature in android auto. i'm left feeling a bit naked when i occasionally borrow my dad's car with no nav system.


Many extensions are just about you and the editor though. For instance I made an extension for finding "//TODO" comments, I don't really care if my coworkers instead do a basic search for "//TODO", use ripgrep, or whatever, I use that extension because it improves _my_ workflow.


so in other words you always just use notepad or nano or some editor with almost no features so that you'll never miss missing features ?


Despite the tone, I totally agree with you. I strongly dislike the reasoning that suggests you should hamstring yourself 100% of the time to accomodate a potential situation that may affect you 5% of the time.

“I don’t use multiple monitors because sometimes I’m just with a laptop”.

“I don’t customise my shell because sometimes I have to ssh to a server”

“I don’t customise my editor because sometimes I have to use a coworkers editor”.

Optimise for the 90%+ of time.


About 7 or 8 years ago I used to optimize for the 5%.

I remember thinking exactly what you wrote about customizing your shell. Back then I wouldn't even use aliases because "what if the server I'm on doesn't have it". Such a silly way of thinking but it made so much sense back then.

Now I have tons of customizations in the environment I spend 95% of my time and it's way better.


Well, I use IDE's these days, but I stick with the vanilla install. I shot myself in the foot with a highly customized Emacs environment a few times. But that's just me, I guess.


Is this assuming everyone else use vanilla nano or notepad?


My students next semester are going to each create a VS Code or Atom plug-in as their course project. I’ll definitely be showing them this!


what if they prefer ecmacs or vim or sublime or etc, they all have plugin ecosystems as well


Then it sounds like a great opportunity for self-learning.

One class can't teach everything. If people have preferences in their tooling, then that's a great opportunity to generalize the lessons they are taught about VS Code.


I actually enjoy digging through plugin code. I was using brackets for a while and found some minor bug where the git plugin wasn't hiding folders correctly. Raised a bug, then downloaded the code and dug through it for a while and figure out a way to fix it, got merged. Made me feel super happy.

https://github.com/brackets-userland/brackets-git/pull/1039

If people are wanting to contribute to OSS i highly recommend finding plugins in your favourite editor to contribute to.


I can’t teach them all.


But why force your students to use a specific tool?

How is this different to writing an Excel macro?


Is your argument really "why teach them to do something specific"?

Why teach C++? Some students might not prefer that to C#.

My problem at school was always "how do I apply this lesson to an actual problem?" Picking _something_ (anything!) to teach is great (to me), because canny students can go off and use the lesson to do _anything_ else.


> Why teach C++? Some students might not prefer that to C#.

Between these two there is very little to choose in terms of concepts the students would be exposed to. I would assume that teaching either of those would aim to teach the underlying concepts of object orientated programming.

The questions that need to be asked instead are: What concepts would building an editor plugin expose students too? And is this the best way to introduce those concepts? (NB I am assuming University level where contact time for taught material is only really enough to introduce concepts not to really go into details.)


Why teach C in University when students might prefer Python or Java? The specific implementation isn't important, it's the overarching concepts that matter.


I would argue that a programming course might want to teach all three of those. They are quite different languages which could be used to teach different underlying concepts (C for pointers and low level stuff (and maybe combined with some assembler), Java for object orientation and Python for dynamic typing).

Python vs PHP vs JavaScript would be another matter. I would say it doesn't matter so much which of those you teach. Same with e.g. Java vs C# vs C++.

The question remains why build an Atom plugin over an Excel macro? And what underlying concepts would you hope to teach students by doing this? And is this the best way to introduce those concepts?


You can learn a lot from using a specific tool. And hopefully transfer that knowledge to the tool you like.


I assume that the OP is teaching at University level. From experience I know that time is very limited in that environment. Everything done with the students should be well justified. Building an editor add on seems like something I would question strongly. What concepts is the OP aiming to introduce the students to? And is this the best way to introduce those concepts?


I want them to practice concepts behind designing, building, and evaluating usable dev tools. Not just reading about them. The course is a special topics on dev tools.


That's optional additional homework.


Very flattering, thank you!


Isn't that a step down from teaching people VBA macros?

I hope it isn't for a CS class. They should be learning principles rather than creating toy plug-ins which is something anyone can do for a hobby if they wanted.


Creating a plugin allows them to practice the principles that they learn in the course.


There is a vast amount of material to cover in a University course and very limited time to do so. There is only really time to introduce concepts if enough material is to be covered.


In my experience as a student (and as a prof), being taught concepts without an opportunity to apply them is virtually useless. The course is a special topics on dev tools.


Ignore what these negative commenters are saying. That's a perfectly good idea for a student project, and I would've loved to have a project like that in my university courses.

But I would agree that if someone uses something else like vim or emacs as their primary editor, they should have the option of writing a plugin for their editor of choice. (As long as they accept that the rest of the class will be taught how to write Atom/VS Code extensions and they'll have to do most of the learning on their own.)


I am coming from this from the angle of having done University level teaching. As an undergrad it seems like there is so much time and so much depth of material. When you are teaching a course you realise that there is actually very limited time and so much to cover. If you choose to dwell a long time on one topic you might well find you don't have time to expose your students to the full range of concepts that they need to be exposed to. In the UK for example you have 3-4 years to take students from finishing school to being ready to do research!


May I ask the degree field?


Computer science for upper-level undergrads or grads.


Really nice of him to spend time on OSS tools for VSCode. On the other hand, I feel like the IDEs lugins can do most of these things for me without plugins.

I feel less need to install plugins for their products. And the one plugin that I use in IntelliJ is something I wrote for fun and which doesn't help at all with development. (It shows a random XKCD comic each time I open a new project.)

But it's nice that there is a free IDE available with a rich ecosystem! As a student, I had to deal with Eclipse / Netbeans which seems to me to have been a worse experience than VSCode is these days.

EDIT: fixed some typos.


The flip side of this is that an editor that relies on plugins for many features is kind of forced to have good APIs, or plugins authors wouldn't/couldn't make those plugins.


That's a good side-effect indeed!

I found it quite easy for IntelliJ as well though. (At work we develop some in-house ones as well though they are for specific use cases).


So, you basically gamed the reputation system of the vscode marketplace having autocomits and autoupdates because any update counts as a download?


I'm just pointing at a problem, not exploiting it. I made a program for repeating my commits across repositories for being more productive, but those commits have a purpose, I'm not making them for the sake of it. Should I update my extensions once a year because the Marketplace is stupid?


This is awesome, great job!


Thank you!


great job! Moz :D


Thank you fellow AirMash player ;)


So happy to know I'm not the only one playing Airmash who isn't in high school!




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: