After this commit (2460f0a702), the `hl_cache` variable
stores the hl_ID instead of the group name.
Another way to get the hl name which is adopted from the method used
here `_get_hl_from_capture`:
```lua
local hl = vim.treesitter.highlighter.hl_map[query.captures[id]]
```
But, as the method covers another case, we can directly use it.
I've also added the type guard so that, in the future, it does not
explode like it does now.
fixes: #1151
* fix: use treesitter language name if available
This will fix the problem where the filetype is different than the
treesitter lang name. Eg., filetyep -> "sh", langname -> "bash"
* refactor: use treesitter only if the query object is available
* refactor: ok -> parser_ok ;)
* something kind of works already
* yayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayayaya
* use async for everything besides live jobs
* fix: fixup autocmds previewer
* fix: lints for prime
* temp: Add example of how we can think about async sorters
* feat: Allow picker to decide when to cancel
* fix: simplify scoring logic and tests
* fixup: name
* fix: Move back towards more backwards compat methods
* fixup: Remove results from opts
* fixup: remove trailing quote
* fixup: Attempt to clean up some more async items. Next is status
* wip: Add todo for when bfredl implements extmarks over the EOL
* wip
* fixup: got em
* fixup: cleaning
* fixup: docs
If you don't want to have a previewer disable it with `:Telescope current_buffer_fuzzy_find previewer=false`
To ignore empty lines do: `:Telescope current_buffer_fuzzy_find skip_empty_lines=true`
* feat: replace_map
* feat: Add action_set and action_state
* fix: Move all actions.get_ to action_state.get_
* fix: replace all internal references of _goto_file_selection_edit
* feat: add some docs
* fix: lint
* feat: actions.select
* remove mentions and usage of goto_file_selection APIs
* feat: special case attach_mappings to be overridable and defaultable
* Having goto_file_selection mappings will cause a error
as well as replacing deprecated goto_file_selection methodes
For config and replacing use this instead:
- actions.select_default
- actions.select_horizonal
- actions.select_vertical
- actions.select_tab
Only replacing:
- actions.set.edit -- for replacing all select functions
* adds actions.state.select_key_to_edit_key
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>