VS Code: Folder contains emphasized items issue [Solved]

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
3 min

banner

# VS Code: Folder contains emphasized items issue [Solved]

The issue where a folder contains emphasized items in VS Code occurs for multiple reasons:

  • Having a glitched VS Code window (you have to restart it).
  • Having changes that you haven't committed to git.
  • Having deleted or moved files opened in a tab.

folder contains emphasized items

The color of the dot near the folder name is important. For example:

  • the dot is red when a file in the folder contains an error.
  • the dot is yellow when a file in the folder contains a warning.
  • the dot is green or brown when a file in the folder contains uncommitted changes.

The first thing you should try to resolve the issue is to reload your VS Code window:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux
  • Command + Shift + P on macOS
Note: you can also press F1 to open the Command Palette.
  1. Type reload window and select Developer: Reload Window.

reload vscode window

# Try to commit your changes

If the issue persists, you might have uncommitted changes in your git repository.

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type toggle terminal and select View: Toggle Terminal.

vscode open terminal

  1. Run the following commands to commit your changes.
shell
git add . git commit -m "YOUR COMMIT MESSAGE"

folder contains emphasized items

# Disabling Git in your project

If you just want to get rid of the emphasized items warning and don't want to track your files using git, you can disable the git integration in VS Code.

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type git enabled, look for the Git: Enabled setting and uncheck the checkbox.

disable git

Here is a short clip that shows how to disable the setting.

disable git integration

# Close tabs of deleted or moved files

Another thing that might help is to close the tabs of deleted or moved files.

Sometimes VS Code glitches when you delete or move a file and still have the tab open.

It still shows errors and warnings for the deleted or moved files in Explorer.

If the issue persists, try to restart VS Code again.

Completely close the Window by clicking on the X icon in the top right corner and reopen your project by issuing the code . command from your terminal.

shell
code .

# Try to view the issues that cause the warning

If the issue persists, try to view the issues that cause the warning.

You can toggle the Problems tab by pressing:

  • on Windows and Linux: Ctrl + Shift + M
  • on macOS: Cmd + Shift + M

focus problems tab

You can also:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type toggle problems and select View: Toggle Problems.

view toggle problems

If you see any warnings or errors in the tab, correct them, save the file and restart VS Code.

Closing VS Code completely and reopening a new window often solves the issue.

# Conclusion

To solve the "folder contains emphasized items" in VS Code error:

  • Try to reload your VS Code Window.
  • Make sure to commit your changes to git.
  • Close tabs of any deleted or moved files.

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.