If you want to use blindFS/topiary-nushell: topiary formatter for nushell, you should do:
cargo install topiary
git clone https://github.com/blindFS/topiary-nushell ($env.XDG_CONFIG_HOME | path join topiary)
$env.TOPIARY_CONFIG_FILE = ($env.XDG_CONFIG_HOME | path join topiary languages.ncl)
$env.TOPIARY_LANGUAGE_DIR = ($env.XDG_CONFIG_HOME | path join topiary languages)
but organizing where topiary-nushell is lazy task for me, so it will do:
- Automatically clone
topiary-nushellon setup and offers:TopiaryNuUpdateto update it. - Automatically set envs for formatter.
- Offers
topiaryformatter via mason. (of course you can manually docargo install topiarytoo)
{
"zknx/topiary-nushell.nvim",
dependencies = {
"stevearc/conform.nvim",
},
ft = "nu",
cmd = "TopiaryNuUpdate",
opts = {},
}or
{
"zknx/topiary-nushell.nvim",
ft = "nu",
cmd = "TopiaryNuUpdate",
opts = {
add_formatter_to_conform = false,
},
} {
"mason-org/mason.nvim",
opts = {
registries = {
"github:mason-org/mason-registry",
"github:zknx/topiary-nushell.nvim",
},
},
},then :MasonInstall topiary should works
vim.lsp.enable("nushell")