native win32

(setq package-archives '(("gnu"   . "http://mirrors.ustc.edu.cn/elpa/gnu/")
("melpa" . "http://mirrors.ustc.edu.cn/elpa/melpa/"))) (use-package rustic)
(add-hook 'rust-mode-hook
(lambda () (setq indent-tabs-mode nil)))
(add-hook 'rust-mode-hook
(lambda () (define-key rust-mode-map (kbd "C-c C-c") 'rust-run)))
(setq rust-format-on-save t) (require 'yasnippet)
(yas-global-mode 1)
(electric-pair-mode)
(global-company-mode) (add-hook 'julia-mode-hook 'julia-repl-mode) (setq racket-program "G:\\Program Files\\Racket\\Racket.exe")
(require 'racket-xp)
(add-hook 'racket-mode-hook #'racket-xp-mode) (add-hook 'racket-mode-hook #'racket-mode-xref-backend-function)
(add-hook 'racket-xp-mode-hook #'racket-xp-xref-backend-function)
(add-hook 'racket-repl-mode-hook #'racket-repl-xref-backend-function) (use-package paredit
:ensure t
:config
(dolist (m '(emacs-lisp-mode-hook
lisp-mode-hook
racket-mode-hook
racket-repl-mode-hook))
(add-hook m #'paredit-mode))
(bind-keys :map paredit-mode-map
("{" . paredit-open-curly)
("}" . paredit-close-curly))
(unless terminal-frame
(bind-keys :map paredit-mode-map
("M-[" . paredit-wrap-square)
("M-{" . paredit-wrap-curly)))) (eval-after-load 'scheme
'(define-key scheme-mode-map "\t" 'scheme-complete-or-indent))
(autoload 'scheme-get-current-symbol-info "scheme-complete" nil t)
(add-hook 'scheme-mode-hook
(lambda ()
(make-local-variable 'eldoc-documentation-function)
(setq eldoc-documentation-function 'scheme-get-current-symbol-info)
(eldoc-mode))) ;(require 'rainbow-delimiters)
(require 'highlight-parentheses) (dolist (m '(emacs-lisp-mode-hook
lisp-mode-hook
racket-mode-hook
racket-repl-mode-hook))
;(add-hook m #'rainbow-delimiters-mode)
(add-hook m #'highlight-parentheses-mode))
(global-paren-face-mode)
(load (expand-file-name "C:/users/o/quicklisp/slime-helper.el"))
(setq inferior-lisp-program "sbcl")
(slime-setup '(slime-fancy slime-company))
(add-to-list 'slime-contribs 'slime-repl)
(load-theme 'solarized-dark 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.
'(julia-program "G:/Julia 1.5.3/bin/julia.exe")
'(package-selected-packages
'(all-the-icons-dired dired-du dired-explorer dired-filter dired-icon dired-rainbow direx paren-face common-lisp-snippets redshank slime-company slime highlight-parentheses solarized-theme rainbow-delimiters yasnippet use-package-hydra use-package-ensure-system-package use-package-el-get use-package-chords thrift scribble-mode scheme-complete rustic racket-mode paredit mic-paren lsp-ui lsp-julia julia-vterm julia-shell julia-repl flycheck-rust flycheck-julia el-get company)))
(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.
'(default ((t (:family "Consolas" :foundry "outline" :slant normal :weight normal :height 143 :width normal)))))

msys2

;(setq package-archives '(("gnu"   . "http://mirrors.ustc.edu.cn/elpa/gnu/")
; ("melpa" . "http://mirrors.ustc.edu.cn/elpa/melpa/")))
(setq package-archives '(("gnu" . "http://mirrors.ustc.edu.cn/elpa/gnu/")
("melpa" . "http://mirrors.ustc.edu.cn/elpa/melpa/")
("melpa-stable" . "http://mirrors.ustc.edu.cn/elpa/melpa-stable/")
("org" . "http://mirrors.ustc.edu.cn/elpa/org/")))
(setq package-archives nil)
(global-company-mode)
(global-flycheck-mode) (eval-after-load 'company
'(add-to-list 'company-backends 'company-irony)) (eval-after-load 'company
'(add-to-list 'company-backends 'company-c-headers)) (add-hook 'c++-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'objc-mode-hook 'irony-mode) (defun compile-gtk-single-file ()
(interactive)
(let* ((base-name (file-name-base (buffer-file-name)))
(exe-name (concat base-name ".exe"))
(source-name (concat base-name ".c"))
(cmd (read-shell-command "Compile single gtk file: "
(concat "gcc `pkg-config --cflags gtk4` -o "
exe-name " "
source-name
" `pkg-config --libs gtk4`"
" && ./"
exe-name
" &"))))
(shell-command cmd))) (defun run-gtk-single-file ()
(interactive)
(let* ((base-name (file-name-base (buffer-file-name)))
(exe-name (concat base-name ".exe"))
(cmd (read-shell-command "Run single gtk file: "
(concat "./"
exe-name
" &"))))
(shell-command cmd))) (add-hook 'c-mode-hook
'(lambda ()
(local-set-key (kbd "C-c c") 'compile-gtk-single-file)
(local-set-key (kbd "C-c r") 'run-gtk-single-file))) (ivy-mode)
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
(setq search-default-mode #'char-fold-to-regexp)
(global-set-key "\C-s" 'swiper)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history) (setenv "GTAGSLIBPATH" "G:/msys64/mingw64/include/")
(load-file "g:/msys64/home/o/.emacs.d/global-tags.el/global-tags.el")
(add-hook 'c-mode-hook #'global-tags-exclusive-backend-mode)
(add-hook 'c-mode-hook
(lambda ()
(add-hook 'after-save-hook
#'global-tags-update-database-with-buffer
nil
t))) (use-package ivy-xref
:ensure t
:init
;; xref initialization is different in Emacs 27 - there are two different
;; variables which can be set rather than just one
(when (>= emacs-major-version 27)
(setq xref-show-definitions-function #'ivy-xref-show-defs))
;; Necessary in Emacs <27. In Emacs 27 it will affect all xref-based
;; commands other than xref-find-definitions (e.g. project-find-regexp)
;; as well
(setq xref-show-xrefs-function #'ivy-xref-show-xrefs)) ;; Windows performance tweaks
;;
(when (boundp 'w32-pipe-read-delay)
(setq w32-pipe-read-delay 0))
;; Set the buffer size to 64K on Windows (from the original 4K)
(when (boundp 'w32-pipe-buffer-size)
(setq irony-server-w32-pipe-buffer-size (* 64 1024))) (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.
'(company-backends
'(company-c-headers company-clang company-irony company-bbdb company-semantic company-cmake company-capf company-clang company-files
(company-dabbrev-code company-gtags company-etags company-keywords)
company-oddmuse company-dabbrev))
'(company-c-headers-path-system
'("g:/msys64/mingw64/include" "g:/msys64/mingw64/include/gtk-4.0" "g:/msys64/mingw64/include/glib-2.0" "g:/msys64/mingw64/include/graphene-1.0" "g:/msys64/mingw64/lib/glib-2.0/include" "g:/msys64/mingw64/include/cairo" "g:/msys64/mingw64/include/pango-1.0" "g:/msys64/usr/include" "g:/msys64/mingw64/include/harfbuzz" "g:/msys64/mingw64/include/gdk-pixbuf-2.0" "g:/msys64/mingw64/lib/graphene-1.0/include"))
'(company-clang-arguments
'("-IG:/msys64/mingw64/include" "-IG:/msys64/mingw64/include/gtk-4.0" "-IG:/msys64/mingw64/include/glib-2.0" "-IG:/msys64/mingw64/include/graphene-1.0" "-IG:/msys64/mingw64/lib/glib-2.0/include" "-IG:/msys64/mingw64/include/cairo" "-IG:/msys64/mingw64/include/pango-1.0" "-IG:/msys64/usr/include" "-IG:/msys64/mingw64/include/harfbuzz" "-IG:/msys64/mingw64/include/gdk-pixbuf-2.0" "-IG:/msys64/mingw64/lib/graphene-1.0/include"))
'(company-minimum-prefix-length 2)
'(flycheck-clang-include-path
'("g:/msys64/mingw64/include" "g:/msys64/mingw64/include/gtk-4.0" "g:/msys64/mingw64/include/glib-2.0" "g:/msys64/mingw64/include/graphene-1.0" "g:/msys64/mingw64/lib/glib-2.0/include" "g:/msys64/mingw64/include/cairo" "g:/msys64/mingw64/include/pango-1.0" "g:/msys64/usr/include" "g:/msys64/mingw64/include/harfbuzz" "g:/msys64/mingw64/include/gdk-pixbuf-2.0" "g:/msys64/mingw64/lib/graphene-1.0/include"))
'(flycheck-clang-includes nil)
'(flycheck-gcc-include-path nil)
'(package-selected-packages
'(ht async persp-mode-projectile-bridge use-package ivy-xcdoc ivy-xref counsel-gtags swiper ivy gxref flycheck-irony company-irony-c-headers company-irony irony clang-capf clang-format clang-format+ company company-c-headers company-ctags))
'(sql-connection-alist
'(("stock"
(sql-product 'ms)
(sql-user "sa")
(sql-password "JianBing!@#0831")
(sql-server "121.196.17.12")
(sql-database "DataSource"))))
'(sql-ms-program
"C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\SQLCMD.EXE"))
(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.
)

emacs config on win10 for rust 1的更多相关文章

  1. Emacs在RHEL 5上的安装和使用

    1. install latest emacs xz -d emacs-24.3.tar.xz tar xvf emacs-24.3.tar ./configure make make install ...

  2. emacs配置文件的基础知识 (转载)

    转自:http://blog.csdn.net/schumyxp/article/details/2278268 emacs的配置文件,叫作.emacs,是个隐藏文件,存在于当前用户的根目录下面,也就 ...

  3. [追热点]学习Rust之选择IDE

    学习语言非常需要实际上手写代码,自然绕不开IDE工具,所以第一时间当然是选择IDE. Rust官网推荐 先去看看Rust官网推荐了什么IDE:工具 - Rust 程序设计语言 无论您喜欢用命令行还是可 ...

  4. windows vscode 远程调试代码

    需要: vscode + Remote-ssh(vscode插件中下载) openssh (https://www.mls-software.com/files/setupssh-8.0p1-2.ex ...

  5. 更好的处理 Python 多工程 import 依赖

    话说, 这段时间需要开发一个项目, 新项目对现有的几乎所有项目都有依赖. 豆瓣现存的几个大项目,基本都是围绕豆瓣主站shire的依赖, 也就是说, 其他项目对shire的单项依赖,  这些项目在需要主 ...

  6. 解决win10开机出现C:\WIndows\system32\config\systemprofile\Desktop不可用 问题

    背景:公司一台win10机子好久没用了,今天开了打算用下(打算远程桌面),远程桌面连不上(好久没用了,用户名都忘了),所以又插上显示器和键鼠. 键盘因为是PS/2接口,不能热插拔,所以开机一段时间后( ...

  7. Bad owner or permissions on .ssh/config win10问题解决

    最近向系统添加了新用户账号后出现了问题,尝试使用私钥登陆服务器,提示了 Bad owner or permissions on .ssh/config 这个报错,就是如题中的问题 修复 按照Windo ...

  8. win10 IIS web.config加密不能访问:打不开 RSA 密钥容器

    C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys 找到密钥文件, 根据时间判断具体是哪一个文件,赋予network service读权限

  9. Win10系统下安装编辑器之神(The God of Editor)Vim并且构建Python生态开发环境(2020年最新攻略)

    原文转载自「刘悦的技术博客」https://v3u.cn/a_id_160 众神殿内,依次坐着Editplus.Atom.Sublime.Vscode.JetBrains家族.Comodo等等一众编辑 ...

  10. Win10 UWP开发系列:使用VS2015 Update2+ionic开发第一个Cordova App

    安装VS2015 Update2的过程是非常曲折的.还好经过不懈的努力,终于折腾成功了. 如果开发Cordova项目的话,推荐大家用一下ionic这个框架,效果还不错.对于Cordova.PhoneG ...

随机推荐

  1. 2020强网杯青少赛Pursuing_The_Wind战队WRITEUP

    在线文档:https://docs.qq.com/doc/DZkN0RFFaR1ZDdHhD    旧事拾荒,偶遇该文档,既发. 战队信息 战队名称:Pursuing_The_Wind 战队排名:12 ...

  2. screenfetch—最炫酷的查看你的设备信息

    screenfetch是一个很方便的并且很炫酷的一个程序,它可以做到很炫酷的输出你想要看到的系统信息. 只需要短短一行命令,就可以快速的安装上它.! 并且可以直观的显示出来,当前设备的信息.

  3. [机器学习] Yellowbrick使用笔记8-模型选择可视化

    Yellowbrick可视化工具旨在指导模型选择过程.一般来说,模型选择是一个搜索问题,定义如下:给定N个由数值属性描述的实例和(可选)一个估计目标,找到一个由特征.算法和最适合数据的超参数组成的三元 ...

  4. VMware安装linux系统CentOs7.4 mini版过程

    创建虚拟机 新建虚拟机 选择虚拟机的操作系统,本文中安装的CentOS属于linux 设置虚拟机的名称和虚拟机所使用的文件再物理机中的路径, 设置虚拟机的cup数量和核心数量,如果设置的不合适可以再创 ...

  5. ionic+vue+capacitor系列笔记--03项目使用Native插件

    话不多说,直接上代码 下载依赖 npm install @capacitor/camera 添加权限配置代码到安卓文件夹里的 AndroidManifest.xml <uses-permissi ...

  6. 解决前端发送post 请求出现403,cancled等问题

    问题一:页面初始加载,部分接口首次请求options是200,然后第二次post请求cancled状态 1. 检查console控制台报错,如果是接口问题,就不用操心了 2.如果是其他报错,那么就不用 ...

  7. Java线程池中的execute和submit

    一.概述 execute和submit都是线程池中执行任务的方法. execute是Executor接口中的方法 public interface Executor { void execute(Ru ...

  8. Node.js+Koa2+TypeScript技术概览

    最近几年一直使用Node.js作为后端服务平台,通过Koa2框架中间件快速搭建Web服务,但是使用JavaScript开发大型后端服务时会使程序变得难以维护,继而使用TypeScript语言开发,使编 ...

  9. thinkphp无法访问man.php/index/login

    配置半天.user.ini,权限问题解决了,但是还是访问不了后台登陆界面(链接:域名/man.php/index/login),后来发现是伪静态thinkphp没设置好,设置好后重启nginx就好啦

  10. C#Autofac依赖注入批量注入 (目前版本.netcore3.0)

    上一文:C#依赖注入一看就会系列 链接:C#依赖注入(直白明了)讲解 一看就会系列 - 22222220 - 博客园 (cnblogs.com) 上一次我们知道了 为什么要依赖注入,这次我们就用使用人 ...