Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(LSP): Allow users to manage Company backends manually #16627

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions layers/+tools/lsp/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ If `both', binds lightweight navigation functions under `SPC m g' and lsp-ui fun
(defvar lsp-use-upstream-bindings nil "When non-nil, map keys to `lsp-command-map'.")

(defvar lsp-sonarlint nil "When non-nil, use `lsp-sonarlint' package.")

(defvar lsp-manage-backends-manually nil "When non-nil lsp-mode does not insert `company-capf' as the ultimate first item of `company-backends'.
`lsp-manage-backends-manually' can either be `:all' or a list of major-modes that should be managed manually.")
4 changes: 4 additions & 0 deletions layers/+tools/lsp/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
(if lsp-use-upstream-bindings
(spacemacs/lsp-bind-upstream-keys)
(spacemacs/lsp-bind-keys))
(setq lsp-completion-provider (if (or (equal :all lsp-manage-backends-manually)
(member major-mode lsp-manage-backends-manually))
:none
:capf))
;; This sets the lsp indentation for all modes derived from web-mode.
(add-to-list 'lsp--formatting-indent-alist '(web-mode . web-mode-markup-indent-offset))
(add-hook 'lsp-after-open-hook (lambda ()
Expand Down
Loading