mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(typescript): add typescriptreact/javascriptreact to types
This commit is contained in:
parent
3acdac917b
commit
7beb18c8cb
1 changed files with 13 additions and 15 deletions
|
|
@ -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] = {
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue