gitlab-org--gitlab-foss/app/assets/javascripts/lib/utils/ace_utils.js

6 lines
172 B
JavaScript

/* global ace */
export default function getModeByFileExtension(path) {
const modelist = ace.require('ace/ext/modelist');
return modelist.getModeForPath(path).mode;
}