Add .config/nvim/lazyvim.json
Update .config/nvim/lua/plugins/none-ls.lua
This commit is contained in:
parent
46e66bc5e3
commit
ec6675e638
9
dot_config/nvim/lazyvim.json
Normal file
9
dot_config/nvim/lazyvim.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "2123"
|
||||||
|
},
|
||||||
|
"version": 2
|
||||||
|
}
|
@ -1,24 +1,24 @@
|
|||||||
local h = require("null-ls.helpers")
|
-- local h = require("-ls.helpers")
|
||||||
local methods = require("null-ls.methods")
|
-- local methods = require("none-ls.methods")
|
||||||
local u = require("null-ls.utils")
|
-- local u = require("none-ls.utils")
|
||||||
|
|
||||||
local FORMATTING = methods.internal.FORMATTING
|
-- local FORMATTING = methods.internal.FORMATTING
|
||||||
|
|
||||||
local leptosfmt = h.make_builtin({
|
-- local leptosfmt = h.make_builtin({
|
||||||
name = "leptosfmt",
|
-- name = "leptosfmt",
|
||||||
meta = {
|
-- meta = {
|
||||||
url = "https://github.com/bram209/leptosfmt",
|
-- url = "https://github.com/bram209/leptosfmt",
|
||||||
description = "A formatter for the leptos view! macro"
|
-- description = "A formatter for the leptos view! macro"
|
||||||
},
|
-- },
|
||||||
method = FORMATTING,
|
-- method = FORMATTING,
|
||||||
filetypes = { "rust" },
|
-- filetypes = { "rust" },
|
||||||
generator_opts = {
|
-- generator_opts = {
|
||||||
command = "leptosfmt",
|
-- command = "leptosfmt",
|
||||||
args = { "--quiet", "--stdin" },
|
-- args = { "--quiet", "--stdin" },
|
||||||
to_stdin = true,
|
-- to_stdin = true,
|
||||||
},
|
-- },
|
||||||
factory = h.formatter_factory,
|
-- factory = h.formatter_factory,
|
||||||
})
|
-- })
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -49,11 +49,11 @@ return {
|
|||||||
extra_args = { "--edition=2021" },
|
extra_args = { "--edition=2021" },
|
||||||
filetypes = { "rust" }
|
filetypes = { "rust" }
|
||||||
}),
|
}),
|
||||||
leptosfmt.with({
|
-- leptosfmt.with({
|
||||||
condition = function(utils)
|
-- condition = function(utils)
|
||||||
return utils.root_has_file({ "leptosfmt.toml" })
|
-- return utils.root_has_file({ "leptosfmt.toml" })
|
||||||
end,
|
-- end,
|
||||||
}),
|
-- }),
|
||||||
nls.builtins.diagnostics.revive,
|
nls.builtins.diagnostics.revive,
|
||||||
nls.builtins.code_actions.impl,
|
nls.builtins.code_actions.impl,
|
||||||
nls.builtins.code_actions.refactoring,
|
nls.builtins.code_actions.refactoring,
|
||||||
|
Loading…
Reference in New Issue
Block a user