Public Access
changed
This commit is contained in:
+18
-4
@@ -5,14 +5,28 @@ return {
|
||||
},
|
||||
config = function()
|
||||
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({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
formatting.stylua,
|
||||
formatting.black,
|
||||
formatting.isort,
|
||||
formatting.prettier.with({
|
||||
extra_filetypes = { "svelte" },
|
||||
}),
|
||||
prettypst,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -25,6 +25,14 @@ return {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["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')
|
||||
--
|
||||
@@ -33,11 +41,7 @@ return {
|
||||
-- * method: eg 'v' or 'o'
|
||||
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||
-- mapping query_strings to modes.
|
||||
selection_modes = {
|
||||
["@parameter.outer"] = "v", -- charwise
|
||||
["@function.outer"] = "v",
|
||||
["@class.outer"] = "<c-v>", -- blockwise
|
||||
},
|
||||
selection_modes = {},
|
||||
-- If you set this to `true` (default is `false`) then any textobject is
|
||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||
-- whitespace has priority in order to act similarly to eg the built-in
|
||||
|
||||
Reference in New Issue
Block a user