diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua new file mode 100644 index 0000000..8c3c318 --- /dev/null +++ b/.config/nvim/lua/plugins/conform.lua @@ -0,0 +1,28 @@ +-- https://github.com/stevearc/conform.nvim + +local function configure_conform() + local conform = require("conform") + -- Keymaps + vim.keymap.set({"n", "v"}, "f", function() conform.format({}) end, {silent = true}) + -- vim.o.formatexpr = "v:lua.require('conform').formatexpr()" + -- Configure conform + local opts = { + formatters_by_ft = { + julia = {"runic"}, + }, + formatters = { + runic = { + command = "runic", + }, + }, + default_format_opts = { + timeout_ms = 10000, + }, + } + conform.setup(opts) +end + +return { + "stevearc/conform.nvim", + config = configure_conform, +}