设置lintnode

所以,我试图设置lintnode与emacs工作,它似乎安装正常。 当我启动时,我没有在缓冲区或任何东西的错误。

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

这里是我的emacs init文件的副本,以检查出你是否认为这可能是问题。

如果这太混乱,这是一个粘贴箱。 Emacs Init

(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) 

js-mode-hook结尾处有一个额外的引号。 而问题的根源可能是你以后使用了不存在AFAIK的javascript-mode-hookjavascript-modejs-mode的别名,所以这个hook被称为js-mode-hook )。

这对于用lintnode安装JSLint具有正确的指导。 http://emacswiki.org/emacs/FlymakeJavaScript