Code Monkey home page Code Monkey logo

edk2-vscode's Introduction

edk2-vscode

edk2-vscode is a plugin of vscode for supporting edk2 files association.

Syntax Highlight

  • DEC/DSC/FDF/INF/UNI/VFR

Definition Hotkey (F12)

Extension Functions
FDF File definition hotkey
DSC File definition hotkey
DEC File definition hotkey
INF Function/File/Guid/Pcd definition hoteky
VFR STRING_TOKEN/Header definition hotkey

Comment Toggling (Ctrl+/)

  • DEC/DSC/FDF/INF/UNI/VFR

Code Outline

  • DEC/DSC/INF/FDF

Snippet

Name Alias
DEBUG DEBUG / debug / Debug / CTRL+F1 (Prefix Customization Support)
ERROR EFI_ERROR / error
NONE ERROR !EFI_ERROR / !error
ASSERT ASSERT / assert

Build

Functions How
Build dsc Right click on dsc file in explorer/editor
Go to build Right click on inf file in explorer/editor
Settings File > Preferences > Settings > Extensions > Edk2 Build Setting

Known Issue

  1. Trigger git blame for each line with gitlens plugin. Suggest to disable two functions in gitlens "gitlens.codeLens.authors.enabled": false and "gitlens.codeLens.recentChange.enabled": false'
GNU GENERAL PUBLIC LICENSE
Copyright (C) 2019-2023  WalonLi

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

edk2-vscode's People

Contributors

johnazoidberg avatar makubacki avatar viviannk avatar walonli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edk2-vscode's Issues

`.fdf.inc` and `.dsc.inc` should be highlighted like `.fdf` and `.dsc`, respectively

Hi - .fdf.inc and .dsc.inc are standards for include files in the same format as .fdf and .dsc, repsectively, in the EDK-II repo, but these files are not currently highlighted in the same way as .fdf and .dsc, respectively. I believe it would be helpful if they were.

E.g. in NetworkPkg (but also multiple other places) we have:

Screenshot 2023-07-08 at 08 08 37

 

And here is one .fdf.inc file with current .inc highlighting, and what it would ideally look like with .fdf highlighting (just achieved by a temporary rename, here):

Screenshot 2023-07-08 at 08 08 47

 

Screenshot 2023-07-08 at 08 14 55

DSC outline is missing [Components]

Outstanding plugin!

The DSC code outline does not pick up [Components] sections. In particular, [Components.$(DXE_ARCH)] and [Components.$(PEI_ARCH)] are excluded. I mention those particulars just in case the references might be causing the trouble.

Weird git blame in dsc file

image

I didn't enable any special gitlens feature.
And I only see the weird git blame when edk2-vscode is enable. And it probably occur since the recent edk2-vscode update.

This won't happened in c files, I only see it in the dsc file, component/libraryclass section.

fdf/dsc .inc file syntax highlight

EDK2 has the included dsc/fdf file naming as xxx.dsc.inc and xxx.fdf.inc.
Such as:
NetworkPkg/Network.dsc.inc
NetworkPkg/Network.fdf.inc

Currently, the syntax highlight for dsc and fdf is great. Pease apply to the dsc.inc fdf.inc if possible. Thanks!

[Feature request] [Part2] List the section names on the right of the file name

@WalonLi Thank you for the effort!

I am closing this request.

But... there is always a but XD

I was hoping that it can show the name on the top when focus is within the scope of the outline. Take the example below, it shows "..." only, not the "FeaturePcd" because the focus is on the PcdPciBusHotplugDeviceSupport
圖片

It only show FeaturePcd when the focus is right on the [FeaturePcd] itself:
圖片

Sometimes PCDs in the same section are more than a page and I have to open the side bar then search to check which section this PCD is belong to, or to just scroll pages up and up and up. If it can directly show the section name where the focused line is belong to (on the top) it will help me to save some time. This is my original intention but I didn't make it clearly described.

Originally posted by @JamesAmiTw in #3 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.