refactor(lsp): replace LSPManager with controller-based architecture
- Remove legacy LSPManager dialog implementation - Introduce LSPController as the central LSP entry point - Route UI interactions through lsp_controller.lsp_manager_ui - Move client lifecycle handling out of ProviderResponseCache - Simplify completion cache and matcher filtering - Improve LSP completion item parsing with safer fallbacks - Modernize typing (Python 3.10 union syntax) - Remove unused imports and dead code - Use GLib.idle_add for safe UI scrolling operations - Minor comment and spelling fixes
This commit is contained in:
8
plugins/code/ui/lsp_manager/scripts/CONFIG.sh
Normal file
8
plugins/code/ui/lsp_manager/scripts/CONFIG.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# set -o xtrace ## To debug scripts
|
||||
# set -o errexit ## To exit on error
|
||||
# set -o errunset ## To exit if a variable is referenced but not set
|
||||
|
||||
|
||||
CONTAINER="newton-lsp"
|
||||
38
plugins/code/ui/lsp_manager/scripts/start.sh
Executable file
38
plugins/code/ui/lsp_manager/scripts/start.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
. CONFIG.sh
|
||||
|
||||
# set -o xtrace ## To debug scripts
|
||||
# set -o errexit ## To exit on error
|
||||
# set -o errunset ## To exit if a variable is referenced but not set
|
||||
|
||||
|
||||
function main() {
|
||||
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
cd "${SCRIPTPATH}"
|
||||
echo "Working Dir: " $(pwd)
|
||||
|
||||
ID=$(podman ps --filter "ancestor=localhost/${CONTAINER}:latest" --format "{{.ID}}")
|
||||
if [ "${ID}" != "" ]; then
|
||||
echo "Is up..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CODE_HOST="${HOME}/Coding"
|
||||
CODE_CONTAINER="${HOME}/Coding"
|
||||
CONFIG_HOST="${HOME}/.config/lsps"
|
||||
CONFIG_CONTAINER="${HOME}/.config/lsps"
|
||||
|
||||
# podman run -d -m 4G \
|
||||
podman run -m 4G \
|
||||
-p 9999:9999 \
|
||||
-e HOME="${HOME}" \
|
||||
-e MAVEN_OPTS="-Duser.home=${HOME}" \
|
||||
-e JAVA_TOOL_OPTIONS="-Duser.home=${HOME}" \
|
||||
-e JDTLS_CONFIG_PATH="${CONFIG_CONTAINER}/jdtls" \
|
||||
-e JDTLS_DATA_PATH="${JDTLS_CONFIG_PATH}/data" \
|
||||
-v "${CODE_HOST}":"${CODE_CONTAINER}" \
|
||||
-v "${CONFIG_HOST}":"${CONFIG_CONTAINER}" \
|
||||
"${CONTAINER}:latest"
|
||||
}
|
||||
main $@;
|
||||
23
plugins/code/ui/lsp_manager/scripts/stop.sh
Executable file
23
plugins/code/ui/lsp_manager/scripts/stop.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
. CONFIG.sh
|
||||
|
||||
# set -o xtrace ## To debug scripts
|
||||
# set -o errexit ## To exit on error
|
||||
# set -o errunset ## To exit if a variable is referenced but not set
|
||||
|
||||
|
||||
function main() {
|
||||
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
cd "${SCRIPTPATH}"
|
||||
echo "Working Dir: " $(pwd)
|
||||
|
||||
ID=$(podman ps --filter "ancestor=localhost/${CONTAINER}:latest" --format "{{.ID}}")
|
||||
if [ "${ID}" == "" ]; then
|
||||
echo "Is not up..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
podman container stop "${ID}"
|
||||
}
|
||||
main $@;
|
||||
Reference in New Issue
Block a user