Liking cljdoc? Tell your friends :D

Capabilities

Implementation Status

Below are all the currently supported LSP capabilities and their implementation status:

capabilitydonenotes
initialize
initialized
shutdown
exit
$/cancelRequest
$/progress
window/showDocument
window/showMessage
window/showMessageRequest
window/logMessage
window/workDoneProgress/create
window/workDoneProgress/cancel
telemetry/event
client/registerCapability
client/unregisterCapability
workspace/workspaceFolders
workspace/didChangeWorkspaceFolders
workspace/didChangeConfigurationCurrently does nothing but log
workspace/configuration
workspace/didChangeWatchedFiles
workspace/symbol
workspace/executeCommandSee Extra capabilities
workspace/applyEditTextDocumentEdit and RenameFile only
textDocument/didOpen
textDocument/didChange
textDocument/willSave
textDocument/willSaveWaitUntil
textDocument/didSaveDo nothing currently
textDocument/didClose
textDocument/publishDiagnostics
textDocument/completion
completionItem/resolve
textDocument/hover
textDocument/signatureHelpMissing support for active parameter ATM
textDocument/declaration
textDocument/definitionTODO: Find java classes definition
textDocument/typeDefinition
textDocument/implementation
textDocument/references
textDocument/documentHighlight
textDocument/documentSymbol
textDocument/codeAction
codeAction/resolve
textDocument/codeLens
codeLens/resolve
textDocument/documentLink
documentLink/resolve
textDocument/documentColor
textDocument/colorPresentation
textDocument/formatting
textDocument/rangeFormatting
textDocument/onTypeFormatting
textDocument/rename
textDocument/prepareRename
textDocument/foldingRange
textDocument/selectionRange
textDocument/semanticTokens/full
textDocument/semanticTokens/full/delta
textDocument/semanticTokens/range
workspace/semanticTokens/refresh
workspace/codeLens/refresh
textDocument/linkedEditingRange
textDocument/prepareCallHierarchy
callHierarchy/incomingCalls
callHierarchy/outgoingCalls
textDocument/moniker

Extra capabilities

Besides LSP official capabilities, clojure-lsp has some extra features:

Refactorings

It should be possible to introduce most of the refactorings here


More details

Calling executeCommand with the following commands and additional args will notify the client with applyEdit. All commands expect the first three args to be [document-uri, line, column] (eg ["file:///home/snoe/file.clj", 13, 11])

donecommandargsnotes
add-import-to-namespace[document-uri, line, column, import-name]
add-missing-libspec
clean-ns
cycle-coll
cycle-privacy
expand-let
extract-function[document-uri, line, column, function-name]
inline-symbol
introduce-let[document-uri, line, column, binding-name]
move-to-let[document-uri, line, column, binding-name]
thread-first
thread-first-all
thread-last
thread-last-all
unwind-all
unwind-thread
resolve-macro-as[document-uri, line, column, resolved-full-symbol kondo-config-path]
create-test

See Vim client section for an example.

Emacs provides all those refactorings via lsp-mode with the lsp-clojure- prefix.

Other clients might provide a higher level interface to workspace/executeCommand you need to pass the path, line and column numbers.

Custom methods

clojure-lsp has some custom LSP methods that doesn't follow the protocol but aggregate value as a clojure IDE:

commandargsnotes
clojure/serverInfo/raw Use to retrieve from server the server configuration information
clojure/serverInfo/log Use to log to user the server configuration information
clojure/cursorInfo/log[document-uri, line, column]Use to log to user the debugging information for the symbol at cursor
clojure/clojuredocs/raw[symbol-name, symbol-ns]Use to retreive any Clojuredocs entry. Will return null if no entry found.

Can you improve this documentation? These fine people already did:
Eric Dallo, Peter Strömberg & dcfrankel
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close