Harbour-Intellisense README
Harbour-Intellisense provides powerful language support for Harbour, including syntax analysis, scope detection, intelligent code completion, and more. This extension is tailored for developers working with Harbour codebases, enhancing productivity with in-depth insights into your project structure.
Please note: This extension is in Alpha and still under active development. It has some limitations, which currently works only for functions and procedures, all the features have a disable config if you want to use a finished version from other extension.
Use the extension "Harbour and xHarbour" from Antonino Perricone to improve this extension (Helps a lot util i finish a stable version for this extension)
Features
Harbour language support for .prg
, .ch
files.
Scope Detection:
Dynamically parses your Harbour code to generate a recursive scope tree, including support for nested functions, variables, and parameters.
(Currently working on classes, methods, and codeblocks scope detection.)
Hover Support:
Displays tooltips with scope and type information for identifiers under the cursor.
(working to add more information)
Auto-Completion:
Suggests relevant completions based on the current scope and context.
(needs an improvment in the filtering)
Go-to Definition:
Quickly navigate to the definition of a variable, function, or other identifiers.
(not working for classes and methods)
Diagnostics: Under development, i have a version with some diagnostics but i need a stable version for most of the other providers to finish the diagnostics.
Function Signature Help:
Shows function parameters and details when typing or hovering over function calls.
Multi-level Scoping:
Supports Harbour-specific constructs like BEGIN SEQUENCE...ENDSEQUENCE
, IF...ENDIF
, and nested function definitions, accurately reflecting the depth and relationships.
Harbour Snippets:
Some snippets for most of the Harbour and xHarbour reserved words, structures and functions with some documentation scanned from the original doc.
(In the future i will implement the doc in the hover provider to)
Requirements
- Visual Studio Code 1.70.0 or higher.
- No additional dependencies.
Extension Settings
This extension contributes the following settings:
harbour-intellisense.language-completions-provider
: Enable/Disable the harbour language completions provider.
harbour-intellisense.completion-provider
: Enable/Disable the dynamic completion provider.
harbour-intellisense.definition-provider
: Enable/Disable the definition provider.
harbour-intellisense.formatter-provider
: Enable/Disable the formatter provider.
harbour-intellisense.hover-provider
: Enable/Disable the hover provider.
harbour-intellisense.signature-helper-provider
: Enable/Disable the signature helper provider.
harbour-intellisense.global-scanner
: Enable/Disable the global scanner (this provider scan the entire project and can be heavy for slow machines).
Known Issues
Suport For Classes and Methods:
Currently, scope analysis needs an implementation for classes and methods.
References Provider Don`t Work:
I need to develop this feature ;-;.
Why Lowercase for Reserved Words?
I`ve chosen to use a lowercase pattern for reserved words in Harbour to align with common conventions in modern programming languages. This approach aims to improve code readability, especially for new developers coming from other languages. While Harbour itself is case-insensitive, establishing a consistent pattern can greatly enhance the clarity of code and make it easier to follow. I believe this small adjustment will help maintain a clean and understandable codebase for both new and experienced developers alike.
If you find any bugs or have suggestions, feel free to reach out to me at:
Email: luan.nc@hotmail.com
Enjoy coding with Harbour-Intellisense!