From 26bb56eba8de39a2ba8bdea3cb906b6e0d74b996 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Tue, 26 Nov 2024 04:49:57 +0100 Subject: [PATCH] languages/typst: fixed callback error with non-english characters --- modules/plugins/languages/typst.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/typst.nix b/modules/plugins/languages/typst.nix index 45b6a70f..510b70cd 100644 --- a/modules/plugins/languages/typst.nix +++ b/modules/plugins/languages/typst.nix @@ -21,7 +21,10 @@ lspConfig = '' lspconfig.typst_lsp.setup { capabilities = capabilities, - on_attach = default_on_attach, + on_attach = function(client, bufnr) + -- Disable semantic tokens if the issue persists + client.server_capabilities.semanticTokensProvider = nil + end, cmd = ${ if isList cfg.lsp.package then expToLua cfg.lsp.package @@ -36,7 +39,10 @@ lspconfig.tinymist.setup { capabilities = capabilities, single_file_support = true, - on_attach = default_on_attach, + on_attach = function(client, bufnr) + -- Disable semantic tokens if the issue persists + client.server_capabilities.semanticTokensProvider = nil + end, cmd = ${ if isList cfg.lsp.package then expToLua cfg.lsp.package