1

因此,我正在尝试设置 lintnode 以与 emacs 一起使用,并且它似乎安装得很好。当我启动时,我没有在缓冲区或任何东西中收到错误。

但是,当我去写一些 JS 时,我没有得到任何功能。所以我检查 npm 以查看所有节点包是否都是最新的,它们不是,但即使在我执行“npm update”并获得 200 个响应之后,版本仍然没有变化。我正在运行 Xubuntu 以获得一些背景信息。

这是我的 emacs 初始化文件的副本,以检查您是否认为这可能是问题所在。

如果这太乱了,这是一个粘贴箱。Emacs 初始化

(add-to-list 'load-path "~/.emacs.d/auto-complete-1.3.1")
;Load the default configuration
(require 'auto-complete-config)
;Make sure we can find the dictionaries
(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete-1.3.1/dict")
;Use dictionaries by default
(setq-default ac-sources (add-to-list 'ac-sources 'ac-source-dictionary))
(global-auto-complete-mode t)
;Start auto completion after two characters of a word
(setq ac-auto-start 2)
; case sensitivity is important when finding matches
(setq ac-ignore-case nil)

(add-hook 'js-mode-hook'
  (lambda ()
    ;;Scan the file for nested code blocks
    (imenu-add-menubar-index)
    ;;Activate folding mode
    (hs-minor-mode t)
    )
)

;;Yasnipped: Auto-codesnippet manager
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet")
(require 'yasnippet)
(yas-global-mode 1)

;;Lintnode
(add-to-list 'load-path "~/.emacs.d/plugins/lintnode")
(require 'flymake-jslint)
(add-hook 'javascript-mode-hook
  (lambda () (flymake-mode t)))
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(lintnode-autostart t))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

;;Flymake-the nice minibuffer cursor linked message
(add-to-list 'load-path "~/.emacs.d/plugins/flymake")
(require 'flymake-cursor)
4

2 回答 2

1

末尾有一个额外的报价js-mode-hook。问题的根源可能是您稍后使用javascript-mode-hook不存在的 AFAIK (javascript-mode是一个别名,js-mode因此调用了该钩子js-mode-hook)。

于 2013-01-24T22:46:01.577 回答
0

这具有使用 lintnode 安装 JSLint 的正确说明。 http://emacswiki.org/emacs/FlymakeJavaScript

于 2013-01-25T16:34:48.747 回答