GithubHelp home page GithubHelp logo

asklar / midl-langserv Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 0.0 420 KB

MIDL 3 language server extension for VS Code

License: MIT License

JavaScript 1.05% TypeScript 81.10% PowerShell 0.35% PEG.js 17.50%
cppwinrt midl midl3 midlrt windows windows-runtime windows-runtime-component

midl-langserv's Introduction

CI

MIDL 3.0 language support

Provides syntax highlighting, autocomplete, and diagnostics for MIDL 3.

Status: Development in progress.

Functionality

  • Syntax highlighting
  • Basic semantic parsing
  • Diagnostics ("squigglies") and context-free auto-completions

This extension collects basic usage telemetry (e.g. which version is being used).

Feedback / bug reports

https://github.com/asklar/midl-langserv

midl-langserv's People

Contributors

asklar avatar dependabot[bot] avatar marcelwgn avatar sylveon avatar zadjii-msft avatar

Stargazers

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

Watchers

 avatar

midl-langserv's Issues

`ref` keyword break syntax highlighting

Describe the bug
When using the ref keyword to use the "fill array" WinRT pattern, syntax highlighting stops working an error is underlined on the declaration of function.

To Reproduce

namespace Foo
{
    runtimeclass Bar
    {
        void Buz(ref UInt8[] arr);
    }
}

Expected behavior
The keyword to be recognized and highlighted as such, with no red squiggles

Screenshots
image

Versions:

  • VSCode: 1.63.2
  • MIDL 3 extension: 0.0.26

Additional context
out works as expected.

Disable for non-MIDL3 IDL files

Fantastic extension Alex, it's a huge productivity boost.

My project has a mix of MIDL3 and older IDL files. While it's unreasonable to support all the variations of IDL, I wonder if the extension could disable itself on non-MIDL3 files. Currently, the "Problems" pane is polluted with dozens of expected errors as a result.

I don't know if it's super simple to make the difference. In my case, I observe that all non-MIDL3 files either start with:

[uuid(...)]
interface ...

or

cpp_quote("#pragma once")

Or maybe project settings could enable/disable this extension on individual files/directories.

Support for Visual Studio (Not just VSCode!)

Is your feature request related to a problem? Please describe.
Add support for use with Visual Studio (2019+)

Describe the solution you'd like
Extension to support full MIDL syntax highlighting in Visual Studio

Describe alternatives you've considered
Writing my own... :(

Additional context
The support for syntax highlighting of any MIDL code in VS is pretty limited (to the point of being mostly useless) as we use more things based on MIDL3 it would help a LOT if we had a tool that could properly provide syntax highlighting/intellisense.

`typedef` not recognized

Describe the bug
typedef allows to define aliases just like how it works in C. Currently, the extension doesn't recognize this construct and gives an error.

To Reproduce

namespace Foo
{
    typedef Windows.Foundation.EventHandler<Int32> MyEventHandler;

    runtimeclass Foo
    {
        event MyEventHandler MyEvent;
    }
}

Expected behavior
No error, and recognize usages of that typedef later in the same file.

Screenshots
image

Versions:

  • VSCode: 1.63.2
  • MIDL 3 extension: v0.0.27

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.