syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.69k stars 4.89k forks source link

Add an option to Semantic layer to disable function description in minibuffer? #10477

Closed qqldd closed 4 years ago

qqldd commented 6 years ago

The semantic layer is good. But its function description in minibuffer sometime annoying. It hides messages from other functions. Can we add an option to disable this function? A previous example is: #878

qqldd commented 6 years ago

It seems disable the global-semantic-idle-summary-mode will disable the echo to the minibuffer. But since it is lazy loading. Not sure how to disable it correctly in user-config.

smile13241324 commented 6 years ago

@qqldd your best bet would be to use an eval after load block in your user config. Like it is done for the org layer. Depending on whether you have an autoload object after leaving the layer load process "addhook" may be an alternative.

If you follow the eval after load approach don't forget to mention it in the semantic layer docu.

JonathanKang commented 5 years ago

I have lsp layer in my configuration, and it provides such a feature like global-semantic-idle-summary-mode, so you can see the definition of a variable/function in the mini buffer. I also have semantic layer configured, which enables global-semantic-idle-summary-mode by default. But it conflicts with the one provided by lsp layer(ccls) in c/c++ mode.

I just worked around it with the following config

(require 'semantic)
(setq semantic-default-submodes (remove 'global-semantic-idle-summary-mode semantic-default-submodes))
(semantic-mode 1)

But that's just my workaround. Hope there can be a official fix for this.

rcoacci commented 5 years ago

Perhaps @sdwolfz, @MaskRay or @cormacc could take a look at this? With an lsp backend enabled semantic-idle-summary-mode keeps "fighting" with lsp-mode to display the symbol information on the echo area. It's really annoying.
Perhaps we should ditch semantic completelly when an LSP backend is selected? Is there anything semantic can do that lsp-mode can't?

bet4it commented 5 years ago

I have disabled semantic-idle-summary-mode when gtags layer is used in #11511. We can also check for lsp-mode with the similar way.

JonathanKang commented 5 years ago

Is there anything semantic can do that lsp-mode can't?

semantic-stickyfunc-mode, which I found very useful.

duianto commented 5 years ago

The following PR is now on the develop branch: Improve the use of semantic #11511

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!