feat: add typst dependencies and make conform use isort

This commit is contained in:
2026-04-25 22:42:23 +02:00
parent 3ab9f0b465
commit 26e9593aab
4 changed files with 11 additions and 5 deletions
+6
View File
@@ -57,6 +57,7 @@ in
astro-language-server astro-language-server
tinymist tinymist
typstyle typstyle
websocat
# ty # ty
# basedpyright # basedpyright
@@ -121,6 +122,11 @@ in
themeName = repoTheme.name; themeName = repoTheme.name;
}; };
typstPreviewDependencies = {
tinymist = "${pkgs.tinymist}/bin/tinymist";
websocat = "${pkgs.websocat}/bin/websocat";
};
}; };
# 5. Wrapper Configuration # 5. Wrapper Configuration
@@ -1,3 +1,5 @@
vim.loader.enable()
require("options") require("options")
require("plugins.lsp") require("plugins.lsp")
require("plugins.completion") require("plugins.completion")
@@ -33,7 +33,7 @@ require("lz.n").load({
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
python = { "isort", "black" }, python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
-- --
-- You can use 'stop_after_first' to run the first available formatter from the list -- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true }, -- javascript = { "prettierd", "prettier", stop_after_first = true },
@@ -46,4 +46,4 @@ require("lz.n").load({
}) })
end, end,
}, },
}) })
@@ -6,9 +6,7 @@ require("lz.n").load({
-- Setup typst-preview -- Setup typst-preview
require("typst-preview").setup({ require("typst-preview").setup({
-- Optionally configure things here -- Optionally configure things here
dependencies_bin = { dependencies_bin = require("nix-info").settings.typstPreviewDependencies,
-- For example, use tinymist as the LSP if that's what you are running
},
}) })
vim.keymap.set("n", "<leader>tp", "<cmd>TypstPreviewToggle<cr>", { desc = "[T]ypst [P]review Toggle" }) vim.keymap.set("n", "<leader>tp", "<cmd>TypstPreviewToggle<cr>", { desc = "[T]ypst [P]review Toggle" })