Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Comments

Make function_complex work#62

Merged
nathom merged 1 commit intonathom:mainfrom
yasuoza:make-function-works
Jan 3, 2022
Merged

Make function_complex work#62
nathom merged 1 commit intonathom:mainfrom
yasuoza:make-function-works

Conversation

@yasuoza
Copy link
Contributor

@yasuoza yasuoza commented Dec 25, 2021

try_lookup returns true when query is in map even if set_filetype
returns false.
For that reason, function_literal using try_lookup works.

On the other hand, function_complex using try_regex did not work
because set_filetype returns false and try_regex returns false.

This commit resolve the issue by make it always return true when regexp matches the absolute_path.
This behavior is consistent with try_lookup.

Conflicts #55 but #55 did not work for me. Sorry #55 worked, but this is backward(explained in README.md) compatibility PR.

`try_lookup` returns true when query is in map even if set_filetype
returns false.
For that reason, `function_literal` using `try_lookup` works.

On the other hand, `function_complex` using `try_regex` did not work
because `set_filetype` returns false and `try_regex` returns false.

This commit resolve the issue by make it always return true when regexp matches the absolute_path.
This behavior is consistent with `try_lookup`.
@nathom nathom merged commit 3cf9ea0 into nathom:main Jan 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants