I was working on a C program in linux, and realized C++ would be a better fit. So I copied the program and gave it the .cpp extension. then I spent a bunch of time figuring out all the weird errors i was getting, before realizing the file retained the build commands from gcc.
The program has the same file name, only the extension had changed. new files with different filenames did not have this issue.
Geany only automatically determines the filetype when a file is first added to the session. After that it remembers the filetype to allow users to manually set the filetype and have it remembered while the file remains in the session. The session is saved and restored when Geany is quit and restarted.
So to change the filetype, close the file and reopen it, or set it manually `Document->Set Filetype...`
Closed #3525 as completed.
github-comments@lists.geany.org