manateelazycat / lsp-bridge

A blazingly fast LSP client for Emacs
GNU General Public License v3.0
1.42k stars 205 forks source link

lsp-bridge-mode is not enabled automatically on C++ #807

Closed damanis closed 9 months ago

damanis commented 9 months ago

For JavaScript files lsp-bridge-mode enabled automatically when file loaded. For C++ files it is not activated until lsp-bridge-mode command called manually. The lsp-bridge version is latest for 8ec922088. The configuration is minimal according Installation section step 5:

(add-to-list 'load-path "<path-to-lsp-bridge>")
(require 'yasnippet)
(yas-global-mode 1)
(require 'lsp-bridge)
(global-lsp-bridge-mode)
(setq lsp-bridge-get-project-path-by-filepath ...)
manateelazycat commented 9 months ago

You need write CMakeLists.txt like below:

CMakeLists.txt

Only cpp file, LSP server won't work

damanis commented 9 months ago

I added CMakeLists.txt (project does not use cmake) with all cpp-files - same, need activate lsp-bridge manually.

manateelazycat commented 9 months ago

You need enable option lsp-bridge-enable-log, then https://github.com/manateelazycat/lsp-bridge/blob/dfc5c3210ec1d6c421ef38e51e30f568ad4a3a54/lsp-bridge.el#L1188 will print which predicate is wrong.

damanis commented 9 months ago

@manateelazycat Currently it not reproduced, I will try again and notify you if it causes. Is there easy way to save log directly to file?