Giter Site home page Giter Site logo

Comments (8)

sebastiencs avatar sebastiencs commented on May 26, 2024

Thanks for the report.
Can you please execute toggle-debug-on-error before lsp-ui-peek-find-definitions and give the output ?

from lsp-ui.

ramsayleung avatar ramsayleung commented on May 26, 2024

the debug message:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  aref(nil 0)
  (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags)
  (and (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags))
  (or (and (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list (quote lsp--workspace) lsp--cur-workspace)))
  (progn nil (or (and (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list (quote lsp--workspace) lsp--cur-workspace))) (aref lsp--cur-workspace 6))
  (aref (progn nil (or (and (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list (quote lsp--workspace) lsp--cur-workspace))) (aref lsp--cur-workspace 6)) 0)
  (memq (aref (progn nil (or (and (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list (quote lsp--workspace) lsp--cur-workspace))) (aref lsp--cur-workspace 6)) 0) cl-struct-lsp--client-tags)
  (and (memq (aref (progn nil (or (and (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list (quote lsp--workspace) lsp--cur-workspace))) (aref lsp--cur-workspace 6)) 0) cl-struct-lsp--client-tags))
  (or (and (memq (aref (progn nil (or (and (memq ... cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list ... lsp--cur-workspace))) (aref lsp--cur-workspace 6)) 0) cl-struct-lsp--client-tags)) (signal (quote wrong-type-argument) (list (quote lsp--client) (progn nil (or (and (memq (aref lsp--cur-workspace 0) cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list (quote lsp--workspace) lsp--cur-workspace))) (aref lsp--cur-workspace 6)))))
  (progn nil (or (and (memq (aref (progn nil (or (and ...) (signal ... ...)) (aref lsp--cur-workspace 6)) 0) cl-struct-lsp--client-tags)) (signal (quote wrong-type-argument) (list (quote lsp--client) (progn nil (or (and (memq ... cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list ... lsp--cur-workspace))) (aref lsp--cur-workspace 6))))) (let* ((v (progn nil (or (and (memq ... cl-struct-lsp--workspace-tags)) (signal (quote wrong-type-argument) (list ... lsp--cur-workspace))) (aref lsp--cur-workspace 6)))) (aset v 13 (+ (aref v 13) 1))))
  (plist-put (progn (progn (or (stringp request) (signal (quote wrong-type-argument) (list (quote string) request (quote request)))) nil) (list :jsonrpc "2.0" :method request :params (or param (list :textDocument (list :uri (lsp--path-to-uri buffer-file-name)) :position (list :line (1- (line-number-at-pos)) :character (- (point) (line-beginning-position))))))) :id (progn nil (or (and (memq (aref (progn nil (or ... ...) (aref lsp--cur-workspace 6)) 0) cl-struct-lsp--client-tags)) (signal (quote wrong-type-argument) (list (quote lsp--client) (progn nil (or (and ...) (signal ... ...)) (aref lsp--cur-workspace 6))))) (let* ((v (progn nil (or (and ...) (signal ... ...)) (aref lsp--cur-workspace 6)))) (aset v 13 (+ (aref v 13) 1)))))
  (lsp--send-request (plist-put (progn (progn (or (stringp request) (signal (quote wrong-type-argument) (list (quote string) request (quote request)))) nil) (list :jsonrpc "2.0" :method request :params (or param (list :textDocument (list :uri (lsp--path-to-uri buffer-file-name)) :position (list :line (1- ...) :character (- ... ...)))))) :id (progn nil (or (and (memq (aref (progn nil ... ...) 0) cl-struct-lsp--client-tags)) (signal (quote wrong-type-argument) (list (quote lsp--client) (progn nil (or ... ...) (aref lsp--cur-workspace 6))))) (let* ((v (progn nil (or ... ...) (aref lsp--cur-workspace 6)))) (aset v 13 (+ (aref v 13) 1))))))
  (let ((result (lsp--send-request (plist-put (progn (progn (or ... ...) nil) (list :jsonrpc "2.0" :method request :params (or param ...))) :id (progn nil (or (and ...) (signal ... ...)) (let* (...) (aset v 13 ...))))))) (if result (progn (lsp-ui-peek--locations-to-xref-items result))))
  (let ((result (let ((result (lsp--send-request (plist-put ... :id ...)))) (if result (progn (lsp-ui-peek--locations-to-xref-items result)))))) (if result (progn (-filter (quote identity) result))))
  lsp-ui-peek--get-references(definitions "textDocument/definition" nil)
  (let ((xrefs (lsp-ui-peek--get-references kind request param))) (if xrefs nil (user-error "No %s found for: %s" (symbol-name kind) input)) (xref-push-marker-stack) (if (featurep (quote evil-jumps)) (progn (let ((evil--jumps-window-jumps #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)))) (evil-set-jump)))) (if (and (not lsp-ui-peek-always-show) (not (cdr xrefs)) (= (length (plist-get (car xrefs) :xrefs)) 1)) (let* ((xref (car (plist-get (car xrefs) :xrefs))) (file (gethash "uri" xref)) (range (gethash "range" xref)) (--dash-source-7-- (gethash "start" range)) (line (gethash "line" --dash-source-7--)) (col (gethash "character" --dash-source-7--)) (file (string-remove-prefix "file://" file))) (lsp-ui-peek--goto-xref (list (quote :file) file (quote :line) line (quote :column) col))) (lsp-ui-peek-mode) (lsp-ui-peek--show xrefs)))
  lsp-ui-peek--find-xrefs(is_token_expired definitions "textDocument/definition")
  lsp-ui-peek-find-definitions()
  funcall-interactively(lsp-ui-peek-find-definitions)
  call-interactively(lsp-ui-peek-find-definitions record nil)
  command-execute(lsp-ui-peek-find-definitions record)
  #[257 "\304\305!\203\f

from lsp-ui.

sebastiencs avatar sebastiencs commented on May 26, 2024

lsp-rust doesn't run on your buffer.
How did you configure lsp-rust ?

(require 'lsp-mode)
(require 'lsp-rust)
(add-hook 'rust-mode-hook #'lsp-rust-enable)

It should be something like that

Check in the *messages* buffer if there are no errors

from lsp-ui.

ramsayleung avatar ramsayleung commented on May 26, 2024

Sorry for my stupid mistake:

(use-package lsp-rust
  :ensure t
  :defer t ;; I have not loaded lsp-rust
  :config (progn
	    (add-hook 'rust-mode-hook 'lsp-rust-enable)
	    (add-hook 'rust-mode-hook 'flycheck-mode)
	    ))

Thanks for your reply

from lsp-ui.

sebastiencs avatar sebastiencs commented on May 26, 2024

No problem :)

from lsp-ui.

ramsayleung avatar ramsayleung commented on May 26, 2024

Since I have the same issue again, so just I reopen this looking for suggestion, this is error message with toggle-debug-on-error:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  lsp--on-hover()
  eldoc-print-current-symbol-info()
  #[0 "�\204�

This is my Python code with Chinese comment:

class JDSpider(scrapy.Spider):
    name = "jindong"
    rotete_user_agent = True

    # 在关闭爬虫的之前,保存资源
    def __init__(self):
        self.price_url = "https://p.3.cn/prices/mgets?pduid={}&skuIds=J_{}"
        self.price_backup_url = "https://p.3.cn/prices/get?pduid={}&skuid=J_{}"
        self.jd_subdomain = ["jiadian", "shouji", "wt", "shuma", "diannao",
                             "bg", "channel", "jipiao", "hotel", "trip",
                             "ish", "book", "e", "health", "baby", "toy",
                             "nong", "jiu", "fresh", "china", "che", "list"]

    def start_requests(self):
        urls = ['https://jd.com/']
        for url in urls:
            yield scrapy.Request(url=url, callback=self.parse)

Is it something related to my Chinese word?

from lsp-ui.

sebastiencs avatar sebastiencs commented on May 26, 2024

@samrayleung I don't have any issue with this code, do you have the lastest packages of lsp-mode and lsp-ui ?

from lsp-ui.

ramsayleung avatar ramsayleung commented on May 26, 2024

I don't have issue after upgrading lsp-mode and lsp-ui to the lastest version. It seems works! Thanks again for your reply :)

from lsp-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.