This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

nvim: add new treefmt-nix none-ls plugin

+17
+17
tools/nvim.nix
··· 40 40 extraConfigLua = '' 41 41 local null_ls = require("null-ls") 42 42 local helpers = require("null-ls.helpers") 43 + local utils = require("null-ls.utils") 43 44 44 45 local treefmt_nix = { 45 46 method = null_ls.methods.FORMATTING, ··· 48 49 command = "treefmt", 49 50 args = { "--allow-missing-formatter", "--stdin", "$FILENAME" }, 50 51 to_stdin = true, 52 + runtime_condition = function() 53 + return utils.is_executable("treefmt") 54 + end, 55 + }), 56 + } 57 + 58 + local treefmt_nix2 = { 59 + method = null_ls.methods.FORMATTING, 60 + filetypes = {}, 61 + generator = helpers.formatter_factory({ 62 + command = "treefmt-nix", 63 + args = { "--allow-missing-formatter", "--stdin", "$FILENAME" }, 64 + to_stdin = true, 65 + runtime_condition = function() 66 + return utils.is_executable("treefmt-nix") 67 + end, 51 68 }), 52 69 } 53 70