;;; ravi-init-lsp.el --- lsp-mode support -*- lexical-binding: t; -*- ;; Copyright (C) 2021 Ravi Kiran ;; Author: Ravi Kiran ;; Keywords: ;; 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 3 of the License, 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. If not, see . ;;; Commentary: ;; LSP mode support ;;; Code: ;; 4k is too low; use 1MB minimum for interprocess communication (setq read-process-output-max (* 1024 1024)) (use-package lsp-mode :init (setq lsp-keymap-prefix "H-l") :hook ((c-mode-hook . lsp-deferred) (c++-mode-hook . lsp-deferred) ;; (python-mode . lsp-deferred) (lsp-mode-hook . lsp-enable-which-key-integration)) :commands (lsp lsp-deferred) :bind (:map lsp-mode-map ("M-" . lsp-execute-code-action)) ; perhaps helm-lsp-code-actions? :config (setq lsp-enable-file-watchers nil) ; Most of my repos are too large (setq lsp-enable-indentation nil) ; I'll handle indentation myself (setq lsp-headerline-breadcrumb-enable nil) (use-package helm-lsp :if (equal ravi/use-selection-system 'helm) :commands helm-lsp-workspace-symbol) (use-package consult-lsp :if (member ravi/use-selection-system '(selectrum vertico)) :commands (consult-lsp-diagnostics consult-lsp-symbols)) (use-package lsp-ui :commands lsp-ui-mode :hook (lsp-mode . lsp-ui-mode) :bind (:map lsp-ui-mode-map ("C-c i" . lsp-ui-imenu)) :config (setq lsp-ui-doc-enable t) (setq lsp-ui-peek-show-directory t) (setq lsp-ui-peek-enable t))) (use-package dap-mode :defer t :after lsp-mode :config (dap-auto-configure-mode)) (provide 'ravi-init-lsp) ;;; ravi-init-lsp.el ends here