feat: add typst preview

This commit is contained in:
Youwen Wu 2024-09-27 14:49:02 -07:00
parent 88462d0794
commit da19031199
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
6 changed files with 48 additions and 1 deletions

View file

@ -6,5 +6,19 @@
"TermOpen"
];
}
# {
# command = {
# __raw = ''
# require('typst-preview').update()
# '';
# };
# event = [
# "BufEnter"
# "BufWinEnter"
# ];
# pattern = [
# "*.typ"
# ];
# }
];
}

View file

@ -17,6 +17,7 @@
standalonePlugins = [
"nvim-treesitter"
"vimplugin-treesitter-grammar-nix"
"vimplugin-typst-preview.nvim"
];
};
byteCompileLua = {

View file

@ -9,5 +9,6 @@
./misc.nix
./navigation.nix
./treesitter.nix
./typst.nix
];
}

10
config/plugins/typst.nix Normal file
View file

@ -0,0 +1,10 @@
{ inputs, pkgs, ... }:
{
plugins.typst-vim.enable = true;
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
name = "typst-preview.nvim";
src = inputs.typst-preview;
})
];
}

View file

@ -337,7 +337,8 @@
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"render-markdown": "render-markdown",
"satellite": "satellite"
"satellite": "satellite",
"typst-preview": "typst-preview"
}
},
"satellite": {
@ -391,6 +392,22 @@
"repo": "treefmt-nix",
"type": "github"
}
},
"typst-preview": {
"flake": false,
"locked": {
"lastModified": 1724595641,
"narHash": "sha256-kJ6IfLSBmJMgEFuCy6fGtqSRBXjt2Aoxu2NW9iyzRLU=",
"owner": "chomosuke",
"repo": "typst-preview.nvim",
"rev": "7ae2b82cf334819494505b772745beb28705b12b",
"type": "github"
},
"original": {
"owner": "chomosuke",
"repo": "typst-preview.nvim",
"type": "github"
}
}
},
"root": "root",

View file

@ -30,6 +30,10 @@
url = "github:Eandrju/cellular-automaton.nvim";
flake = false;
};
typst-preview = {
url = "github:chomosuke/typst-preview.nvim";
flake = false;
};
};
outputs =