dotfiles/emacs/.emacs.d/modules/jg-dev.el

113 lines
2.6 KiB
EmacsLisp

; -*- lexical-binding: t; -*-
;;; Code:
(setq-default indent-tabs-mode nil)
(use-package flycheck
:init
(setq flycheck-python-flake8-executable "flake8")
(setq flycheck-python-pylint-executable "pylint")
:config
(add-hook 'after-init-hook #'global-flycheck-mode))
(use-package magit
:commands (magit-status magit-get-current-branch)
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package lsp-mode
:commands (lsp lsp-deferred)
:init
(setq lsp-diagnostic-package :none)
(setq lsp-keymap-prefix "C-c l") ;; Or 'C-l', 's-l
:config
(lsp-enable-which-key-integration t)
)
(use-package company
:after lsp-mode
:hook (lsp-mode . company-mode)
:bind (:map company-active-map
("<tab>" . company-complete-selection))
(:map lsp-mode-map
("<tab>" . company-indent-or-complete-common))
:custom
(company-minimum-prefix-length 1)
(company-idle-delay 0.0))
(use-package lsp-ui
:hook (lsp-mode . lsp-ui-mode)
:custom
(lsp-ui-doc-position 'bottom)
:commands lsp-ui-mode)
(use-package lsp-treemacs
:after lsp
:commands lsp-treemacs-errors-list
)
(use-package lsp-ivy
:after lsp
:commands lsp-ivy-workspace-symbol)
(use-package cmake-mode)
(use-package dap-mode
;; Uncomment the config below if you want all UI panes to be hidden by default!
;; :custom
;; (lsp-enable-dap-auto-configure nil)
;; :config
;; (dap-ui-mode 1)
:commands dap-debug
:config
;; Set up Node debugging
(require 'dap-python)
;; (dap-python-setup) ;; Automatically installs Node debug adapter if needed
)
(use-package typescript-mode
:hook (typescript-mode . lsp-deferred)
)
(use-package python-mode
:ensure nil
:hook (python-mode . lsp-deferred)
:custom
;; NOTE: Set these if Python 3 is called "python3" on your system!
(python-shell-interpreter "python3")
(dap-python-executable "python3")
(dap-python-debugger 'debugpy)
:config
(require 'dap-python))
(use-package pyvenv
:after python-mode
:config
(pyenv-mode 1))
(use-package php-mode
:ensure t
)
(use-package yaml-mode
:ensure t)
(ac-config-default)
(require 'ac-geiser)
(add-hook 'geiser-mode-hook 'ac-geiser-setup)
(add-hook 'geiser-repl-mode-hook 'ac-geiser-setup)
;;(eval-after-load "auto-complete"
;; (add-to-list 'ac-modes' geiser-repl-mode))
(require 'paredit)
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'scheme-mode-hook #'enable-paredit-mode)
(require 'iedit)
(provide 'jg-dev)
;;; jg-dev.el ends here