mirror of https://github.com/buggins/dlangide.git
Setting for showing white space marks in editors - close #102
This commit is contained in:
parent
37b50254c5
commit
6fdb8812c4
|
@ -60,6 +60,7 @@ Build and run with DUB:
|
||||||
|
|
||||||
If you see build errors, try to upgrade dependencies:
|
If you see build errors, try to upgrade dependencies:
|
||||||
|
|
||||||
|
dub clean-caches
|
||||||
dub upgrade --force-remove
|
dub upgrade --force-remove
|
||||||
dub build --force
|
dub build --force
|
||||||
|
|
||||||
|
|
2
dub.json
2
dub.json
|
@ -12,7 +12,7 @@
|
||||||
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dlangui": "~>0.7.44",
|
"dlangui": "~>0.7.46",
|
||||||
"dcd": "~>0.7.5"
|
"dcd": "~>0.7.5"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,8 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
|
||||||
//ACTION_GO_TO_DEFINITION, ACTION_GET_COMPLETIONS
|
//ACTION_GO_TO_DEFINITION, ACTION_GET_COMPLETIONS
|
||||||
popupMenu = editPopupItem;
|
popupMenu = editPopupItem;
|
||||||
showIcons = true;
|
showIcons = true;
|
||||||
showFolding = true;
|
//showFolding = true;
|
||||||
|
showWhiteSpaceMarks = true;
|
||||||
content.marksChanged = this;
|
content.marksChanged = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +86,7 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
|
||||||
useSpacesForTabs = _settings.useSpacesForTabs;
|
useSpacesForTabs = _settings.useSpacesForTabs;
|
||||||
smartIndents = _settings.smartIndents;
|
smartIndents = _settings.smartIndents;
|
||||||
smartIndentsAfterPaste = _settings.smartIndentsAfterPaste;
|
smartIndentsAfterPaste = _settings.smartIndentsAfterPaste;
|
||||||
|
showWhiteSpaceMarks = _settings.showWhiteSpaceMarks;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected EditorTool _editorTool;
|
protected EditorTool _editorTool;
|
||||||
|
|
|
@ -20,6 +20,7 @@ SettingsPage createSettingsPages() {
|
||||||
texted.addCheckbox("editors/textEditor/useSpacesForTabs", UIString("Use spaces for tabs"d));
|
texted.addCheckbox("editors/textEditor/useSpacesForTabs", UIString("Use spaces for tabs"d));
|
||||||
texted.addCheckbox("editors/textEditor/smartIndents", UIString("Smart indents"d));
|
texted.addCheckbox("editors/textEditor/smartIndents", UIString("Smart indents"d));
|
||||||
texted.addCheckbox("editors/textEditor/smartIndentsAfterPaste", UIString("Smart indent after paste"d));
|
texted.addCheckbox("editors/textEditor/smartIndentsAfterPaste", UIString("Smart indent after paste"d));
|
||||||
|
texted.addCheckbox("editors/textEditor/showWhiteSpaceMarks", UIString("Show white space marks"d));
|
||||||
|
|
||||||
SettingsPage dlang = res.addChild("dlang", UIString("D"d));
|
SettingsPage dlang = res.addChild("dlang", UIString("D"d));
|
||||||
SettingsPage dub = dlang.addChild("dlang/dub", UIString("DUB"d));
|
SettingsPage dub = dlang.addChild("dlang/dub", UIString("DUB"d));
|
||||||
|
|
|
@ -19,6 +19,7 @@ class IDESettings : SettingsFile {
|
||||||
ed.setIntegerDef("tabSize", 4);
|
ed.setIntegerDef("tabSize", 4);
|
||||||
ed.setBooleanDef("smartIndents", true);
|
ed.setBooleanDef("smartIndents", true);
|
||||||
ed.setBooleanDef("smartIndentsAfterPaste", true);
|
ed.setBooleanDef("smartIndentsAfterPaste", true);
|
||||||
|
ed.setBooleanDef("showWhiteSpaceMarks", true);
|
||||||
Setting ui = uiSettings();
|
Setting ui = uiSettings();
|
||||||
ui.setStringDef("theme", "ide_theme_default");
|
ui.setStringDef("theme", "ide_theme_default");
|
||||||
ui.setStringDef("language", "en");
|
ui.setStringDef("language", "en");
|
||||||
|
@ -133,6 +134,11 @@ class IDESettings : SettingsFile {
|
||||||
/// set smart indents enabled flag
|
/// set smart indents enabled flag
|
||||||
@property IDESettings smartIndents(bool enabled) { editorSettings.setBoolean("smartIndents", enabled); return this; }
|
@property IDESettings smartIndents(bool enabled) { editorSettings.setBoolean("smartIndents", enabled); return this; }
|
||||||
|
|
||||||
|
/// true if smart indents are enabled
|
||||||
|
@property bool showWhiteSpaceMarks() { return editorSettings.getBoolean("showWhiteSpaceMarks", true); }
|
||||||
|
/// set smart indents enabled flag
|
||||||
|
@property IDESettings showWhiteSpaceMarks(bool enabled) { editorSettings.setBoolean("showWhiteSpaceMarks", enabled); return this; }
|
||||||
|
|
||||||
/// true if smart indents are enabled
|
/// true if smart indents are enabled
|
||||||
@property bool smartIndentsAfterPaste() { return editorSettings.getBoolean("smartIndentsAfterPaste", true); }
|
@property bool smartIndentsAfterPaste() { return editorSettings.getBoolean("smartIndentsAfterPaste", true); }
|
||||||
/// set smart indents enabled flag
|
/// set smart indents enabled flag
|
||||||
|
|
Loading…
Reference in New Issue