added typst

This commit is contained in:
gwslingerland 2026-01-08 14:24:17 +01:00
parent ed984140f4
commit aacc7a510c
2 changed files with 32 additions and 2 deletions

View File

@ -3,3 +3,6 @@ local opt = vim.opt_local
opt.wrap = true opt.wrap = true
opt.linebreak = true opt.linebreak = true
opt.textwidth = 0 opt.textwidth = 0
opt.spell = true
opt.spelllang = { 'en_gb' }

View File

@ -710,7 +710,32 @@ require('lazy').setup({
}, },
}, },
}, },
tinymist = {},
tinymist = {
on_attach = function(client, bufnr)
vim.keymap.set('n', '<leader>tp', function()
client:exec_cmd({
title = 'pin',
command = 'tinymist.pinMain',
arguments = { vim.api.nvim_buf_get_name(0) },
}, { bufnr = bufnr })
end, { desc = '[T]inymist [P]in', noremap = true })
vim.keymap.set('n', '<leader>tu', function()
client:exec_cmd({
title = 'unpin',
command = 'tinymist.pinMain',
arguments = { vim.v.null },
}, { bufnr = bufnr })
end, { desc = '[T]inymist [U]npin', noremap = true })
end,
},
} }
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
@ -729,6 +754,7 @@ require('lazy').setup({
local ensure_installed = vim.tbl_keys(servers or {}) local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, { vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code 'stylua', -- Used to format Lua code
'typstyle',
}) })
require('mason-tool-installer').setup { ensure_installed = ensure_installed } require('mason-tool-installer').setup { ensure_installed = ensure_installed }
@ -781,6 +807,7 @@ require('lazy').setup({
end, end,
formatters_by_ft = { formatters_by_ft = {
lua = { 'stylua' }, lua = { 'stylua' },
typst = { 'typstyle' },
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" }, -- python = { "isort", "black" },
-- --
@ -941,7 +968,7 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter` -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = { opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'typst' },
-- Autoinstall languages that are not installed -- Autoinstall languages that are not installed
auto_install = true, auto_install = true,
highlight = { highlight = {