mirror of
https://github.com/youwen5/neovim-flake.git
synced 2024-11-28 12:13:51 -08:00
Compare commits
4 commits
7bd4bbb0cb
...
6cdb83a772
Author | SHA1 | Date | |
---|---|---|---|
6cdb83a772 | |||
ad551a46f8 | |||
fb308fc6d7 | |||
c7d664b923 |
6 changed files with 100 additions and 65 deletions
|
@ -6,19 +6,5 @@
|
||||||
"TermOpen"
|
"TermOpen"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
# {
|
|
||||||
# command = {
|
|
||||||
# __raw = ''
|
|
||||||
# require('typst-preview').update()
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# event = [
|
|
||||||
# "BufEnter"
|
|
||||||
# "BufWinEnter"
|
|
||||||
# ];
|
|
||||||
# pattern = [
|
|
||||||
# "*.typ"
|
|
||||||
# ];
|
|
||||||
# }
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
nushell.enable = true;
|
nushell.enable = true;
|
||||||
svelte.enable = true;
|
svelte.enable = true;
|
||||||
tailwindcss.enable = true;
|
tailwindcss.enable = true;
|
||||||
typst-lsp.enable = true;
|
tinymist.enable = true;
|
||||||
marksman.enable = true;
|
marksman.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,57 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.delay = 1000;
|
settings.delay = 1000;
|
||||||
};
|
};
|
||||||
nvim-autopairs.enable = true;
|
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)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
yanky = {
|
yanky = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableTelescope = true;
|
enableTelescope = true;
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
require 'typst-preview'.setup {
|
require 'typst-preview'.setup {
|
||||||
dependencies_bin = {
|
dependencies_bin = {
|
||||||
['typst-preview'] = ${pkgs.tinymist},
|
['typst-preview'] = "${pkgs.tinymist}/bin/tinymist",
|
||||||
['websocat'] = ${pkgs.websocat}
|
['websocat'] = "${pkgs.websocat}/bin/websocat"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{ inputs, pkgs, ... }:
|
{ inputs, pkgs, ... }:
|
||||||
{
|
{
|
||||||
plugins.typst-vim.enable = true;
|
|
||||||
extraPlugins = [
|
extraPlugins = [
|
||||||
(pkgs.vimUtils.buildVimPlugin {
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "typst-preview.nvim";
|
name = "typst-preview.nvim";
|
||||||
|
|
92
flake.lock
92
flake.lock
|
@ -56,11 +56,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726153070,
|
"lastModified": 1727826117,
|
||||||
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -77,11 +77,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726153070,
|
"lastModified": 1727826117,
|
||||||
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -95,11 +95,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1726560853,
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -125,11 +125,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725513492,
|
"lastModified": 1728092656,
|
||||||
"narHash": "sha256-tyMUA6NgJSvvQuzB7A1Sf8+0XCHyfSPRx/b00o6K0uo=",
|
"narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "7570de7b9b504cfe92025dd1be797bf546f66528",
|
"rev": "1211305a5b237771e13fcca0c51e60ad47326a9a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -163,11 +163,11 @@
|
||||||
"haskell-tools": {
|
"haskell-tools": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726521542,
|
"lastModified": 1728323645,
|
||||||
"narHash": "sha256-TyqjJohmIwuqMqy01H3sRRcm8okNeWtAfLqX2Ehr9mQ=",
|
"narHash": "sha256-vjzTrqkiVmDUwUfzjzjRC/dFBP8MSMnNymgvxZ15lUw=",
|
||||||
"owner": "mrcjkb",
|
"owner": "mrcjkb",
|
||||||
"repo": "haskell-tools.nvim",
|
"repo": "haskell-tools.nvim",
|
||||||
"rev": "1edf2bb5ced056b5d3d1df783dd02041ce09b087",
|
"rev": "bacbf122d82e70b9000f36d6322d5de1a524ea3c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -184,11 +184,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726357542,
|
"lastModified": 1728041527,
|
||||||
"narHash": "sha256-p4OrJL2weh0TRtaeu1fmNYP6+TOp/W2qdaIJxxQay4c=",
|
"narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e524c57b1fa55d6ca9d8354c6ce1e538d2a1f47f",
|
"rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -221,11 +221,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726188813,
|
"lastModified": 1727999297,
|
||||||
"narHash": "sha256-Vop/VRi6uCiScg/Ic+YlwsdIrLabWUJc57dNczp0eBc=",
|
"narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "21fe31f26473c180390cfa81e3ea81aca0204c80",
|
"rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -236,11 +236,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726463316,
|
"lastModified": 1728018373,
|
||||||
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -252,14 +252,14 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725233747,
|
"lastModified": 1727825735,
|
||||||
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
|
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixvim": {
|
"nixvim": {
|
||||||
|
@ -277,11 +277,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726502324,
|
"lastModified": 1728321376,
|
||||||
"narHash": "sha256-I/WFSIBeIjlY3CgSJ6IRYxP2aEJ6b42Y1HAeATlBh48=",
|
"narHash": "sha256-pEx+lat5gK59sdWn4zt7XW8s9GQC+BbOk2Qw3LY/O+0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "2e3083e42509c399b224239f6d7fa17976b18536",
|
"rev": "cb3c1bfcaf44fd6f0043d916f3a14f666c3364a4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -299,11 +299,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726392886,
|
"lastModified": 1728017046,
|
||||||
"narHash": "sha256-9RtOuG7V8KG8IU8nZje5EQ1WSM/inr7+zb3tAgTiHDM=",
|
"narHash": "sha256-ofWYux/uUAv8wq7sWw8XWke0sh8p4qYxSOn8d+EaJ8c=",
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"repo": "search",
|
"repo": "search",
|
||||||
"rev": "97d34b70deed4878fcb2449ac89dab717d72efa1",
|
"rev": "ba81d9c1eae20fc3a1cd066062a05ac2e799e629",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -315,11 +315,11 @@
|
||||||
"render-markdown": {
|
"render-markdown": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726511696,
|
"lastModified": 1728331543,
|
||||||
"narHash": "sha256-l0k39OXcpoH7D6UmuQy0LNLj+8HCkKz9R/4zVH4bEt0=",
|
"narHash": "sha256-+tpNIQOBDlSkeCNcoTcjmnK+ms5OHBtwr0+4k1tweNk=",
|
||||||
"owner": "MeanderingProgrammer",
|
"owner": "MeanderingProgrammer",
|
||||||
"repo": "render-markdown.nvim",
|
"repo": "render-markdown.nvim",
|
||||||
"rev": "2424693c7a4c79641a7ea1e2a838dbc9238d6066",
|
"rev": "d20d19fa54965f6eb94558c0b84fe9a942169fb4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -344,11 +344,11 @@
|
||||||
"satellite": {
|
"satellite": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725437627,
|
"lastModified": 1727707770,
|
||||||
"narHash": "sha256-5WMKEsS9e9nTuylZ5pRPIW+G/52HKC1bjSdz3GvJg+8=",
|
"narHash": "sha256-WVOYouiEFeLkQBe1Ptazw/mIfzxmaQmOuEK8KlfMYoQ=",
|
||||||
"owner": "lewis6991",
|
"owner": "lewis6991",
|
||||||
"repo": "satellite.nvim",
|
"repo": "satellite.nvim",
|
||||||
"rev": "dfc2b220f4969ebc49b0f2a94ab6faae240705bd",
|
"rev": "ea0a2e92bbb57981043fca334f5b274c0f279238",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -380,11 +380,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725271838,
|
"lastModified": 1727984844,
|
||||||
"narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=",
|
"narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd",
|
"rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -396,11 +396,11 @@
|
||||||
"typst-preview": {
|
"typst-preview": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724595641,
|
"lastModified": 1727642175,
|
||||||
"narHash": "sha256-kJ6IfLSBmJMgEFuCy6fGtqSRBXjt2Aoxu2NW9iyzRLU=",
|
"narHash": "sha256-n0TfcXJLlRXdS6S9dwYHN688IipVSDLVXEqyYs+ROG8=",
|
||||||
"owner": "chomosuke",
|
"owner": "chomosuke",
|
||||||
"repo": "typst-preview.nvim",
|
"repo": "typst-preview.nvim",
|
||||||
"rev": "7ae2b82cf334819494505b772745beb28705b12b",
|
"rev": "0354cc1a7a5174a2e69cdc21c4db9a3ee18bb20a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
Loading…
Reference in a new issue