1

I'm trying to setup C++ IDE on spacemacs.

Below are the layers configured .

    dotspacemacs-configuration-layers
    '(
        helm
        (auto-completion :variables
                        auto-completion-return-key-behavior 'complete
                        auto-completion-tab-key-behavior 'cycle
                        auto-completion-complete-with-key-sequence nil
                        auto-completion-complete-with-key-sequence-delay 0.1
                        auto-completion-private-snippets-directory nil
                        auto-completion-enable-snippets-in-popup nil
                        )
        (lsp :variables
            lsp-ui-doc-enable t
            lsp-ui-sideline-enable nil)

        emacs-lisp
        c-c++
        (cmake :variables cmake-enable-cmake-ide-support nil)
        go
        java
        treemacs
        syntax-checking
    )

Below are the additional packages -

dotspacemacs-additional-packages '(bazel-mode lsp-haskell ccls lsp-ui company-lsp dap-mode)

My c++ configuration layer settings are -

    (setq-default dotspacemacs-configuration-layers
                '((c-c++ :variables
                        c-c++-backend 'lsp-ccls
                        c-c++-adopt-subprojects t
                        c-c++-lsp-enable-semantic-highlight 'rainbow
                        c-c++-default-mode-for-headers 'c++-mode
                        c++-enable-organize-includes-on-save t
                        c-c++-lsp-cache-dir ".cache"
                        c-c++-lsp-extra-init-params '(:completion (:detailedLabel t) :index (:comments 2))
                        c-c++-lsp-sem-highlight-method 'font-lock
                        c-c++-lsp-sem-highlight-rainbow nil
                        )))

    (setq ccls-executable "/usr/bin/ccls")
    (add-hook 'prog-mode-hook #'lsp)

After adding the below settings I'm getting below error -

Settings

    (setq ccls-executable "/usr/bin/ccls")
    (add-hook 'prog-mode-hook #'lsp)

Error -

Error running timer ‘lsp--on-idle’: (error "The connected server(s) does not support method textDocument/documentLink To find out what capabilities support your server use ‘M-x lsp-describe-session’ and expand the capabilities section.")

I don't get this error for other programming languages like go, java etc I only get this for C++.

What is wrong with my configuration? How can I fix this error?

Note:

My OS details -

    raj@localhost:~> lsb_release -a
    LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
    Distributor ID: openSUSE
    Description:    openSUSE Leap 15.1
    Release:        15.1
    Codename:       n/a
1

I got the solution from gitter.im. Setting the below in .spacemacs file worked

(setq lsp-enable-links nil)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.