mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	fix(treesitter): support subfiletypes in get_lang (#23605)
This commit is contained in:
		@@ -27,6 +27,11 @@ function M.get_lang(filetype)
 | 
			
		||||
  if filetype == '' then
 | 
			
		||||
    return
 | 
			
		||||
  end
 | 
			
		||||
  if ft_to_lang[filetype] then
 | 
			
		||||
    return ft_to_lang[filetype]
 | 
			
		||||
  end
 | 
			
		||||
  -- support subfiletypes like html.glimmer
 | 
			
		||||
  filetype = vim.split(filetype, '.', { plain = true })[1]
 | 
			
		||||
  return ft_to_lang[filetype]
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user