feat: improve tree-sitter syntax highlighting with named nodes
- Add aliases for keywords (VAR_INPUT, BEGIN, IF, etc.) as named nodes - Add aliases for built-in types (INT, BOOL, STRING, etc.) as type_builtin - Add aliases for constants (TRUE, FALSE) - Add aliases for operators (AND, OR, NOT, MOD) - Add prefix node for # variable prefix highlighting - Highlight FB instance names in calls - Highlight FB parameter names as properties - Update README with detailed syntax highlighting features - Update .gitignore for *.wasm files
This commit is contained in:
@@ -33,11 +33,15 @@ A comprehensive Neovim/LazyVim plugin providing **Language Server Protocol (LSP)
|
||||
|
||||
### Syntax Highlighting
|
||||
- Full SCL syntax support via tree-sitter
|
||||
- ORGANIZATION_BLOCK, FUNCTION_BLOCK, FUNCTION definitions
|
||||
- Variable declarations (VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR_TEMP, etc.)
|
||||
- Control structures (IF/THEN/ELSE, CASE, FOR, WHILE, REPEAT)
|
||||
- Code regions and comments
|
||||
- All SCL data types and operators
|
||||
- Block definitions: ORGANIZATION_BLOCK, FUNCTION_BLOCK, FUNCTION
|
||||
- Variable sections: VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR_TEMP, VAR_CONSTANT
|
||||
- Control structures: IF/THEN/ELSIF/ELSE/END_IF, CASE/OF/END_CASE, FOR/TO/BY/DO/END_FOR, WHILE/END_WHILE, REPEAT/UNTIL/END_REPEAT
|
||||
- Built-in data types: BOOL, INT, DINT, REAL, STRING, TIME, etc.
|
||||
- Function block instances highlighted in calls
|
||||
- FB parameter names (IN, PT, CU, etc.) highlighted as properties
|
||||
- `#` prefix for local variables highlighted
|
||||
- Operators: AND, OR, NOT, XOR, MOD
|
||||
- Comments: line (`//`), block (`(* *)`), C-style (`/* */`)
|
||||
|
||||
### Additional Features
|
||||
| Feature | Description |
|
||||
|
||||
Reference in New Issue
Block a user