diff --git a/README.md b/README.md index 30c2725..4669ed5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Neovim plugin that can do sometings like VAssistX. use { 'Kohirus/cppassist.nvim', opt = true, - ft = { "h", "cpp", "hpp", "c", "cc", "cxx" }, + ft = { "h", "cpp", "hpp", "c", "cc", "cxx", "cuda" }, config = function() require("cppassist").setup() end, diff --git a/lua/cppassist/utils.lua b/lua/cppassist/utils.lua index 43b729e..b6ab6c3 100644 --- a/lua/cppassist/utils.lua +++ b/lua/cppassist/utils.lua @@ -104,10 +104,10 @@ function M.ExtensionCmd(extension) else local res = nil local firstch = string.sub(extension, 1, 1) - if firstch == "h" then - res = " -e cpp -e cxx -e c -e cc " - elseif firstch == "c" then - res = " -e h -e hpp -e hxx " + if firstch == "h" or extension == "cuh" then + res = " -e cpp -e cxx -e c -e cc -e cu" + elseif firstch == "c" or extension == "cu" then + res = " -e h -e hpp -e hxx -e cuh" else print("Invalid filetype!") end