pojokcodeid.nvim-lazy/lua/user/lsp/settings_backup/tsserver.lua

19 lines
445 B
Lua
Raw Normal View History

2024-03-01 15:19:53 +07:00
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",
},
}