Skip to content

Commit 196242f

Browse files
committed
Clean up and add changelog entry
1 parent 07a3bf9 commit 196242f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- added icons for all the features and their commands ([#318])
1919
- refactored the codebase with a new architecture which allows dynamic feature, document widget adapter, and code editor registration ([#318])
2020
- the document in the connections list in the statusbar popover are now represented by easy-to-understand DocumentLocator (breadcrumbs) widget rather than an internal id ([bacc006])
21+
- syntax highlighting mode is adjusted to the language with the majority of the code in an editor ([#319])
2122

2223
- bug fixes
2324

@@ -32,6 +33,7 @@
3233
[#301]: https://github.com/krassowski/jupyterlab-lsp/pull/301
3334
[#315]: https://github.com/krassowski/jupyterlab-lsp/pull/315
3435
[#318]: https://github.com/krassowski/jupyterlab-lsp/pull/318
36+
[#319]: https://github.com/krassowski/jupyterlab-lsp/pull/318
3537
[00448d0]: https://github.com/krassowski/jupyterlab-lsp/pull/318/commits/00448d0c55e7f9a1e7e0a5322f17610daac47dfe
3638
[bacc006]: https://github.com/krassowski/jupyterlab-lsp/pull/318/commits/bacc0066da0727ff7397574914bf0401e4d8f7cb
3739
[4e5b2ad]: https://github.com/krassowski/jupyterlab-lsp/pull/318/commits/4e5b2adf655120458cc8be4b453fe9a78c98e061

packages/jupyterlab-lsp/src/features/syntax_highlighting.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
IFeatureLabIntegration,
1313
IFeatureSettings
1414
} from '../feature';
15-
import { VirtualDocument } from '../virtual/document';
1615
import { CodeMirrorEditor } from '@jupyterlab/codemirror';
1716
import CodeMirror from 'codemirror';
1817
import { IEditorMimeTypeService } from '@jupyterlab/codeeditor/lib/mimetype';
@@ -51,12 +50,11 @@ export class CMSyntaxHighlighting extends CodeMirrorIntegration {
5150
return CodeMirror.findModeByMIME(mimetype);
5251
}
5352

54-
update_mode(doc: VirtualDocument, changed_document: VirtualDocument) {
53+
update_mode() {
5554
let root = this.virtual_document;
5655
for (let map of root.foreign_document_maps) {
5756
for (let [range, block] of map.entries()) {
5857
let ce_editor = block.editor;
59-
// get the ce_editor from block
6058
let editor = (ce_editor as CodeMirrorEditor).editor;
6159
let lines = editor.getValue('\n');
6260
let total_area = lines.concat('').length;

0 commit comments

Comments
 (0)