Comments (2)
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.
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)
- Is it possible to use regular expressions or wildcards in `ltex.latex.commands`? HOT 2
- Any way to make Polish quotes recognized?
- Support Windows Certificate Store
- Switch language for file in neovim HOT 2
- Support use of HTTP proxy in LanguageToolHttpInterface
- Add support for neorg
- Root-level doc comments in Rust are ignored HOT 2
- How do I ignore a specific syntax element?
- LTeX: massive helix_lsp::transport [ERROR] logging
- Version 16 bug with Windows and Eglot HOT 1
- "ltex.latex.commands" and "ltex.latex.environments" cannot act on some original ones
- configuration within vimrc
- Ellipsis in markdown link HOT 2
- Add support for apacite commands
- I'm trying to use this LSP with markdown documents, but it's forcing the incorrect language code. HOT 2
- Setting of hiddenFalsePositives nvim lua not working
- Set `ltex.dictionary` and `ltex.disabledRules` in magic comments
- Quarto language setting option HOT 1
- `lineCommentRegexString` does not recognize a comment without a whitespace
- Report error for non-conforming language specification
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ltex-ls.