style(nvim): format with stylua

This commit is contained in:
Price Hiller 2023-08-29 22:49:41 -05:00
parent 43e1917bac
commit 376e581ba5
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
9 changed files with 44 additions and 28 deletions

View File

@ -2,8 +2,8 @@ local file_loc = vim.fn.expand("%:p:h")
vim.opt_local.makeprg = "docker build " .. file_loc vim.opt_local.makeprg = "docker build " .. file_loc
vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI"}, { vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI" }, {
callback = function() callback = function()
require("lint").try_lint() require("lint").try_lint()
end end,
}) })

View File

@ -3,5 +3,5 @@ vim.opt_local.shiftwidth = 2
vim.keymap.set("n", "<leader>fr", ":!xdg-open %<CR>", { vim.keymap.set("n", "<leader>fr", ":!xdg-open %<CR>", {
buffer = true, buffer = true,
silent = true silent = true,
}) })

View File

@ -14,9 +14,9 @@ return {
config = function() config = function()
local list_patterns = { local list_patterns = {
unordered = "[-+*]", -- - + * unordered = "[-+*]", -- - + *
digit = "%d+[.)]", -- 1. 2. 3. digit = "%d+[.)]", -- 1. 2. 3.
ascii = "%a[.)]", -- a) b) c) ascii = "%a[.)]", -- a) b) c)
roman = "%u*[.)]", -- I. II. III. roman = "%u*[.)]", -- I. II. III.
} }
require("autolist").setup({ require("autolist").setup({
@ -35,8 +35,8 @@ return {
list_patterns.digit, list_patterns.digit,
list_patterns.ascii, list_patterns.ascii,
list_patterns.roman, list_patterns.roman,
">" ">",
} },
}, },
}) })
local autolist_group = vim.api.nvim_create_augroup("Autolist", {}) local autolist_group = vim.api.nvim_create_augroup("Autolist", {})
@ -120,4 +120,4 @@ return {
}) })
end, end,
}, },
} }

View File

@ -24,7 +24,7 @@ return {
filetype = { filetype = {
markdown = filetypes.markdown.prettierd, markdown = filetypes.markdown.prettierd,
css = filetypes.css.prettierd, css = filetypes.css.prettierd,
lua = filetypes.lua.stylua lua = filetypes.lua.stylua,
}, },
} }
end, end,

View File

@ -2,7 +2,7 @@ return {
{ {
"chrishrb/gx.nvim", "chrishrb/gx.nvim",
keys = { keys = {
{ "gx", desc = "Open filepath or URI" } { "gx", desc = "Open filepath or URI" },
}, },
dependencies = { "nvim-lua/plenary.nvim" }, dependencies = { "nvim-lua/plenary.nvim" },
config = true, -- default settings config = true, -- default settings

View File

@ -1,8 +1,8 @@
return { return {
{ {
'lukas-reineke/headlines.nvim', "lukas-reineke/headlines.nvim",
dependencies = "nvim-treesitter/nvim-treesitter", dependencies = "nvim-treesitter/nvim-treesitter",
config = true, -- or `opts = {}` config = true, -- or `opts = {}`
filetypes = { "markdown", "norg", "rmd", "org" } filetypes = { "markdown", "norg", "rmd", "org" },
} },
} }

View File

@ -11,7 +11,8 @@ return {
"HighlightColorsToggle", "HighlightColorsToggle",
}, },
config = true, config = true,
},{ },
{
"uga-rosa/ccc.nvim", "uga-rosa/ccc.nvim",
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = function() config = function()
@ -24,7 +25,7 @@ return {
}, },
highlighter = { highlighter = {
auto_enable = true, auto_enable = true,
lsp = true lsp = true,
}, },
}) })
end, end,

View File

@ -4,13 +4,13 @@ return {
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = function() config = function()
require("lint").linters_by_ft = { require("lint").linters_by_ft = {
markdown = {"proselint"} markdown = { "proselint" },
} }
vim.api.nvim_create_autocmd({ "BufWritePost", "BufEnter" }, { vim.api.nvim_create_autocmd({ "BufWritePost", "BufEnter" }, {
callback = function() callback = function()
require("lint").try_lint() require("lint").try_lint()
end end,
}) })
end end,
} },
} }

View File

@ -39,7 +39,23 @@ return {
"windwp/nvim-ts-autotag", "windwp/nvim-ts-autotag",
dependencies = { "nvim-treesitter/nvim-treesitter" }, dependencies = { "nvim-treesitter/nvim-treesitter" },
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = true, opts = {
filetypes = {
"astro",
"glimmer",
"handlebars",
"html",
"javascript",
"jsx",
"php",
"rescript",
"svelte",
"tsx",
"typescript",
"vue",
"xml",
},
},
ft = { ft = {
"astro", "astro",
"glimmer", "glimmer",
@ -47,7 +63,6 @@ return {
"html", "html",
"javascript", "javascript",
"jsx", "jsx",
"markdown",
"php", "php",
"rescript", "rescript",
"svelte", "svelte",
@ -105,7 +120,7 @@ return {
"pfeiferj/nvim-hurl", "pfeiferj/nvim-hurl",
config = true, config = true,
}, },
"JoosepAlviste/nvim-ts-context-commentstring" "JoosepAlviste/nvim-ts-context-commentstring",
}, },
config = function() config = function()
local treesitter_dir = vim.fn.stdpath("data") .. "/treesitter" local treesitter_dir = vim.fn.stdpath("data") .. "/treesitter"
@ -160,8 +175,8 @@ return {
enable = true, enable = true,
}, },
context_commentstring = { context_commentstring = {
enable = true enable = true,
} },
}) })
end, end,
}, },