From 4fe2c7ed8f3631a0844ce9f79ac8b0df24a390d1 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Thu, 4 Apr 2024 23:29:06 -0500 Subject: [PATCH] Updated LSP inferastructure --- README.md | 8 +++++- .../usr/share/newton/lsp-servers-config.json | 28 +++++++++++-------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ca37de4..ba36110 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ This is currently very much a WIP effort with two branches to take note of. The * release/newton-with-gtksource * release/newton-with-webkit2 +# LSP +Add lsp-ws-proxy somewhere in $PATH and make executable. Download from: + +* https://github.com/qualified/lsp-ws-proxy + + # Images * GtkSource.View ![1 Newton default view. ](images/pic1.png) @@ -21,4 +27,4 @@ This is currently very much a WIP effort with two branches to take note of. The * Gtk Webkit2 + Ace Editor ![5 Newton default view. ](images/pic5.png) -![6 Bufers list. ](images/pic6.png) +![6 Bufers list. ](images/pic6.png) \ No newline at end of file diff --git a/user_config/usr/share/newton/lsp-servers-config.json b/user_config/usr/share/newton/lsp-servers-config.json index 7935068..7b1472a 100644 --- a/user_config/usr/share/newton/lsp-servers-config.json +++ b/user_config/usr/share/newton/lsp-servers-config.json @@ -1,14 +1,16 @@ { "sh": { "info": "", + "alt-command": "", "command": "", - "socket": "ws://127.0.0.1:3030/shell", + "socket": "ws://127.0.0.1:3030/?name=shell", "initialization_options": {} }, "python": { "info": "https://github.com/python-lsp/python-lsp-server", - "command": "pylsp --ws --port 3030", - "socket": "ws://127.0.0.1:3030/python", + "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.rope_autoimport.enabled": true, "pylsp.plugins.rope_completion.enabled": true, @@ -21,8 +23,9 @@ }, "python3": { "info": "https://pypi.org/project/jedi-language-server/", - "command": "jedi-language-server", - "socket": "ws://127.0.0.1:3030/python", + "alt-command": "jedi-language-server", + "command": "lsp-ws-proxy --listen 3030 -- jedi-language-server", + "socket": "ws://127.0.0.1:3030/?name=jedi-language-server", "initialization_options": { "jediSettings": { "autoImportModules": [], @@ -47,20 +50,23 @@ }, "c": { "info": "https://clangd.llvm.org/", - "command": "/usr/bin/clangd", - "socket": "ws://127.0.0.1:3030/c", + "alt-command": "clangd", + "command": "lsp-ws-proxy --listen 3030 -- clangd", + "socket": "ws://127.0.0.1:3030/?name=clangd", "initialization_options": {} }, "cpp": { "info": "https://clangd.llvm.org/", - "command": "/usr/bin/clangd", - "socket": "ws://127.0.0.1:3030/cpp", + "alt-command": "clangd", + "command": "lsp-ws-proxy --listen 3030 -- clangd", + "socket": "ws://127.0.0.1:3030/?name=clangd", "initialization_options": {} }, "java": { "info": "https://download.eclipse.org/jdtls/", - "command": "java-language-server", - "socket": "ws://127.0.0.1:3030/java", + "alt-command": "java-language-server", + "command": "lsp-ws-proxy --listen 3030 -- java-language-server", + "socket": "ws://127.0.0.1:3030/?name=java-language-server", "initialization_options": {} } } \ No newline at end of file