Bug 388971 - Syntax highlighting doesn’t work sometimes
Summary: Syntax highlighting doesn’t work sometimes
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.2.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-14 19:30 UTC by Vitaliy
Modified: 2018-03-15 19:24 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot with missing syntax highlighting. (209.00 KB, image/png)
2018-01-14 19:30 UTC, Vitaliy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaliy 2018-01-14 19:30:56 UTC
Created attachment 109862 [details]
Screenshot with missing syntax highlighting.

See the screenshot.
1. Syntax (or semantic?) highlighting is absent for some functions, e.g. Lua auxlib functions (it was absent for other Lua functions as well before some magic that I don’t remember exactly). Autocompletion and argument list works for them, however.
2. Those for which highlighting works are described as “Invalid type” (followed by “Type: Function”!) in the tooltip.

There may be several reasons for that.
a. I have several versions of Lua, one in `/usr/include` and others in subdirectories.
b. Lua uses weird syntax for functions, like
`LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e);`
(notice the parentheses, like in pointer declaration).
c. Lua uses `#include` inside `extern "C"`.
Comment 1 Milian Wolff 2018-01-15 14:29:16 UTC
I think you uploaded the wrong screenshot, no?
Comment 2 Vitaliy 2018-03-07 19:11:34 UTC
Sorry for long wait.
No, the screenshot is correct. At line 46, the function is recognized (argument list is shown) but not highlighted. That’s common with Lua. Everything else is fine.
Comment 3 Milian Wolff 2018-03-08 08:33:15 UTC
can you create a MWE that we can use to reproduce the issue?