You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/runtime/queries/fsharp/locals.scm

33 lines
830 B
Scheme

Update fsharp tree sitter repo reference (#11061) The repository reference used here was a fork from the actual repository, which has now been moved under ionide organization, where it is in active maintenance and development. The commit SHA is the currently latest commit from main branch. The injections.scm is copied as is from the fsharp treesitter repo [queries](https://github.com/ionide/tree-sitter-fsharp/blame/main/queries). The locals.scm is copied from the repo and the capture names are to follow the standard names: - Replace @local.definition.var @local.definition.function, and @local.definition.parameter with @local.definition - Remove (#set! "definition.function.scope" "parent") The highlights.scm is copied as well from the fsharp treesitter repo, but modified here to match helix highlight scopes based on my best guesstimates. The changes made: - Remove @spell scopes - Split @comment into @comment.line and @comment.block - Replace @comment.documentation with @comment.block.documentation - Replace @character.special with @special - Replace @variable.member with @variable.other.member - Replace @type.definition with @type - Replace @function.member with @function.method - Replace @module with @namespace - Replace @constant.macro with @function.macro - Replace @property with @variable.other.member - Replace @variable.member with @variable.other.member - Replace @variable.parameter.builtin with @variable.builtin - Replace @function.call with @function - Replace @number with @constant.numeric.integer and @constant.numeric.float - Replace @boolean with @constant.builtin.boolean - Replace @keyword.conditional with @keyword.control.conditional - Replace @keyword.return with @keyword.control.return - Replace @keyword.repeate with @keyword.control.repeat - Replace @keyword.import with @keyword.control.import - Replace @keyword.modifier with @keyword.storage.modifier - Replace @keyword.type with @keyword.storage.type - Replace @keyword.exception with @keyword.control.exception - Replace @module.builtin with @namespace
2 months ago
(identifier) @local.reference
[
Update fsharp tree sitter repo reference (#11061) The repository reference used here was a fork from the actual repository, which has now been moved under ionide organization, where it is in active maintenance and development. The commit SHA is the currently latest commit from main branch. The injections.scm is copied as is from the fsharp treesitter repo [queries](https://github.com/ionide/tree-sitter-fsharp/blame/main/queries). The locals.scm is copied from the repo and the capture names are to follow the standard names: - Replace @local.definition.var @local.definition.function, and @local.definition.parameter with @local.definition - Remove (#set! "definition.function.scope" "parent") The highlights.scm is copied as well from the fsharp treesitter repo, but modified here to match helix highlight scopes based on my best guesstimates. The changes made: - Remove @spell scopes - Split @comment into @comment.line and @comment.block - Replace @comment.documentation with @comment.block.documentation - Replace @character.special with @special - Replace @variable.member with @variable.other.member - Replace @type.definition with @type - Replace @function.member with @function.method - Replace @module with @namespace - Replace @constant.macro with @function.macro - Replace @property with @variable.other.member - Replace @variable.member with @variable.other.member - Replace @variable.parameter.builtin with @variable.builtin - Replace @function.call with @function - Replace @number with @constant.numeric.integer and @constant.numeric.float - Replace @boolean with @constant.builtin.boolean - Replace @keyword.conditional with @keyword.control.conditional - Replace @keyword.return with @keyword.control.return - Replace @keyword.repeate with @keyword.control.repeat - Replace @keyword.import with @keyword.control.import - Replace @keyword.modifier with @keyword.storage.modifier - Replace @keyword.type with @keyword.storage.type - Replace @keyword.exception with @keyword.control.exception - Replace @module.builtin with @namespace
2 months ago
(namespace)
(named_module)
(function_or_value_defn)
] @local.scope
Update fsharp tree sitter repo reference (#11061) The repository reference used here was a fork from the actual repository, which has now been moved under ionide organization, where it is in active maintenance and development. The commit SHA is the currently latest commit from main branch. The injections.scm is copied as is from the fsharp treesitter repo [queries](https://github.com/ionide/tree-sitter-fsharp/blame/main/queries). The locals.scm is copied from the repo and the capture names are to follow the standard names: - Replace @local.definition.var @local.definition.function, and @local.definition.parameter with @local.definition - Remove (#set! "definition.function.scope" "parent") The highlights.scm is copied as well from the fsharp treesitter repo, but modified here to match helix highlight scopes based on my best guesstimates. The changes made: - Remove @spell scopes - Split @comment into @comment.line and @comment.block - Replace @comment.documentation with @comment.block.documentation - Replace @character.special with @special - Replace @variable.member with @variable.other.member - Replace @type.definition with @type - Replace @function.member with @function.method - Replace @module with @namespace - Replace @constant.macro with @function.macro - Replace @property with @variable.other.member - Replace @variable.member with @variable.other.member - Replace @variable.parameter.builtin with @variable.builtin - Replace @function.call with @function - Replace @number with @constant.numeric.integer and @constant.numeric.float - Replace @boolean with @constant.builtin.boolean - Replace @keyword.conditional with @keyword.control.conditional - Replace @keyword.return with @keyword.control.return - Replace @keyword.repeate with @keyword.control.repeat - Replace @keyword.import with @keyword.control.import - Replace @keyword.modifier with @keyword.storage.modifier - Replace @keyword.type with @keyword.storage.type - Replace @keyword.exception with @keyword.control.exception - Replace @module.builtin with @namespace
2 months ago
(value_declaration_left
.
[
(_ (identifier) @local.definition)
(_ (_ (identifier) @local.definition))
(_ (_ (_ (identifier) @local.definition)))
(_ (_ (_ (_ (identifier) @local.definition))))
(_ (_ (_ (_ (_ (identifier) @local.definition)))))
(_ (_ (_ (_ (_ (_ (identifier) @local.definition))))))
])
Update fsharp tree sitter repo reference (#11061) The repository reference used here was a fork from the actual repository, which has now been moved under ionide organization, where it is in active maintenance and development. The commit SHA is the currently latest commit from main branch. The injections.scm is copied as is from the fsharp treesitter repo [queries](https://github.com/ionide/tree-sitter-fsharp/blame/main/queries). The locals.scm is copied from the repo and the capture names are to follow the standard names: - Replace @local.definition.var @local.definition.function, and @local.definition.parameter with @local.definition - Remove (#set! "definition.function.scope" "parent") The highlights.scm is copied as well from the fsharp treesitter repo, but modified here to match helix highlight scopes based on my best guesstimates. The changes made: - Remove @spell scopes - Split @comment into @comment.line and @comment.block - Replace @comment.documentation with @comment.block.documentation - Replace @character.special with @special - Replace @variable.member with @variable.other.member - Replace @type.definition with @type - Replace @function.member with @function.method - Replace @module with @namespace - Replace @constant.macro with @function.macro - Replace @property with @variable.other.member - Replace @variable.member with @variable.other.member - Replace @variable.parameter.builtin with @variable.builtin - Replace @function.call with @function - Replace @number with @constant.numeric.integer and @constant.numeric.float - Replace @boolean with @constant.builtin.boolean - Replace @keyword.conditional with @keyword.control.conditional - Replace @keyword.return with @keyword.control.return - Replace @keyword.repeate with @keyword.control.repeat - Replace @keyword.import with @keyword.control.import - Replace @keyword.modifier with @keyword.storage.modifier - Replace @keyword.type with @keyword.storage.type - Replace @keyword.exception with @keyword.control.exception - Replace @module.builtin with @namespace
2 months ago
(function_declaration_left
.
((_) @local.definition)
((argument_patterns
[
(_ (identifier) @local.definition)
(_ (_ (identifier) @local.definition))
(_ (_ (_ (identifier) @local.definition)))
(_ (_ (_ (_ (identifier) @local.definition))))
(_ (_ (_ (_ (_ (identifier) @local.definition)))))
(_ (_ (_ (_ (_ (_ (identifier) @local.definition))))))
])
))