File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ function FzfWin:treesitter_attach()
898898 -- line:col:text (grep_curbuf)
899899 -- line<U+00A0>text (lines|blines)
900900 --- @diagnostic disable-next-line : unused-local
901- local filepath , _lnum , text = line_parser (line :sub (min_col ))
901+ local filepath , _lnum , text , _ft = line_parser (line :sub (min_col ))
902902 if not text or text == 0 then return end
903903
904904 text = text :gsub (" ^%d+:" , " " ) -- remove col nr if exists
@@ -916,8 +916,8 @@ function FzfWin:treesitter_attach()
916916 end
917917 end )()
918918
919- local ft = ft_bufnr and vim .bo [tonumber (ft_bufnr )].ft
920- or vim .filetype .match ({ filename = path .tail (filepath ) })
919+ local ft = _ft or ( ft_bufnr and vim .bo [tonumber (ft_bufnr )].ft
920+ or vim .filetype .match ({ filename = path .tail (filepath ) }) )
921921 if not ft then return end
922922
923923 local lang = vim .treesitter .language .get_lang (ft )
You can’t perform that action at this time.
0 commit comments