emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.04k stars 139 forks source link

emacs28, lsp-ui-mode, File local-variables error: (invalid-function (((class color) (min-colors 89)) (:background #f8e8c6 :foreground #876d26))) #496

Closed yssource closed 4 years ago

yssource commented 4 years ago
Debugger entered--Lisp error: (invalid-function (((class color) (min-colors 89)) (:background "#f8e8c6" :foreground "#876d26")))
  ((((class color) (min-colors 89)) (:background "#f8e8c6" :foreground "#876d26")))
  eval(((((class color) (min-colors 89)) (:background "#f8e8c6" :foreground "#876d26"))))
  custom-initialize-reset(lsp-ui-doc-header (funcall #'#f(compiled-function () #<bytecode 0x1e0000171e91>)))
  custom-declare-variable(lsp-ui-doc-header (funcall #'#f(compiled-function () #<bytecode 0x1e0000171e91>)) "Whether or not to enable the header which display ..." :type boolean :group lsp-ui-doc)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\310\311!\203&\0\300\312!\210\313\314\315\316\317\320\317\321\317\322\323\324..." [require lsp-protocol lsp-mode dash dash-functional goto-addr markdown-mode cl-lib featurep xwidget-internal xwidget custom-declare-group lsp-ui-doc nil "Display informations of the current line." :group tools convenience lsp-ui :link (custom-manual "(lsp-ui-doc) Top") (info-link "(lsp-ui-doc) Customizing") custom-declare-variable lsp-ui-doc-enable funcall function #f(compiled-function () #<bytecode 0x1e0000171e5d>) "Whether or not to enable lsp-ui-doc." :type boolean lsp-ui-doc-header #f(compiled-function () #<bytecode 0x1e0000171e91>) "Whether or not to enable the header which display ..." lsp-ui-doc-include-signature #f(compiled-function () #<bytecode 0x1e0000171e91>) "Whether or not to include the object signature/typ..." lsp-ui-doc-position #f(compiled-function () #<bytecode 0x1e00277079b9>) "Where to display the doc." (choice (const :tag "Top" top) (const :tag "Bottom" bottom) (const :tag "At point" at-point)) lsp-ui-doc-alignment #f(compiled-function () #<bytecode 0x1e000010d9b5>) "How to align the doc.\nThis only takes effect when ..." (choice (const :tag "Frame" frame) (const :tag "Window" window)) lsp-ui-doc-border #f(compiled-function () #<bytecode 0x1e00065188e7b>) "Border color of the frame." color lsp-ui-doc-max-width #f(compiled-function () #<bytecode 0x1e000017154d>) ...] 14)
  require(lsp-ui-doc)
  eval-buffer(#<buffer  *load*> nil "/home/jimmy/.emacs.d/elpa/28.0/develop/lsp-ui-2020..." nil t)  ; Reading at buffer position 1702
  load-with-code-conversion("/home/jimmy/.emacs.d/elpa/28.0/develop/lsp-ui-2020..." "/home/jimmy/.emacs.d/elpa/28.0/develop/lsp-ui-2020..." nil t)
  (lsp-ui-mode)
  (progn (lsp-ui-mode))
  (if (functionp 'lsp-ui-mode) (progn (lsp-ui-mode)))
  (with-no-warnings (if (functionp 'lsp-ui-mode) (progn (lsp-ui-mode))) (cond ((eq :none lsp-prefer-flymake)) ((and (not (version< emacs-version "26.1")) lsp-prefer-flymake) (lsp--flymake-setup)) ((and (functionp 'lsp-ui-mode) (featurep 'flycheck)) (require 'lsp-ui-flycheck) (lsp-ui-flycheck-enable t) (flycheck-mode 1))))
  lsp--auto-configure()
  lsp()
  spacemacs//c-c++-setup-lsp-ccls()
  (cond ((eq val 'lsp-clangd) (spacemacs//c-c++-setup-lsp-clangd)) ((eq val 'lsp-ccls) (spacemacs//c-c++-setup-lsp-ccls)) ((eq val 'rtags) (spacemacs//c-c++-setup-rtags)) ((eq val 'ycmd) (spacemacs//c-c++-setup-ycmd)) (t nil))
  (let* ((val (spacemacs//c-c++-backend))) (cond ((eq val 'lsp-clangd) (spacemacs//c-c++-setup-lsp-clangd)) ((eq val 'lsp-ccls) (spacemacs//c-c++-setup-lsp-ccls)) ((eq val 'rtags) (spacemacs//c-c++-setup-rtags)) ((eq val 'ycmd) (spacemacs//c-c++-setup-ycmd)) (t nil)))
  spacemacs//c-c++-setup-backend()
  run-hooks(c++-mode-local-vars-hook)
  spacemacs//run-local-vars-mode-hook()
  run-hooks(hack-local-variables-hook)
  hack-local-variables-apply()
  hack-local-variables(no-mode)
  run-mode-hooks(c++-mode-hook)
  c++-mode()
  set-auto-mode-0(c++-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer main.cpp> "/tmp/hello/main.cpp" nil nil "/tmp/hello/main.cpp" (326 47))
  find-file-noselect("/tmp/hello/main.cpp" nil nil nil)
  #f(compiled-function (filename &optional wildcards) "Edit file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if none already exists.\nInteractively, the default if you just type RET is the current directory,\nbut the visited file name is available through the minibuffer history:\ntype \\[next-history-element] to pull it into the minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs prompts for\nthe file name, the result is affected by `file-name-at-point-functions',\nwhich by default try to guess the file name by looking at point in the\ncurrent buffer.  Customize the value of `file-name-at-point-functions'\nor set it to nil, if you want only the visited file name and the\ncurrent directory to be available on first \\[next-history-element]\nrequest.\n\nYou can visit files on remote machines by specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the file name.  You can\nalso visit local files as a different user by specifying\n/sudo::FILE for the file name.\nSee the Info node `(tramp)File name Syntax' in the Tramp Info\nmanual, for more about this.\n\nInteractively, or if WILDCARDS is non-nil in a call from Lisp,\nexpand wildcards (if any) and visit multiple files.  You can\nsuppress wildcard expansion by setting `find-file-wildcards' to nil.\n\nTo visit a file without any kind of conversion and without\nautomatically choosing a major mode, use \\[find-file-literally]." (interactive #f(compiled-function () #<bytecode 0x1131212787f314b>)) #<bytecode 0x155ebbcbe2870d02>)("/tmp/hello/main.cpp" nil)
  ad-Advice-find-file(#f(compiled-function (filename &optional wildcards) "Edit file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if none already exists.\nInteractively, the default if you just type RET is the current directory,\nbut the visited file name is available through the minibuffer history:\ntype \\[next-history-element] to pull it into the minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs prompts for\nthe file name, the result is affected by `file-name-at-point-functions',\nwhich by default try to guess the file name by looking at point in the\ncurrent buffer.  Customize the value of `file-name-at-point-functions'\nor set it to nil, if you want only the visited file name and the\ncurrent directory to be available on first \\[next-history-element]\nrequest.\n\nYou can visit files on remote machines by specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the file name.  You can\nalso visit local files as a different user by specifying\n/sudo::FILE for the file name.\nSee the Info node `(tramp)File name Syntax' in the Tramp Info\nmanual, for more about this.\n\nInteractively, or if WILDCARDS is non-nil in a call from Lisp,\nexpand wildcards (if any) and visit multiple files.  You can\nsuppress wildcard expansion by setting `find-file-wildcards' to nil.\n\nTo visit a file without any kind of conversion and without\nautomatically choosing a major mode, use \\[find-file-literally]." (interactive #f(compiled-function () #<bytecode 0x1131212787f314b>)) #<bytecode 0x155ebbcbe2870d02>) "/tmp/hello/main.cpp")
  apply(ad-Advice-find-file #f(compiled-function (filename &optional wildcards) "Edit file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if none already exists.\nInteractively, the default if you just type RET is the current directory,\nbut the visited file name is available through the minibuffer history:\ntype \\[next-history-element] to pull it into the minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs prompts for\nthe file name, the result is affected by `file-name-at-point-functions',\nwhich by default try to guess the file name by looking at point in the\ncurrent buffer.  Customize the value of `file-name-at-point-functions'\nor set it to nil, if you want only the visited file name and the\ncurrent directory to be available on first \\[next-history-element]\nrequest.\n\nYou can visit files on remote machines by specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the file name.  You can\nalso visit local files as a different user by specifying\n/sudo::FILE for the file name.\nSee the Info node `(tramp)File name Syntax' in the Tramp Info\nmanual, for more about this.\n\nInteractively, or if WILDCARDS is non-nil in a call from Lisp,\nexpand wildcards (if any) and visit multiple files.  You can\nsuppress wildcard expansion by setting `find-file-wildcards' to nil.\n\nTo visit a file without any kind of conversion and without\nautomatically choosing a major mode, use \\[find-file-literally]." (interactive #f(compiled-function () #<bytecode 0x1131212787f314b>)) #<bytecode 0x155ebbcbe2870d02>) "/tmp/hello/main.cpp")
  find-file("/tmp/hello/main.cpp")
  #f(compiled-function (f) #<bytecode -0xe5ee923465b4e20>)("/tmp/hello/main.cpp")
  ivy-call()
  ivy-read("Recentf: " ("/tmp/hello/main.cpp" "/home/jimmy/.emacs.d/.cache/layouts/persp-auto-sav..." "/home/jimmy/workspace/git/yssource/abquant-data/cx..." "/home/jimmy/workspace/git/alandefreitas/matplotplu..."  ...) :action #f(compiled-function (f) #<bytecode -0xe5ee923465b4e20>) :require-match t :caller counsel-recentf)
  counsel-recentf()
  funcall-interactively(counsel-recentf)
  call-interactively(counsel-recentf nil nil)
  command-execute(counsel-recentf)
sebastiencs commented 4 years ago

@yssource It looks like an error in your configuration. It seems your forgot a quote (') somewhere

yssource commented 4 years ago

@sebastiencs Thanks a lot. The problem got disappeared after reinstalling all of my layers and packages.