autocomplete is not working
Looking in ctags everything is fine and I tried re parsing my workspace but it still isn't working
Hi,
15.0 made changes to the Language Server plugin. It's complicated but, as a result, it may or may not have worked depending on which clangd/ncurses packages happened to be installed (or not), and whether ~/.codelite/ already had a configuration for the plugin.
This situation should now be fixed with yesterday's 15.0.1 'release'. There are updated rpm links in the downloads page.
Regards,
David
Hi David,
With 15.0.2 The problem still persists. It is an existing project.
Is there anywhere to look for upgrade procedure of an existing project?
My life with autocomplete is just difficult to say lightly!
Is there anywhere to look for upgrade procedure of an existing project?
My apologies. I had a mental blip when I wrote 'workspace settings' above; it should have said '~/.codelite/'. I've now corrected it.
AFAIK code-completion should work as well, or as badly, in an existing project as in a new one; but try creating a new one and see if that's true for you.
I'm not the code-completion expert here, and I don't have any useful advice other than the nuclear option: turn off the Language Server plugin and revert to using the old method.
Can you check if you have clangd
process running on your machine as child process of CodeLite?
a simple
Code: Select all
ps -ef|grep clangd
will do.
Now, if the process is running, you can check why code completion is not working by increasing the log verbosity from: settings -> preferences -> misc -> log
and set it to Debug
Post the log here
Hi Eran,
eranif wrote: ↑Tue Apr 27, 2021 12:35 amCan you check if you have
clangd
process running on your machine as child process of CodeLite?
a simpleCode: Select all
ps -ef|grep clangd
will do.
The Process is running.
Code: Select all
501 22437 95848 0 7:30AM ?? 0:00.65 /Applications/codelite.app/Contents/MacOS/clangd -limit-results=500 -header-insertion-decorators=0
Here we go:
Code: Select all
[07:36:56:356 DBG] [Main] 1: CreateAsyncProcess called with: [git, --no-pager, blame, --date=short, /Users/evstevemd/Library/Application Support/CodeLite/codelite.log]
[07:36:56:357 DBG] [Main] 2: CreateAsyncProcess called with: [/bin/sh, -c, git --no-pager blame --date=short "/Users/evstevemd/Library/Application Support/CodeLite/codelite.log"]
[07:36:56:405 DBG] [Main] Outline: symbols for file /Users/evstevemd/Library/Application Support/CodeLite/codelite.log were invalidated
[07:36:56:405 DBG] [Main] Outline: Rebuilding cache for file: /Users/evstevemd/Library/Application Support/CodeLite/codelite.log
[07:36:56:424 DBG] [Main] Outline: symbols cache updated for file: /Users/evstevemd/Library/Application Support/CodeLite/codelite.log
[07:36:56:424 DBG] [Main] Outline: DoBuildTree is called
[07:36:56:424 DBG] [Main] Outline: symbols are the same, DoBuildTree will do nothing
[07:36:56:427 WRN] [Main] [git] fatal: '/Users/evstevemd/Library/Application Support/CodeLite/codelite.log' is outside repository
[07:36:56:428 DBG] [Main] 1: CreateAsyncProcess called with: [git, --no-pager, ls-files, -m]
[07:36:56:428 DBG] [Main] 2: CreateAsyncProcess called with: [/bin/sh, -c, git --no-pager ls-files -m]
[07:36:56:503 DBG] [Main] 1: CreateAsyncProcess called with: [git, --no-pager, status, -s]
[07:36:56:504 DBG] [Main] 2: CreateAsyncProcess called with: [/bin/sh, -c, git --no-pager status -s]
[07:37:01:858 DBG] [Main] Caching file: /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp with checksum: B2385C03970F7E19BE1774B07C66A02A
[07:37:01:858 DBG] [Main] Converting /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp
[07:37:01:860 DBG] [Main] /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp -> file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp
[07:37:01:860 DBG] [Main] LSPNetworkSTDIO:
Content-Length: 628
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp","languageId":"cpp","version":1,"text":"#include \"pushdialog.h\"\n#include \"git_plugin.h\"\n\nGitPushDialog::GitPushDialog(wxWindow* parent, GitPlugin* plugin)\n : GitPushDialogBase(parent)\n , m_plugin(plugin)\n{\n wxMessageBox(plugin->GetPlgName());\n}\n\nGitPushDialog::~GitPushDialog()\n{\n}\n\nvoid GitPushDialog::OnPush(wxCommandEvent& event)\n{\n}\n\nvoid GitPushDialog::OnCancel(wxCommandEvent& event)\n{\n EndModal(wxID_CANCEL);\n}\n"}}}
[07:37:01:861 DBG] Wrote message of size: 651
[07:37:01:866 DBG] [Main] Git: active editor changed
[07:37:01:874 DBG] [Main] [stderr] I[07:37:01.861] <-- textDocument/didOpen
[07:37:01:874 DBG] [Main] [stderr] I[07:37:01.861] Enqueueing 0 commands for indexing
I[07:37:01.861] Updating file /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp with command
[/Users/evstevemd/Projects/Mhariri/git_plugin]
/Applications/codelite.app/Contents/MacOS/clang-tool -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -I/Users/evstevemd/Projects/Mhariri/git_plugin -I/Users/evstevemd/Projects/Mhariri/git_plugin/src -I/Users/evstevemd/Projects/Mhariri/sdk/include -DAPI_USING_DLL -DPLUGIN_CREATING_DLL /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp -fsyntax-only -resource-dir=/Applications/codelite.app/Contents/lib/clang/10.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
[07:37:02:501 DBG] [Main] [stdout] Content-Length: 1407
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_file_not_found","message":"In included file: 'wx/settings.h' file not found\n\n/Users/evstevemd/Projects/Mhariri/git_plugin/git_design.h:11:10:\nnote: error occurred here","range":{"end":{"character":23,"line":0},"start":{"character":9,"line":0}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxWindow'","range":{"end":{"character":37,"line":3},"start":{"character":29,"line":3}},"severity":1,"source":"clang"},{"code":"no_member","message":"No member named 'GetPlgName' in 'GitPlugin'","range":{"end":{"character":35,"line":7},"start":{"character":25,"line":7}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":41,"line":14},"start":{"character":27,"line":14}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":43,"line":18},"start":{"character":29,"line":18}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'wxID_CANCEL'","range":{"end":{"character":24,"line":20},"start":{"character":13,"line":20}},"severity":1,"source":"clang"}],"uri":"file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp"}}
[07:37:02:501 DBG] [Main] [stderr] I[07:37:02.499] --> textDocument/publishDiagnostics
[07:37:02:501 DBG] [Main] [clangd] Content-Length: 1407
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_file_not_found","message":"In included file: 'wx/settings.h' file not found\n\n/Users/evstevemd/Projects/Mhariri/git_plugin/git_design.h:11:10:\nnote: error occurred here","range":{"end":{"character":23,"line":0},"start":{"character":9,"line":0}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxWindow'","range":{"end":{"character":37,"line":3},"start":{"character":29,"line":3}},"severity":1,"source":"clang"},{"code":"no_member","message":"No member named 'GetPlgName' in 'GitPlugin'","range":{"end":{"character":35,"line":7},"start":{"character":25,"line":7}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":41,"line":14},"start":{"character":27,"line":14}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":43,"line":18},"start":{"character":29,"line":18}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'wxID_CANCEL'","range":{"end":{"character":24,"line":20},"start":{"character":13,"line":20}},"severity":1,"source":"clang"}],"uri":"file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp"}}
[07:37:02:501 DBG] [Main] [clangd] Received diagnostic message
[07:37:05:638 DBG] [Main] Caching file: /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp with checksum: 1EFFBA644771E1F45A849CCE965547F0
[07:37:05:639 DBG] [Main] Converting /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp
[07:37:05:641 DBG] [Main] /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp -> file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp
[07:37:05:641 DBG] [Main] LSPNetworkSTDIO:
Content-Length: 624
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp","version":89},"contentChanges":[{"text":"#include \"pushdialog.h\"\n#include \"git_plugin.h\"\n\nGitPushDialog::GitPushDialog(wxWindow* parent, GitPlugin* plugin)\n : GitPushDialogBase(parent)\n , m_plugin(plugin)\n{\n wxMessageBox(plugin->G());\n}\n\nGitPushDialog::~GitPushDialog()\n{\n}\n\nvoid GitPushDialog::OnPush(wxCommandEvent& event)\n{\n}\n\nvoid GitPushDialog::OnCancel(wxCommandEvent& event)\n{\n EndModal(wxID_CANCEL);\n}\n"}]}}
[07:37:05:641 DBG] [Main] Converting /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp
[07:37:05:641 DBG] Wrote message of size: 647
[07:37:05:641 DBG] [Main] /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp -> file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp
[07:37:05:642 DBG] [Main] LSPNetworkSTDIO:
Content-Length: 219
{"jsonrpc":"2.0","method":"textDocument/completion","params":{"textDocument":{"uri":"file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp"},"position":{"line":7,"character":26}},"id":62}
[07:37:05:642 DBG] Wrote message of size: 242
[07:37:05:676 DBG] [Main] [stdout] Content-Length: 7304
{"id":62,"jsonrpc":"2.0","result":{"isIncomplete":false,"items":[{"detail":"GitPanel *","filterText":"GetBottomPanel","insertText":"GetBottomPanel","insertTextFormat":1,"kind":2,"label":"GetBottomPanel()","score":9.6800003051757812,"sortText":"3ee51eb8GetBottomPanel","textEdit":{"newText":"GetBottomPanel","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"int","filterText":"GetBranches","insertText":"GetBranches","insertTextFormat":1,"kind":2,"label":"GetBranches(bool markActive, bool showActive)","score":9.6800003051757812,"sortText":"3ee51eb8GetBranches","textEdit":{"newText":"GetBranches","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"GitSideBar *","filterText":"GetSideBar","insertText":"GetSideBar","insertTextFormat":1,"kind":2,"label":"GetSideBar()","score":9.6800003051757812,"sortText":"3ee51eb8GetSideBar","textEdit":{"newText":"GetSideBar","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"int *","filterText":"GetSignature","insertText":"GetSignature","insertTextFormat":1,"kind":2,"label":"GetSignature()","score":9.6800003051757812,"sortText":"3ee51eb8GetSignature","textEdit":{"newText":"GetSignature","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitStageAll","insertText":"GitStageAll","insertTextFormat":1,"kind":2,"label":"GitStageAll()","score":9.6800003051757812,"sortText":"3ee51eb8GitStageAll","textEdit":{"newText":"GitStageAll","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitStagePath","insertText":"GitStagePath","insertTextFormat":1,"kind":2,"label":"GitStagePath(const int &path)","score":9.6800003051757812,"sortText":"3ee51eb8GitStagePath","textEdit":{"newText":"GitStagePath","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitUnstageAll","insertText":"GitUnstageAll","insertTextFormat":1,"kind":2,"label":"GitUnstageAll()","score":9.6800003051757812,"sortText":"3ee51eb8GitUnstageAll","textEdit":{"newText":"GitUnstageAll","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitUnstagePath","insertText":"GitUnstagePath","insertTextFormat":1,"kind":2,"label":"GitUnstagePath(const int &path)","score":9.6800003051757812,"sortText":"3ee51eb8GitUnstagePath","textEdit":{"newText":"GitUnstagePath","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_CHECKOUT","insertText":"ID_GIT_CHECKOUT","insertTextFormat":1,"kind":10,"label":"ID_GIT_CHECKOUT","score":1.1000000238418579,"sortText":"80000000ID_GIT_CHECKOUT","textEdit":{"newText":"ID_GIT_CHECKOUT","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_COMMIT","insertText":"ID_GIT_COMMIT","insertTextFormat":1,"kind":10,"label":"ID_GIT_COMMIT","score":1.1000000238418579,"sortText":"80000000ID_GIT_COMMIT","textEdit":{"newText":"ID_GIT_COMMIT","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_COMMIT_DIALOG","insertText":"ID_GIT_COMMIT_DIALOG","insertTextFormat":1,"kind":10,"label":"ID_GIT_COMMIT_DIALOG","score":1.1000000238418579,"sortText":"80000000ID_GIT_COMMIT_DIALOG","textEdit":{"newText":"ID_GIT_COMMIT_DIALOG","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_INIT","insertText":"ID_GIT_INIT","insertTextFormat":1,"kind":10,"label":"ID_GIT_INIT","score":1.1000000238418579,"sortText":"80000000ID_GIT_INIT","textEdit":{"newText":"ID_GIT_INIT","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_PULL","insertText":"ID_GIT_PULL","insertTextFormat":1,"kind":10,"label":"ID_GIT_PULL","score":1.1000000238418579,"sortText":"80000000ID_GIT_PULL","textEdit":{"newText":"ID_GIT_PULL","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_PUSH","insertText":"ID_GIT_PUSH","insertTextFormat":1,"kind":10,"label":"ID_GIT_PUSH","score":1.1000000238418579,"sortText":"80000000ID_GIT_PUSH","textEdit":{"newText":"ID_GIT_PUSH","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_REFRESH","insertText":"ID_GIT_REFRESH","insertTextFormat":1,"kind":10,"label":"ID_GIT_REFRESH","score":1.1000000238418579,"sortText":"80000000ID_GIT_REFRESH","textEdit":{"newText":"ID_GIT_REFRESH","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_REMOVE","insertText":"ID_GIT_REMOVE","insertTextFormat":1,"kind":10,"label":"ID_GIT_REMOVE","score":1.1000000238418579,"sortText":"80000000ID_GIT_REMOVE","textEdit":{"newText":"ID_GIT_REMOVE","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_STAGE","insertText":"ID_GIT_STAGE","insertTextFormat":1,"kind":10,"label":"ID_GIT_STAGE","score":1.1000000238418579,"sortText":"80000000ID_GIT_STAGE","textEdit":{"newText":"ID_GIT_STAGE","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_STAGE_ALL","insertText":"ID_GIT_STAGE_ALL","insertTextFormat":1,"kind":10,"label":"ID_GIT_STAGE_ALL","score":1.1000000238418579,"sortText":"80000000ID_GIT_STAGE_ALL","textEdit":{"newText":"ID_GIT_STAGE_ALL","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_UNSTAGE","insertText":"ID_GIT_UNSTAGE","insertTextFormat":1,"kind":10,"label":"ID_GIT_UNSTAGE","score":1.1000000238418579,"sortText":"80000000ID_GIT_UNSTAGE","textEdit":{"newText":"ID_GIT_UNSTAGE","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_UNSTAGE_ALL","insertText":"ID_GIT_UNSTAGE_ALL","insertTextFormat":1,"kind":10,"label":"ID_GIT_UNSTAGE_ALL","score":1.1000000238418579,"sortText":"80000000ID_GIT_UNSTAGE_ALL","textEdit":{"newText":"ID_GIT_UNSTAGE_ALL","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"void","filterText":"LogGitError","insertText":"LogGitError","insertTextFormat":1,"kind":2,"label":"LogGitError(int error)","score":1.1000000238418579,"sortText":"80000000LogGitError","textEdit":{"newText":"LogGitError","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"void","filterText":"OnGitCommit","insertText":"OnGitCommit","insertTextFormat":1,"kind":2,"label":"OnGitCommit(int &e)","score":1.1000000238418579,"sortText":"80000000OnGitCommit","textEdit":{"newText":"OnGitCommit","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"void","filterText":"OnGitInit","insertText":"OnGitInit","insertTextFormat":1,"kind":2,"label":"OnGitInit(int &e)","score":1.1000000238418579,"sortText":"80000000OnGitInit","textEdit":{"newText":"OnGitInit","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}}]}}
[07:37:05:676 DBG] [Main] [stderr] I[07:37:05.641] <-- textDocument/didChange
I[07:37:05.642] <-- textDocument/completion(62)
I[07:37:05.647] Code complete: sema context ArrowMemberAccess, query scopes [] (AnyScope=true), expected type <none>
I[07:37:05.647] Code complete: 23 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 23 returned.
I[07:37:05.647] --> reply:textDocument/completion(62) 5 ms
[07:37:05:677 DBG] [Main] [clangd] Content-Length: 7304
{"id":62,"jsonrpc":"2.0","result":{"isIncomplete":false,"items":[{"detail":"GitPanel *","filterText":"GetBottomPanel","insertText":"GetBottomPanel","insertTextFormat":1,"kind":2,"label":"GetBottomPanel()","score":9.6800003051757812,"sortText":"3ee51eb8GetBottomPanel","textEdit":{"newText":"GetBottomPanel","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"int","filterText":"GetBranches","insertText":"GetBranches","insertTextFormat":1,"kind":2,"label":"GetBranches(bool markActive, bool showActive)","score":9.6800003051757812,"sortText":"3ee51eb8GetBranches","textEdit":{"newText":"GetBranches","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"GitSideBar *","filterText":"GetSideBar","insertText":"GetSideBar","insertTextFormat":1,"kind":2,"label":"GetSideBar()","score":9.6800003051757812,"sortText":"3ee51eb8GetSideBar","textEdit":{"newText":"GetSideBar","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"int *","filterText":"GetSignature","insertText":"GetSignature","insertTextFormat":1,"kind":2,"label":"GetSignature()","score":9.6800003051757812,"sortText":"3ee51eb8GetSignature","textEdit":{"newText":"GetSignature","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitStageAll","insertText":"GitStageAll","insertTextFormat":1,"kind":2,"label":"GitStageAll()","score":9.6800003051757812,"sortText":"3ee51eb8GitStageAll","textEdit":{"newText":"GitStageAll","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitStagePath","insertText":"GitStagePath","insertTextFormat":1,"kind":2,"label":"GitStagePath(const int &path)","score":9.6800003051757812,"sortText":"3ee51eb8GitStagePath","textEdit":{"newText":"GitStagePath","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitUnstageAll","insertText":"GitUnstageAll","insertTextFormat":1,"kind":2,"label":"GitUnstageAll()","score":9.6800003051757812,"sortText":"3ee51eb8GitUnstageAll","textEdit":{"newText":"GitUnstageAll","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"bool","filterText":"GitUnstagePath","insertText":"GitUnstagePath","insertTextFormat":1,"kind":2,"label":"GitUnstagePath(const int &path)","score":9.6800003051757812,"sortText":"3ee51eb8GitUnstagePath","textEdit":{"newText":"GitUnstagePath","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_CHECKOUT","insertText":"ID_GIT_CHECKOUT","insertTextFormat":1,"kind":10,"label":"ID_GIT_CHECKOUT","score":1.1000000238418579,"sortText":"80000000ID_GIT_CHECKOUT","textEdit":{"newText":"ID_GIT_CHECKOUT","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_COMMIT","insertText":"ID_GIT_COMMIT","insertTextFormat":1,"kind":10,"label":"ID_GIT_COMMIT","score":1.1000000238418579,"sortText":"80000000ID_GIT_COMMIT","textEdit":{"newText":"ID_GIT_COMMIT","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_COMMIT_DIALOG","insertText":"ID_GIT_COMMIT_DIALOG","insertTextFormat":1,"kind":10,"label":"ID_GIT_COMMIT_DIALOG","score":1.1000000238418579,"sortText":"80000000ID_GIT_COMMIT_DIALOG","textEdit":{"newText":"ID_GIT_COMMIT_DIALOG","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_INIT","insertText":"ID_GIT_INIT","insertTextFormat":1,"kind":10,"label":"ID_GIT_INIT","score":1.1000000238418579,"sortText":"80000000ID_GIT_INIT","textEdit":{"newText":"ID_GIT_INIT","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_PULL","insertText":"ID_GIT_PULL","insertTextFormat":1,"kind":10,"label":"ID_GIT_PULL","score":1.1000000238418579,"sortText":"80000000ID_GIT_PULL","textEdit":{"newText":"ID_GIT_PULL","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_PUSH","insertText":"ID_GIT_PUSH","insertTextFormat":1,"kind":10,"label":"ID_GIT_PUSH","score":1.1000000238418579,"sortText":"80000000ID_GIT_PUSH","textEdit":{"newText":"ID_GIT_PUSH","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_REFRESH","insertText":"ID_GIT_REFRESH","insertTextFormat":1,"kind":10,"label":"ID_GIT_REFRESH","score":1.1000000238418579,"sortText":"80000000ID_GIT_REFRESH","textEdit":{"newText":"ID_GIT_REFRESH","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_REMOVE","insertText":"ID_GIT_REMOVE","insertTextFormat":1,"kind":10,"label":"ID_GIT_REMOVE","score":1.1000000238418579,"sortText":"80000000ID_GIT_REMOVE","textEdit":{"newText":"ID_GIT_REMOVE","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_STAGE","insertText":"ID_GIT_STAGE","insertTextFormat":1,"kind":10,"label":"ID_GIT_STAGE","score":1.1000000238418579,"sortText":"80000000ID_GIT_STAGE","textEdit":{"newText":"ID_GIT_STAGE","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_STAGE_ALL","insertText":"ID_GIT_STAGE_ALL","insertTextFormat":1,"kind":10,"label":"ID_GIT_STAGE_ALL","score":1.1000000238418579,"sortText":"80000000ID_GIT_STAGE_ALL","textEdit":{"newText":"ID_GIT_STAGE_ALL","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_UNSTAGE","insertText":"ID_GIT_UNSTAGE","insertTextFormat":1,"kind":10,"label":"ID_GIT_UNSTAGE","score":1.1000000238418579,"sortText":"80000000ID_GIT_UNSTAGE","textEdit":{"newText":"ID_GIT_UNSTAGE","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"const int","filterText":"ID_GIT_UNSTAGE_ALL","insertText":"ID_GIT_UNSTAGE_ALL","insertTextFormat":1,"kind":10,"label":"ID_GIT_UNSTAGE_ALL","score":1.1000000238418579,"sortText":"80000000ID_GIT_UNSTAGE_ALL","textEdit":{"newText":"ID_GIT_UNSTAGE_ALL","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"void","filterText":"LogGitError","insertText":"LogGitError","insertTextFormat":1,"kind":2,"label":"LogGitError(int error)","score":1.1000000238418579,"sortText":"80000000LogGitError","textEdit":{"newText":"LogGitError","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"void","filterText":"OnGitCommit","insertText":"OnGitCommit","insertTextFormat":1,"kind":2,"label":"OnGitCommit(int &e)","score":1.1000000238418579,"sortText":"80000000OnGitCommit","textEdit":{"newText":"OnGitCommit","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}},{"detail":"void","filterText":"OnGitInit","insertText":"OnGitInit","insertTextFormat":1,"kind":2,"label":"OnGitInit(int &e)","score":1.1000000238418579,"sortText":"80000000OnGitInit","textEdit":{"newText":"OnGitInit","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}}}}]}}
[07:37:05:677 DBG] [Main] [clangd] received a response
[07:37:05:677 DBG] [Main] Read 23 completion items
[07:37:05:678 DBG] [Main] Received: 23 completion items
[07:37:06:143 DBG] [Main] [stderr] I[07:37:06.143] Updating file /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp with command
[/Users/evstevemd/Projects/Mhariri/git_plugin]
/Applications/codelite.app/Contents/MacOS/clang-tool -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -I/Users/evstevemd/Projects/Mhariri/git_plugin -I/Users/evstevemd/Projects/Mhariri/git_plugin/src -I/Users/evstevemd/Projects/Mhariri/sdk/include -DAPI_USING_DLL -DPLUGIN_CREATING_DLL /Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp -fsyntax-only -resource-dir=/Applications/codelite.app/Contents/lib/clang/10.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
[07:37:06:156 DBG] [Main] [stderr] I[07:37:06.156] --> textDocument/publishDiagnostics
[07:37:06:156 DBG] [Main] [stdout] Content-Length: 1398
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_file_not_found","message":"In included file: 'wx/settings.h' file not found\n\n/Users/evstevemd/Projects/Mhariri/git_plugin/git_design.h:11:10:\nnote: error occurred here","range":{"end":{"character":23,"line":0},"start":{"character":9,"line":0}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxWindow'","range":{"end":{"character":37,"line":3},"start":{"character":29,"line":3}},"severity":1,"source":"clang"},{"code":"no_member","message":"No member named 'G' in 'GitPlugin'","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":41,"line":14},"start":{"character":27,"line":14}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":43,"line":18},"start":{"character":29,"line":18}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'wxID_CANCEL'","range":{"end":{"character":24,"line":20},"start":{"character":13,"line":20}},"severity":1,"source":"clang"}],"uri":"file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp"}}
[07:37:06:156 DBG] [Main] [clangd] Content-Length: 1398
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_file_not_found","message":"In included file: 'wx/settings.h' file not found\n\n/Users/evstevemd/Projects/Mhariri/git_plugin/git_design.h:11:10:\nnote: error occurred here","range":{"end":{"character":23,"line":0},"start":{"character":9,"line":0}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxWindow'","range":{"end":{"character":37,"line":3},"start":{"character":29,"line":3}},"severity":1,"source":"clang"},{"code":"no_member","message":"No member named 'G' in 'GitPlugin'","range":{"end":{"character":26,"line":7},"start":{"character":25,"line":7}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":41,"line":14},"start":{"character":27,"line":14}},"severity":1,"source":"clang"},{"code":"unknown_typename","message":"Unknown type name 'wxCommandEvent'","range":{"end":{"character":43,"line":18},"start":{"character":29,"line":18}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'wxID_CANCEL'","range":{"end":{"character":24,"line":20},"start":{"character":13,"line":20}},"severity":1,"source":"clang"}],"uri":"file:///Users/evstevemd/Projects/Mhariri/git_plugin/pushdialog.cpp"}}
[07:37:06:157 DBG] [Main] [clangd] Received diagnostic message
[07:37:14:988 DBG] [Main] Git: active editor changed
[07:37:14:989 DBG] [Main] 1: CreateAsyncProcess called with: [git, --no-pager, blame, --date=short, /Users/evstevemd/Library/Application Support/CodeLite/codelite.log]
[07:37:14:990 DBG] [Main] 2: CreateAsyncProcess called with: [/bin/sh, -c, git --no-pager blame --date=short "/Users/evstevemd/Library/Application Support/CodeLite/codelite.log"]
[07:37:15:065 WRN] [Main] [git] fatal: '/Users/evstevemd/Library/Application Support/CodeLite/codelite.log' is outside repository
Hi David,
No problem at all.
Will try this if Eran's suggestion does not work too
Already tried this. Turning off the LS does not enable classic Completion.
Looks like clangd is unable to locate header files
Code: Select all
In included file: 'wx/settings.h' file not found\n\n/Users/evstevemd/Projects/Mhariri/git_plugin/git_design.h:11:10:\nnote: error occurred here
Some questions:
Code: Select all
find . -name "compile_flags.txt"
find . -name "compile_commands.json"
on of these files should exist for you (where compile_flags.txt
>> compile_commands.json
)
this file: compile_commands.json
provide input for clangd for how to compile any source file
If compile_flags.txt
exists, than clangd
will use this as the input file for the completion (it will ignore the compile_commands.json
)
CodeLite generate compile_flags.txt
by default when the build process is over and it will also restart clangd
(so it will reload it)
The content of compile_flags.txt
should be in the form:
Code: Select all
-I/path/to/wx
-I/another/path
-DMY_MACRO_1=1
...
-std=c++11
...
where compile_commands.json
is a JSON file with the command line per file in the workspace.
Please report which file exists for you, and paste here their content
The files do not exists. I remember one time deleting them when cleaning manually the CMake generated folder.
Is there a way to regenerate them? I'm trying to run (CMake kind of) workspace full rebuild. Not sure if that will generate them!
UPDATE:
Files were not generated
You did not answer my initial question:
which workspace type are you using?