-- Core plugins that must be in Lua (nfnl compiles Fennel, so it can't be in Fennel) return { { "Olical/nfnl", lazy = false, config = function() -- Create global commands that work without opening a fennel file first local api = require("nfnl.api") vim.api.nvim_create_user_command("NfnlCompileAllFiles", function(opts) api["compile-all-files"](opts.args ~= "" and opts.args or nil) end, { desc = "Compile all Fennel files", nargs = "?", complete = "dir" }) vim.api.nvim_create_user_command("NfnlCompileFile", function(opts) api["compile-file"]({ path = opts.args ~= "" and opts.args or nil }) end, { desc = "Compile current or specified Fennel file", nargs = "?", complete = "file" }) end, }, { "nvim-treesitter/nvim-treesitter", branch = "main", build = ":TSUpdate", config = function() local langs = { "clojure", "fennel", "lua", "vim", "vimdoc", "query" } -- Install parsers asynchronously on first load vim.schedule(function() local ok, ts = pcall(require, "nvim-treesitter") if ok and ts.install then ts.install(langs) end end) -- Enable treesitter highlighting for supported filetypes -- This is required for nvim-paredit to work (needs vim.treesitter.get_node()) vim.api.nvim_create_autocmd("FileType", { pattern = { "clojure", "fennel", "lua", "vim", "query", "scheme", "lisp" }, callback = function() pcall(vim.treesitter.start) end, }) end, }, { "nvim-telescope/telescope.nvim", tag = "0.1.8", dependencies = { "nvim-lua/plenary.nvim" }, keys = { { "ff", "Telescope find_files", desc = "Find files" }, { "fg", "Telescope live_grep", desc = "Live grep" }, { "fb", "Telescope buffers", desc = "Buffers" }, { "fh", "Telescope help_tags", desc = "Help tags" }, }, }, }