Skip to content

rustic-analyzer-macro-expand fails when Rustic uses the tree-sitter Rust mode #83

@yoav-za

Description

@yoav-za

This issue occurs because rustic-macro-expansion-mode tries to reference non tree-sitter font locking data:

rustic/rustic-lsp.el

Lines 159 to 164 in c1e1d5d

(setq-local font-lock-defaults
'(rust-font-lock-keywords
nil nil nil nil
(font-lock-syntactic-face-function
. rust-mode-syntactic-face-function)))
)

Error trace:

Debugger entered--Lisp error: (void-function rust-syntax-propertize)
  rust-syntax-propertize(1 1)
  syntax-propertize(1)
  font-lock-default-fontify-syntactically(1 1 nil)
  font-lock-fontify-syntactically-region(1 1 nil)
  font-lock-default-fontify-region(1 1 nil)
  font-lock-fontify-region(1 1)
  font-lock-after-change-function(1 1 64)
  rustic-analyzer-macro-expand("{\n    std::io::_print(std::format_args_nl!(\"Hello,...")
  lsp-rust-analyzer-expand-macro()
  funcall-interactively(lsp-rust-analyzer-expand-macro)

Happens on Emacs 29 with a recent rustic version c1e1d5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions