jackguo380 / vim-lsp-cxx-highlight

Vim plugin for C/C++/ObjC semantic highlighting using cquery, ccls, or clangd
MIT License
338 stars 26 forks source link

Does it support termux on Android using clangd? #81

Closed YaQia closed 2 years ago

YaQia commented 2 years ago

Describe the bug I found it seemed not available on termux for Cpp highlighting. The classes and functions are not highlighted.

To Reproduce

the commands below are termux commands.

pkg install neovim pkg install clangd Install coc.nvim by setting init.vim Install coc-clangd Install vim-lsp-cxx-highlight In vim, typing :CocConfig to set like the example.

Expected behavior highlighting vscode-like with cmake projects.

Screenshots If applicable, add screenshots to help explain your problem.

Configuration (Fill this out):

Wed Dec 15 13:14:39 2021: lsp_cxx_hl beginning initialization ...
Wed Dec 15 13:14:39 2021: vim-lsp not detected
Wed Dec 15 13:14:39 2021: LanguageClient-neovim not detected
Wed Dec 15 13:14:39 2021: coc.nvim successfully registered
Wed Dec 15 13:14:39 2021: nvim-lsp successfully registered

Additional context All the same configurations work well on my x86-64 Ubuntu20.04, so I wanna know whether it is not supported on Android yet.

YaQia commented 2 years ago

BTW, my Ubuntu20.04 neovim version is 0.4.3, I guess it's because 0.4.3 doesn't support nvim-lsp?

YaQia commented 2 years ago

I've tried to use nvim-lsp, but it still doesn't work. I removed coc-clangd, but it's not working...

YaQia commented 2 years ago

I've tried to use vim, not working...

jackguo380 commented 2 years ago

I'm not too familiar with the differences in versions of neovim, while I do use neovim daily I am mostly compiling it from source.

There's nothing preventing this plugin specifically from running on any architecture that can run vim/neovim as it is written 100% in vimscript.

As a first step please look more into if coc.nvim is working correctly on your Android setup. Clangd support in this plugin requires coc.nvim, because coc translates clangd's different highlighting protocol back to something this plugin can understand. Whether nvim-lsp works or not is likely not making any difference in this case.

Also check if you have the correct coc configuration flags. From the README:

{
    "clangd.semanticHighlighting": true,
    "coc.preferences.semanticTokensHighlights": false
}
YaQia commented 2 years ago

Thanks! Maybe I have some configuration neglected, I'll check the coc.nvim configuration.