diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 3e1afab2519613d946229d3949886dc81d92023d..d7c1b3ec3dc4f4133d407e1aade2f7ba56a62e55 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -39,6 +39,14 @@ local plugins = {
     config = function() require("ztf.configure.dapui") end,
     dependencies = { "mfussenegger/nvim-dap" },
   },
+  {
+    "williamboman/mason.nvim",
+    opts = {
+      ensure_installed = {
+        "tinymist",
+      },
+    },
+  },
   -- rust
   {
     'simrat39/rust-tools.nvim',
diff --git a/.config/nvim/lua/ztf/lsp.lua b/.config/nvim/lua/ztf/lsp.lua
index 9f77063e26c0b6ed4c7c996c62acf1542a483778..b335c1ca5e824c05d24d327bf558b32edce474b9 100644
--- a/.config/nvim/lua/ztf/lsp.lua
+++ b/.config/nvim/lua/ztf/lsp.lua
@@ -14,22 +14,33 @@ local configs = require 'lspconfig.configs'
 
 lspconfig.gopls.setup {}
 
-lspconfig.typst_lsp.setup{
-  root_dir = function(path)
-    local strip_dir_pat = '/([^/]+)$'
-    local strip_sep_pat = '/$'
-    if not path or #path == 0 then
-      return
-    end
-    local result = path:gsub(strip_sep_pat, ''):gsub(strip_dir_pat, '')
-    if #result == 0 then
-      if vim.loop.os_uname().version:match 'Windows' then
-        return path:sub(1, 2):upper()
-      else
-        return '/'
-      end
-    end
-    return result
+-- lspconfig.typst_lsp.setup {
+--   root_dir = function(path)
+--     local strip_dir_pat = '/([^/]+)$'
+--     local strip_sep_pat = '/$'
+--     if not path or #path == 0 then
+--       return
+--     end
+--     local result = path:gsub(strip_sep_pat, ''):gsub(strip_dir_pat, '')
+--     if #result == 0 then
+--       if vim.loop.os_uname().version:match 'Windows' then
+--         return path:sub(1, 2):upper()
+--       else
+--         return '/'
+--       end
+--     end
+--     return result
+--   end,
+-- }
+
+-- tinymist is an LS for typst
+lspconfig.tinymist.setup {
+  settings = {
+    exportPdf = "onType",
+    outputPath = "$dir/live/$name",
+  },
+  root_dir = function(fname)
+    return lspconfig.util.path.dirname(fname)
   end,
 }
 lspconfig.vimls.setup {}