[llvm-bugs] [Bug 41788] New: clangd tries to index/syntax check MATLAB files (.m extension conflict)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 7 07:04:03 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41788

            Bug ID: 41788
           Summary: clangd tries to index/syntax check MATLAB files (.m
                    extension conflict)
           Product: clang-tools-extra
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: clangd
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lilbill39 at gmail.com
                CC: llvm-bugs at lists.llvm.org

I've got clangd hooked up in VSCode and really like it. As part of my work I
also need to write MATLAB code for which I'm using the vscode-matlab extension
and have the extension .m bound to the language "matlab" in VSCode:

  "files.associations": {"*.m": "matlab"}

However when I open a .m file in VSCode with clangd running, it validates the
file, likely as Objective-C, causing a bunch of errors to show up.

Can clangd indexing be based off of the language rather than the file
extension?

https://github.com/microsoft/vscode-extension-samples/blob/master/lsp-sample/package.json

shows binding with a language as well as their client:

https://github.com/microsoft/vscode-extension-samples/blob/master/lsp-sample/client/src/extension.ts

Using this mechanism allows users to perform the extension to language mapping
on their own.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190507/ad391ce3/attachment.html>


More information about the llvm-bugs mailing list