clojure-emacs-autocomplete

1. https://github.com/clojure-emacs/cider#keyboard-shortcuts

2. install emacs 24.5

3. http://clojure-doc.org/articles/tutorials/emacs.html

4. http://stackoverflow.com/questions/23233470/how-to-use-ciders-built-in-autocompletion-in-clojure/28249313#28249313

5. edit .lein project.clj

  

{:user
{
:java-cmd "C:\\Program Files\\Java\\jdk1.8.0\\bin\\java.exe"
:plugins [
[cider/cider-nrepl "0.9.0-SNAPSHOT"]
]
:dependencies [[org.clojure/tools.nrepl "0.2.7"]]
}
}

6. edit project‘s project.clj

    :profiles {:dev {:plugins [[cider/cider-nrepl "0.9.0"]]}}

7. the .emacs

(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.
 ‘(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))))
(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.
 )

(require ‘cl)
(require ‘package)
(add-to-list ‘package-archives ‘("melpa" . "http://melpa.org/packages/") t) 

(let ((default-directory "~/.emacs.d/elpa/"))
(normal-top-level-add-to-load-path ‘("."))
(normal-top-level-add-subdirs-to-load-path))  

(require ‘color-theme)
(color-theme-initialize)
(color-theme-bharadwaj-slate)

(require ‘auto-complete-config)
(add-to-list ‘ac-dictionary-directories "~/.emacs.d/elpa/auto-complete-20150615.34/dict")

(require ‘clojure-mode)
(require ‘cider-mode)
(require ‘ac-cider)

(ac-config-default)
(add-hook ‘cider-repl-mode-hook ‘ac-cider-setup)                                                                                                              

(add-hook ‘cider-mode-hook ‘ac-cider-setup)
(eval-after-load "auto-complete"
  ‘(add-to-list ‘ac-modes ‘cider-repl-mode))

(add-hook ‘clojure-mode-hook ‘paredit-mode)
(add-hook ‘clojurescript-mode-hook ‘paredit-mode)                                                                                                             

(add-hook ‘clojure-mode-hook ‘rainbow-delimiters-mode)
(setq cider-repl-pop-to-buffer-on-connect nil)

(require ‘highlight-parentheses)
(add-hook ‘clojure-mode-hook
          (lambda ()
            (highlight-parentheses-mode t)))

(defun set-auto-complete-as-completion-at-point-function ()
  (setq completion-at-point-functions ‘(auto-complete)))
(add-hook ‘auto-complete-mode-hook ‘set-auto-complete-as-completion-at-point-function)
(add-hook ‘cider-repl-mode-hook ‘set-auto-complete-as-completion-at-point-function)                                                                           

(add-hook ‘cider-mode-hook ‘set-auto-complete-as-completion-at-point-function)
(eval-after-load "cider"
  ‘(define-key cider-mode-map (kbd "C-c C-d") ‘ac-cider-popup-doc))

(package-initialize)

  

时间: 2024-10-06 12:23:53

clojure-emacs-autocomplete的相关文章

jquery ui autoComplete自动完成

官网:http://jqueryui.com/autocomplete 最简单的形式: var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure",  ]; $( "#tags" ).autocomplete({ source:

TIOBE 2014年9月编程语言排行榜 Java、C++跌至历史最低点

TIOBE 2014年9月编程语言排行榜今天发布,Java.C++跌至历史最低点,前三名则没有变化,C.Java.Objective-C. 尽管Java排名第二,但其份额却在下降,从图表上可以看出,下降了-2.01%.另外排名第四的C++份额下降幅度也较大,为-3.99%. TIOBE编程语言社区排行榜是编程语言流行趋势的一个指标,每月更新,这份排行榜排名基于互联网上有经验的程序员.课程和第三方厂商的数量.排名使用著 名的搜索引擎(诸如Google.MSN.Yahoo!.Wikipedia.Yo

Programming Languages

http://hyperpolyglot.org/ Programming Languages Interpreted Languages:JavaScript, PHP, Python, Ruby More Interpreted Languages:Perl, Tcl, Lua, Groovy Operating System Automation:POSIX Shell, Cmd.exe, PowerShell GUI Scripting:Smalltalk, AutoHotkey, Ap

编程语言排行榜2014年10月

[天极软件频道消息]近日TIOBE发布2014年10月编程语言排行榜,C.Java.Objective-C依然排名前三:Java.C++份额持续下降跌至历史最低点:Google Dart首次进入Top 20,排名第17位. TIOBE编程语言社区排行榜 TIOBE编程语言社区排行榜是编程语言流行趋势的一个指标,每月更新,这份排行榜排名基于互联网上有经验的程序员.课程和第三方厂商的数量.排名使用著名的搜索引擎(诸如Google.MSN.Yahoo!.Wikipedia.YouTube以及Baidu

gocode+auto-complete搭建emacs的go语言自动补全功能

上篇随笔记录了在emacs中使用go-mode和goflymake搭建了go语言的简单编程环境(推送门),今天来记录一下使用gocode+auto-complete配置emacs中go语言的自动补全功能.先看一下效果图??,我的emacs配置可以参考myemacs-conf. 关于gocode gocode是nsf写的各种编辑器提供go语言自动补全功能的工具.参考github中的README.md对gocode进行一下安装. $ go get -u github.com/nsf/gocode 安

Emacs 安装 clojure开发环境

安装CIDER模块 还是比较简单的,就是用list-packages查找,找到CIDER后,安装. 直接用官方文档的命令安装会失败,还是用上面的方式. 使用middleware匹配版本 工程的project.clj文件中添加倒数第二行 (defproject project1 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME&quo

JQuery UI之Autocomplete(4)多值输入、远程缓存与组合框

1.多值输入 首先加入相关的css和js文件,以及对应的HTML代码如下: <link href="../css/jquery-ui.css" rel="stylesheet" /> <script type="text/javascript" src="../js/jquery-1.9.1.min.js" ></script> <script type="text/java

Emacs 中的coding system

.title { text-align: center; margin-bottom: .2em } .subtitle { text-align: center; font-size: medium; font-weight: bold; margin-top: 0 } .todo { font-family: monospace; color: red } .done { font-family: monospace; color: green } .priority { font-fami

JQuery 插件 autocomplete

最近有个功能就是对文本框里的内容模糊查询,并出现一个下拉框对模糊查询出来的内容进行选择.最开始写的时候我就想起以前的公司遇到过,用的是rpc(简称人品差),but我已经记不得咋个实现的了,然后各种求助以前的同事.然而他们都不晓得咋个弄了.好吧,咋办呢,我就问旁边的同事有没有遇到过这种类似的功能,怎么做的,早点问也不至于时间白白浪费吧.于是就有了autocomplete.我的知识面不广,所以现在我也尽量在总结,不要笑. 进入主题: 官网地址:api.jqueryui.com/autocomplet

AUCTeX+Emacs 是目前我见过的能最大限度提高 LaTeX 编辑效率的编辑器 (转)

AUCTeX+Emacs 是目前我见过的能最大限度提高 LaTeX 编辑效率的编辑器 效率的提高程度取决于你对 Emacs/lisp 的熟悉程度,但可以说基本上能提高到你所能想象的最大程度了.下面我会就效率方面介绍它的几个特性,不仅与 WinEdt 做对比,同时也和其他 OSX上的某些编辑器做一下对比, 安装和配置网上很多,比如这篇小文档[1],这里就不介绍了. 强大的快捷键系统 (CDLaTeX) 就提高编辑效率而言,快捷键是最重要的,同样的内容别的编辑要按10下键盘才能实现你就按5下就实现了