feat(typescript): add typescriptreact/javascriptreact to types

This commit is contained in:
OneOfOne 2023-10-03 11:30:24 -05:00
parent 3acdac917b
commit 7beb18c8cb
No known key found for this signature in database
GPG key ID: F3A4E8B6760B7805

View file

@ -1,3 +1,11 @@
local fmt_opts = {
format = {
indentSize = vim.o.shiftwidth,
convertTabsToSpaces = vim.o.expandtab,
tabSize = vim.o.tabstop,
},
}
return {
-- add typescript to treesitter
@ -34,20 +42,10 @@ return {
},
},
settings = {
typescript = {
format = {
indentSize = vim.o.shiftwidth,
convertTabsToSpaces = vim.o.expandtab,
tabSize = vim.o.tabstop,
},
},
javascript = {
format = {
indentSize = vim.o.shiftwidth,
convertTabsToSpaces = vim.o.expandtab,
tabSize = vim.o.tabstop,
},
},
typescript = fmt_opts,
javascript = fmt_opts,
typescriptreact = fmt_opts,
javascriptreact = fmt_opts,
completions = {
completeFunctionCalls = true,
},
@ -86,7 +84,7 @@ return {
},
}
end
for _, language in ipairs({ "typescript", "javascript" }) do
for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do
if not dap.configurations[language] then
dap.configurations[language] = {
{