We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d56752d commit 5cfaad2Copy full SHA for 5cfaad2
lua/nvim-surround/queries.lua
@@ -42,7 +42,8 @@ M.get_selection = function(capture, type)
42
local treesitter = require("nvim-surround.treesitter")
43
44
local root = treesitter.get_root()
45
- local query = get_query(vim.bo.filetype, type)
+ local language = vim.treesitter.language.get_lang(vim.bo.filetype) or vim.bo.filetype
46
+ local query = get_query(language, type)
47
if root == nil or query == nil then
48
return nil
49
end
0 commit comments