shun / ddc-source-vim-lsp

vim-lsp source for ddc.vim
MIT License
44 stars 13 forks source link

Can't use completion with clojure-lsp #15

Closed sakuraiyuta closed 2 years ago

sakuraiyuta commented 2 years ago

Environment

vim version:

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@HMBRW-A-001-M1-004.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.7.2_1/share/nvim"

Run :checkhealth for more info

Issue

Can't use completion with clojure-lsp due to responses(a:data['response']['result']) from LSP don't be converted to type dictionary.(It's list)

Logs

vim-lsp's debug log:

木  8/11 20:41:34 2022:["--->", 5, "clojure-lsp", {"method": "textDocument/completion", "on_notification": "---funcref---", "params": {"textDocument": {"uri": "file:///**ommited**/core.clj"}, "position": {"character": 3, "line": 46}}}]
木  8/11 20:41:34 2022:["<---", 5, "clojure-lsp", {"response": {"id": 6, "jsonrpc": "2.0", "result": [{"label": "dec", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "dec"}, "kind": 3, "detail": "clojure.core/dec"}, {"label": "dec'", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "dec'"}, "kind": 3, "detail": "clojure.core/dec'"}, {"label": "decimal?", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "decimal?"}, "kind": 3, "detail": "clojure.core/decimal?"}, {"label": "declare", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "declare"}, "kind": 3, "detail": "clojure.core/declare"}, {"label": "dedupe", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "dedupe"}, "kind": 3, "detail": "clojure.core/dedupe"}, {"label": "def", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "def"}, "kind": 18, "detail": "clojure.core/def"}, {"label": "default-data-readers", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "default-data-readers"}, "kind": 6, "detail": "clojure.core/default-data-readers"}, {"label": "definline", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "definline"}, "kind": 3, "detail": "clojure.core/definline"}, {"label": "definterface", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "definterface"}, "kind": 3, "detail": "clojure.core/definterface"}, {"label": "defmacro", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defmacro"}, "kind": 3, "detail": "clojure.core/defmacro"}, {"label": "defmethod", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defmethod"}, "kind": 3, "detail": "clojure.core/defmethod"}, {"label": "defmulti", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defmulti"}, "kind": 3, "detail": "clojure.core/defmulti"}, {"label": "defn", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defn"}, "kind": 3, "detail": "clojure.core/defn"}, {"label": "defn-", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defn-"}, "kind": 3, "detail": "clojure.core/defn-"}, {"label": "defonce", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defonce"}, "kind": 3, "detail": "clojure.core/defonce"}, {"label": "defprotocol", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defprotocol"}, "kind": 3, "detail": "clojure.core/defprotocol"}, {"label": "defrecord", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defrecord"}, "kind": 3, "detail": "clojure.core/defrecord"}, {"label": "defstruct", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "defstruct"}, "kind": 3, "detail": "clojure.core/defstruct"}, {"label": "deftype", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "deftype"}, "kind": 3, "detail": "clojure.core/deftype"}, {"label": "delay", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "delay"}, "kind": 3, "detail": "clojure.core/delay"}, {"label": "delay?", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "delay?"}, "kind": 3, "detail": "clojure.core/delay?"}, {"label": "deliver", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "deliver"}, "kind": 3, "detail": "clojure.core/deliver"}, {"label": "denominator", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "denominator"}, "kind": 3, "detail": "clojure.core/denominator"}, {"label": "deref", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "deref"}, "kind": 3, "detail": "clojure.core/deref"}, {"label": "derive", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "derive"}, "kind": 3, "detail": "clojure.core/derive"}, {"label": "descendants", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "descendants"}, "kind": 3, "detail": "clojure.core/descendants"}, {"label": "destructure", "data": {"filename": "/clojure.core.clj", "ns": "clojure.core", "name": "destructure"}, "kind": 3, "detail": "clojure.core/destructure"}]}, "request": {"id": 6, "jsonrpc": "2.0", "method": "textDocument/completion", "params": {"textDocument": {"uri": "file:///**ommited**/core.clj"}, "position": {"character": 3, "line": 46}}}}]
木  8/11 20:41:34 2022:["s:on_stdout client request on_notification() error", "Vim(let):E715: 辞書型が必要です", "function <SNR>209_on_stdout_string[2]..<SNR>207_on_stdout[75]..<SNR>173_request_on_notification[3]..<SNR>174_createNext[1]..<SNR>174_subscribeSourceCallback[2]..<lambda>590[1]..ddc_vim_lsp#_callback, line 11"]