diff options
author | Sheogorath | 2018-10-10 11:13:44 +0200 |
---|---|---|
committer | Sheogorath | 2018-10-10 11:13:52 +0200 |
commit | 1a9df2268072bf92a881a7b55ee422b6d1d09b4d (patch) | |
tree | 9d56d341b6e83d70b8592b07f684fe8eddba2cd7 /public/js | |
parent | c7478c1694be2b3b880b8d52f9c15d60832a06f8 (diff) |
Add autocomplete for highlight.js languages into codemirror
Right now we support code highlighting for rust, but it doesn't appear
in autocomplete of codemirror, because codemirror is not aware of it.
This patch lets highlightjs simply tell codemirror, what it supports and
adds this to the autocomplete list.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js index 3dd25fa6..98c3b6d2 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -17,6 +17,7 @@ import toMarkdown from 'to-markdown' import { saveAs } from 'file-saver' import randomColor from 'randomcolor' import store from 'store' +import hljs from 'highlight.js' import _ from 'lodash' @@ -92,7 +93,7 @@ var cursorMenuThrottle = 50 var cursorActivityDebounce = 50 var cursorAnimatePeriod = 100 var supportContainers = ['success', 'info', 'warning', 'danger'] -var supportCodeModes = ['javascript', 'typescript', 'jsx', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki', 'go', 'gherkin'] +var supportCodeModes = ['javascript', 'typescript', 'jsx', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki', 'go', 'gherkin'].concat(hljs.listLanguages()) var supportCharts = ['sequence', 'flow', 'graphviz', 'mermaid', 'abc'] var supportHeaders = [ { |