Skip to content

[Help request] there is no interaction between the NppLspClient and the clojure-lsp server #6

@linpengcheng

Description

@linpengcheng

[Help request] there is no interaction between the NppLspClient and the clojure-lsp server

first, thank you for your excellent project!

I feel that there is no interaction between the NppLspClient and the clojure-lsp server, and the lsp client cannot obtain a list of symbols, and cannot goto definitions, declarations, implementation, and find references.


notepad++ lsp config file:

[lspservers.clojure]
# mode = "tcp"
# port = 12340
# host = "127.0.0.1"
mode = "io"
executable = 'x:\dev\cljc\clojure-lsp.bat'
# args = '--check-parent-process --log-file D:\log.txt -vvv'
auto_start_server = false

lsp out console info:

on_file_opened:: clojure: x:\tmp\t.clj
on_file_opened: initialized=false
starting language server: clojure
checking language server status: clojure
  trying to start x:\dev\cljc\clojure-lsp.bat
  running
checking current lexer
checking language server status: clojure
  is already running
on_initialize: 10132
write_to_stdin: Content-Length: 2119

{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":10132,"clientInfo":{"name":"NppLspClient","version":"0.0.1"},"rootUri":"file:///x%3A/tmp","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":false,"workspaceEdit":{"documentChanges":false},"didChangeConfiguration":{"dynamicRegistration":false},"didChangeWatchedFiles":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":false},"configuration":false,"workspaceFolders":false},"textDocument":{"publishDiagnostics":{"relatedInformation":false},"synchronization":{"dynamicRegistration":false,"willSave":false,"willSaveWaitUntil":false,"didSave":true},"completion":{"dynamicRegistration":false,"contextSupport":false,"completionItem":{"snippetSupport":false,"commitCharactersSupport":false,"documentationFormat":["plaintext"],"deprecatedSupport":false},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":false,"contentFormat":["plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"documentationFormat":["plaintext"]}},"definition":{"dynamicRegistration":false},"references":{"dynamicRegistration":false},"documentHighlight":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"codeAction":{"dynamicRegistration":false},"codeLens":{"dynamicRegistration":false},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"onTypeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"documentLink":{"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"implementation":{"dynamicRegistration":false},"colorProvider":{"dynamicRegistration":false},"foldingRange":{"dynamicRegistration":false,"rangeLimit":100,"lineFoldingOnly":true}}},"trace":"off","workspaceFolders":null}}
on_message_received: 
on_message_received: x:\dev\Notepad++>#!/usr/bin/env bash 
'#!' ²»ʇĚ²¿»򍢲¿üÁҲ²»ʇ¿ɔːеij̐򍊻򅺴¦À펄¼þ¡£
on_message_received: 
'exec' ²»ʇĚ²¿»򍢲¿üÁҲ²»ʇ¿ɔːеij̐򍊻򅺴¦À펄¼þ¡£
on_message_received: x:\dev\Notepad++>exec java -Xmx2g -server -jar $0 "$@" 
on_message_received: Content-Length: 134

on_message_received: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"clojure-lsp","value":{"kind":"begin","title":"clojure-lsp","percentage":0}}}
on_message_received: Content-Length: 146

on_message_received: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"clojure-lsp","value":{"kind":"report","message":"Finding kondo config","percentage":5}}}Content-Length: 140

clojure-lsp server is like properly working.

~/.config/clojure-lsp/config.edn

{:log-path "x:/tmp/clojure-lsp.log"
 :use-metadata-for-privacy? true}

:log-path "x:/tmp/clojure-lsp.log"

2022-06-01T05:51:13.840Z  INFO [clojure-lsp.db:70] - [DB] Reading transit analysis cache from x:\tmp\.lsp\.cache\db.transit.json db took 29ms
2022-06-01T05:51:13.871Z  INFO [clojure-lsp.crawler:160] - [Startup] Using cached db for project root x:\tmp
2022-06-01T05:51:13.871Z  INFO [clojure-lsp.source-paths:216] - [Startup] Using default source-paths: #{"src" "test"}
2022-06-01T05:51:13.871Z  INFO [clojure-lsp.crawler:71] - Copying kondo configs from classpath to project if any...
2022-06-01T05:51:13.886Z  INFO [clojure-lsp.crawler:73] - Copied kondo configs, took 7ms secs.
2022-06-01T05:51:13.886Z  INFO [clojure-lsp.crawler:191] - [Startup] Analyzing source paths for project root x:\tmp
2022-06-01T05:51:13.918Z  INFO [clojure-lsp.kondo:157] - Linting whole project for unused-public-var took 3ms
2022-06-01T05:51:13.934Z  INFO [clojure-lsp.crawler:27] - [Startup] Project only paths analyzed, took 34ms
2022-06-01T05:51:13.934Z  INFO [clojure-lsp.handlers:93] - :initialize 156ms
2022-06-01T05:51:13.934Z  INFO [clojure-lsp.feature.clojuredocs:21] - [Clojuredocs] Refreshing clojuredocs cache...
2022-06-01T05:51:13.950Z  INFO [clojure-lsp.handlers:116] - [Startup] Analyzing test paths for project root file:///x%3A/tmp
2022-06-01T05:51:13.966Z  INFO [clojure-lsp.feature.java-interop:222] - [Java] JDK source already present on global LSP cache dir.
2022-06-01T05:51:14.218Z  INFO [clojure-lsp.db:70] - [DB] Reading transit analysis cache from C:\Users\user001\.cache\clojure-lsp\db.transit.json db took 259ms
2022-06-01T05:51:14.278Z  INFO [clojure-lsp.feature.java-interop:255] - [Java] JDK source cached loaded successfully.
2022-06-01T05:52:53.445Z  INFO [lsp4clj.core:317] - [Server] Initializing...
2022-06-01T05:52:53.460Z  INFO [clojure-lsp.db:70] - [DB] Reading transit analysis cache from x:\tmp\.lsp\.cache\db.transit.json db took 1ms
2022-06-01T05:52:53.460Z  INFO [clojure-lsp.crawler:160] - [Startup] Using cached db for project root x:\tmp
2022-06-01T05:52:53.460Z  INFO [clojure-lsp.source-paths:216] - [Startup] Using default source-paths: #{"src" "test"}
2022-06-01T05:52:53.460Z  INFO [clojure-lsp.crawler:71] - Copying kondo configs from classpath to project if any...
2022-06-01T05:52:53.460Z  INFO [clojure-lsp.crawler:73] - Copied kondo configs, took 3ms secs.
2022-06-01T05:52:53.476Z  INFO [clojure-lsp.crawler:191] - [Startup] Analyzing source paths for project root x:\tmp
2022-06-01T05:52:53.476Z  INFO [clojure-lsp.kondo:157] - Linting whole project for unused-public-var took 0ms
2022-06-01T05:52:53.476Z  INFO [clojure-lsp.crawler:27] - [Startup] Project only paths analyzed, took 10ms
2022-06-01T05:52:53.476Z  INFO [clojure-lsp.handlers:93] - :initialize 33ms
2022-06-01T05:52:53.491Z  INFO [clojure-lsp.feature.java-interop:222] - [Java] JDK source already present on global LSP cache dir.
2022-06-01T05:52:53.476Z  INFO [clojure-lsp.handlers:116] - [Startup] Analyzing test paths for project root file:///x%3A/tmp
2022-06-01T05:52:53.797Z  INFO [clojure-lsp.db:70] - [DB] Reading transit analysis cache from C:\Users\user001\.cache\clojure-lsp\db.transit.json db took 300ms
2022-06-01T05:52:53.885Z  INFO [clojure-lsp.feature.java-interop:255] - [Java] JDK source cached loaded successfully.
2022-06-01T05:53:22.853Z  ERROR [clojure-lsp.feature.clojuredocs:34] - [Clojuredocs] Error refreshing clojuredocs information. java.net.ConnectException: Connection timed out: connect
2022-06-01T05:53:22.853Z  INFO [clojure-lsp.feature.clojuredocs:23] - [Clojuredocs] Refreshing clojuredocs cache took 128904ms.
2022-06-01T05:54:20.935Z  INFO [lsp4clj.core:317] - [Server] Initializing...
2022-06-01T05:54:20.935Z  INFO [clojure-lsp.db:70] - [DB] Reading transit analysis cache from x:\tmp\.lsp\.cache\db.transit.json db took 1ms
2022-06-01T05:54:20.951Z  INFO [clojure-lsp.crawler:160] - [Startup] Using cached db for project root x:\tmp
2022-06-01T05:54:20.951Z  INFO [clojure-lsp.source-paths:216] - [Startup] Using default source-paths: #{"src" "test"}
2022-06-01T05:54:20.951Z  INFO [clojure-lsp.crawler:71] - Copying kondo configs from classpath to project if any...
2022-06-01T05:54:20.951Z  INFO [clojure-lsp.crawler:73] - Copied kondo configs, took 4ms secs.
2022-06-01T05:54:20.966Z  INFO [clojure-lsp.crawler:191] - [Startup] Analyzing source paths for project root x:\tmp
2022-06-01T05:54:20.966Z  INFO [clojure-lsp.kondo:157] - Linting whole project for unused-public-var took 0ms
2022-06-01T05:54:20.966Z  INFO [clojure-lsp.crawler:27] - [Startup] Project only paths analyzed, took 8ms
2022-06-01T05:54:20.984Z  INFO [clojure-lsp.feature.clojuredocs:21] - [Clojuredocs] Refreshing clojuredocs cache...
2022-06-01T05:54:20.987Z  INFO [clojure-lsp.feature.java-interop:222] - [Java] JDK source already present on global LSP cache dir.
2022-06-01T05:54:20.983Z  INFO [clojure-lsp.handlers:93] - :initialize 37ms
2022-06-01T05:54:20.982Z  INFO [clojure-lsp.handlers:116] - [Startup] Analyzing test paths for project root file:///x%3A/tmp
2022-06-01T05:54:21.193Z  INFO [clojure-lsp.db:70] - [DB] Reading transit analysis cache from C:\Users\user001\.cache\clojure-lsp\db.transit.json db took 200ms
2022-06-01T05:54:21.243Z  INFO [clojure-lsp.feature.java-interop:255] - [Java] JDK source cached loaded successfully.
2022-06-01T05:55:34.598Z  ERROR [clojure-lsp.feature.clojuredocs:34] - [Clojuredocs] Error refreshing clojuredocs information. java.net.ConnectException: Connection timed out: connect
2022-06-01T05:55:34.598Z  INFO [clojure-lsp.feature.clojuredocs:23] - [Clojuredocs] Refreshing clojuredocs cache took 73610ms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    language server dependentIn order to get this fixed it is needed to change a behavior of the server component

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions