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