Skip to content

Commit

Permalink
[New] Support Debug Adapter Protocol: dap-mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed Mar 15, 2019
1 parent d9e8768 commit d4bcd5e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ ido.*
flycheck_*.el*
README.html
*.sqlite
.dap-*
1 change: 1 addition & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
(require 'init-flycheck)
(require 'init-projectile)
(require 'init-lsp)
(require 'init-dap)

(require 'init-emacs-lisp)
(require 'init-c)
Expand Down
47 changes: 47 additions & 0 deletions lisp/init-dap.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
;; init-dap.el --- Initialize dap configurations. -*- lexical-binding: t -*-

;; Copyright (C) 2019 Vincent Zhang

;; Author: Vincent Zhang <[email protected]>
;; URL: https://github.com/seagle0128/.emacs.d

;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
;; Floor, Boston, MA 02110-1301, USA.
;;

;;; Commentary:
;;
;; Debug Adapter Protocol configurations.
;;

;;; Code:

(use-package dap-mode
:hook ((after-init . dap-mode)
(dap-mode . dap-ui-mode)

(python-mode . (lambda () (require 'dap-python)))
(go-mode . (lambda () (require 'dap-go)))
(java-mode . (lambda () (require 'dap-java)))
(rust-mode . (lambda () (require 'dap-rust)))
((c-mode c++-mode objc-mode swift) . (lambda () (require 'dap-lldb)))
(php-mode . (lambda () (require 'dap-php)))))

(provide 'init-dap)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-dap.el ends here
1 change: 1 addition & 0 deletions lisp/init-lsp.el
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
:init
(setq lsp-auto-guess-root t) ; Detect project root
(setq lsp-prefer-flymake nil) ; Use lsp-ui and flycheck
(setq flymake-fringe-indicator-position 'right-fringe)
:config
;; Configure LSP clients
(use-package lsp-clients
Expand Down

0 comments on commit d4bcd5e

Please sign in to comment.