Emacs配置:Unity项目开发配置
Posted by:  | Word Count: 167   | Reading Time: 1 Minute  

需要安装的插件

  • csharp-mode : C#语言语法高亮、语言缩进插件 *必须

  • omnisharp-emacs : 对C#语言项目提供Emacs Server端的解决方案,能支持代码提示和文件/命名空间/代码定义重命名,依赖csharp-mode

具体配置

  1. 通过以下命令安装给omnisharp-mode提供支持的程序 MacOS:

      brew install omnisharp/omnisharp-roslyn/omnisharp-mono
  2. Emacs配置

      (use-package csharp-mode
        :ensure t
        :after company
        :config
        (use-package omnisharp
    :init
    (omnisharp-mode)
    :ensure t
    )
        (eval-after-load
     'company
    '(add-to-list 'company-backends #'company-omnisharp))
        (add-hook 'csharp-mode-hook #'flycheck-mode)
        (add-hook 'csharp-mode-hook #'company-mode)
        (add-hook 'csharp-mode-hook #'omnisharp-mode)
        )
comments powered by Disqus