We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding
(defun serve-d-command () "Shell command to start serve-d." '("dub" "run" "serve-d@~master")) ;; "--logfile" "serve-d.log" "--loglevel" "all" (require 'lsp-mode nil t) (dolist (mode '(d-mode d-ts-mode)) ;; (add-hook mode #'lsp) (add-to-list 'lsp-language-id-configuration `(,mode . "d"))) (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection #'serve-d-command) :major-modes '(d-mode d-ts-mode) :server-id 'serve-d))
to my ~/.emacs.d/init.el followed by a manual evalutation of
~/.emacs.d/init.el
(dolist (mode '(d-mode d-ts-mode)) ;; (add-hook mode #'lsp) (add-to-list 'lsp-language-id-configuration `(,mode . "d"))) (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection #'serve-d-command) :major-modes '(d-mode d-ts-mode) :server-id 'serve-d))
and manual activation of lsp-mode in d-mode sets up a connection to an instance of serve-d.
lsp-mode
d-mode
However trying out xref-find-definitions on, for instance, the symbol WordOrder.mostSignificantWordFirst at https://github.com/nordlow/gmp-d/blob/master/src/gmp/z.d#L312 results in
xref-find-definitions
WordOrder.mostSignificantWordFirst
Debugger entered--Lisp error: (error "Attempted to get unknown instance component DCDComponent in instance cwd:$HOME/Work/gmp-d") error("Attempted to get unknown instance component DCDComponent in instance cwd:$HOME/Work/gmp-d") lsp-request("textDocument/definition" (:textDocument (:uri "file://$HOME/Work/gmp-d/src/gmp/z.d") :position (:line 311 :character 25))) #f(compiled-function (backend identifier) #<bytecode 0xc84f7d380117922>)(xref-lsp #("mostSignificantWordFirst" 0 24 (identifier-at-point t face (highlight-symbol-face font-lock-constant-face) fontified t))) apply(#f(compiled-function (backend identifier) #<bytecode 0xc84f7d380117922>) xref-lsp #("mostSignificantWordFirst" 0 24 (identifier-at-point t face (highlight-symbol-face font-lock-constant-face) fontified t))) xref-backend-definitions(xref-lsp #("mostSignificantWordFirst" 0 24 (identifier-at-point t face (highlight-symbol-face font-lock-constant-face) fontified t))) #f(compiled-function () #<bytecode -0xe5cbf2f02411dfc>)() xref-show-definitions-buffer(#f(compiled-function () #<bytecode -0xe5cbf2f02411dfc>) ((window . #<window 9 on z.d>) (display-action) (auto-jump))) xref--show-defs(#f(compiled-function () #<bytecode -0xe5cbf2f02411dfc>) nil) xref--find-definitions(#("mostSignificantWordFirst" 0 24 (identifier-at-point t face (highlight-symbol-face font-lock-constant-face) fontified t)) nil) xref-find-definitions(#("mostSignificantWordFirst" 0 24 (identifier-at-point t face (highlight-symbol-face font-lock-constant-face) fontified t))) funcall-interactively(xref-find-definitions #("mostSignificantWordFirst" 0 24 (identifier-at-point t face (highlight-symbol-face font-lock-constant-face) fontified t))) command-execute(xref-find-definitions)
. What's missing?
See also https://forum.dlang.org/post/[email protected].
The text was updated successfully, but these errors were encountered:
lookup works fine here with vscode, so it's likely an issue with how serve-d is initialized with emacs.
Can you share more log, especially the initialization parts?
Sorry, something went wrong.
lookup works fine here with vscode, so it's likely an issue with how serve-d is initialized with emacs. Can you share more log, especially the initialization parts?
Ok, thanks.
Which logs are you referring? The output from serve-d?
the LSP logs, ideally also what emacs sends and receives, but the serve-d logs alone (e.g. piped to a file) would probably also help already.
Enable trace logging for it
No branches or pull requests
Adding
to my
~/.emacs.d/init.el
followed by a manual evalutation ofand manual activation of
lsp-mode
ind-mode
sets up a connection to an instance of serve-d.However trying out
xref-find-definitions
on, for instance, the symbolWordOrder.mostSignificantWordFirst
at https://github.com/nordlow/gmp-d/blob/master/src/gmp/z.d#L312 results in. What's missing?
See also https://forum.dlang.org/post/[email protected].
The text was updated successfully, but these errors were encountered: