GithubHelp home page GithubHelp logo

Comments (2)

valentjn avatar valentjn commented on July 28, 2024

The Language Server Protocol (LSP) has the concept of language identifiers, which are used by language servers to determine the type of documents. File extensions shouldn't be used as they are not reliable, they may be missing, and there may be clashes.

LTEX only uses file extensions (i.e., the source code quoted in the issue description) when running commands such as LTeX: Check All Documents in Workspace, because in this case, files are checked that are not open in the language client (editor) and therefore, no language identifier is available for them. For regular checking, file extensions are not used, only language IDs.

IMO, it would be confusing UX to have a setting that somehow supplements/overrides the editor choices of language IDs. Besides, I don't really see enough possible use cases besides MDX.

A better solution is to make the language client send a distinct language ID (mdx in this case), e.g., by installing extensions that add language support for the specific language, and make the language server recognize the language ID.

Of course, most desirable would be adding full support for MDX to LTEX. Looking at examples, MDX can be JavaScript with some Markdown in it, which would be pretty hard to parse and probably out-of-scope for LTEX. However, it's easily possible to check MDX as Markdown, if you're fine with all the false positives.

from ltex-ls.

bencmbrook avatar bencmbrook commented on July 28, 2024

Appreciate the thorough response and understand your reasoning. That global override can work well enough for my use case.

Thanks—closing this out.

from ltex-ls.

Related Issues (20)

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.