Repository navigation
Open
Description
Not sure what happen, but Far stop working on MacVim when source is ripgrep.
Debug log shows that this line is different between vim and macvim:
macvim:
[21:15:51] invoke res:{'items': []}
vim:
[21:17:15] invoke res:{'items': [{'fname': 'test.txt', 'items': [{'lnum': 1, 'cnum': 1, 'text': 'a'}]}]}
Complete log for both case below:
Vim log
debug enabled!
[21:17:15] =============== FIND ================
[21:17:15] cmdline: a %
[21:17:15] far#find({'pattern': 'a', 'file_mask': '%', 'range': [-1, -1], 'replace_with': 'a'},['--result-preview=0'])
[21:17:15] assemble_context({'pattern': 'a', 'replace_with': 'a', 'range': [-1, -1], 'limit': 1000, 'file_mask': '%', 'cwd': '/Users/apollotang/Desktop/far-debug', 'source': 'rg'},{'highlight_match': 1, 'preview_layout': 'bottom', 'result_preview': '0', 'preview_width': 100, 'layout': 'right', 'preview_height': 11, 'width': 100, 'height': 20, 'auto_preview': 1, 'collapse_result': 0})
[21:17:15] source: {'args': {'cmd': ['rg', '--no-heading', '--column', '--no-messages', '--max-count={limit}', '--smart-case', '--ignore-case', '--glob={file_mask}', '{pattern}'], 'fix_cnum': 'next', 'items_file_min': 30, 'expand_cmdargs': 1}, 'executor': 'py3', 'fn': 'far.sources.shell.search'}
[21:17:15] executor: far#executors#py3#execute
[21:17:15] s:param_proc()
[21:17:15] invoke cmd:['def far_rpc_invoker():', ' import far.sources.shell', ' return far.sources.shell.search({"pattern":"a","replace_with":"a","range":[-1,-1],"limit":1000,"file_mask":"test.txt","cwd":"/Users/apollotang/Desktop/far-debug","source":"rg"},{"cmd":["rg","--no-heading","--column","--no-messages","--max-count={limit}","--smart-case","--ignore-case","--glob={file_mask}","{pattern}"],"fix_cnum":"next","items_file_min":30,"expand_cmdargs":1},[])']
[21:17:15] farpy:search({'pattern': 'a', 'replace_with': 'a', 'range': [-1, -1], 'limit': 1000, 'file_mask': 'test.txt', 'cwd': '/Users/apollotang/Desktop/far-debug', 'source': 'rg'}, {'cmd': ['rg', '--no-heading', '--column', '--no-messages', '--max-count={limit}', '--smart-case', '--ignore-case', '--glob={file_mask}', '{pattern}'], 'fix_cnum': 'next', 'items_file_min': 30, 'expand_cmdargs': 1}, [])
[21:17:15] farpy:cmd:['rg', '--no-heading', '--column', '--no-messages', '--max-count=1000', '--smart-case', '--ignore-case', '--glob=test.txt', 'a']
[21:17:15] farpy:end of proc. break
[21:17:15] invoke res:{'items': [{'fname': 'test.txt', 'items': [{'lnum': 1, 'cnum': 1, 'text': 'a'}]}]}
[21:17:15] assemble_context_callback()
[21:17:15] open_far_buff({'highlight_match': 1, 'preview_layout': 'bottom', 'result_preview': '0', 'preview_width': 100, 'layout': 'right', 'preview_height': 11, 'width': 100, 'height': 20, 'auto_preview': 1, 'collapse_result': 0})
[21:17:15] new bufcmd: botright vertical 100 new FAR\ 1
[21:17:15] apply_default_mappings()
[21:17:15] update_far_buffer(2, 2)
[21:17:15] build_buffer_content(...,{'highlight_match': 1, 'preview_layout': 'bottom', 'result_preview': '0', 'preview_width': 100, 'layout': 'right', 'preview_height': 11, 'width': 60, 'height': 20, 'auto_preview': 1, 'collapse_result': 0})
[21:17:15] content:
[21:17:15] Files:1 Matches:1 Time:0.090ms
[21:17:15] - test.tx/test.txt (1 matches)
[21:17:15] 1 a
[21:17:15] syntax:
[21:17:15] syn match FarNone ".*" contains=FarSearchVal,FarReplaceVal,FarItem
[21:17:15] syn match FarLineCol "^..\d*" contains=FarSearchVal,FarReplaceVal,FarItem
[21:17:15] syn region FarStatusLine start="\%1l^" end="$"
[21:17:15] syn region FarFilePath start="\%2l^.."hs=s+2 end=".\{16\}"
[21:17:15] syn region FarFileStats start="\%2l^.\{20\}"hs=e end="$" contains=FarFilePath keepend
[21:17:15] syn region FarItem matchgroup=FarSearchVal start="\%3l\%8c"rs=s+2,hs=s+1 matchgroup=FarReplaceVal end="" oneline
[21:17:15] resize timer started #5
[21:17:15] far#show_preview_window_under_cursor()
[21:17:17] resizing buf 2 to 59
[21:17:17] update_far_buffer(2, 2)
[21:17:17] build_buffer_content(...,{'highlight_match': 1, 'preview_layout': 'bottom', 'result_preview': '0', 'preview_width': 100, 'layout': 'right', 'preview_height': 11, 'width': 60, 'height': 20, 'auto_preview': 1, 'collapse_result': 0})
[21:17:17] content:
[21:17:17] Files:1 Matches:1 Time:0.090ms
[21:17:17] - test.tx/test.txt (1 matches)
[21:17:17] 1 a
[21:17:17] syntax:
[21:17:17] syn match FarNone ".*" contains=FarSearchVal,FarReplaceVal,FarItem
[21:17:17] syn match FarLineCol "^..\d*" contains=FarSearchVal,FarReplaceVal,FarItem
[21:17:17] syn region FarStatusLine start="\%1l^" end="$"
[21:17:17] syn region FarFilePath start="\%2l^.."hs=s+2 end=".\{16\}"
[21:17:17] syn region FarFileStats start="\%2l^.\{20\}"hs=e end="$" contains=FarFilePath keepend
[21:17:17] syn region FarItem matchgroup=FarSearchVal start="\%3l\%8c"rs=s+2,hs=s+1 matchgroup=FarReplaceVal end="" oneline
MacVim log:
debug enabled!
[21:15:50] =============== FIND ================
[21:15:50] cmdline: a %
[21:15:50] far#find({'pattern': 'a', 'file_mask': '%', 'range': [-1, -1], 'replace_with': 'a'},['--result-preview=0'])
[21:15:50] assemble_context({'pattern': 'a', 'replace_with': 'a', 'range': [-1, -1], 'limit': 1000, 'file_mask': '%', 'cwd': '/Users/apollotang/Desktop/far-debug', 'source': 'rg'},{'highlight_match': 1, 'preview_layout': 'bottom', 'result_preview': '0', 'preview_width': 100, 'layout': 'right', 'preview_height': 11, 'width': 100, 'height': 20, 'auto_preview': 1, 'collapse_result': 0})
[21:15:50] source: {'args': {'cmd': ['rg', '--no-heading', '--column', '--no-messages', '--max-count={limit}', '--smart-case', '--ignore-case', '--glob={file_mask}', '{pattern}'], 'fix_cnum': 'next', 'items_file_min': 30, 'expand_cmdargs': 1}, 'executor': 'py3', 'fn': 'far.sources.shell.search'}
[21:15:50] executor: far#executors#py3#execute
[21:15:51] s:param_proc()
[21:15:51] invoke cmd:['def far_rpc_invoker():', ' import far.sources.shell', ' return far.sources.shell.search({"pattern":"a","replace_with":"a","range":[-1,-1],"limit":1000,"file_mask":"test.txt","cwd":"/Users/apollotang/Desktop/far-debug","source":"rg"},{"cmd":["rg","--no-heading","--column","--no-messages","--max-count={limit}","--smart-case","--ignore-case","--glob={file_mask}","{pattern}"],"fix_cnum":"next","items_file_min":30,"expand_cmdargs":1},[])']
[21:15:51] farpy:search({'pattern': 'a', 'replace_with': 'a', 'range': [-1, -1], 'limit': 1000, 'file_mask': 'test.txt', 'cwd': '/Users/apollotang/Desktop/far-debug', 'source': 'rg'}, {'cmd': ['rg', '--no-heading', '--column', '--no-messages', '--max-count={limit}', '--smart-case', '--ignore-case', '--glob={file_mask}', '{pattern}'], 'fix_cnum': 'next', 'items_file_min': 30, 'expand_cmdargs': 1}, [])
[21:15:51] farpy:cmd:['rg', '--no-heading', '--column', '--no-messages', '--max-count=1000', '--smart-case', '--ignore-case', '--glob=test.txt', 'a']
[21:15:51] farpy:end of proc. break
[21:15:51] invoke res:{'items': []}
[21:15:51] assemble_context_callback()
[21:15:51] open_far_buff({'highlight_match': 1, 'preview_layout': 'bottom', 'result_preview': '0', 'preview_width': 100, 'layout': 'right', 'preview_height': 11, 'width': 100, 'height': 20, 'auto_preview': 1, 'collapse_result': 0})
[21:15:51] new bufcmd: botright vertical 100 new FAR\ 1
[21:15:51] apply_default_mappings()
[21:15:51] update_far_buffer(2, 2)
[21:15:51] build_buffer_content(...,{'highlight_match': 1, 'preview_layout': 'bottom', 'result_preview': '0', 'preview_width': 100, 'layout': 'right', 'preview_height': 11, 'width': 100, 'height': 20, 'auto_preview': 1, 'collapse_result': 0})
[21:15:51] content:
[21:15:51] Files:0 Matches:0 Time:0.090ms
[21:15:51] syntax:
[21:15:51] syn match FarNone ".*" contains=FarSearchVal,FarReplaceVal,FarItem
[21:15:51] syn match FarLineCol "^..\d*" contains=FarSearchVal,FarReplaceVal,FarItem
[21:15:51] syn region FarStatusLine start="\%1l^" end="$"
[21:15:51] resize timer started #6
[21:15:51] far#show_preview_window_under_cursor()
Metadata
Metadata
Assignees
Labels
No labels
Activity
ApolloTang commentedon Apr 16, 2019
for your reference Macvim and vim both work when source is vimgrep the only line different is time:
MacVim:
vim:
Complete log for both case:
macvim:
Vim:
brooth commentedon May 25, 2019
Try to run this command (or change it accordingly) in your terminal to see the actual rg results:
rg --no-heading --column --no-messages --max-count=1000 --smart-case --ignore-case --glob=test.txt aApolloTang commentedon May 26, 2019
Here is the result (screen shot):
atomdmac commentedon Aug 10, 2021
@ApolloTang To clarify: is the issue that
Faris returning0results when you usergas your source? FWIW, I'm using Neovim with thergnvimsource and it returns search results butFardodoesn't appear to do anything. Using the defaultsourcedoes allowFardoto work, however.