Add .config/nvim/lazyvim.json

Update .config/nvim/lua/plugins/none-ls.lua
This commit is contained in:
Kasper Juul Hermansen 2023-11-09 21:53:43 +01:00
parent 46e66bc5e3
commit ec6675e638
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
2 changed files with 33 additions and 24 deletions

View File

@ -0,0 +1,9 @@
{
"extras": [
],
"news": {
"NEWS.md": "2123"
},
"version": 2
}

View File

@ -1,24 +1,24 @@
local h = require("null-ls.helpers")
local methods = require("null-ls.methods")
local u = require("null-ls.utils")
-- local h = require("-ls.helpers")
-- local methods = require("none-ls.methods")
-- local u = require("none-ls.utils")
local FORMATTING = methods.internal.FORMATTING
-- local FORMATTING = methods.internal.FORMATTING
local leptosfmt = h.make_builtin({
name = "leptosfmt",
meta = {
url = "https://github.com/bram209/leptosfmt",
description = "A formatter for the leptos view! macro"
},
method = FORMATTING,
filetypes = { "rust" },
generator_opts = {
command = "leptosfmt",
args = { "--quiet", "--stdin" },
to_stdin = true,
},
factory = h.formatter_factory,
})
-- local leptosfmt = h.make_builtin({
-- name = "leptosfmt",
-- meta = {
-- url = "https://github.com/bram209/leptosfmt",
-- description = "A formatter for the leptos view! macro"
-- },
-- method = FORMATTING,
-- filetypes = { "rust" },
-- generator_opts = {
-- command = "leptosfmt",
-- args = { "--quiet", "--stdin" },
-- to_stdin = true,
-- },
-- factory = h.formatter_factory,
-- })
return {
@ -49,11 +49,11 @@ return {
extra_args = { "--edition=2021" },
filetypes = { "rust" }
}),
leptosfmt.with({
condition = function(utils)
return utils.root_has_file({ "leptosfmt.toml" })
end,
}),
-- leptosfmt.with({
-- condition = function(utils)
-- return utils.root_has_file({ "leptosfmt.toml" })
-- end,
-- }),
nls.builtins.diagnostics.revive,
nls.builtins.code_actions.impl,
nls.builtins.code_actions.refactoring,