This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+tools/lsp/packages.el
cormacc c375bc428f Flattened some cquery/ccls configuration
c-c++-lsp-initialization-options:
-> ccls-initialization-options
-> cquery-extra-init-params (cacheFormat set to "msgpack" by default)

c-c++-lsp-args:
-> ccls-args
-> cquery-extra-args

c-c++-lsp-cache-dir:
-> ccls: Appended to initialization-options
-> cquery-cache-dir

<<Amendment 1 21/12/18>>
Removing 'clangd' from list of lsp clients to squash per-file prompt for
language client.
Updated lsp/packages.el to reflect upstream lsp-mode function name changes.
Python layer -- added if guards to prevent anaconda package loading / keyboard
shortcut config when lsp backend selected.
2018-12-22 12:51:17 +02:00

51 lines
1.5 KiB
EmacsLisp

;;; packages.el --- Language Server Protocol Layer packages file for Spacemacs
;;
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
;;
;; Author: Fangrui Song <i@maskray.me>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defconst lsp-packages
'(
lsp-mode
lsp-ui
(company-lsp :requires company)
))
(defun lsp/init-lsp-mode ()
(use-package lsp-mode
:defer t
:config
(progn
(require 'lsp-clients)
(setq lsp-prefer-flymake nil)
(spacemacs/lsp-bind-keys)
(add-hook 'lsp-after-open-hook (lambda ()
"Setup xref jump handler and declare keybinding prefixes"
(spacemacs//setup-lsp-jump-handler major-mode)
(spacemacs//lsp-declare-prefixes-for-mode major-mode))))))
(defun lsp/init-lsp-ui ()
(use-package lsp-ui
:defer t
:config
(progn
(if lsp-remap-xref-keybindings
(progn (define-key lsp-ui-mode-map [remap xref-find-definitions] #'lsp-ui-peek-find-definitions)
(define-key lsp-ui-mode-map [remap xref-find-references] #'lsp-ui-peek-find-references)))
(spacemacs/lsp-define-key
lsp-ui-peek-mode-map
"h" #'lsp-ui-peek--select-prev-file
"j" #'lsp-ui-peek--select-next
"k" #'lsp-ui-peek--select-prev
"l" #'lsp-ui-peek--select-next-file
)
)))
(defun lsp/init-company-lsp ()
(use-package company-lsp :defer t))