diff --git a/user_config/usr/share/newton/context_path/resources/css/newton/ace-overrides.css b/user_config/usr/share/newton/context_path/resources/css/newton/ace-overrides.css
new file mode 100644
index 0000000..a7d6257
--- /dev/null
+++ b/user_config/usr/share/newton/context_path/resources/css/newton/ace-overrides.css
@@ -0,0 +1,90 @@
+/* TAGS */
+
+
+/* IDs */
+#ace_settingsmenu, #kbshortcutmenu {
+ background-color: rgba(0, 0, 0, 0.0);
+ color: rgba(255, 255, 255, 1.0);
+ box-shadow: -5px 4px 5px rgba(249, 148, 6, 0.74);
+ padding: 1em 0.5em 2em 1em;
+ overflow: auto;
+ position: absolute;
+ margin: 0;
+ bottom: 0;
+ right: 0;
+ top: 0;
+ z-index: 9991;
+ cursor: default;
+}
+
+
+/* CLASSES */
+.ace_editor.ace_autocomplete {
+ width: 300px;
+ z-index: 200000;
+ border: 1px lightgray solid;
+ position: fixed;
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
+ line-height: 1.4;
+ background-color: rgba(0, 0, 0, 0.0);
+ color: rgba(255, 255, 255, 1.0);
+}
+
+.ace_status-indicator {
+ color: gray;
+ position: absolute;
+ right: 0;
+ border-left: 1px solid;
+}
+
+
+.ace_prompt_container {
+ max-width: 603px;
+ width: 100%;
+ margin: 20px auto;
+ padding: 3px;
+ background: rgba(0, 0, 0, 0);
+ border-radius: 2px;
+ box-shadow: 0px 2px 3px 0px #555;
+}
+
+.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
+ /* background-color: #CAD6FA; */
+ z-index: 1;
+}
+
+/*.ace_prompt_container {*/
+/* max-width: 603px;*/
+/* width: 100%;*/
+/* margin: 20px auto;*/
+/* padding: 3px;*/
+/* background: rgba(0, 0, 0, 0) !important;*/
+/* border-radius: 2px;*/
+/* box-shadow: 0px 2px 3px 0px #555;*/
+/*}*/
+
+.ace-tm,
+.ace-tm:focus,
+.ace-tm::selected {
+ background-color: rgba(242, 133, 0, 0.16) !important;
+ color: rgba(0, 0, 0, 1.0);
+ border: 1px lightgray solid;
+}
+
+.ace_selected {
+ background-color: rgba(181, 168, 153, 0.34) !important;
+ color: rgba(0, 0, 0, 1);
+}
+
+
+.ace_marker-layer .ace_selected-word {
+ background-color: rgba(242, 133, 0, 0.74);
+ color: rgba(255, 255, 255, 1.0);
+}
+
+/*.ace_marker-layer .ace_highlight-word,*/
+/*.ace_marker-layer .ace_highlight-marker {*/
+/* background-color: rgba(255, 0, 0, 0.74);*/
+/*}*/
+
+
diff --git a/user_config/usr/share/newton/context_path/resources/css/newton/main.css b/user_config/usr/share/newton/context_path/resources/css/newton/main.css
index f6b2454..d97e44a 100644
--- a/user_config/usr/share/newton/context_path/resources/css/newton/main.css
+++ b/user_config/usr/share/newton/context_path/resources/css/newton/main.css
@@ -84,13 +84,6 @@
margin-bottom: -200px;
}
-.ace_status-indicator {
- color: gray;
- position: absolute;
- right: 0;
- border-left: 1px solid;
-}
-
.nav-tabs {
display: list-item;
overflow: auto;
@@ -188,4 +181,4 @@
/* Other message text colors */
.error { color: rgb(170, 18, 18); }
.warning { color: rgb(255, 168, 0); }
-.success { color: rgb(136, 204, 39); }
\ No newline at end of file
+.success { color: rgb(136, 204, 39); }
diff --git a/user_config/usr/share/newton/context_path/resources/css/newton/overrides.css b/user_config/usr/share/newton/context_path/resources/css/newton/overrides.css
index 370135a..536c974 100644
--- a/user_config/usr/share/newton/context_path/resources/css/newton/overrides.css
+++ b/user_config/usr/share/newton/context_path/resources/css/newton/overrides.css
@@ -26,20 +26,6 @@ input.form-control::placeholder {
/* IDs */
-#ace_settingsmenu, #kbshortcutmenu {
- background-color: rgba(0, 0, 0, 0.0);
- color: rgba(255, 255, 255, 1.0);
- box-shadow: -5px 4px 5px rgba(249, 148, 6, 0.74);
- padding: 1em 0.5em 2em 1em;
- overflow: auto;
- position: absolute;
- margin: 0;
- bottom: 0;
- right: 0;
- top: 0;
- z-index: 9991;
- cursor: default;
-}
/* CLASSES */
@@ -59,14 +45,3 @@ input.form-control::placeholder {
border-color: rgba(249, 148, 6, 0.74);
}
-.ace_marker-layer .ace_selected-word {
- background-color: rgba(242, 133, 0, 0.74);
- color: rgba(255, 255, 255, 1.0);
-}
-
-/*.ace_marker-layer .ace_highlight-word,*/
-/*.ace_marker-layer .ace_highlight-marker {*/
-/* background-color: rgba(255, 0, 0, 0.74);*/
-/*}*/
-
-
diff --git a/user_config/usr/share/newton/context_path/resources/js/newton/components.js b/user_config/usr/share/newton/context_path/resources/js/newton/components.js
index bc4173f..ad7cff9 100644
--- a/user_config/usr/share/newton/context_path/resources/js/newton/components.js
+++ b/user_config/usr/share/newton/context_path/resources/js/newton/components.js
@@ -175,12 +175,6 @@ class InputCheckboxContainer extends HTMLElement {
}
}
-const QueryState = {
- Searching: 0,
- SearchSuccess: 1,
- SearchFail: 2
-}
-
class SearchReplaceContainer extends HTMLElement {
constructor() {
@@ -204,11 +198,11 @@ class SearchReplaceContainer extends HTMLElement {
let elm = this.shadowRoot.getElementById("find-entry");
- elm.addEventListener("keyup", (eve) => {
+ elm.addEventListener("keydown", (eve) => {
if (eve.key === "Enter") {
let elm = this.shadowRoot.getElementById("find-btn");
elm.click();
- return
+ return;
}
let elm = this.shadowRoot.getElementById("find-all-btn");
@@ -249,7 +243,7 @@ class SearchReplaceContainer extends HTMLElement {
elm.classList.add("btn-dark");
} else {
elm.classList.add("btn-info");
- elm.classList.remove("btn-dark")
+ elm.classList.remove("btn-dark");
}
this.setFindOptionsLbl();
@@ -291,7 +285,7 @@ class SearchReplaceContainer extends HTMLElement {
editor.findNext();
}
- findAllEntries(query = null, isBackwwards = true, isWrap = true, range = null) {
+ findAllEntries(query = null, isBackwwards = false, isWrap = true, range = null) {
this.updateStyle(QueryState.SearchSuccess);
if (query === "") {
this.shadowRoot.getElementById("find-status-lbl").innerText = "Find in current buffer";
@@ -302,8 +296,8 @@ class SearchReplaceContainer extends HTMLElement {
}
let totalCount = editor.findAll(query, {
- backwards: isBackwwards === "True" ? true : false,
- wrap: isWrap === "True" ? true : false,
+ backwards: isBackwwards,
+ wrap: isWrap,
caseSensitive: this.isMatchCase(),
wholeWord: this.isUseWholeWord(),
regExp: this.isUseRegex(),
@@ -332,10 +326,10 @@ class SearchReplaceContainer extends HTMLElement {
}
}
- findEntry(query = null, isBackwwards = true, isWrap = true, range = null) {
+ findEntry(query = null, isBackwwards = false, isWrap = true, range = null) {
let result = editor.find(query, {
- backwards: isBackwwards === "True" ? true : false,
- wrap: isWrap === "True" ? true : false,
+ backwards: isBackwwards,
+ wrap: isWrap,
caseSensitive: this.isMatchCase(),
wholeWord: this.isUseWholeWord(),
regExp: this.isUseRegex(),
@@ -379,9 +373,9 @@ class SearchReplaceContainer extends HTMLElement {
updateStyle(state) {
let elm = this.shadowRoot.getElementById("find-entry");
- elm.classList.remove("searching")
- elm.classList.remove("search-success")
- elm.classList.remove("search-fail")
+ elm.classList.remove("searching");
+ elm.classList.remove("search-success");
+ elm.classList.remove("search-fail");
if (state === 0)
elm.classList.add("searching");
diff --git a/user_config/usr/share/newton/context_path/resources/js/newton/globals.js b/user_config/usr/share/newton/context_path/resources/js/newton/globals.js
index 049c6dc..098e92b 100644
--- a/user_config/usr/share/newton/context_path/resources/js/newton/globals.js
+++ b/user_config/usr/share/newton/context_path/resources/js/newton/globals.js
@@ -4,19 +4,25 @@ const messenger = (window.webkit) ? window.webkit.messageHandlers : (message) =
const EDITOR_OPTS = {
- printMarginColumn: 80,
- enableBasicAutocompletion: true,
- enableInlineAutocompletion: true,
- enableSnippets: true,
- enableLiveAutocompletion: true,
- highlightActiveLine: true,
- useSoftTabs: true,
- tabSize: 4,
- tooltipFollowsMouse: true,
- useWrapMode: false,
- scrollPastEnd: 0.5,
- mergeUndoDeltas: false
- }
+ printMarginColumn: 80,
+ enableBasicAutocompletion: true,
+ enableInlineAutocompletion: true,
+ enableSnippets: true,
+ enableLiveAutocompletion: true,
+ liveAutocompletionDelay: 10,
+ liveAutocompletionThreshold: 2,
+ highlightActiveLine: true,
+ tabSize: 4,
+ useSoftTabs: true,
+ useElasticTabstops: true,
+ tooltipFollowsMouse: true,
+ useWrapMode: false,
+ scrollPastEnd: 0.5,
+ mergeUndoDeltas: false,
+ showGutter: true,
+ customScrollbar: true,
+ navigateWithinSoftTabs: true
+};
const BASE_LINK = `${window.location.href}resources/js/libs/ace_editor/lsp`;
@@ -41,4 +47,11 @@ let isControlDown = false;
let queryMarkers = [];
-let blockHigherNewtonEvePropigation = false;
\ No newline at end of file
+let blockHigherNewtonEvePropigation = false;
+
+
+const QueryState = {
+ Searching: 0,
+ SearchSuccess: 1,
+ SearchFail: 2
+};
\ No newline at end of file
diff --git a/user_config/usr/share/newton/context_path/resources/js/newton/keybinding-newton.js b/user_config/usr/share/newton/context_path/resources/js/newton/keybinding-newton.js
index e712fe2..950b72f 100644
--- a/user_config/usr/share/newton/context_path/resources/js/newton/keybinding-newton.js
+++ b/user_config/usr/share/newton/context_path/resources/js/newton/keybinding-newton.js
@@ -17,8 +17,12 @@ const editorCommands = [
editor.showKeyboardShortcuts();
})
}
-
-
+ }, {
+ name: "openCommandPalette2",
+ bindKey: {linux: "Command-Shift-/|F1", win: "Ctrl-Shift-/|F1"},
+ exec: function(editor) {
+ editor.execCommand("openCommandPalette");
+ }
}, {
name: "showLSPManager",
bindKey: {win: "ctrl-m", mac: "command-m"},
@@ -41,7 +45,6 @@ const editorCommands = [
sendMessage("open_file", "", "", fpath, "");
},
readOnly: true
-
}, {
name: "saveSession",
bindKey: {win: "ctrl-s", mac: "ctrl-s"},
@@ -70,6 +73,13 @@ const editorCommands = [
toggleLineHighlight();
},
readOnly: true
+ }, {
+ name: "gotoDefinition",
+ bindKey: {win: "ctrl-g", mac: "ctrl-g"},
+ exec: function(editor) {
+ console.log("Goto stub...");
+ },
+ readOnly: true
}, {
name: "movelinesUp",
bindKey: {win: "ctrl-up", mac: "ctrl-up"},
@@ -121,5 +131,4 @@ const editorCommands = [
readOnly: true
}
-
];
\ No newline at end of file
diff --git a/user_config/usr/share/newton/context_path/resources/js/newton/ui-logic.js b/user_config/usr/share/newton/context_path/resources/js/newton/ui-logic.js
index 89f4406..ce0ca49 100644
--- a/user_config/usr/share/newton/context_path/resources/js/newton/ui-logic.js
+++ b/user_config/usr/share/newton/context_path/resources/js/newton/ui-logic.js
@@ -15,6 +15,7 @@ const loadPreviewEditor = () => {
const loadEditor = () => {
ace.require("ace/ext/language_tools");
ace.require("ace-linters/language-client");
+ ace.require("ace/ext/elastic_tabstops_lite");
editor = ace.edit("editor");
// Note: https://github.com/ajaxorg/ace/wiki/Configuring-Ace
diff --git a/user_config/usr/share/newton/lsp-servers-config.json b/user_config/usr/share/newton/lsp-servers-config.json
index 585e695..c9c9eed 100644
--- a/user_config/usr/share/newton/lsp-servers-config.json
+++ b/user_config/usr/share/newton/lsp-servers-config.json
@@ -6,7 +6,7 @@
"socket": "ws://127.0.0.1:3030/?name=shell",
"initialization-options": {}
},
- "python": {
+ "python": {
"info": "https://github.com/python-lsp/python-lsp-server",
"alt-command": "pylsp --ws --port 3030",
"command": "lsp-ws-proxy --listen 3030 -- pylsp",
@@ -21,6 +21,28 @@
]
}
},
+ "python_bad_config": {
+ "info": "https://github.com/python-lsp/python-lsp-server",
+ "alt-command": "pylsp --ws --port 3030",
+ "command": "lsp-ws-proxy --listen 3030 -- pylsp",
+ "socket": "ws://127.0.0.1:3030/?name=pylsp",
+ "initialization-options": {
+ "pylsp.plugins.ruff": true,
+ "pylsp.plugins.pylsp_rope.rename": true,
+ "pylsp.plugins.rope_rename.enabled": false,
+ "pylsp.plugins.rope_autoimport.enabled": true,
+ "pylsp.plugins.rope_completion.enabled": false,
+ "pylsp.plugins.rope_completion.eager": false,
+ "pylsp.plugins.jedi_rename.enabled": false,
+ "pylsp.plugins.jedi_completion.enabled": true,
+ "pylsp.plugins.jedi_completion.include_class_objects": false,
+ "pylsp.plugins.jedi_completion.include_function_objects": false,
+ "pylsp.plugins.jedi_completion.fuzzy": true,
+ "pylsp.plugins.jedi.extra_paths": [
+ "/home/abaddon/Portable_Apps/py-venvs/lsp_bridge-venv/venv/lib/python3.10/site-packages/gi-stubs"
+ ]
+ }
+ },
"python3": {
"info": "https://pypi.org/project/jedi-language-server/",
"alt-command": "jedi-language-server",
@@ -68,5 +90,12 @@
"command": "lsp-ws-proxy --listen 3030 -- java-language-server",
"socket": "ws://127.0.0.1:3030/?name=java-language-server",
"initialization-options": {}
+ },
+ "go": {
+ "info": "https://pkg.go.dev/golang.org/x/tools/gopls#section-readme",
+ "alt-command": "gopls",
+ "command": "lsp-ws-proxy --listen 3030 -- gopls",
+ "socket": "ws://127.0.0.1:3030/?name=gopls",
+ "initialization-options": {}
}
}
\ No newline at end of file