From 7f5bfed9f03acb969c2858558ae5dd9ed9a98a9d Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 26 Dec 2023 12:59:58 +0900 Subject: [PATCH 1/2] new: nvim: config for typst --- dotfiles/neovim/init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index da5e70a..14b20d2 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -97,7 +97,7 @@ require('lazy').setup({ }, { 'kdheepak/cmp-latex-symbols', -- latex math - ft = { 'julia', }, + ft = { 'julia', 'typst', }, }, { "nvim-treesitter/nvim-treesitter", @@ -166,6 +166,7 @@ vim.filetype.add { saty = 'satysfi', satyh = 'satysfi', satyg = 'satysfi', + typ = 'typst', }, pattern = { ['.*%.satyh%-%a+'] = 'satysfi', @@ -585,6 +586,12 @@ lspconfig.powershell_es.setup { -- cmd = {'omnisharp'}, -- } +lspconfig.typst_lsp.setup { + on_attach = on_attach, + capabilities = capabilities, + single_file_support = true, +} + local lss = { "pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake", "csharp_ls", "html", "r_language_server", } for _, ls in pairs(lss) do From 8bd8447734862607dba439e54433da2eb503bbd2 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Wed, 7 Feb 2024 21:19:04 +0900 Subject: [PATCH 2/2] neovim: typst: option for typst --- dotfiles/neovim/after/ftplugin/typst.lua | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 dotfiles/neovim/after/ftplugin/typst.lua diff --git a/dotfiles/neovim/after/ftplugin/typst.lua b/dotfiles/neovim/after/ftplugin/typst.lua new file mode 100644 index 0000000..530b84c --- /dev/null +++ b/dotfiles/neovim/after/ftplugin/typst.lua @@ -0,0 +1,2 @@ +vim.o.tabstop = 2 +vim.o.shiftwidth = 2