mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix(treesitter): suppress get_parser warnings via opts.error
This commit is contained in:
		
				
					committed by
					
						
						Christian Clason
					
				
			
			
				
	
			
			
			
						parent
						
							7b71fdbc1e
						
					
				
				
					commit
					0f067cd34d
				
			@@ -802,7 +802,7 @@ local function parse_buf(fname, text, parser_path)
 | 
			
		||||
  if parser_path then
 | 
			
		||||
    vim.treesitter.language.add('vimdoc', { path = parser_path })
 | 
			
		||||
  end
 | 
			
		||||
  local lang_tree = assert(vim.treesitter._get_parser(buf), 'vimdoc parser not found.')
 | 
			
		||||
  local lang_tree = assert(vim.treesitter.get_parser(buf, nil, { error = false }))
 | 
			
		||||
  return lang_tree, buf
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user