pojokcodeid.nvim-lazy/lua/user/lsp/settings_backup/tsserver.lua
2024-10-20 17:21:07 +07:00

18 lines
445 B
Lua

return {
-- add cmd
cmd = { "typescript-language-server", "--stdio" },
-- add file type support
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
-- add dynamic root dir support
root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
init_options = {
hostInfo = "neovim",
},
}