Public Access
changed
This commit is contained in:
+18
-4
@@ -5,14 +5,28 @@ return {
|
|||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
local formatting = null_ls.builtins.formatting
|
||||||
|
|
||||||
|
local prettypst = {
|
||||||
|
name = "prettypst",
|
||||||
|
method = require("null-ls").methods.FORMATTING,
|
||||||
|
filetypes = { "typst" },
|
||||||
|
generator = require("null-ls.helpers").formatter_factory({
|
||||||
|
command = vim.fn.stdpath("data") .. "/mason/bin/prettypst",
|
||||||
|
args = { "-" },
|
||||||
|
to_stdin = true,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.formatting.stylua,
|
formatting.stylua,
|
||||||
null_ls.builtins.formatting.black,
|
formatting.black,
|
||||||
null_ls.builtins.formatting.isort,
|
formatting.isort,
|
||||||
null_ls.builtins.formatting.prettier.with({
|
formatting.prettier.with({
|
||||||
extra_filetypes = { "svelte" },
|
extra_filetypes = { "svelte" },
|
||||||
}),
|
}),
|
||||||
|
prettypst,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,14 @@ return {
|
|||||||
-- You can use the capture groups defined in textobjects.scm
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
["af"] = "@function.outer",
|
["af"] = "@function.outer",
|
||||||
["if"] = "@function.inner",
|
["if"] = "@function.inner",
|
||||||
|
["ai"] = "@conditional.outer",
|
||||||
|
["ii"] = "@conditional.inner",
|
||||||
|
["ao"] = "@block.outer",
|
||||||
|
["io"] = "@block.inner",
|
||||||
|
["aO"] = "@object.outer",
|
||||||
|
["iO"] = "@object.inner",
|
||||||
|
["aa"] = "@array.outer",
|
||||||
|
["ia"] = "@array.inner",
|
||||||
},
|
},
|
||||||
-- You can choose the select mode (default is charwise 'v')
|
-- You can choose the select mode (default is charwise 'v')
|
||||||
--
|
--
|
||||||
@@ -33,11 +41,7 @@ return {
|
|||||||
-- * method: eg 'v' or 'o'
|
-- * method: eg 'v' or 'o'
|
||||||
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||||
-- mapping query_strings to modes.
|
-- mapping query_strings to modes.
|
||||||
selection_modes = {
|
selection_modes = {},
|
||||||
["@parameter.outer"] = "v", -- charwise
|
|
||||||
["@function.outer"] = "v",
|
|
||||||
["@class.outer"] = "<c-v>", -- blockwise
|
|
||||||
},
|
|
||||||
-- If you set this to `true` (default is `false`) then any textobject is
|
-- If you set this to `true` (default is `false`) then any textobject is
|
||||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||||
-- whitespace has priority in order to act similarly to eg the built-in
|
-- whitespace has priority in order to act similarly to eg the built-in
|
||||||
|
|||||||
Reference in New Issue
Block a user