-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionality
Milestone
Description
I have an extension which provides some language support (folding and highlighting) for file trees. When opening an untitled file and pasting in a tree, the extension will try to set the language to tree if it has some specific characters (ex. ├──, └──). However, once language detection kicks in it automatically changes it to ini.
I was testing the language detection code and can clearly see that for a tree file it somehow detects ini with 100% confidence. So there are 2 questions:
- Is it a bug that this is being detected as an
inifile? - Is there any process for hooking into/add languages to the custom detection API?
I tested the language detection code with the below
const vsl = require("@vscode/vscode-languagedetection");
const modulOperations = new vsl.ModelOperations();
(async () => {
const result = await modulOperations.runModel(`
├── functions
├── src
│ ├── articles
│ ├── components
│ ├── constants
│ ├── contexts
│ ├── data
│ ├── hooks
│ ├── i18n
│ │ └── locales
│ ├── modals
│ │ └── sections
│ ├── pages
│ │ ├── app
│ │ └── r
│ ├── styles
│ ├── templates
│ └── utils
└── static
└── images
├── screenshots
└── templates
`);
console.log(result);
})();Output:
Hacksore
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionality

