Add support for lowercase identifiers
The autocompletion uses the pascal style for the identifiers, e.g. "IntToStr". I would prefer lowercase for everything: "inttostr".
Can you add an option to make the capitalization style configurable?. Lazarus has a identifier policy in Tools/Options/Codetools/Words:
- None (pascal)
- lowercase
- UPPERCASE
- Lowercase, first letter up
Comments (5)
-
repo owner -
repo owner - changed status to open
-
reporter - edited description
- changed title to Add support for lowercase identifiers
-
reporter You're right, I changed the description from keyword to identifier.
I know this is something personal but I use lowercase for everything (functions, procedures, etc), so the weird part of the code are the identifiers added using the autocompletion. Anyway, the "very low priority" is fine with me :)
-
Although it's a personal preference, I think it's considered as bad practice in Pascal to name methods (function and procedure) using all lowercases. Pascal is known to use
lowercase
for keywords and reserved words,CamelCase
for identifiers, andCAPITAL_CASE
for constants.However, I found many new Pascal programmers today also use
camelCase
(first letter as lowercase) for identifiers and variables, especially for internal or local scope. I think it's a good practice, it helps distinguish which locals from globals. - Log in to comment
Hi Juan,
all keyword suggestions ("procedure", "function", "class", "while", "for" etc.) do currently come from snippets and are already lowercase. If you want to configure them differently then take a look here: https://code.visualstudio.com/docs/editor/userdefinedsnippets
IntToStr
is not a keyword but a function name. It appears in code completion only when SysUtils is listed in one of theuses
sections. It appears in exactly the same capitalization as its definition. If you asked for my personal opinion on this topic I'd say that changing capitalization of identifiers only leads to confusion. But you didn't ask for it and my opinion shouldn't stay over other developers' opinions ;-) So I leave this topic open. But for now, the priority to implement a settings that controls automatic captilization adjustments is very low.