Compare commits

..

No commits in common. "6cdb83a7722007499fba016f8771379044bcf187" and "7bd4bbb0cb3a9bdac37bb69227ca1a3628272b50" have entirely different histories.

6 changed files with 65 additions and 100 deletions

View file

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

View file

@ -13,7 +13,7 @@
nushell.enable = true;
svelte.enable = true;
tailwindcss.enable = true;
tinymist.enable = true;
typst-lsp.enable = true;
marksman.enable = true;
};
};

View file

@ -18,57 +18,7 @@
enable = true;
settings.delay = 1000;
};
nvim-autopairs = {
enable = true;
luaConfig.post = ''
local npairs = require('nvim-autopairs')
local Rule = require('nvim-autopairs.rule')
local cond = require('nvim-autopairs.conds')
npairs.add_rules({
Rule("$", "$",{"tex", "latex", "typst"})
-- don't add a pair if the next character is %
:with_pair(cond.not_after_regex("%%"))
-- don't add a pair if the previous character is xxx
:with_pair(cond.not_before_regex("xxx", 3))
-- don't move right when repeat character
:with_move(cond.none())
-- don't delete if the next character is xx
:with_del(cond.not_after_regex("xx"))
-- disable adding a newline when you press <cr>
:with_cr(cond.none())
},
{
Rule("_", "_","typst")
-- don't add a pair if the previous character is xxx
:with_pair(cond.not_before_regex("[%w%.]", 3))
-- don't move right when repeat character
:with_move(cond.none())
-- don't delete if the next character is xx
:with_del(cond.not_after_regex("[%w%.]"))
},
{
Rule("*", "*","typst")
-- don't add a pair if the previous character is xxx
:with_pair(cond.not_before_regex("[%w%.]", 3))
-- don't move right when repeat character
:with_move(cond.none())
-- don't delete if the next character is xx
:with_del(cond.not_after_regex("[%w%.]"))
},
{
Rule("$$","$$","tex")
:with_pair(function(opts)
print(vim.inspect(opts))
if opts.line=="aa $$" then
-- don't add pair on that line
return false
end
end)
}
)
'';
};
nvim-autopairs.enable = true;
yanky = {
enable = true;
enableTelescope = true;

View file

@ -8,8 +8,8 @@
require 'typst-preview'.setup {
dependencies_bin = {
['typst-preview'] = "${pkgs.tinymist}/bin/tinymist",
['websocat'] = "${pkgs.websocat}/bin/websocat"
['typst-preview'] = ${pkgs.tinymist},
['websocat'] = ${pkgs.websocat}
}
}

View file

@ -1,5 +1,6 @@
{ inputs, pkgs, ... }:
{
plugins.typst-vim.enable = true;
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
name = "typst-preview.nvim";

View file

@ -56,11 +56,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"lastModified": 1726153070,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
"type": "github"
},
"original": {
@ -77,11 +77,11 @@
]
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"lastModified": 1726153070,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
"type": "github"
},
"original": {
@ -95,11 +95,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -125,11 +125,11 @@
]
},
"locked": {
"lastModified": 1728092656,
"narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=",
"lastModified": 1725513492,
"narHash": "sha256-tyMUA6NgJSvvQuzB7A1Sf8+0XCHyfSPRx/b00o6K0uo=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "1211305a5b237771e13fcca0c51e60ad47326a9a",
"rev": "7570de7b9b504cfe92025dd1be797bf546f66528",
"type": "github"
},
"original": {
@ -163,11 +163,11 @@
"haskell-tools": {
"flake": false,
"locked": {
"lastModified": 1728323645,
"narHash": "sha256-vjzTrqkiVmDUwUfzjzjRC/dFBP8MSMnNymgvxZ15lUw=",
"lastModified": 1726521542,
"narHash": "sha256-TyqjJohmIwuqMqy01H3sRRcm8okNeWtAfLqX2Ehr9mQ=",
"owner": "mrcjkb",
"repo": "haskell-tools.nvim",
"rev": "bacbf122d82e70b9000f36d6322d5de1a524ea3c",
"rev": "1edf2bb5ced056b5d3d1df783dd02041ce09b087",
"type": "github"
},
"original": {
@ -184,11 +184,11 @@
]
},
"locked": {
"lastModified": 1728041527,
"narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
"lastModified": 1726357542,
"narHash": "sha256-p4OrJL2weh0TRtaeu1fmNYP6+TOp/W2qdaIJxxQay4c=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
"rev": "e524c57b1fa55d6ca9d8354c6ce1e538d2a1f47f",
"type": "github"
},
"original": {
@ -221,11 +221,11 @@
]
},
"locked": {
"lastModified": 1727999297,
"narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=",
"lastModified": 1726188813,
"narHash": "sha256-Vop/VRi6uCiScg/Ic+YlwsdIrLabWUJc57dNczp0eBc=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b",
"rev": "21fe31f26473c180390cfa81e3ea81aca0204c80",
"type": "github"
},
"original": {
@ -236,11 +236,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"lastModified": 1726463316,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
"type": "github"
},
"original": {
@ -252,14 +252,14 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"lastModified": 1725233747,
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
}
},
"nixvim": {
@ -277,11 +277,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1728321376,
"narHash": "sha256-pEx+lat5gK59sdWn4zt7XW8s9GQC+BbOk2Qw3LY/O+0=",
"lastModified": 1726502324,
"narHash": "sha256-I/WFSIBeIjlY3CgSJ6IRYxP2aEJ6b42Y1HAeATlBh48=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "cb3c1bfcaf44fd6f0043d916f3a14f666c3364a4",
"rev": "2e3083e42509c399b224239f6d7fa17976b18536",
"type": "github"
},
"original": {
@ -299,11 +299,11 @@
]
},
"locked": {
"lastModified": 1728017046,
"narHash": "sha256-ofWYux/uUAv8wq7sWw8XWke0sh8p4qYxSOn8d+EaJ8c=",
"lastModified": 1726392886,
"narHash": "sha256-9RtOuG7V8KG8IU8nZje5EQ1WSM/inr7+zb3tAgTiHDM=",
"owner": "NuschtOS",
"repo": "search",
"rev": "ba81d9c1eae20fc3a1cd066062a05ac2e799e629",
"rev": "97d34b70deed4878fcb2449ac89dab717d72efa1",
"type": "github"
},
"original": {
@ -315,11 +315,11 @@
"render-markdown": {
"flake": false,
"locked": {
"lastModified": 1728331543,
"narHash": "sha256-+tpNIQOBDlSkeCNcoTcjmnK+ms5OHBtwr0+4k1tweNk=",
"lastModified": 1726511696,
"narHash": "sha256-l0k39OXcpoH7D6UmuQy0LNLj+8HCkKz9R/4zVH4bEt0=",
"owner": "MeanderingProgrammer",
"repo": "render-markdown.nvim",
"rev": "d20d19fa54965f6eb94558c0b84fe9a942169fb4",
"rev": "2424693c7a4c79641a7ea1e2a838dbc9238d6066",
"type": "github"
},
"original": {
@ -344,11 +344,11 @@
"satellite": {
"flake": false,
"locked": {
"lastModified": 1727707770,
"narHash": "sha256-WVOYouiEFeLkQBe1Ptazw/mIfzxmaQmOuEK8KlfMYoQ=",
"lastModified": 1725437627,
"narHash": "sha256-5WMKEsS9e9nTuylZ5pRPIW+G/52HKC1bjSdz3GvJg+8=",
"owner": "lewis6991",
"repo": "satellite.nvim",
"rev": "ea0a2e92bbb57981043fca334f5b274c0f279238",
"rev": "dfc2b220f4969ebc49b0f2a94ab6faae240705bd",
"type": "github"
},
"original": {
@ -380,11 +380,11 @@
]
},
"locked": {
"lastModified": 1727984844,
"narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=",
"lastModified": 1725271838,
"narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64",
"rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd",
"type": "github"
},
"original": {
@ -396,11 +396,11 @@
"typst-preview": {
"flake": false,
"locked": {
"lastModified": 1727642175,
"narHash": "sha256-n0TfcXJLlRXdS6S9dwYHN688IipVSDLVXEqyYs+ROG8=",
"lastModified": 1724595641,
"narHash": "sha256-kJ6IfLSBmJMgEFuCy6fGtqSRBXjt2Aoxu2NW9iyzRLU=",
"owner": "chomosuke",
"repo": "typst-preview.nvim",
"rev": "0354cc1a7a5174a2e69cdc21c4db9a3ee18bb20a",
"rev": "7ae2b82cf334819494505b772745beb28705b12b",
"type": "github"
},
"original": {