My Top 5 VSCode Extensions for React and NextJS!

Josh tried coding
26 Nov 202215:01

Summary

TLDRIn this informative video, the presenter shares their top five Visual Studio Code (VS Code) extensions that enhance their coding experience. They discuss GitHub Copilot for AI-assisted coding, Import Cost to manage dependencies, Prettier for code formatting, Prisma for database file syntax highlighting, and Tailwind CSS Intellisense for streamlined CSS development. Additionally, they mention an XML extension for formatting XML files as a bonus. The video emphasizes the value of these extensions in boosting productivity without necessarily improving code quality.

Takeaways

  • πŸ˜€ The presenter uses five main extensions in VS Code regularly and will discuss an additional bonus extension.
  • πŸ” The first extension highlighted is GitHub Copilot, which offers code completion but requires a subscription or student access for full use.
  • πŸ’° GitHub Copilot can be obtained for free by students, and it providesζ™Ίθƒ½εŒ– code suggestions to enhance coding efficiency.
  • πŸ“š Import Cost is the second extension, which helps in managing the size of imports in a project to reduce client-side footprint.
  • 🌟 Import Cost also has a shortcut that reorders and cleans up imports, categorizing external and local imports for better organization.
  • πŸ“ The third extension, Prettier, is widely known for code formatting, offering customizable settings and the ability to format on save.
  • πŸ“‘ Prettier can be configured project-wide using a .prettierrc file to ensure consistent code styling across a development team.
  • 🌐 The fourth extension is Prisma, which provides syntax highlighting and auto-completion specifically for Prisma database files.
  • 🎨 Tailwind CSS Intellisense is the fifth extension, which is essential for developers using Tailwind CSS, offering real-time CSS previews and class explanations.
  • πŸ”§ The bonus extension, XML, is useful for formatting XML files, such as SVGs, when the default formatting options are insufficient.
  • πŸ›  Extensions are supplementary tools that can help write code faster, but they do not inherently improve code quality.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is discussing the top five extensions the speaker uses in Visual Studio Code (VS Code) and one bonus extension.

  • How many extensions does the speaker regularly use according to the video?

    -The speaker regularly uses five extensions, with an additional bonus extension mentioned.

  • What is GitHub Copilot and why is it mentioned in the video?

    -GitHub Copilot is an AI-powered code completion tool that integrates with VS Code. It is mentioned because it is one of the top extensions the speaker uses.

  • Is GitHub Copilot free or does it require a subscription?

    -GitHub Copilot is not free; it requires a subscription. However, students can get it for free, and the speaker has obtained it for free through their student status.

  • What does the Import Cost extension do?

    -The Import Cost extension helps in identifying the 'cost' or size of imports in a project, which can help in optimizing the client-side footprint by avoiding heavy dependencies.

  • What is Prettier and how does it help in coding?

    -Prettier is a code formatter that automatically formats code according to the user's preferences. It helps in maintaining consistent code formatting across a project.

  • What is the purpose of a .prettierrc configuration file?

    -A .prettierrc configuration file is used to set Prettier's formatting rules for a project. It ensures that all developers working on the project follow the same code formatting standards.

  • What does the Prisma extension provide for Prisma files?

    -The Prisma extension provides syntax highlighting and auto-completion for Prisma files, which are used for database schema and queries in various databases.

  • What is the Tailwind CSS Intellisense extension and how does it assist developers?

    -The Tailwind CSS Intellisense extension provides real-time feedback and suggestions when working with Tailwind CSS classes, making it easier to understand and write Tailwind CSS code.

  • What is the XML extension mentioned in the video and what does it do?

    -The XML extension mentioned in the video is used for formatting XML files, such as SVG files, in VS Code. It ensures that the code is well-structured and readable.

  • What is the speaker's opinion on the usefulness of extensions in coding?

    -The speaker believes that extensions are supplements that do not make one write better code, but they can help in writing code faster.

Outlines

00:00

πŸ€– GitHub Copilot: AI-Powered Coding Companion

The video introduces GitHub Copilot, an AI extension for VS Code that assists in writing code. It offers code completion and pattern-based suggestions, which can be particularly useful for students who can access it for free. Despite occasional imperfections in its suggestions, it's a valuable tool for enhancing coding efficiency, especially in TypeScript projects.

05:02

πŸ“¦ Import Cost: Visual Dependency Management

The script discusses Import Cost, an extension that helps visualize the 'cost' or impact of importing different packages in a project. It aids in understanding the weight added to the client-side footprint, which is crucial for performance optimization. The extension also facilitates better organization of imports and can be a helpful tool for developers looking to streamline their codebase.

10:04

🌟 Prettier: Code Formatting Made Easy

The video highlights Prettier, a widely-used VS Code extension for code formatting. It formats code consistently, which is beneficial for teams to maintain a uniform code style. The extension can be customized with a .prettierrc configuration file, ensuring that all developers adhere to the same formatting rules, thus improving code readability and collaboration.

πŸ” Prisma: Enhancing Database Code Experience

The script covers the Prisma extension, which provides syntax highlighting and auto-completion for Prisma files used in database interactions. This tool is particularly useful for developers working with various databases like SQL, MongoDB, and others, as it simplifies the coding process and improves the readability of database-related code.

🌈 Tailwind CSS Intellisense: A Designer's Best Friend

The video features Tailwind CSS Intellisense, an extension that offers real-time insights into the CSS effects of Tailwind classes. It's an essential tool for developers using Tailwind CSS, as it helps understand and write better CSS by providing hover-over details of what each class does, enhancing productivity and consistency in styling.

🎨 XML: A Niche Tool for SVG and XML Formatting

As a bonus, the video mentions the XML extension, which is beneficial for developers working with SVG files. It provides formatting capabilities for XML files, which can be crucial for maintaining clean and organized code. Although it's not frequently used, it's a handy addition for those needing to format XML or SVG code within VS Code.

Mindmap

Keywords

πŸ’‘VS Code Extensions

VS Code Extensions are additional software components that enhance the functionality of the Visual Studio Code editor. They are integral to the video's theme, as the script discusses the presenter's top picks for improving coding efficiency and experience. Examples from the script include GitHub Copilot, Import Cost, Prettier, Prisma, and Tailwind CSS Intellisense.

πŸ’‘GitHub Copilot

GitHub Copilot is an AI-powered extension for VS Code that assists in writing code by providing code completion suggestions. It is highlighted in the video as a valuable tool for developers, especially students who can access it for free. The script demonstrates its use in generating function code based on user input.

πŸ’‘Import Cost

Import Cost is an extension that helps developers understand the impact of importing different modules on their project's bundle size. It is relevant to the video's theme of optimizing code, as it helps in identifying heavy dependencies that could increase client-side footprint, as shown when the presenter discusses the 'unstable_get_service_session' import.

πŸ’‘Prettier

Prettier is a code formatter extension for VS Code that standardizes code style. It is a central concept in the video, emphasizing code consistency and readability. The script illustrates Prettier's functionality in formatting code with a hotkey press and mentions the possibility of configuring it project-wide through a 'prettier.config.js' file.

πŸ’‘Prisma

Prisma is an extension that provides syntax highlighting and auto-completion for Prisma schema files used in database operations. It is mentioned in the context of working with databases like SQL, MongoDB, and others. The video script shows how it can assist in writing and understanding Prisma files more efficiently.

πŸ’‘Tailwind CSS Intellisense

Tailwind CSS Intellisense is an extension that offers real-time feedback and suggestions when writing Tailwind CSS classes. It is connected to the video's theme of enhancing coding productivity, especially for those using the Tailwind CSS framework. The script demonstrates its utility in displaying the underlying CSS for shorthand classes.

πŸ’‘XML Extension

The XML extension for VS Code is a bonus tool mentioned in the script, which provides formatting capabilities for XML files, including SVGs. Although not frequently used by the presenter, it is highlighted as a helpful tool for improving the layout of XML-based files when needed.

πŸ’‘Syntax Highlighting

Syntax highlighting is a feature that displays source code in different colors and fonts according to the role of the constructs in the language being programmed. It is a key aspect of the video, as it is provided by several extensions discussed, such as Prisma and the XML extension, to improve code readability.

πŸ’‘Code Formatting

Code formatting refers to the arrangement and layout of code to improve its readability and consistency. The video script discusses the importance of code formatting with extensions like Prettier and the XML extension, showing how they can automatically format code with a hotkey press.

πŸ’‘Auto-Completion

Auto-completion is a feature that predicts and suggests the rest of the line of code as it is being typed. It is a core concept in the video, particularly showcased by GitHub Copilot, which can write code based on user-provided comments and patterns.

πŸ’‘Tailwind CSS

Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces. The video script discusses the use of Tailwind CSS Intellisense for developers who utilize this framework, emphasizing its role in enhancing productivity and understanding of Tailwind CSS classes.

Highlights

Introduction of the video discussing the top five VS Code extensions used by the speaker.

Mention of a bonus extension that is rarely used but still included in the video.

GitHub Copilot extension for AI-assisted coding, including its cost and availability for students.

Demonstration of GitHub Copilot's code completion capabilities in TypeScript.

The occasional repetitive suggestions from GitHub Copilot and its limitations.

Import Cost extension to visualize the impact of imports on the application's footprint.

Import Cost's feature to automatically organize and optimize imports in a project.

Live Server extension mentioned but not detailed as it's not used by the speaker.

Prettier extension for code formatting with customizable settings and team consistency.

Prisma extension for syntax highlighting and auto-completion in Prisma database files.

Tailwind CSS Intellisense extension for working with Tailwind CSS classes and utilities.

XML extension for formatting XML files, such as SVGs, within VS Code.

The practical use of extensions to write faster code rather than necessarily better code.

The speaker's personal experience and preference for using these extensions in their workflow.

Invitation for viewers to try these extensions and see the impact on their own coding experience.

Closing remarks and sign-off for the video.

Transcripts

play00:00

hey guys nice to have you in this video

play00:02

I want to talk about which five

play00:03

extensions I use in vs code and I didn't

play00:06

just make the number five up because I

play00:08

realized I actually just use five

play00:10

extensions regularly and then I'll add

play00:13

one bonus one on top on this video

play00:15

um well it's kind of a euphemism to call

play00:17

it bonus because really it's one I

play00:19

rarely use but I still want to include

play00:21

it in this video okay here we are and

play00:23

let me show you these Snippets I'm using

play00:25

we're gonna go to extensions and now you

play00:28

can see there are more than five

play00:30

certainly but I don't know what this is

play00:32

I don't use this one I used to use this

play00:35

one when I started with react but the

play00:37

first one I want to show you is GitHub

play00:39

co-pilot and now chances are you

play00:41

probably know that let's go over here

play00:44

let's type in GitHub called pilot really

play00:49

really good stuff now GitHub corporate

play00:51

does cost money so you can install the

play00:54

extension for free but um if you don't

play00:57

have a subscription as you can see right

play00:58

here there is a subscription required

play01:00

you won't be able to actually use it and

play01:03

the subscription either does cost money

play01:05

or if you are a student you can um also

play01:09

get GitHub corporated for free and

play01:11

that's what I did because I'm studying

play01:13

in that case you can actually get a

play01:15

GitHub co-pilot completely for free and

play01:18

as you can see right here in the bottom

play01:19

it's an icon that appears when you have

play01:22

GitHub co-pilot and when you got it

play01:24

installed and the subscription running

play01:27

you can like enable it globally and then

play01:29

go into any file

play01:31

so let's go for example into the nav bar

play01:33

and um let me close this down a bit and

play01:37

here we can say you know cons at dates

play01:40

and then we can have a function and

play01:43

pretty much let GitHub co-pilot

play01:45

um write code for us so if you've never

play01:47

used it essentially you can do

play01:50

um it does code completion so if you

play01:53

comment something

play01:54

and say function to add to string or to

play02:00

concatenate two strings and then press

play02:03

enter

play02:04

um it already knows what to do so you

play02:06

get the parameters it can see okay we're

play02:09

working in typescript so it will

play02:11

automatically generate the code and

play02:13

especially when it comes to you know um

play02:15

the pattern finding and then completing

play02:18

code based on patterns GitHub co-pilot

play02:21

really shines so sometimes the the

play02:24

output is really bad sometimes it's you

play02:26

know repetitive so for example it will

play02:29

suggest the line

play02:31

um you know const hello is equal to just

play02:35

an example and then when you press enter

play02:37

it will suggest the same line again and

play02:40

again and again so sometimes the model

play02:42

does not work perfectly but GitHub

play02:44

co-pilot can be really useful especially

play02:46

if you can get it for free as a student

play02:48

and that is my first extension now

play02:51

number two

play02:52

is import cost and what import cost does

play02:55

is pretty much what it says on the can

play02:58

right when you import something and we

play03:00

can go into a different project for that

play03:02

let's go into one huge file that has a

play03:06

lot of imports um so it is in this

play03:10

project right here which is the

play03:13

project we've been developing together

play03:15

the startup

play03:16

and and here we can go to I think it's

play03:19

a source document and then we can go to

play03:25

okay here it is so as you can see there

play03:28

are a lot of imports in here and what

play03:32

the

play03:33

um import cost does as you can see right

play03:35

here you can see how like like how

play03:37

expensive an import is so for example

play03:39

the unstable get service session right

play03:41

here that we import from next auth would

play03:43

be really heavy like a heavy dependency

play03:45

that you know adds a lot of weight to

play03:48

the footprint on the client which is

play03:50

generally what we really want to avoid

play03:52

now one cool thing you can also know

play03:54

this is let's say for example we put

play03:57

this down here and then when you press

play04:00

um control no shift alt and O pay

play04:03

attention to what happens to the super

play04:05

Json import right here so the green

play04:07

green thing when I press that shortcut

play04:09

as you can see the Imports that come

play04:12

from outside will get automatically

play04:14

moved to the top so I can move them all

play04:17

down here and let's say we want that one

play04:20

down here so it's kind of like not in

play04:23

order but when we press shift alt and

play04:25

all or the unused exports get deleted

play04:28

automatically and then all the um like

play04:31

exports from outside from you know

play04:33

packages that we installed npm packages

play04:35

will be listed on top with their cost

play04:38

Associated and then below that will be

play04:41

all the local Imports that you have in

play04:43

your project so

play04:45

um cool extension

play04:47

um sometimes useful sometimes not that

play04:49

useful honestly mostly not that useful

play04:51

but it can it can help you save some

play04:54

footprint on a client side and it's just

play04:56

interesting to see um how expensive

play04:58

certain packages are because for some I

play05:02

really wouldn't have expected that they

play05:03

are that expensive and yeah that's why I

play05:06

use it cool package number two on my

play05:07

list then live server I don't use that

play05:10

then prettier and I think honestly

play05:13

everybody knows what prettier is it's

play05:16

essentially just a you know when you

play05:18

press um control F so let's go into a

play05:21

different project again let's go into

play05:23

this one the business card application

play05:26

we've done a couple days ago

play05:28

and in here

play05:30

we can use prettier so imagine the code

play05:34

was like weirdly spaced out

play05:38

um like that and then we press the

play05:40

prettier hotkey and then as you can see

play05:42

well it doesn't work right here because

play05:44

it is a string so that we we don't

play05:46

expect that to work but essentially what

play05:49

Purdue does is it formats your code um

play05:51

however you want it so you know we can

play05:54

just format it very weirdly okay that

play05:57

that wouldn't work but you can just do

play06:00

some weird stuff with it and whenever

play06:01

you press the hotkey that you can also

play06:04

have on Save By the way and then it

play06:07

automatically formats your code now if

play06:09

you go into vs code and type in prettier

play06:11

you can also have some

play06:14

um you know controls on what what you

play06:16

want uh your local prettier to do and

play06:19

while it's local I'm gonna get to in a

play06:21

second but you can you know have just a

play06:24

lot of options you can fit code within

play06:27

this line limit so if I were to say like

play06:29

200 and then press Ctrl F then it might

play06:32

just move some stuff to one line which

play06:35

you know wouldn't really be readable but

play06:37

you get the point so you can just have

play06:39

your local prettier set these settings

play06:42

now because pretty is such a useful

play06:45

extension and because many Dev teams

play06:48

also use it together there is a

play06:50

possibility to define a

play06:55

prettier.config.js for example in your

play06:57

application and I've prepared something

play06:59

right here it's a a pretty configuration

play07:02

file and then here you can have like a

play07:04

Json if you define this as a Json file

play07:07

but we Define it as Js

play07:10

so for example we can copy the prettier

play07:13

config and then paste it in here and as

play07:15

you can see I already formatted it with

play07:18

um prettier and what this file does is

play07:20

it overwrites your local settings that

play07:23

I've just shown you that you can go to

play07:25

add file then preferences and then

play07:28

settings and then type in print here

play07:31

essentially it overwrites these local

play07:33

settings so every developer working in

play07:36

this project gets their prettier

play07:38

information from this file and so the

play07:40

whole project will have one consistent

play07:42

formatting which I think is a really

play07:44

great idea because if everybody held

play07:46

like had a different prettier settings

play07:49

then it would look kind of better than

play07:52

not having any formatting at all but you

play07:54

get the point right if every developer

play07:56

has the same prettier file and to work

play07:58

with the whole project will just be

play08:00

consistent which is great so prettier

play08:03

definitely definitely up there really

play08:05

really good extension and then there are

play08:07

two more I want to talk about one is

play08:09

Prisma and Prisma is a very very simple

play08:12

extension but it essentially provides

play08:15

syntax highlighting for Prisma files now

play08:18

if you've never worked with Prisma files

play08:20

they are database files so if you're

play08:22

working with an SQL like right here or

play08:26

with a cargo hdb mongodb postgresql

play08:30

sqlite even and if you're working with

play08:33

any of those you might have a Prisma

play08:35

file and essentially if you want syntax

play08:38

highlighting this is just the extension

play08:40

that does it for you it does formatting

play08:43

it does some Auto completion

play08:45

so as you can wait no that's GitHub

play08:49

co-pilot but sometimes it provides

play08:51

really handy completion for example if

play08:53

you were to type add ID and then add

play08:55

default and then here you can say you

play08:58

know this completion right here for

play09:00

example comes from this Prisma extension

play09:04

really useful if you're working with

play09:06

databases now the last one and then

play09:09

maybe one bonus one the XML but it's a

play09:11

very simple one the last one is tail1

play09:13

CSS intellisense great extension if

play09:17

you're working with Tailwind really good

play09:19

one so let me show you what it does if

play09:21

you go to an index page so any file that

play09:24

we are working with tailwind and

play09:26

honestly I am only working with Tailwind

play09:28

I am not doing that to myself having to

play09:31

code out regular CSS anymore no more my

play09:34

friends no more

play09:36

um I I always tend to use Tailwind

play09:38

and essentially what the intellisense

play09:40

does is what you can see right here so

play09:42

for example uh wait wait I can't zoom in

play09:45

there we go

play09:46

um if you type for example BG black 10

play09:48

then you can see there's a

play09:51

um you know the black color field so it

play09:53

represents the color you've just typed

play09:54

out and if you hover over certain stuff

play09:57

as you can see right now it's loading

play09:59

but normally

play10:01

when it when it's not loading so I don't

play10:03

know what my vs code is doing right now

play10:05

takes a lot to load

play10:07

um there we go and if you hover over

play10:10

them now you can see what they actually

play10:12

do so if I were to remove this

play10:15

um or disable

play10:17

right okay we have to reload I think so

play10:20

let's read out the application

play10:22

and go back into business card and then

play10:24

go into the exact same file and then

play10:26

let's hover over the stuff so as you can

play10:28

see I'm hovering over this stuff right

play10:30

now but it's not showing us any

play10:31

intellisense so it's not showing us what

play10:34

this rounded full actually means right

play10:36

because this is essentially just a

play10:39

shorthand for some CSS so when we're

play10:42

saying round it full behind the scenes

play10:44

some CSS is being applied and with the

play10:47

extension that I've just shown you

play10:49

um whatever CSS is

play10:52

um you know the same thing as round at

play10:53

full will be shown to you and then also

play10:55

like the colors will be displayed

play10:58

um so if you're working with Tailwind

play11:00

Tailwind CSS intellisense

play11:02

um like it's kind of a must-have add-on

play11:04

I feel like

play11:05

um so for example right now we can hover

play11:08

over a rounded full and as you can see

play11:11

you can see exactly what it does in CSS

play11:13

right it applies a border radius of

play11:16

999 pixels you can see the colors you're

play11:19

using

play11:20

M right here and I think they are even

play11:24

adjusting yeah it's a very subtle change

play11:27

but I hope you can see it so for example

play11:29

if we have 10 transparency the black is

play11:32

not as dark as when we go to for example

play11:34

50 and the cool thing is whenever you

play11:36

are inspecting code that comes from a

play11:38

code base that you didn't right that is

play11:40

written with tailwind and you don't know

play11:42

what a class does you can literally just

play11:43

hover over it and see what CSS exactly

play11:46

it displays right so if we were to hover

play11:49

over grid calls too we can see okay it's

play11:51

a grid template columns that we repeat

play11:54

two times with the min max of zero and

play11:56

one fraction so that's pretty cool you

play11:58

can just hover over the stuff and get a

play12:00

way better understanding of how other

play12:02

people write Tailwind CSS and how you

play12:05

can write better code yourself okay and

play12:07

the last extension I want to show you

play12:09

those were my top five by the way the

play12:11

last one is kind of a bonus but it's

play12:13

also kind of ass so you you rarely need

play12:15

it to be honest but if you're working

play12:17

with SVG files then I found this XML to

play12:20

be useful I'm not sure if we have an SVG

play12:23

file in here no we don't but I if I go

play12:27

into

play12:28

for example the word for front end we

play12:31

definitely have SVG files in here um so

play12:34

let's go in here and as you can see with

play12:36

the extension we have the XML one we can

play12:40

see the code and also prettier Works in

play12:42

here and if I uninstall or disable the

play12:46

extension let me show you what happens

play12:48

okay it says reload required so let's

play12:50

restart the vs code

play12:53

go back into the

play12:55

um SVG files and as you can see right

play12:57

now

play12:58

um there is no formatter for XML files

play13:01

installed so if the layout was really

play13:03

bad as it often is when you for example

play13:05

copy svgs from the web the layout will

play13:08

be really bad sometimes and so right now

play13:10

we have no way to format this if we

play13:13

press the pretty hotkey nothing happens

play13:15

and that is where the

play13:18

that is pretty much the only case where

play13:20

the XML

play13:22

extension comes in clutch so we can

play13:24

disable that and then if we press the

play13:26

same hotkey we use for prettier you can

play13:28

see the formatting actually worked so

play13:31

that's what it does the syntax

play13:33

highlighting is not done by the

play13:36

um not by the extension unlike the

play13:39

Prisma one for example and this one

play13:41

actually does syntax highlighting this

play13:42

one doesn't this one is just for the you

play13:45

know formatting of XML so for example

play13:48

HTML or svgs and that's pretty much the

play13:51

only use case I've ever found it useful

play13:53

and yeah that's pretty much it those are

play13:55

the M5 main extensions I use GitHub

play13:59

co-pilot if you can get it somehow you

play14:01

know it is paid or if you're a student

play14:03

you can get it for free really useful

play14:05

One Import cost then prettier one of the

play14:09

best extensions no questions asked like

play14:12

26 million installs just speaks for

play14:14

themselves then Prisma can be useful if

play14:17

you're working in Prisma files but it is

play14:19

quite specific I agree

play14:21

um business intellisense really useful

play14:23

if you're working with Taiwan CSS and

play14:26

then if you're working with XML and the

play14:28

and and sometimes need some code

play14:31

formatting in those files you can use

play14:33

the XML but this is just a bonus that I

play14:35

rarely use so I want to concentrate on

play14:38

the other five that's pretty much all

play14:39

remember guys extensions are just uh

play14:42

supplements pretty much you don't write

play14:44

better code but you can write faster

play14:45

code with them and I think with that

play14:47

said

play14:48

um this was all I wanted to share with

play14:50

you thank you very much for watching I

play14:53

wish you a lot of fun working with those

play14:55

extensions yourself if you decide to do

play14:57

that I'll see you in the next video have

play14:59

a good one and bye bye

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
VS CodeGitHub CopilotImport CostPrettierCode FormattingTailwind CSSIntellisensePrismaSVG FilesCoding Tools